Documentation ¶
Index ¶
- Constants
- Variables
- func InitAppPath(appID string, owner, ownerName string, header http.Header) error
- func MakeRequestPath(namespacePath string) string
- func Path(appID string, typ string) string
- func RootPath(appID string) string
- func SplitAsAppPath(fullPath string) (string, string, error)
- func ValidateAPIPath(owner, callerPath, referPath string) error
- func ValidateAppAccessPermit(fullNamespace string, header http.Header, writterAPI bool) error
- func ValidateNamespace(owner string, op adaptor.Operation, fullPath string) error
- func ValidateServicePath(owner string, op adaptor.Operation, servicePath string) error
- type NamespaceDefine
Constants ¶
View Source
const ( RootOfAPPs = "/system/app" RootOfFaas = "/system/faas" ServiceForm = "form" )
consts define
Variables ¶
View Source
var ( PathEnum = enumset.New(nil) // API authorize method PathFaasGlobal = PathEnum.MustReg("faas.global") // faas in global PathRoot = PathEnum.MustReg("root") PathPoly = PathEnum.MustReg("poly") PathRawRoot = PathEnum.MustReg("raw.root") PathFaas = PathEnum.MustReg("faas") // faas in app PathRawInner = PathEnum.MustReg("raw.inner") PathRaw3Party = PathEnum.MustReg("raw.3party") PathRaw3PartyDefault = PathEnum.MustReg("raw.3party.default") PathServiceForm = PathEnum.MustReg("inner.form") )
enum define
Functions ¶
func InitAppPath ¶
InitAppPath create namespaces within app
func MakeRequestPath ¶
MakeRequestPath return path of request
func SplitAsAppPath ¶
SplitAsAppPath split a full namespace as app/sub path
func ValidateAPIPath ¶
ValidateAPIPath verify if refer api path from different APP
func ValidateAppAccessPermit ¶
ValidateAppAccessPermit verify if user has app acccess right
func ValidateNamespace ¶
ValidateNamespace verify namespace when some operation
Types ¶
type NamespaceDefine ¶
NamespaceDefine define a namespace
func GetCreateAppPaths ¶
func GetCreateAppPaths(appID string) []NamespaceDefine
GetCreateAppPaths get the namespace info to create
Click to show internal directories.
Click to hide internal directories.