api

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EchoConfig added in v1.1.0

type EchoConfig struct {
	Debug                         bool
	ListenAddress                 string
	EnableCORSMiddleware          bool
	EnableLoggerMiddleware        bool
	EnableRecoverMiddleware       bool
	EnableRequestIDMiddleware     bool
	EnableTrailingSlashMiddleware bool
	EnableTimeoutMiddleware       bool
	RequestTimeout                time.Duration
}

type LoggerConfig added in v1.1.0

type LoggerConfig struct {
	Level              zerolog.Level
	RequestLevel       zerolog.Level
	LogRequestBody     bool
	LogRequestHeader   bool
	LogRequestQuery    bool
	LogResponseBody    bool
	LogResponseHeader  bool
	PrettyPrintConsole bool
}

type Server

type Server struct {
	Config  ServerConfig
	Echo    *echo.Echo
	Manager *manager.Manager
}

func DefaultServerFromEnv

func DefaultServerFromEnv() *Server

func NewServer

func NewServer(config ServerConfig) *Server

func (*Server) InitManager

func (s *Server) InitManager(ctx context.Context) error

func (*Server) Ready

func (s *Server) Ready() bool

func (*Server) Shutdown

func (s *Server) Shutdown(ctx context.Context) error

func (*Server) Start

func (s *Server) Start() error

type ServerConfig

type ServerConfig struct {
	Address        string
	Port           int
	DebugEndpoints bool
	Logger         LoggerConfig
	Echo           EchoConfig
}

func DefaultServerConfigFromEnv

func DefaultServerConfigFromEnv() ServerConfig

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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