acb

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UserAgentMiddleware

func UserAgentMiddleware(c *gin.Context)

Types

type Server

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

func NewServer

func NewServer(log *logrus.Entry, store store.Store, config *config2.Config) (*Server, error)

func (*Server) Configure

func (s *Server) Configure() error

func (*Server) DeleteBackupHandler added in v1.1.0

func (s *Server) DeleteBackupHandler(c *gin.Context)

func (*Server) ListBackupsHandler

func (s *Server) ListBackupsHandler(c *gin.Context)

ListBackupsHandler implements the ACB /getbkp

func (*Server) Ping

func (s *Server) Ping(c *gin.Context)

func (*Server) SaveBackupHandler

func (s *Server) SaveBackupHandler(c *gin.Context)

func (*Server) Start

func (s *Server) Start() error

func (*Server) Stop

func (s *Server) Stop() error

type Service

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

func NewService

func NewService(entry *log.Entry, config *ServiceConfig) (*Service, error)

func (*Service) Configure

func (s *Service) Configure() error

func (*Service) Start

func (s *Service) Start() error

func (*Service) Stop

func (s *Service) Stop() error

type ServiceConfig

type ServiceConfig struct {
	Store           StoreConfig     `yaml:"store" validate:"required"`
	Servers         []config.Config `yaml:"servers"`
	*logging.Config `yaml:"logging"`
}

func (*ServiceConfig) Check

func (c *ServiceConfig) Check() error

type StoreConfig added in v1.4.0

type StoreConfig struct {
	Type     store.Type        `yaml:"type" validate:"required" default:"directory"`
	Path     string            `yaml:"path" validate:"required_if=Type directory"`
	Database *db.Configuration `yaml:"db"`
}

func (*StoreConfig) Check added in v1.4.0

func (c *StoreConfig) Check() error

func (*StoreConfig) GetStore added in v1.4.0

func (c *StoreConfig) GetStore(logger *log.Entry) (store.Store, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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