api

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2025 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

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

func AccessForbidden

func AccessForbidden() Error

func InvalidUUID added in v0.5.0

func InvalidUUID() Error

func NewError

func NewError(err error) Error

func NotFound

func NotFound() Error

func NotFoundCustomMsg added in v0.5.0

func NotFoundCustomMsg(msg string) 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