Documentation ¶
Index ¶
- Constants
- func Failure(context httpserver.Context, ctx interface{})
- func FiexdValue(v string) func(ctx httpserver.Context) (string, error)
- func Intercepter(scope interface{}, id ValueGetter, resource interface{}, action Action, ...) httpserver.Interceptor
- func OrgIDByCluster(orgServer orgpb.OrgServiceServer, key string) func(ctx httpserver.Context) (string, error)
- func OrgIDByClusterWrapper(orgServer orgpb.OrgServiceServer, key string) func(ctx context.Context, req interface{}) (string, error)
- func OrgIDByOrgName(key string) func(ctx httpserver.Context) (string, error)
- func OrgIDFromHeader() func(ctx httpserver.Context) (string, error)
- func OrgIDFromQuery(key string) func(ctx httpserver.Context) (string, error)
- func PathValue(keys ...string) func(ctx httpserver.Context) (string, error)
- func ProjectId(r *http.Request) string
- func ProjectIdFromParams() func(ctx httpserver.Context) (string, error)
- func QueryValue(keys ...string) func(ctx httpserver.Context) (string, error)
- func ScopeIdFromParams(db *table.DB) func(ctx httpserver.Context) (string, error)
- func TenantGroupFromParams(db *table.DB) func(ctx httpserver.Context) (string, error)
- func Tk(r *http.Request) string
- func TkFromParams(db *table.DB) func(ctx httpserver.Context) (string, error)
- type Action
- type MonitorPermission
- type Scope
- type ValueGetter
Constants ¶
View Source
const ( ScopeSys = "sys" ScopeOrg = "org" ScopeProject = "project" ScopeApp = "app" ScopePublisher = "publisher" ScopeMicroService = "micro_service" )
Scope values
View Source
const ( ActionCreate = "CREATE" ActionDelete = "DELETE" ActionUpdate = "UPDATE" ActionGet = "GET" ActionList = "LIST" ActionOperate = "OPERATE" )
Action values
Variables ¶
This section is empty.
Functions ¶
func FiexdValue ¶
func FiexdValue(v string) func(ctx httpserver.Context) (string, error)
FiexdValue .
func Intercepter ¶
func Intercepter(scope interface{}, id ValueGetter, resource interface{}, action Action, org org.ClientInterface) httpserver.Interceptor
Interceptor .
func OrgIDByCluster ¶
func OrgIDByCluster(orgServer orgpb.OrgServiceServer, key string) func(ctx httpserver.Context) (string, error)
OrgIDByCluster .
func OrgIDByClusterWrapper ¶
func OrgIDByClusterWrapper(orgServer orgpb.OrgServiceServer, key string) func(ctx context.Context, req interface{}) (string, error)
wrap the new pkg.permission.ValueGetter
func OrgIDByOrgName ¶
func OrgIDByOrgName(key string) func(ctx httpserver.Context) (string, error)
OrgIDByOrgName .
func OrgIDFromHeader ¶
func OrgIDFromHeader() func(ctx httpserver.Context) (string, error)
OrgIDFromHeader .
func OrgIDFromQuery ¶
func OrgIDFromQuery(key string) func(ctx httpserver.Context) (string, error)
OrgIDFromQuery .
func PathValue ¶
func PathValue(keys ...string) func(ctx httpserver.Context) (string, error)
PathValue .
func ProjectIdFromParams ¶
func ProjectIdFromParams() func(ctx httpserver.Context) (string, error)
func QueryValue ¶
func QueryValue(keys ...string) func(ctx httpserver.Context) (string, error)
QueryValue .
func ScopeIdFromParams ¶
func TenantGroupFromParams ¶
func TkFromParams ¶
Types ¶
type MonitorPermission ¶
type MonitorPermission struct {
Name string
}
Click to show internal directories.
Click to hide internal directories.