api

package
v0.0.0-...-881dcfe Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProtoCall

func ProtoCall[TResponse, TRequest any, TProtoRequest TProto[TRequest], TProtoResponse TProtoErr[TResponse]](
	ctx context.Context, client chttp.Client, url string, request TProtoRequest,
) (TProtoResponse, error)

func ProtoHandler

func ProtoHandler[TRequest, TResponse any, TProtoRequest TProto[TRequest], TProtoResponse TProto[TResponse]](
	handler func(fCtx *fiber.Ctx, request TProtoRequest) (TProtoResponse, error),
) func(fCtx *fiber.Ctx) error

Types

type ErrorMessage

type ErrorMessage struct {
	// contains filtered or unexported fields
}

func (*ErrorMessage) Error

func (e *ErrorMessage) Error() string

type TProto

type TProto[T any] interface {
	*T
	proto.Message
	ValidateAll() error
}

type TProtoErr

type TProtoErr[T any] interface {
	TProto[T]
	GetError() *communication.Error
}

Jump to

Keyboard shortcuts

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