Documentation
¶
Index ¶
- Constants
- Variables
- func CountRepoByNameOrPath(ctx context.Context, repoName, repoPath string) (int64, error)
- func CreateBranch(ctx context.Context, branch model.Branch) (model.Branch, error)
- func CreatePool(ctx context.Context, pool model.ZfsPool) (model.ZfsPool, error)
- func CreateRepo(ctx context.Context, repo model.Repo) (model.Repo, error)
- func DeletePool(ctx context.Context, poolId int32) error
- func DeleteRepo(ctx context.Context, repoId int32) error
- func GetBranch(ctx context.Context, branchId int32) (model.Branch, error)
- func GetBranchByName(ctx context.Context, branchName string) (model.Branch, error)
- func GetBranchPorts(ctx context.Context) ([]int32, error)
- func Initialize() func()
- func UpdateBranchPgStatus(ctx context.Context, branchId int32, status BranchPgStatus) error
- func UpdateBranchStatus(ctx context.Context, branchId int32, status BranchStatus) error
- func UpdateRepoPg(ctx context.Context, repoId int32, pgPath string, version int32, ...) (model.Repo, error)
- func UpdateRepoStatus(ctx context.Context, repoId int32, status RepoStatus, output string) (model.Repo, error)
- type BranchPgStatus
- type BranchStatus
- type PoolDetail
- type RepoDetail
- type RepoPgAdapter
- type RepoStatus
Constants ¶
View Source
const ( BranchOpen BranchStatus = "OPEN" BranchMerged BranchStatus = "MERGED" BranchClosed BranchStatus = "CLOSED" BranchPgStarting BranchPgStatus = "STARTING" BranchPgStopped BranchPgStatus = "STOPPED" BranchPgRunning BranchPgStatus = "RUNNING" BranchPgFailed BranchPgStatus = "FAILED" )
View Source
const ( RepoStarted RepoStatus = "STARTED" RepoCompleted RepoStatus = "READY" RepoFailed RepoStatus = "FAILED" HostAdapter RepoPgAdapter = "HOST" )
Variables ¶
View Source
var Db *sql.DB
Functions ¶
func CountRepoByNameOrPath ¶
func CreateBranch ¶
func GetBranchByName ¶
func Initialize ¶
func Initialize() func()
func UpdateBranchPgStatus ¶
func UpdateBranchPgStatus(ctx context.Context, branchId int32, status BranchPgStatus) error
func UpdateBranchStatus ¶
func UpdateBranchStatus(ctx context.Context, branchId int32, status BranchStatus) error
func UpdateRepoPg ¶
func UpdateRepoPg(ctx context.Context, repoId int32, pgPath string, version int32, adapter RepoPgAdapter, status RepoStatus, ) (model.Repo, error)
func UpdateRepoStatus ¶
Types ¶
type BranchPgStatus ¶
type BranchPgStatus string
type BranchStatus ¶
type BranchStatus string
type PoolDetail ¶
func ListPoolDetail ¶
func ListPoolDetail(ctx context.Context) ([]PoolDetail, error)
type RepoDetail ¶
type RepoDetail struct {
Repo model.Repo
Pool model.ZfsPool `alias:"pool"`
Branches []model.Branch `alias:"branches"`
}
func GetRepoByName ¶
func GetRepoByName(ctx context.Context, repoName string) (RepoDetail, error)
func ListRepoWithStatus ¶
func ListRepoWithStatus(ctx context.Context, status ...RepoStatus) ([]RepoDetail, error)
type RepoPgAdapter ¶
type RepoPgAdapter string
type RepoStatus ¶
type RepoStatus string
Click to show internal directories.
Click to hide internal directories.