manager

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2021 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetOrgID

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

func GetOrgIDStr added in v1.4.0

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

func IsManager added in v1.4.0

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

func NewBundle

func NewBundle() *bundle.Bundle

func OrgPermCheck added in v1.4.0

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

func PermissionCheck added in v1.4.0

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 Option

type Option func(am *AdminManager)

func WithBundle

func WithBundle(bundle *bundle.Bundle) Option

func WithDB

func WithDB(db *dao.DBClient) Option

func WithETCDStore

func WithETCDStore(etcdStore *etcd.Store) Option

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