Documentation
¶
Index ¶
- Variables
- func GenerateSpanID() string
- func GenerateTraceID() string
- func GetLicenseCiphertext(code string, version string) (string, error)
- func SendNotification(eventSource string, eventType string, eventData any) error
- type APIContext
- type AsmParam
- type ContextKey
- type DalContext
- type EventHandler
- type GlobalThisReader
- type Handler
- type HandlerFunc
- type LicenseHandler
- type PreparedQuery
- type QueryResult
- type RequestContext
- type RequestReader
- type RequestWriter
- type ResponseReader
- type ResponseWriter
- type ScriptRunner
Constants ¶
This section is empty.
Variables ¶
View Source
var ApiCtxKey = ContextKey{}
Functions ¶
func GenerateSpanID ¶ added in v0.1.18
func GenerateSpanID() string
GenerateSpanID generates a 64-bit Span ID
func GenerateTraceID ¶ added in v0.1.18
func GenerateTraceID() string
GenerateTraceID generates a 128-bit Trace ID
func GetLicenseCiphertext ¶ added in v0.1.21
Types ¶
type APIContext ¶ added in v0.1.0
type APIContext interface {
RequestReader
ResponseReader
RequestWriter
ResponseWriter
}
APIContext combines request and response contexts
type ContextKey ¶ added in v0.1.1
type ContextKey struct{}
type DalContext ¶ added in v0.1.9
type EventHandler ¶ added in v0.1.21
type EventHandler interface {
SendNotification(eventSource string, eventType string, eventData any) error
}
var DefaultEventManager EventHandler
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 LicenseHandler ¶ added in v0.1.21
var DefaultLicenseManager LicenseHandler
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 RequestReader ¶ added in v0.1.15
type RequestReader interface {
RequestID() string
RequestContext() *RequestContext
Method() string
Params() any
RawParams() []byte
Metas() map[string]any
}
RequestReader contains request-related information
type RequestWriter ¶ added in v0.1.15
type RequestWriter interface {
SetRequestID(string)
SetMethod(string)
SetParams(any)
SetRawParams([]byte)
SetMetas(map[string]any)
}
RequestWriter allows modification of request-related information
type ResponseReader ¶ added in v0.1.15
ResponseReader contains response-related information
type ResponseWriter ¶ added in v0.1.15
ResponseWriter allows modification of response-related information
type ScriptRunner ¶
Click to show internal directories.
Click to hide internal directories.