common

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BindRequestPayload

func BindRequestPayload[S any](c *fiber.Ctx) *S

func FiberConfig

func FiberConfig() fiber.Config

func GrpcConfig

func GrpcConfig(p interface{}) (err error)

func Validate

func Validate(s interface{}) []*common.ErrorResponse

Types

type ErrorHandlingBehavior

type ErrorHandlingBehavior struct{}

func (ErrorHandlingBehavior) Process

func (p ErrorHandlingBehavior) Process(ctx context.Context, msg mediator.Message, next mediator.Next) (interface{}, error)

type LoggingBehavior

type LoggingBehavior struct{}

func (LoggingBehavior) Process

func (p LoggingBehavior) Process(ctx context.Context, msg mediator.Message, next mediator.Next) (interface{}, error)

type ProblemDetails

type ProblemDetails struct {
	Type   string      `json:"type"`
	Title  string      `json:"title"`
	Status int         `json:"status"`
	Detail interface{} `json:"detail"`
}

type ValidationBehavior

type ValidationBehavior struct{}

func (ValidationBehavior) Process

func (p ValidationBehavior) Process(ctx context.Context, msg mediator.Message, next mediator.Next) (interface{}, error)

Jump to

Keyboard shortcuts

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