utils

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsCanceled

func IsCanceled(err error) bool

func JSONToStruct

func JSONToStruct(data []byte, v any) error

func NewJSONRPCError

func NewJSONRPCError(id string, code int, message string, data any) (*protocol.JSONRPCMessage, error)

func NewJSONRPCNotification

func NewJSONRPCNotification(method string, params any) (*protocol.JSONRPCMessage, error)

func NewJSONRPCRequest

func NewJSONRPCRequest(method string, params any) (*protocol.JSONRPCMessage, error)

func NewJSONRPCResponse

func NewJSONRPCResponse(id string, result any) (*protocol.JSONRPCMessage, error)

func StructToJSON

func StructToJSON(v interface{}) ([]byte, error)

func StructToJSONSchema

func StructToJSONSchema(v any) (protocol.JSONSchema, error)

func ValidateJSONRPCMessage

func ValidateJSONRPCMessage(msg *protocol.JSONRPCMessage) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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