Documentation
¶
Index ¶
- func Count(dest interface{}, table string, where string) error
- func CreateBackup(backup *Backup) (int, error)
- func CreateJob(job *Job) (sql.Result, error)
- func CreateMigration(migration *Migration) (int, error)
- func CreateOption(option *Option) (sql.Result, error)
- func CreateOrUpdateOption(option *Option) (sql.Result, error)
- func CreateQueue(queue *Queue) (int, error)
- func CreateUser(user *User) (sql.Result, error)
- func DeleteAllQueues() (sql.Result, error)
- func DeleteBackup(backupIden interface{}) (sql.Result, error)
- func DeleteJob(jobIden interface{}) (sql.Result, error)
- func DeleteMigration(migrationIden interface{}) (sql.Result, error)
- func DeleteQueue(queueIden interface{}) (sql.Result, error)
- func DeleteUser(userIden interface{}) (sql.Result, error)
- func FindAllBackups(dest interface{}) error
- func FindAllJobsByBackup(dest interface{}, backupIden interface{}, order string) error
- func FindAllMigrations(dest interface{}) error
- func FindAllOptions(dest interface{}) error
- func FindAllUsers(dest interface{}) error
- func FindBackupById(dest interface{}, backupIden interface{}) error
- func FindBackups(dest interface{}, order string, p *paginator.Paginator) error
- func FindJobById(dest interface{}, jobIden interface{}) error
- func FindJobsByBackup(dest interface{}, backupIden interface{}, order string, p *paginator.Paginator) error
- func FindJobsIDByBackup(dest interface{}, backupIden interface{}, order string) error
- func FindMigrationById(dest interface{}, migrationIden interface{}) error
- func FindMigrations(dest interface{}, order string, p *paginator.Paginator) error
- func FindMigrationsStatuses(dest interface{}, order string, p *paginator.Paginator) error
- func FindOptionByName(dest interface{}, optionName interface{}) error
- func FindQueueByTypeAndObject(dest interface{}, t interface{}, o interface{}) error
- func FindQueuesByObjectsIdsAndType(dest interface{}, ids interface{}, t string, order string) error
- func FindUserByEmail(dest interface{}, email string) error
- func FindUserById(dest interface{}, userIden interface{}) error
- func FindUsers(dest interface{}, order string, p *paginator.Paginator) error
- func SelectLatestJobForEachBackup(backupsIds []int) ([]types.SmallJob, error)
- func SelectPaginatedJobsByBackup(dest interface{}, backupIden interface{}, order string) error
- func UpdateBackup(data interface{}) (sql.Result, error)
- func UpdateMigration(data interface{}) (sql.Result, error)
- func UpdateMigrationDatesAndStatuses(migration *Migration, uf string, pf string) (sql.Result, error)
- func UpdateMigrationHelper(id int, status string, SetStartedAt bool, SetCompletedAt bool, nullValues bool, ...)
- func UpdateUser(data *User) (sql.Result, error)
- type Backup
- type Job
- type Migration
- type Option
- type Queue
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateBackup ¶
CreateBackup create a backup entry in the backup's table
func CreateMigration ¶
func CreateOption ¶
CreateOption create a option entry in the option's table
func CreateQueue ¶
CreateQueue create a queue entry in the queue's table
func CreateUser ¶
CreateUser create a user entry in the user's table
func DeleteAllQueues ¶
func DeleteBackup ¶
func DeleteMigration ¶
func DeleteQueue ¶
func DeleteUser ¶
func FindAllBackups ¶
func FindAllBackups(dest interface{}) error
func FindAllJobsByBackup ¶
func FindAllMigrations ¶
func FindAllMigrations(dest interface{}) error
func FindAllOptions ¶
func FindAllOptions(dest interface{}) error
func FindAllUsers ¶
func FindAllUsers(dest interface{}) error
func FindBackupById ¶
func FindBackupById(dest interface{}, backupIden interface{}) error
func FindJobById ¶
func FindJobById(dest interface{}, jobIden interface{}) error
func FindJobsByBackup ¶
func FindJobsIDByBackup ¶
func FindMigrationById ¶
func FindMigrationById(dest interface{}, migrationIden interface{}) error
func FindMigrations ¶
func FindMigrationsStatuses ¶
func FindOptionByName ¶
func FindOptionByName(dest interface{}, optionName interface{}) error
func FindQueueByTypeAndObject ¶
func FindQueueByTypeAndObject(dest interface{}, t interface{}, o interface{}) error
func FindUserByEmail ¶
FindUserByEmail searches the user's table with the email given
func FindUserById ¶
func FindUserById(dest interface{}, userIden interface{}) error
func UpdateBackup ¶
func UpdateMigration ¶
func UpdateMigrationHelper ¶
Types ¶
type Backup ¶
type Backup struct {
ID int `db:"id"`
CreatedAt sql.NullTime `db:"created_at"`
UpdatedAt sql.NullTime `db:"updated_at"`
DeletedAt sql.NullTime `db:"deleted_at"`
Name string `db:"name"`
Enable bool `db:"enable"`
Frequency string `db:"frequency"`
Timezone string `db:"timezone"`
CustomFrequency string `db:"custom_frequency"`
Type string `db:"type"`
Bucket string `db:"bucket"`
Region string `db:"region"`
DbName string `db:"db_name"`
DbUser string `db:"db_user"`
DbPassword string `db:"db_password"`
DbHost string `db:"db_host"`
DbPort string `db:"db_port"`
PodLabel string `db:"pod_label"`
PodName string `db:"pod_name"`
DayOfWeek int `db:"day_of_week"`
DayOfMonth int `db:"day_of_month"`
Month int `db:"month"`
Time string `db:"time"`
Container string `db:"container"`
FilesPath string `db:"files_path"`
S3AccessKey string `db:"s3_access_key"`
S3SecretKey string `db:"s3_secret_key"`
StorageDirectory string `db:"storage_directory"`
Retention int `db:"retention"`
Emails string `db:"emails"`
URI sql.NullString `db:"uri"`
User int `db:"user"`
}
Backup struct defines the Backup Model
type Job ¶
type Job struct {
ID int `db:"id"`
CreatedAt time.Time `db:"created_at"`
UpdatedAt time.Time `db:"updated_at"`
CompletedAt sql.NullTime `db:"completed_at"`
File string `db:"file"`
Status string `db:"status"`
Backup int `db:"backup"`
}
Job struct defines the Job Model
type Migration ¶
type Migration struct {
ID int `db:"id"`
CreatedAt sql.NullTime `db:"created_at"`
UpdatedAt sql.NullTime `db:"updated_at"`
DeletedAt sql.NullTime `db:"deleted_at"`
StartedAt sql.NullTime `db:"started_at"`
CompletedAt sql.NullTime `db:"completed_at"`
Name string `db:"name"`
User int `db:"user"`
Timezone string `db:"timezone"`
Emails string `db:"emails"`
SrcType string `db:"src_type"`
SrcAccess string `db:"src_access"`
SrcBucket string `db:"src_bucket"`
SrcRegion string `db:"src_region"`
SrcDbName string `db:"src_db_name"`
SrcDbUser string `db:"src_db_user"`
SrcDbPassword string `db:"src_db_password"`
SrcDbHost string `db:"src_db_host"`
SrcDbPort string `db:"src_db_port"`
SrcPodLabel string `db:"src_pod_label"`
SrcPodName string `db:"src_pod_name"`
SrcContainer string `db:"src_container"`
SrcFilesPath string `db:"src_files_path"`
SrcS3AccessKey string `db:"src_s3_access_key"`
SrcS3SecretKey string `db:"src_s3_secret_key"`
SrcS3File string `db:"src_s3_file"`
SrcURI string `db:"src_uri"`
SrcSshHost string `db:"src_ssh_host"`
SrcSshPort string `db:"src_ssh_port"`
SrcSshUser string `db:"src_ssh_user"`
SrcSshKey string `db:"src_ssh_key"`
SrcKubeconfig string `db:"src_kubeconfig"`
DestType string `db:"dest_type"`
DestAccess string `db:"dest_access"`
DestBucket string `db:"dest_bucket"`
DestRegion string `db:"dest_region"`
DestDbName string `db:"dest_db_name"`
DestDbUser string `db:"dest_db_user"`
DestDbPassword string `db:"dest_db_password"`
DestDbHost string `db:"dest_db_host"`
DestDbPort string `db:"dest_db_port"`
DestPodLabel string `db:"dest_pod_label"`
DestPodName string `db:"dest_pod_name"`
DestContainer string `db:"dest_container"`
DestFilesPath string `db:"dest_files_path"`
DestS3AccessKey string `db:"dest_s3_access_key"`
DestS3SecretKey string `db:"dest_s3_secret_key"`
DestStorageDirectory string `db:"dest_storage_directory"`
DestURI string `db:"dest_uri"`
DestSshHost string `db:"dest_ssh_host"`
DestSshPort string `db:"dest_ssh_port"`
DestSshUser string `db:"dest_ssh_user"`
DestSshKey string `db:"dest_ssh_key"`
DestKubeconfig string `db:"dest_kubeconfig"`
Status sql.NullString `db:"status"`
Output sql.NullString `db:"output"`
}
type Option ¶
type Option struct {
ID int `db:"id"`
CreatedAt time.Time `db:"created_at"`
UpdatedAt time.Time `db:"updated_at"`
Name string `db:"name"`
Value string `db:"value"`
}
Option struct defines the Option Model
Click to show internal directories.
Click to hide internal directories.