Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AutoMigrate ¶
Types ¶
type Repo ¶
type Repo struct {
Name string `gorm:"primaryKey" json:"name" validate:"required"`
// NOTE: the cron validator does not support */number syntax
Cron string `json:"cron" validate:"required"`
Image string `json:"image" validate:"required"`
StorageDir string `json:"storageDir" validate:"required,dir"`
User string `json:"user"`
BindIP string `json:"bindIP" validate:"omitempty,ip"`
Network string `json:"network"`
LogRotCycle int `json:"logRotCycle" validate:"min=0"`
Retry int `json:"retry" validate:"min=0"`
Envs StringMap `gorm:"type:text;serializer:json" json:"envs"`
Volumes StringMap `gorm:"type:text;serializer:json" json:"volumes"`
// sqlite3 does not have builtin datetime type
CreatedAt int64 `gorm:"autoCreateTime" json:"-"`
UpdatedAt int64 `gorm:"autoUpdateTime" json:"-"`
}
Repo represents a Repository.
type RepoMeta ¶
type RepoMeta struct {
Name string `gorm:"primaryKey"`
Upstream string
Size int64
ExitCode int
CreatedAt int64 `gorm:"autoCreateTime"`
UpdatedAt int64 `gorm:"autoUpdateTime"`
LastSuccess int64
PrevRun int64
NextRun int64
Syncing bool
}
RepoMeta represents the metadata of a Repository.
Click to show internal directories.
Click to hide internal directories.