Documentation
¶
Index ¶
- Constants
- func Boolean(in any) bool
- func DefaultTransport(in []byte, tcontext any) (out []byte, err error)
- func Duration(in string, fallback float64) time.Duration
- func DurationBounds(in string, fallback, lowest, highest float64) (out time.Duration)
- func Handle(in []byte, routes map[string]*ROUTE, filter func(string, any) bool, ...) (out []byte)
- func IntegerMap(in any, extra ...bool) (out map[string]int)
- func KeysLength(in any) (out int)
- func Map(in any) (out map[string]any)
- func MapKeys(in any) (out []string)
- func Number(in any, fallback ...float64) float64
- func NumberMap(in any, extra ...bool) (out map[string]float64)
- func NumberSlice(in any, extra ...bool) (out []float64)
- func NumberSliceItem(in []float64, index int) float64
- func Request(calls []*CALL) (payload []byte, err error)
- func Size(in string, fallback int64, extra ...bool) int64
- func SizeBounds(in string, fallback, lowest, highest int64, extra ...bool) (out int64)
- func Slice(in any) (out []any)
- func SliceItem(in []any, index int) any
- func String(in any) string
- func StringMap(in any, extra ...bool) (out map[string]string)
- func StringSlice(in any, extra ...bool) (out []string)
- func StringSliceItem(in []string, index int) string
- func SwitchMap(in map[string]string) (out map[string]string)
- type CALL
- type CONTEXT_KEY
- type ERROR
- type HANDLER
- type REQUEST
- type RESPONSE
- type ROUTE
- type TRANSPORT
- type TRANSPORT_OPTIONS
Constants ¶
View Source
const ( LOW_RESERVED_CODE = -32768 HIGH_RESERVED_CODE = -32000 PARSE_ERROR_CODE = -32700 PARSE_ERROR_MESSAGE = "parse error" INVALID_REQUEST_CODE = -32600 INVALID_REQUEST_MESSAGE = "invalid request" METHOD_NOT_FOUND_CODE = -32601 METHOD_NOT_FOUND_MESSAGE = "method not found" METHOD_NOT_AUTHORIZED_CODE = -32601 METHOD_NOT_AUTHORIZED_MESSAGE = "method not authorized" INVALID_PARAMS_CODE = -32602 INVALID_PARAMS_MESSAGE = "invalid params" INTERNAL_ERROR_CODE = -32603 INTERNAL_ERROR_MESSAGE = "internal error" )
Variables ¶
This section is empty.
Functions ¶
func DurationBounds ¶
func KeysLength ¶
func NumberSlice ¶
func NumberSliceItem ¶
func SizeBounds ¶
func StringSlice ¶
func StringSliceItem ¶
Types ¶
type CALL ¶
type CALL struct { Method string Params any Notification bool Result any Error *ERROR Id string // contains filtered or unexported fields }
type CONTEXT_KEY ¶
type CONTEXT_KEY string
Click to show internal directories.
Click to hide internal directories.