mirror of
https://github.com/paralus/paralus.git
synced 2026-08-24 15:47:19 +00:00
refactor: remove unused func/var/methods (#315)
Signed-off-by: Dhruv Jain <92215138+jaydee029@users.noreply.github.com>
This commit is contained in:
@@ -3,7 +3,6 @@ package server
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"sort"
|
||||
"time"
|
||||
|
||||
"github.com/paralus/paralus/internal/constants"
|
||||
@@ -211,18 +210,6 @@ func NewKubeConfigServer(bs service.BootstrapService, aps service.AccountPermiss
|
||||
return &kubeConfigServer{bs, aps, gps, kss, krs, pf, ksvc, os, ps, al}
|
||||
}
|
||||
|
||||
func checkOrgAdmin(groups []string) bool {
|
||||
orgGrp := "Organization Admins"
|
||||
sort.Strings(groups)
|
||||
indx := sort.SearchStrings(groups, orgGrp)
|
||||
if indx < len(groups) {
|
||||
if groups[indx] == orgGrp {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (s *kubeConfigServer) RevokeKubeconfigSSO(ctx context.Context, req *sentryrpc.RevokeKubeconfigRequest) (*sentryrpc.RevokeKubeconfigResponse, error) {
|
||||
opts := req.Opts
|
||||
accountID, err := query.GetAccountID(opts)
|
||||
|
||||
@@ -44,10 +44,6 @@ type relayObject struct {
|
||||
|
||||
// relayPeerService relay peer service
|
||||
type relayPeerService struct {
|
||||
cert []byte // rpc server certifciate
|
||||
key []byte // rpc server key
|
||||
rootCA []byte // rpc rootCA to verify client certificates.
|
||||
port int
|
||||
|
||||
//ServiceUUID ...
|
||||
ServiceUUID string
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
package server
|
||||
|
||||
import (
|
||||
v3 "github.com/paralus/paralus/proto/types/commonpb/v3"
|
||||
|
||||
"google.golang.org/protobuf/types/known/timestamppb"
|
||||
)
|
||||
|
||||
func getStatus(err error) *v3.Status {
|
||||
if err != nil {
|
||||
return &v3.Status{
|
||||
ConditionStatus: v3.ConditionStatus_StatusFailed,
|
||||
LastUpdated: timestamppb.Now(),
|
||||
Reason: err.Error(),
|
||||
}
|
||||
}
|
||||
return &v3.Status{
|
||||
ConditionStatus: v3.ConditionStatus_StatusOK,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user