api

package
v0.4.10 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2025 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InvalidUUIDError added in v0.4.2

func InvalidUUIDError(err error) *echo.HTTPError

func NotFoundError added in v0.4.2

func NotFoundError(err error) *echo.HTTPError

Types

type Error

type Error struct {
	Errors map[string]any `json:"errors" yaml:"errors"`
}

func AccessForbidden

func AccessForbidden() Error

func NewError

func NewError(err error) Error

func NotFound

func NotFound() Error

func Validator

func Validator(err error) Error

type PrometheusCounters added in v0.4.5

type PrometheusCounters struct {
	BadLogins   prometheus.CounterVec
	TotalLogins prometheus.Counter
}

type PrometheusMetrics added in v0.4.5

type PrometheusMetrics struct {
	Counters *PrometheusCounters
	// contains filtered or unexported fields
}

func NewMetricsHandler added in v0.4.5

func NewMetricsHandler(ctx context.Context, logger *zap.SugaredLogger) *PrometheusMetrics

func (*PrometheusMetrics) Registry added in v0.4.5

func (m *PrometheusMetrics) Registry() *prometheus.Registry

func (*PrometheusMetrics) StartMetricsServer added in v0.4.5

func (m *PrometheusMetrics) StartMetricsServer(port string)

type Server

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

func NewServer

func NewServer(ctx context.Context, s *zap.SugaredLogger, config *config.Config, metrics *PrometheusMetrics) *Server

NewServer initializes the echo server with necessary routes and configurations.

func (*Server) API

func (s *Server) API() *echo.Group

func (*Server) E

func (s *Server) E() *echo.Echo

func (*Server) PrintRoutes

func (s *Server) PrintRoutes()

func (*Server) Start

func (s *Server) Start(address string) error

Start starts the echo server

func (*Server) Stop

func (s *Server) Stop() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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