app

package
v0.0.0-...-55524bd Latest Latest
Warning

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

Go to latest
Published: May 30, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

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

func InitAppPath(appID string, owner, ownerName string, header http.Header) error

InitAppPath create namespaces within app

func MakeRequestPath

func MakeRequestPath(namespacePath string) string

MakeRequestPath return path of request

func Path

func Path(appID string, typ string) string

Path get sub path of app

func RootPath

func RootPath(appID string) string

RootPath get root path of app

func SplitAsAppPath

func SplitAsAppPath(fullPath string) (string, string, error)

SplitAsAppPath split a full namespace as app/sub path

func ValidateAPIPath

func ValidateAPIPath(owner, callerPath, referPath string) error

ValidateAPIPath verify if refer api path from different APP

func ValidateAppAccessPermit

func ValidateAppAccessPermit(fullNamespace string, header http.Header, writterAPI bool) error

ValidateAppAccessPermit verify if user has app acccess right

func ValidateNamespace

func ValidateNamespace(owner string, op adaptor.Operation, fullPath string) error

ValidateNamespace verify namespace when some operation

func ValidateServicePath

func ValidateServicePath(owner string, op adaptor.Operation, servicePath string) error

ValidateServicePath verify the service path

Types

type NamespaceDefine

type NamespaceDefine struct {
	Path   string
	Parent string
	Name   string
	Title  string
}

NamespaceDefine define a namespace

func GetCreateAppPaths

func GetCreateAppPaths(appID string) []NamespaceDefine

GetCreateAppPaths get the namespace info to create

func PathInfo

func PathInfo(typ string) NamespaceDefine

PathInfo get info of path type

Jump to

Keyboard shortcuts

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