common

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CodeOK uint64 = iota
	CodeError
)

Variables

This section is empty.

Functions

func ServeGRPC

func ServeGRPC[T any](s grpctransport.Handler, ctx context.Context, req any, emptyRsp T) (r T, e error)

Types

type BaseDTO

type BaseDTO struct {
	Code    uint64 `json:"code"`
	Message string `json:"message"`
}

type BaseError

type BaseError interface {
	error
	StatusCode() int
	ErrorCode() uint
	ErrorText() string
}

Jump to

Keyboard shortcuts

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