release

package
v1.3.4-beta Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APICommit

type APICommit struct {
	Release string
	API     string
	Commit  string
}

type CommitType

type CommitType = string
const (
	CommitApiDocument CommitType = "api_doc"
	CommitApiRequest  CommitType = "api_request"
	CommitUpstream    CommitType = "upstream"
	CommitApiProxy    CommitType = "api_proxy"
	CommitServiceDoc  CommitType = "service_doc"
	CommitStrategy    CommitType = "strategy"
)

type IReleaseService

type IReleaseService interface {
	// GetRelease 获取发布信息
	GetRelease(ctx context.Context, id string) (*Release, error)
	// CreateRelease 创建发布
	CreateRelease(ctx context.Context, service, version, remark string, apiRequestCommit, apisProxyCommits map[string]string, apiDocCommits, serviceDocCommits string, upstreams map[string]map[string]string, strategies map[string]string) (*Release, error)
	// DeleteRelease 删除发布
	DeleteRelease(ctx context.Context, id string) error
	List(ctx context.Context, service string) ([]*Release, error)
	GetReleaseInfos(ctx context.Context, id string) ([]*APICommit, []*APICommit, *APICommit, []*UpstreamCommit, *ServiceCommit, error)
	GetCommits(ctx context.Context, id string) ([]*ProjectCommits, error)
	GetRunningApiDocCommits(ctx context.Context, serviceIds ...string) ([]string, error)
	GetRunningApiProxyCommit(ctx context.Context, service string, apiUUID string) (string, error)
	Completeness(partitions []string, apis []string, requestCommits []*commit.Commit[api.Request], proxyCommits []*commit.Commit[api.Proxy], upstreamCommits []*commit.Commit[upstream.Config]) bool

	// GetRunning gets the running release with the given service.
	//
	// ctx: the context
	// service: the service name
	// Return type(s): *Release, error
	GetRunning(ctx context.Context, service string) (*Release, error)

	SetRunning(ctx context.Context, service string, id string) error
	CheckNewVersion(ctx context.Context, service string, version string) (bool, error)
}

type ProjectCommits

type ProjectCommits struct {
	Release string
	Type    string
	Target  string
	Key     string
	Commit  string
}

type Release

type Release struct {
	UUID     string
	Service  string
	Version  string
	Remark   string
	Creator  string
	CreateAt time.Time
}

func FromEntity

func FromEntity(e *release.Release) *Release

type ServiceCommit

type ServiceCommit struct {
	Release string
	Service string
	Commit  string
}

type UpstreamCommit

type UpstreamCommit struct {
	Release   string
	Upstream  string
	Partition string
	Commit    string
}

Jump to

Keyboard shortcuts

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