Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ApiCtxKey = ContextKey{}
Functions ¶
This section is empty.
Types ¶
type APIContext ¶ added in v0.1.0
type APIContext interface {
RequestContext
ResponseContext
MutableRequestContext
MutableResponseContext
}
APIContext combines request and response contexts
type ContextKey ¶ added in v0.1.1
type ContextKey struct{}
type DalContext ¶ added in v0.1.9
type GlobalThisReader ¶
type Handler ¶ added in v0.1.3
type Handler interface {
Process(APIContext) error
}
type HandlerFunc ¶ added in v0.1.3
type HandlerFunc func(APIContext) error
func (HandlerFunc) Process ¶ added in v0.1.13
func (hf HandlerFunc) Process(ctx APIContext) error
type MutableRequestContext ¶ added in v0.1.0
type MutableRequestContext interface {
SetRequestID(string)
SetMethod(string)
SetParams(any)
SetRawParams([]byte)
SetMetas(map[string]any)
}
MutableRequestContext allows modification of request context
type MutableResponseContext ¶ added in v0.1.0
MutableResponseContext allows modification of response context
type PreparedQuery ¶
type PreparedQuery struct {
Query string `json:"query"`
Bind []any `json:"bind"`
QueryType string `json:"queryType"`
CheckPoint []*PreparedQuery `json:"checkPoint"`
DatabaseUpdater []*PreparedQuery `json:"databaseUpdater"`
ResultEnricher []*PreparedQuery `json:"resultEnricher"`
}
type QueryResult ¶
type RequestContext ¶ added in v0.1.0
type RequestContext interface {
RequestID() string
Method() string
Params() any
RawParams() []byte
Metas() map[string]any
}
RequestContext contains request-related information
type ResponseContext ¶ added in v0.1.0
ResponseContext contains response-related information
type ScriptRunner ¶
Click to show internal directories.
Click to hide internal directories.