common

package
v0.0.0-...-055c042 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadContextRequestBody

func ReadContextRequestBody(c echo.Context) ([]byte, error)

Types

type EchoBinder

type EchoBinder struct {
	echo.DefaultBinder
}

func (*EchoBinder) Bind

func (b *EchoBinder) Bind(i any, c echo.Context) (err error)

func (*EchoBinder) BindBody

func (b *EchoBinder) BindBody(c echo.Context, value any) (err error)

type EchoJSONSerializer

type EchoJSONSerializer struct{}

EchoJSONSerializer implements JSON encoding using encoding/json.

func (EchoJSONSerializer) Deserialize

func (d EchoJSONSerializer) Deserialize(c echo.Context, i interface{}) error

Deserialize reads a JSON from a request body and converts it into an interface.

func (EchoJSONSerializer) Serialize

func (d EchoJSONSerializer) Serialize(c echo.Context, i interface{}, indent string) error

Serialize converts an interface into a json and writes it to the response. You can optionally use the indent parameter to produce pretty JSONs.

type EchoWrappedContext

type EchoWrappedContext struct {
	echo.Context
	// contains filtered or unexported fields
}

func EchoWrapContext

func EchoWrapContext(c echo.Context) *EchoWrappedContext

func EchoWrapWithContext

func EchoWrapWithContext(c echo.Context, ctx context.Context) *EchoWrappedContext

func (*EchoWrappedContext) Deadline

func (c *EchoWrappedContext) Deadline() (time.Time, bool)

func (*EchoWrappedContext) Done

func (c *EchoWrappedContext) Done() <-chan struct{}

func (*EchoWrappedContext) Err

func (c *EchoWrappedContext) Err() error

func (*EchoWrappedContext) SetValue

func (c *EchoWrappedContext) SetValue(key interface{}, value interface{})

func (*EchoWrappedContext) StackUp

func (c *EchoWrappedContext) StackUp(fn func(context.Context) context.Context)

func (*EchoWrappedContext) Value

func (c *EchoWrappedContext) Value(key interface{}) interface{}

type HTTPDelivery

type HTTPDelivery interface {
	ServeHTTP(host, port string) error
}

type StartStopper

type StartStopper interface {
	Start(ctx context.Context) error
	Stop(ctx context.Context) error
}

Jump to

Keyboard shortcuts

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