Documentation
¶
Index ¶
- Constants
- type CtxData
- type GlobalThis
- func (m GlobalThis) Copy(sourceMap map[string]any)
- func (m GlobalThis) CtxData() map[string]any
- func (m GlobalThis) Env() map[string]any
- func (m GlobalThis) Input() any
- func (m GlobalThis) Meta() map[string]any
- func (m GlobalThis) Output() any
- func (m GlobalThis) Server() map[string]any
- func (m GlobalThis) Session() map[string]any
- func (m GlobalThis) SetCtxData(key string, value any)
- func (m GlobalThis) SetEnv(env map[string]any)
- func (m GlobalThis) SetInput(input any)
- func (m GlobalThis) SetMeta(metas map[string]any)
- func (m GlobalThis) SetOutput(output any)
- func (m GlobalThis) SetServer(server map[string]any)
- func (m GlobalThis) SetSession(sess map[string]any)
- type InputWrapper
- type Meta
- func (m Meta) AddRoles(roles []string)
- func (m Meta) AppKey() string
- func (m Meta) Roles() []string
- func (m Meta) SessionId() string
- func (m Meta) SetAppKey(appKey string)
- func (m Meta) SetSessionId(sessionId string)
- func (m Meta) SetSoftware(software string)
- func (m Meta) SetToken(accessToken string)
- func (m Meta) Software() string
- func (m Meta) Token() string
- type RunnerContext
- type Server
- func (m Server) AddRespHeader(key, value string)
- func (m Server) ApiName() string
- func (m Server) RemoteAddr() string
- func (m Server) RemoteHost() string
- func (m Server) ReqHeader() map[string]string
- func (m Server) RequestId() string
- func (m Server) RequestTime() int64
- func (m Server) RespHeader() map[string]string
- func (m Server) SetApiName(apiName string)
- func (m Server) SetRemoteAddr(remoteAddr string)
- func (m Server) SetRemoteHost(remoteHost string)
- func (m Server) SetReqHeader(header map[string]string)
- func (m Server) SetRequestId(remoteHost string)
- func (m Server) SetRequestTime(timestamp int64)
Constants ¶
View Source
const ( DefaultAnonymousRole = "anonymous" DefaultUserRole = "user" DefaultUserIdKey = "userId" DefaultRolesKey = "roles" )
View Source
const GlobalKey = "globalThis"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GlobalThis ¶
func (GlobalThis) Copy ¶ added in v0.11.9
func (m GlobalThis) Copy(sourceMap map[string]any)
func (GlobalThis) CtxData ¶ added in v0.11.8
func (m GlobalThis) CtxData() map[string]any
func (GlobalThis) Env ¶
func (m GlobalThis) Env() map[string]any
func (GlobalThis) Input ¶
func (m GlobalThis) Input() any
func (GlobalThis) Meta ¶ added in v0.10.0
func (m GlobalThis) Meta() map[string]any
func (GlobalThis) Output ¶
func (m GlobalThis) Output() any
func (GlobalThis) Server ¶
func (m GlobalThis) Server() map[string]any
func (GlobalThis) Session ¶
func (m GlobalThis) Session() map[string]any
func (GlobalThis) SetCtxData ¶ added in v0.11.8
func (m GlobalThis) SetCtxData(key string, value any)
func (GlobalThis) SetEnv ¶
func (m GlobalThis) SetEnv(env map[string]any)
func (GlobalThis) SetInput ¶
func (m GlobalThis) SetInput(input any)
func (GlobalThis) SetMeta ¶ added in v0.10.0
func (m GlobalThis) SetMeta(metas map[string]any)
func (GlobalThis) SetOutput ¶
func (m GlobalThis) SetOutput(output any)
func (GlobalThis) SetServer ¶
func (m GlobalThis) SetServer(server map[string]any)
func (GlobalThis) SetSession ¶
func (m GlobalThis) SetSession(sess map[string]any)
type InputWrapper ¶ added in v0.9.1
type InputWrapper struct {
// contains filtered or unexported fields
}
func Input ¶ added in v0.9.1
func Input(v any) *InputWrapper
func (*InputWrapper) Current ¶ added in v0.9.1
func (i *InputWrapper) Current() int
func (*InputWrapper) LimitOffset ¶ added in v0.9.1
func (i *InputWrapper) LimitOffset() (int, int)
func (*InputWrapper) PageSize ¶ added in v0.9.1
func (i *InputWrapper) PageSize() int
type Meta ¶ added in v0.10.0
func (Meta) SetSessionId ¶ added in v0.10.0
func (Meta) SetSoftware ¶ added in v0.10.0
type RunnerContext ¶
type RunnerContext struct {
ParsedName *method.ParsedName
MetaProvider *bundle.MetaProvider
DalCtx *dbop.DalContext
GlobalThis map[string]any
DebugInfo map[string]any
// contains filtered or unexported fields
}
func NewRunnerContext ¶ added in v0.13.3
func NewRunnerContext(ctx context.Context) *RunnerContext
func (*RunnerContext) Context ¶ added in v0.13.3
func (r *RunnerContext) Context() context.Context
type Server ¶ added in v0.9.1
func (Server) AddRespHeader ¶ added in v0.10.0
func (Server) RemoteAddr ¶ added in v0.9.1
func (Server) RemoteHost ¶ added in v0.9.1
func (Server) RequestTime ¶ added in v0.9.1
func (Server) RespHeader ¶ added in v0.10.0
func (Server) SetApiName ¶ added in v0.9.1
func (Server) SetRemoteAddr ¶ added in v0.9.1
func (Server) SetRemoteHost ¶ added in v0.9.1
func (Server) SetReqHeader ¶ added in v0.10.0
func (Server) SetRequestId ¶ added in v0.9.4
func (Server) SetRequestTime ¶ added in v0.9.1
Click to show internal directories.
Click to hide internal directories.