Documentation ¶
Index ¶
- Variables
- type DBRevision
- type DBStore
- func (D DBStore) DeleteRevision(device string, revisionId string, features config.Features) error
- func (D DBStore) GetRevision(device string, revisionId string, features config.Features) (*entity.Revision, error)
- func (D DBStore) GetRevisionsForDevice(device string, features config.Features) (entity.RevisionList, error)
- func (D DBStore) SetRevision(revision *entity.Revision, features config.Features) error
- 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 Store
- type Type
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 ¶
This section is empty.
Types ¶
type DBRevision ¶
type DBRevision struct { Revision string `gorm:"primaryKey;autoIncrement:false"` Hash string Content string Reason string Device string `gorm:"primaryKey;autoIncrement:false"` Username string Comment string Date time.Time FromPortal bool }
func (*DBRevision) TableName ¶
func (*DBRevision) TableName() string
func (*DBRevision) ToRevision ¶
func (r *DBRevision) ToRevision() *entity.Revision
type DBStore ¶
type DBStore struct {
// contains filtered or unexported fields
}
func NewDBStore ¶
func (DBStore) DeleteRevision ¶
func (DBStore) GetRevision ¶
func (DBStore) GetRevisionsForDevice ¶
type DirectoryStore ¶
type DirectoryStore struct {
// contains filtered or unexported fields
}
func NewDirectoryStore ¶
func NewDirectoryStore(path string, logger *logrus.Entry) (*DirectoryStore, error)
func (*DirectoryStore) DeleteRevision ¶
func (*DirectoryStore) GetRevision ¶
func (*DirectoryStore) GetRevisionsForDevice ¶
func (d *DirectoryStore) GetRevisionsForDevice(device string, features config.Features) (entity.RevisionList, error)
func (*DirectoryStore) SetRevision ¶
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.