server

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2023 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildHandler

func BuildHandler(logger log.Logger, db *dbcontext.DB, sec password.Service,
	cfg *config.Config, version string, trans ut.Translator,
	updown storage.UploadDownloader, p queue.Producer,
	smtpMailer mailer.SMTPMailer, arch archive.Archiver,
	tokenGen token.Service,
	emailTpl tpl.Service) http.Handler

BuildHandler sets up the HTTP routing and builds an HTTP handler.

func CustomHTTPErrorHandler

func CustomHTTPErrorHandler(trans ut.Translator) echo.HTTPErrorHandler

CustomHTTPErrorHandler handles errors encountered during HTTP request processing.

Types

type CustomBinder

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

CustomBinder struct.

func NewBinder

func NewBinder() *CustomBinder

NewBinder initializes custom server binder.

func (*CustomBinder) Bind

func (cb *CustomBinder) Bind(i interface{}, c echo.Context) error

Bind tries to bind request into interface, and if it does then validate it.

type CustomValidator

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

CustomValidator holds custom validator.

func (*CustomValidator) Validate

func (cv *CustomValidator) Validate(i interface{}) error

Validate performs field validation.

Jump to

Keyboard shortcuts

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