Versions in this module Expand all Collapse all v1 v1.0.1 Aug 15, 2024 Changes in this version + var ErrInvalidUserID = errors.New("invalid user id") + func GetOrgID(req *http.Request) (uint64, error) + func GetOrgIDStr(req *http.Request) (string, error) + func IsManager(bdl *bundle.Bundle, userID string, scopeType apistructs.ScopeType, ...) error + func NewBundle() *bundle.Bundle + func OrgPermCheck(bdl *bundle.Bundle, userID, orgID, action string) error + func PermissionCheck(bdl *bundle.Bundle, userID, orgID, projectID, action string) error + type AdminManager struct + func NewAdminManager(options ...Option) *AdminManager + func (am *AdminManager) AppendAdminEndpoint() + func (am *AdminManager) AppendApproveEndpoint() + func (am *AdminManager) AppendAuditEndpoint() + func (am *AdminManager) AppendClusterEndpoint() + func (am *AdminManager) AppendHostEndpoint() + func (am *AdminManager) AppendNoticeEndpoint() + func (am *AdminManager) AppendUserEndpoint() + func (am *AdminManager) CreateNotice(contenxt context.Context, req *http.Request, resources map[string]string) (httpserver.Responser, error) + func (am *AdminManager) DeleteNotice(contenxt context.Context, req *http.Request, resources map[string]string) (httpserver.Responser, error) + func (am *AdminManager) DereferenceCluster(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error) + func (am *AdminManager) ExportExcelAudit(ctx context.Context, w http.ResponseWriter, req *http.Request, ...) error + func (am *AdminManager) GetApprove(contenxt context.Context, req *http.Request, resources map[string]string) (httpserver.Responser, error) + func (am *AdminManager) GetHost(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error) + func (am *AdminManager) HealthyCheck(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error) + func (am *AdminManager) InspectCluster(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error) + func (am *AdminManager) ListApprove(contenxt context.Context, req *http.Request, resources map[string]string) (httpserver.Responser, error) + func (am *AdminManager) ListAudits(ctx context.Context, req *http.Request, vars map[string]string) (httpserver.Responser, error) + func (am *AdminManager) ListCluster(ctx context.Context, req *http.Request, resources map[string]string) (httpserver.Responser, error) + func (am *AdminManager) ListNotice(contenxt context.Context, req *http.Request, resources map[string]string) (httpserver.Responser, error) + func (am *AdminManager) ListUser(ctx context.Context, req *http.Request, resources map[string]string) (httpserver.Responser, error) + func (am *AdminManager) PublishNotice(contenxt context.Context, req *http.Request, resources map[string]string) (httpserver.Responser, error) + func (am *AdminManager) Routers() []httpserver.Endpoint + func (am *AdminManager) SearchUser(ctx context.Context, req *http.Request, resources map[string]string) (httpserver.Responser, error) + func (am *AdminManager) UnpublishNotice(contenxt context.Context, req *http.Request, resources map[string]string) (httpserver.Responser, error) + func (am *AdminManager) UpdateApprove(contenxt context.Context, req *http.Request, resources map[string]string) (httpserver.Responser, error) + func (am *AdminManager) UpdateNotice(contenxt context.Context, req *http.Request, resources map[string]string) (httpserver.Responser, error) + type ClusterInfoResponse struct + Description string + DisplayName string + Id int32 + ManageConfig *ManageConfigResponse + Name string + SchedConfig *SchedConfigResponse + Type string + WildcardDomain string + type ManageConfigResponse struct + Address string + CredentialSource string + type Option func(am *AdminManager) + func WithBundle(bundle *bundle.Bundle) Option + func WithClusterSvc(clusterSvc clusterpb.ClusterServiceServer) Option + func WithDB(db *dao.DBClient) Option + func WithETCDStore(etcdStore *etcd.Store) Option + func WithOrg(org org.Interface) Option + type SchedConfigResponse struct + CpuSubscribeRatio string + DevCPUSubscribeRatio string + StagingCPUSubscribeRatio string + TestCPUSubscribeRatio string + type USERID string + func (uid USERID) Invalid() bool