manager

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 15, 2024 License: Apache-2.0 Imports: 29 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidUserID = errors.New("invalid user id")

Functions

func GetOrgID

func GetOrgID(req *http.Request) (uint64, error)

func GetOrgIDStr

func GetOrgIDStr(req *http.Request) (string, error)

func IsManager

func IsManager(bdl *bundle.Bundle, userID string, scopeType apistructs.ScopeType, scopeID string) error

func NewBundle

func NewBundle() *bundle.Bundle

func OrgPermCheck

func OrgPermCheck(bdl *bundle.Bundle, userID, orgID, action string) error

func PermissionCheck

func PermissionCheck(bdl *bundle.Bundle, userID, orgID, projectID, action string) error

PermissionCheck Permission check

Types

type AdminManager

type AdminManager struct {
	// contains filtered or unexported fields
}

func NewAdminManager

func NewAdminManager(options ...Option) *AdminManager

func (*AdminManager) AppendAdminEndpoint

func (am *AdminManager) AppendAdminEndpoint()

func (*AdminManager) AppendApproveEndpoint

func (am *AdminManager) AppendApproveEndpoint()

func (*AdminManager) AppendAuditEndpoint

func (am *AdminManager) AppendAuditEndpoint()

func (*AdminManager) AppendClusterEndpoint

func (am *AdminManager) AppendClusterEndpoint()

func (*AdminManager) AppendHostEndpoint

func (am *AdminManager) AppendHostEndpoint()

func (*AdminManager) AppendNoticeEndpoint

func (am *AdminManager) AppendNoticeEndpoint()

func (*AdminManager) AppendUserEndpoint

func (am *AdminManager) AppendUserEndpoint()

func (*AdminManager) CreateNotice

func (am *AdminManager) CreateNotice(contenxt context.Context, req *http.Request, resources map[string]string) (httpserver.Responser, error)

func (*AdminManager) DeleteNotice

func (am *AdminManager) DeleteNotice(contenxt context.Context, req *http.Request, resources map[string]string) (httpserver.Responser, error)

func (*AdminManager) DereferenceCluster

func (am *AdminManager) DereferenceCluster(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

func (*AdminManager) ExportExcelAudit

func (am *AdminManager) ExportExcelAudit(
	ctx context.Context, w http.ResponseWriter,
	req *http.Request, resources map[string]string) error

func (*AdminManager) GetApprove

func (am *AdminManager) GetApprove(contenxt context.Context, req *http.Request, resources map[string]string) (httpserver.Responser, error)

func (*AdminManager) GetHost

func (am *AdminManager) GetHost(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

func (*AdminManager) HealthyCheck

func (am *AdminManager) HealthyCheck(
	ctx context.Context, r *http.Request,
	vars map[string]string) (httpserver.Responser, error)

func (*AdminManager) InspectCluster

func (am *AdminManager) InspectCluster(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

func (*AdminManager) ListApprove

func (am *AdminManager) ListApprove(contenxt context.Context, req *http.Request, resources map[string]string) (httpserver.Responser, error)

func (*AdminManager) ListAudits

func (am *AdminManager) ListAudits(ctx context.Context, req *http.Request, vars map[string]string) (httpserver.Responser, error)

func (*AdminManager) ListCluster

func (am *AdminManager) ListCluster(ctx context.Context, req *http.Request, resources map[string]string) (httpserver.Responser, error)

func (*AdminManager) ListNotice

func (am *AdminManager) ListNotice(contenxt context.Context, req *http.Request, resources map[string]string) (httpserver.Responser, error)

func (*AdminManager) ListUser

func (am *AdminManager) ListUser(ctx context.Context, req *http.Request, resources map[string]string) (httpserver.Responser, error)

func (*AdminManager) PublishNotice

func (am *AdminManager) PublishNotice(contenxt context.Context, req *http.Request, resources map[string]string) (httpserver.Responser, error)

func (*AdminManager) Routers

func (am *AdminManager) Routers() []httpserver.Endpoint

func (*AdminManager) SearchUser

func (am *AdminManager) SearchUser(ctx context.Context, req *http.Request, resources map[string]string) (httpserver.Responser, error)

func (*AdminManager) UnpublishNotice

func (am *AdminManager) UnpublishNotice(contenxt context.Context, req *http.Request, resources map[string]string) (httpserver.Responser, error)

func (*AdminManager) UpdateApprove

func (am *AdminManager) UpdateApprove(contenxt context.Context, req *http.Request, resources map[string]string) (httpserver.Responser, error)

func (*AdminManager) UpdateNotice

func (am *AdminManager) UpdateNotice(contenxt context.Context, req *http.Request, resources map[string]string) (httpserver.Responser, error)

type ClusterInfoResponse

type ClusterInfoResponse struct {
	Id             int32                 `json:"id"`
	Name           string                `json:"name"`
	DisplayName    string                `json:"displayName"`
	Type           string                `json:"type"`
	Description    string                `json:"description"`
	WildcardDomain string                `json:"wildcardDomain"`
	SchedConfig    *SchedConfigResponse  `json:"schedConfig"`
	ManageConfig   *ManageConfigResponse `json:"manageConfig"`
}

type ManageConfigResponse

type ManageConfigResponse struct {
	Address          string `json:"address"`
	CredentialSource string `json:"credentialSource"`
}

type Option

type Option func(am *AdminManager)

func WithBundle

func WithBundle(bundle *bundle.Bundle) Option

func WithClusterSvc

func WithClusterSvc(clusterSvc clusterpb.ClusterServiceServer) Option

func WithDB

func WithDB(db *dao.DBClient) Option

func WithETCDStore

func WithETCDStore(etcdStore *etcd.Store) Option

func WithOrg

func WithOrg(org org.Interface) Option

type SchedConfigResponse

type SchedConfigResponse struct {
	CpuSubscribeRatio        string `json:"cpuSubscribeRatio"`
	DevCPUSubscribeRatio     string `json:"devCPUSubscribeRatio"`
	TestCPUSubscribeRatio    string `json:"testCPUSubscribeRatio"`
	StagingCPUSubscribeRatio string `json:"stagingCPUSubscribeRatio"`
}

type USERID

type USERID string

func (USERID) Invalid

func (uid USERID) Invalid() bool

Invalid return UserID is valid or invalid

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL