Documentation ¶
Index ¶
- Variables
- func ANSIDiff(x, y any, opts ...cmp.Option) error
- func Copy[T any](t T) (T, error)
- func GCD(periods []int64) int64
- func GetStructTags(a any, fn func(tag reflect.StructField) error) error
- func IgnoreMapEntries(keys ...string) cmp.Option
- func IsStruct(v any) bool
- func MarshalYAML(v any) ([]byte, error)
- func MarshalYAMLPreserveKeysOrder(v any) ([]byte, error)
- func Or[T comparable](a, b T) T
- func PrettyJSON(v any) ([]byte, error)
- func TrimQuotes(s string) string
- func TypeName(v any) string
- func UnmarshalYAML[T any](b []byte) (T, error)
- func UnmarshalYAMLPreserveKeysOrder[T any](b []byte) (T, error)
- func WriteFile(name string, body []byte, overwrite bool) error
- type CommandHandler
- type CommandHandlerFunc
- type DiffError
- type Path
- type QueryHandler
- type QueryHandlerFunc
- type RequestHandler
- type RequestHandlerFunc
- type RequestReplyHandler
- type RequestReplyHandlerFunc
- type SilentHandler
- type SilentRequestHandler
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCopyFailed = errors.New("copy failed at type assertion")
Functions ¶
func GetStructTags ¶
func GetStructTags(a any, fn func(tag reflect.StructField) error) error
func IgnoreMapEntries ¶
func MarshalYAML ¶
func Or ¶
func Or[T comparable](a, b T) T
func PrettyJSON ¶
func TrimQuotes ¶
func UnmarshalYAML ¶
Types ¶
type CommandHandler ¶
CommandHandler returns an error.
type CommandHandlerFunc ¶
type QueryHandler ¶
QueryHandler returns a value and an error.
type QueryHandlerFunc ¶
type RequestHandler ¶
RequestHandler accepts a request, and returns an error.
type RequestHandlerFunc ¶
func (RequestHandlerFunc[T]) Exec ¶
func (h RequestHandlerFunc[T]) Exec(ctx context.Context, v T) error
func (RequestHandlerFunc[T]) ToCommandHandler ¶
func (h RequestHandlerFunc[T]) ToCommandHandler(ctx context.Context, v T) CommandHandler
type RequestReplyHandler ¶
RequestReplyHandler accepts a request, and returns a value and an error.
type RequestReplyHandlerFunc ¶
func (RequestReplyHandlerFunc[T, U]) Exec ¶
func (h RequestReplyHandlerFunc[T, U]) Exec(ctx context.Context, v T) (U, error)
func (RequestReplyHandlerFunc[T, U]) ToQueryHandler ¶
func (h RequestReplyHandlerFunc[T, U]) ToQueryHandler(ctx context.Context, v T) QueryHandler[U]
type SilentHandler ¶
SilentHandler is similar like CommandHandler, but returns no error.
type SilentRequestHandler ¶
SilentRequestHandler is similar like RequestHandler, but returns no error.
Click to show internal directories.
Click to hide internal directories.