Help us shape the future of Go! Take the 2026 Go Developer Survey

saas

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrPollingTimeout = &PollingTimeoutError{}

Functions

func CheckAndDownloadArtifact

func CheckAndDownloadArtifact(statusPath, downloadPath, token string, builder *models.Artifact, pollInterval, maxPollTime time.Duration) (string, string, error)

对外导出:兼容外部包调用

func ReDownloadSaasArtifact

func ReDownloadSaasArtifact() error

重新下发SaaS构建任务

func RegisterLicense

func RegisterLicense() error

注册License

func SaasHeaders

func SaasHeaders(token string) map[string]string

统一SaaS请求头

Types

type DownloadResult

type DownloadResult struct {
	Path   string
	Status string
	Err    error
}

type PollingTimeoutError

type PollingTimeoutError struct{}

func (*PollingTimeoutError) Error

func (e *PollingTimeoutError) Error() string

type SaasClient

type SaasClient struct {
	Token   string
	BaseURL string
}

func NewSaasClient

func NewSaasClient() *SaasClient

func (*SaasClient) CheckAndDownloadArtifact

func (c *SaasClient) CheckAndDownloadArtifact(statusPath, downloadPath string, builder *models.Artifact, pollInterval, maxPollTime time.Duration) DownloadResult

轮询并下载产物

func (*SaasClient) CheckBuildStatus

func (c *SaasClient) CheckBuildStatus(statusPath string) (string, error)

查询构建状态

func (*SaasClient) DownloadArtifact

func (c *SaasClient) DownloadArtifact(downloadPath string, builder *models.Artifact) error

下载构建产物

Jump to

Keyboard shortcuts

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