server

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2025 License: MIT Imports: 33 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultMiddlewares

func DefaultMiddlewares() []echo.MiddlewareFunc

Types

type Auth

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

func NewAuth

func NewAuth(token string) *Auth

func (*Auth) Middleware

func (a *Auth) Middleware(next echo.HandlerFunc) echo.HandlerFunc

type Config

type Config struct {
	Host             string `mapstructure:"host" json:"host,omitempty"`
	Port             int64  `mapstructure:"port" json:"port,omitempty"`
	EncryptionSecret string `mapstructure:"encryption_secret" json:"encryption_secret,omitempty"`
}

type ErrorResponse

type ErrorResponse struct {
	Message string `json:"message"`
}

func NewErrorResponse

func NewErrorResponse(message string) ErrorResponse

type Server

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

func NewServer

func NewServer(
	cfg Config,
	policy policy.Service,
	redis *redis.Redis,
	vaultStorage vault.Storage,
	client *asynq.Client,
	inspector *asynq.Inspector,
	spec plugin.Spec,
	middlewares []echo.MiddlewareFunc,
	metrics metrics.PluginServerMetrics,
) *Server

NewServer returns a new server.

func (*Server) SetAuthMiddleware

func (s *Server) SetAuthMiddleware(auth echo.MiddlewareFunc)

func (*Server) Start

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

func (*Server) VerifierAuthMiddleware

func (s *Server) VerifierAuthMiddleware(next echo.HandlerFunc) echo.HandlerFunc

Jump to

Keyboard shortcuts

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