Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Diff ¶
type Diff = service_diff.Diff
type IPublishService ¶
type IPublishService interface { SetLatest(ctx context.Context, release string, id string) error RemoveLatest(ctx context.Context, release string) error Latest(ctx context.Context, release ...string) ([]*Publish, error) GetLatest(ctx context.Context, id string) (*Publish, error) Get(ctx context.Context, id string) (*Publish, error) GetDiff(ctx context.Context, id string) (*service_diff.Diff, error) ListProject(ctx context.Context, project string) ([]*Publish, error) ListProjectPage(ctx context.Context, project string, page int, pageSize int) ([]*Publish, int64, error) ListForStatus(ctx context.Context, project string, status ...StatusType) ([]*Publish, error) ListForStatusPage(ctx context.Context, page int, pageSize int, status ...StatusType) ([]*Publish, int64, error) Create(ctx context.Context, uuid, project, release, previous, version, remark string, diff *service_diff.Diff) error SetStatus(ctx context.Context, project, id string, status StatusType) error Refuse(ctx context.Context, project, id string, comments string) error Accept(ctx context.Context, project, id string, comments string) error SetPublishStatus(ctx context.Context, status *Status) error GetPublishStatus(ctx context.Context, id string) ([]*Status, error) }
type Publish ¶
type Publish struct { Id string Service string Release string Previous string Version string ApplyTime time.Time Applicant string Remark string ApproveTime time.Time Approver string Comments string Status StatusType }
func FromEntity ¶
type StatusType ¶
type StatusType int
const ( StatusNone StatusType = iota StatusApply //审核中 StatusAccept // 审核通过 StatusRefuse // 审核拒绝 StatusDone // 已发布 StatusStop // 已中止 StatusClose // 已关闭 StatusPublishing // 发布中 StatusPublishError // 发布失败 )
func (StatusType) MarshalJSON ¶
func (s StatusType) MarshalJSON() ([]byte, error)
func (StatusType) String ¶
func (s StatusType) String() string
Click to show internal directories.
Click to hide internal directories.