svc_publish

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 9, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const PUBLISH = "PUBLISH"

Variables

This section is empty.

Functions

This section is empty.

Types

type PublishSvc

type PublishSvc struct {
	DB    db.Repo
	Store storage.Repo

	PublishRepo       repo.PublishRepo
	PublishConfigRepo repo.PublishConfigRepo
	// contains filtered or unexported fields
}

func (*PublishSvc) DecryptPublishContent

func (p *PublishSvc) DecryptPublishContent(ctx context.Context, pContent string) string

func (*PublishSvc) DeletePublish

func (p *PublishSvc) DeletePublish(ctx context.Context, projectID, namespaceID int, newStatus int) error

DeletePublish 将 PublishToken 从 ETCD 中删除 并且设置 Publish 为 newStatus。

func (*PublishSvc) EnterPublish

func (p *PublishSvc) EnterPublish(ctx context.Context, projectID, namespaceID, configID int, content string) error

EnterPublish 并发安全 进入发布,如果namespace尚未处于发布期,则自动进入发布期 将 config 加入 namespace 的发布期 如果 config 已加入,则更新 config 内容 如果 config 未加入,则加入 如果 config 已被锁定,则返回无法进入

func (*PublishSvc) IsInPublish

func (p *PublishSvc) IsInPublish(ctx context.Context, projectKey, namespaceName string) (bool, error)

func (*PublishSvc) ListPublishConfig

func (p *PublishSvc) ListPublishConfig(ctx context.Context, projectID, namespaceID int) ([]model.PublishConfig, string, error)

ListPublishConfig 获取命名空间下所有的处于发布期的配置 如果命名空间没有处于发布期,则返回错误 如果命名空间处于发布期,则返回旗下待发布的配置列表

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL