acb

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2023 License: MIT Imports: 19 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, 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)

$post_fields = array(

	'reason' => htmlspecialchars($reason),
	'uid' => $uniqueID,
	'file' => curl_file_create($tmpname, 'image/jpg', 'config.jpg'),
	'userkey' => htmlspecialchars($userkey),
	'sha256_hash' => $raw_config_sha256_hash,
	'version' => $g['product_version'],
	'hint' => $config['system']['acb']['hint'],
	'manmax' => $manmax
);

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           StoreType       `yaml:"store" validate:"required" default:"directory"`
	Path            string          `yaml:"path" validate:"required"`
	Servers         []config.Config `yaml:"servers"`
	*logging.Config `yaml:"logging"`
}

func (*ServiceConfig) Check

func (c *ServiceConfig) Check() error

type StoreType

type StoreType string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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