Documentation ¶
Index ¶
- Variables
- func UserAgentMiddleware(c *gin.Context)
- type DirectoryStore
- func (d *DirectoryStore) DeleteRevision(device string, revisionId string, features config.Features) error
- func (d *DirectoryStore) GetRevision(device string, revisionId string, features config.Features) (*entity.Revision, error)
- func (d *DirectoryStore) GetRevisionsForDevice(device string, features config.Features) (entity.RevisionList, error)
- func (d *DirectoryStore) SetRevision(revision *entity.Revision, features config.Features) error
- type Server
- type Service
- type ServiceConfig
- type Store
- type StoreType
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrMaskedToClient = errors.New("") ErrSaveDisabled = fmt.Errorf("%wsave disabled", ErrMaskedToClient) ErrDeleteDisabled = fmt.Errorf("%wdelete disabled", ErrMaskedToClient) ErrDeleteForbidden = fmt.Errorf("%wdelete forbidden", ErrMaskedToClient) ErrNewDeviceDisabled = fmt.Errorf("%wnew devices disabled", ErrMaskedToClient) )
Functions ¶
func UserAgentMiddleware ¶
Types ¶
type DirectoryStore ¶
type DirectoryStore struct {
// contains filtered or unexported fields
}
func NewDirectoryStore ¶
func NewDirectoryStore(path string, logger *log.Entry) (*DirectoryStore, error)
func (*DirectoryStore) DeleteRevision ¶ added in v1.1.0
func (*DirectoryStore) GetRevision ¶
func (*DirectoryStore) GetRevisionsForDevice ¶
func (d *DirectoryStore) GetRevisionsForDevice(device string, features config.Features) (entity.RevisionList, error)
func (*DirectoryStore) SetRevision ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) DeleteBackupHandler ¶ added in v1.1.0
func (*Server) ListBackupsHandler ¶
ListBackupsHandler implements the ACB /getbkp
func (*Server) SaveBackupHandler ¶
$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 );
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(entry *log.Entry, config *ServiceConfig) (*Service, 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 Store ¶
type Store interface { GetRevisionsForDevice(device string, features config.Features) (entity.RevisionList, error) GetRevision(device string, revisionId string, features config.Features) (*entity.Revision, error) DeleteRevision(device string, revisionId string, features config.Features) error SetRevision(revision *entity.Revision, features config.Features) error }
Click to show internal directories.
Click to hide internal directories.