api

package
v1.10.1 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2024 License: AGPL-3.0 Imports: 10 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 {
	Enabled bool `json:"enabled"`

	// Debug
	DebugPprof bool `json:"debugPprof"`

	// Reverse proxy
	EnableTrustedProxyCheck bool     `json:"enableTrustedProxyCheck"`
	TrustedProxies          []string `json:"trustedProxies"`
	ProxyHeader             string   `json:"proxyHeader"`

	// Listen
	Listen         string `json:"listen"`
	CertFile       string `json:"certFile"`
	KeyFile        string `json:"keyFile"`
	ClientCertFile string `json:"clientCertFile"`

	// Misc
	SecretPath      string `json:"secretPath"`
	FiberConfigPath string `json:"fiberConfigPath"`
}

Config stores the configuration for the RESTful API.

func (*Config) Server

func (c *Config) Server(logger *zap.Logger) (*Server, *v1.ServerManager, error)

Server returns a new API server from the config.

type Server

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

Server is the RESTful API server.

func (*Server) Start

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

Start starts the API server.

func (*Server) Stop

func (s *Server) Stop() error

Stop stops the API server.

func (*Server) String

func (s *Server) String() string

String implements the service.Service String method.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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