echo_listener

package
v0.0.0-...-be915d5 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Wrap

func Wrap(in Handler) echo.HandlerFunc

Types

type Config

type Config struct {
	HTTPPort string `default:":8000"`
}

type Context

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

func (Context) Bind

func (c Context) Bind(target any) error

func (Context) Context

func (c Context) Context() context.Context

func (Context) Deleted

func (c Context) Deleted() error

func (Context) List

func (c Context) List(p kit.Pagination, i interface{}) error

func (Context) Origin

func (c Context) Origin() echo.Context

func (Context) Pagination

func (c Context) Pagination(max int) (kit.Pagination, error)

func (Context) ParamInt

func (c Context) ParamInt(name string) (int, error)

func (Context) ParamString

func (c Context) ParamString(name string) string

func (Context) ShouldCan

func (c Context) ShouldCan(permissions ...string) error

func (Context) StatusOK

func (c Context) StatusOK(i interface{}) error

type Handler

type Handler func(c Context) error

type HttpEcho

type HttpEcho[Conf dependencies.Config, Dep dependencies.Locator] struct {
	Swagger    []byte
	InitConfig func(conf Conf) Config
	Builder    func(e *echo.Echo, dep Dep) error
}

func (HttpEcho[Conf, Dep]) Server

func (m HttpEcho[Conf, Dep]) Server(ctx context.Context, log *zerolog.Logger, dep Dep, global Conf) error

Jump to

Keyboard shortcuts

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