rest

package
v0.0.0-...-cff5d44 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Host    string
	Port    string
	Locales []string

	// Turnstile
	TurnstileSecret string
	TurnstileSkip   bool

	// CORS
	Domain           string
	AllowedMethods   string
	AllowedHeaders   string
	AllowedOrigins   string
	ExposeHeaders    string
	AllowCredentials bool

	Tracer        trace.Tracer
	Meter         metric.Meter
	ValidationSrv *validation.Srv

	AuthUseCase    *usecase.AuthUseCase
	AccountUseCase *usecase.AccountUseCase
}

type Server

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

func New

func New(cnf Config) *Server

func (*Server) Listen

func (s *Server) Listen() error

func (*Server) Shutdown

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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