syncd: github.com/dreamans/syncd/module/deploy Index | Files

package deploy

import "github.com/dreamans/syncd/module/deploy"

Index

Package Files

apply.go build.go deploy.go

Constants

const (
    AUDIT_STATUS_PENDING = 1
    AUDIT_STATUS_OK      = 2
    AUDIT_STATUS_REFUSE  = 3
)
const (
    APPLY_STATUS_NONE     = 1
    APPLY_STATUS_ING      = 2
    APPLY_STATUS_SUCCESS  = 3
    APPLY_STATUS_FAILED   = 4
    APPLY_STATUS_DROP     = 5
    APPLY_STATUS_ROLLBACK = 6
)
const (
    BUILD_STATUS_NONE    = 0
    BUILD_STATUS_START   = 1
    BUILD_STATUS_SUCCESS = 2
    BUILD_STATUS_FAILED  = 3
)
const (
    DEPLOY_STATUS_NONE    = 0
    DEPLOY_STATUS_START   = 1
    DEPLOY_STATUS_SUCCESS = 2
    DEPLOY_STATUS_FAILED  = 3
)

type Apply Uses

type Apply struct {
    ID                  int    `json:"id"`
    SpaceId             int    `json:"space_id"`
    ProjectId           int    `json:"project_id"`
    Name                string `json:"name"`
    Description         string `json:"description"`
    BranchName          string `json:"branch_name"`
    CommitVersion       string `json:"commit_version"`
    AuditStatus         int    `json:"audit_status"`
    AuditRefusalReasion string `json:"audit_refusal_reasion"`
    RollbackId          int    `json:"rollback_id"`
    RollbackApplyId     int    `json:"rollback_apply_id"`
    IsRollbackApply     int    `json:"is_rollback_apply"`
    Status              int    `json:"status"`
    UserId              int    `json:"user_id"`
    Username            string `json:"username"`
    Email               string `json:"email"`
    RollbackStatus      int    `json:"rollback_status"`
    Ctime               int    `json:"ctime"`
}

func (*Apply) CheckHaveDeploying Uses

func (a *Apply) CheckHaveDeploying() (bool, error)

func (*Apply) Create Uses

func (a *Apply) Create() error

func (*Apply) Detail Uses

func (a *Apply) Detail() error

func (*Apply) DropStatus Uses

func (a *Apply) DropStatus() error

func (*Apply) List Uses

func (a *Apply) List(keyword string, spaceIds []int, offset, limit int) ([]Apply, error)

func (*Apply) RollbackList Uses

func (a *Apply) RollbackList() ([]Apply, error)

func (*Apply) Total Uses

func (a *Apply) Total(keyword string, spaceIds []int) (int, error)

func (*Apply) Update Uses

func (a *Apply) Update() error

func (*Apply) UpdateAuditStatus Uses

func (a *Apply) UpdateAuditStatus() error

func (*Apply) UpdateRollback Uses

func (a *Apply) UpdateRollback() error

func (*Apply) UpdateStatus Uses

func (a *Apply) UpdateStatus() error

type Build Uses

type Build struct {
    ID         int    `json:"id"`
    ApplyId    int    `json:"apply_id"`
    StartTime  int    `json:"start_time"`
    FinishTime int    `json:"finish_time"`
    Status     int    `json:"status"`
    Tar        string `json:"tar"`
    Output     string `json:"Output"`
    Errmsg     string `json:"errmsg"`
    Ctime      int    `json:"ctime"`
}

func (*Build) Create Uses

func (b *Build) Create() error

func (*Build) CreateFull Uses

func (b *Build) CreateFull() error

func (*Build) Delete Uses

func (b *Build) Delete() error

func (*Build) Detail Uses

func (b *Build) Detail() error

func (*Build) Exists Uses

func (b *Build) Exists() (bool, error)

func (*Build) Finish Uses

func (b *Build) Finish() error

type Deploy Uses

type Deploy struct {
    ID      int    `json:"id"`
    ApplyId int    `json:"apply_id"`
    GroupId int    `json:"group_id"`
    Status  int    `json:"status"`
    Content string `json:"content"`
    Ctime   int    `json:"ctime"`
}

func (*Deploy) Create Uses

func (d *Deploy) Create() error

func (*Deploy) DeleteByApplyId Uses

func (d *Deploy) DeleteByApplyId() error

func (*Deploy) TaskList Uses

func (d *Deploy) TaskList() ([]Deploy, error)

func (*Deploy) UpdateResult Uses

func (d *Deploy) UpdateResult() error

func (*Deploy) UpdateStatus Uses

func (d *Deploy) UpdateStatus() error

Package deploy imports 5 packages (graph) and is imported by 2 packages. Updated 2019-05-02. Refresh now. Tools for package owners.