services

package
v0.0.0-...-d2bc1ab Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AclService

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

func NewAclService

func NewAclService(db *database.Database, groupService groupService) *AclService

func (AclService) Can

func (a AclService) Can(groupId uint, operation models.Operation, resource models.Resource) bool

func (AclService) Create

func (a AclService) Create(r models.Rule) (models.Rule, error)

func (AclService) HasDefaultRules

func (a AclService) HasDefaultRules() bool

type BackupService

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

func NewBackupService

func NewBackupService(db *database.Database) *BackupService

func (BackupService) Create

func (bs BackupService) Create(b models.Backup) (models.Backup, error)

func (BackupService) Delete

func (bs BackupService) Delete(id uint) error

func (BackupService) Find

func (bs BackupService) Find(skip uint, limit uint) ([]models.Backup, error)

func (BackupService) FindById

func (bs BackupService) FindById(id uint) (models.Backup, error)

func (BackupService) Update

func (bs BackupService) Update(b models.Backup) (models.Backup, error)

type Cipher

type Cipher string

type GroupService

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

func NewGroupService

func NewGroupService(db *database.Database) *GroupService

func (GroupService) Create

func (g GroupService) Create(input dto.CreateGroupInput) (models.Group, error)

func (GroupService) CreateDefaultGroup

func (g GroupService) CreateDefaultGroup() (models.Group, error)

func (GroupService) Exist

func (g GroupService) Exist(id uint) bool

func (GroupService) FindById

func (g GroupService) FindById(id uint) (models.Group, error)

func (*GroupService) HasDefaultGroup

func (g *GroupService) HasDefaultGroup() bool

type KeystoreService

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

func NewKeystoreService

func NewKeystoreService(db *database.Database, cipherKey string) *KeystoreService

func (KeystoreService) Create

func (KeystoreService) Delete

func (s KeystoreService) Delete(key string) error

func (KeystoreService) Get

type SnapshotService

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

func (SnapshotService) Failed

func (s SnapshotService) Failed(agentId, backupId uint, errMessage error) (models.Snapshot, error)

func (SnapshotService) FailedExistSnapshot

func (s SnapshotService) FailedExistSnapshot(snapshotId uint, errMessage error) (models.Snapshot, error)

func (SnapshotService) Find

func (SnapshotService) Snap

func (s SnapshotService) Snap(agentId, backupId uint, objName string, size uint, body io.Reader) (models.Snapshot, error)

type UserService

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

func NewUserService

func NewUserService(db *database.Database, groupService groupUserService) *UserService

func (UserService) Create

func (u UserService) Create(input dto.CreateUserInput) (models.User, error)

func (UserService) FindByEmail

func (u UserService) FindByEmail(email string) (models.User, error)

func (UserService) FindById

func (u UserService) FindById(userId uint) (models.User, error)

func (UserService) SetLoggedTime

func (u UserService) SetLoggedTime(userId uint, t time.Time) error

Jump to

Keyboard shortcuts

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