grpcplugins

package
v0.54.1 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: BSD-3-Clause Imports: 30 Imported by: 8

Documentation

Index

Constants

View Source
const (
	WarnColor    = "\033[1;33m"
	ErrColor     = "\033[1;31m"
	SuccessColor = "\033[1;32m"
	NoColor      = "\033[0m"
)

Variables

This section is empty.

Functions

func CDNItemUpload added in v0.53.1

func CDNItemUpload(ctx context.Context, c *actionplugin.Common, cdnAddr string, signature string, reader io.ReadSeeker) (*sdk.CDNItem, time.Duration, error)

func Error added in v0.53.1

func Error(s string)

func Errorf added in v0.53.1

func Errorf(s string, i ...any)

func ExtractFileInfoIntoRunResult added in v0.53.1

func ExtractFileInfoIntoRunResult(runResult *sdk.V2WorkflowRunResult, fi ArtifactoryFileInfo, name, resultType, localRepository, repository, maturity string)

func GetArtifactoryRunResults added in v0.53.1

func GetArtifactoryRunResults(ctx context.Context, c *actionplugin.Common, pattern string) (*workerruntime.V2GetResultResponse, error)

func GetIntegrationByName added in v0.53.1

func GetIntegrationByName(ctx context.Context, c *actionplugin.Common, name string) (*sdk.ProjectIntegration, error)

func GetJobContext added in v0.53.1

func GetJobRun added in v0.53.1

func GetRunResults

func GetRunResults(workerHTTPPort int32) ([]sdk.WorkflowRunResult, error)

func GetWorkerDirectories added in v0.53.0

func GetWorkerDirectories(ctx context.Context, c *actionplugin.Common) (*sdk.WorkerDirectories, error)

func Log added in v0.53.1

func Log(s string)

func Logf added in v0.53.1

func Logf(s string, i ...any)

func Println added in v0.53.1

func Println(a ...interface{})

func PromoteArtifactoryRunResult added in v0.53.1

func PromoteArtifactoryRunResult(ctx context.Context, c *actionplugin.Common, r sdk.V2WorkflowRunResult, promotionType sdk.WorkflowRunResultPromotionType, maturity string, props *utils.Properties) error

func RetrieveFilesToUpload added in v0.53.1

func RetrieveFilesToUpload(ctx context.Context, dirFS fs.FS, filePath string, ifNoFilesFound string) (glob.Results, map[string]int64, map[string]os.FileMode, map[string]fs.File, map[string]ChecksumResult, error)

func RunScript added in v0.53.1

func RunScript(ctx context.Context, chanRes chan *actionplugin.ActionResult, workingDir string, content string) error

func Success added in v0.53.1

func Success(s string)

func Successf added in v0.53.1

func Successf(s string, i ...any)

func UploadRunResult added in v0.53.1

func UploadRunResult(ctx context.Context, actplugin *actionplugin.Common, integrationCache *IntegrationCache, runresultReq *workerruntime.V2RunResultRequest, fileName string, f fs.File, size int64, fileChecksum ChecksumResult) (*workerruntime.V2UpdateResultResponse, error)

func Warn added in v0.53.1

func Warn(s string)

func Warnf added in v0.53.1

func Warnf(s string, i ...any)

Types

type ArtifactoryConfig added in v0.53.1

type ArtifactoryConfig struct {
	URL             string
	Token           string
	DistributionURL string
	ReleaseToken    string
}

type ArtifactoryFileInfo added in v0.53.1

type ArtifactoryFileInfo struct {
	Repo        string    `json:"repo"`
	Path        string    `json:"path"`
	Created     time.Time `json:"created"`
	CreatedBy   string    `json:"createdBy"`
	DownloadURI string    `json:"downloadUri"`
	MimeType    string    `json:"mimeType"`
	Size        string    `json:"size"`
	Checksums   struct {
		Sha1   string `json:"sha1"`
		Md5    string `json:"md5"`
		Sha256 string `json:"sha256"`
	} `json:"checksums"`
	OriginalChecksums struct {
		Sha1   string `json:"sha1"`
		Md5    string `json:"md5"`
		Sha256 string `json:"sha256"`
	} `json:"originalChecksums"`
	URI string `json:"uri"`
}

func GetArtifactoryFileInfo added in v0.53.1

func GetArtifactoryFileInfo(ctx context.Context, c *actionplugin.Common, config ArtifactoryConfig, repo, path string) (*ArtifactoryFileInfo, error)

type ArtifactoryFolderInfo added in v0.53.1

type ArtifactoryFolderInfo struct {
	Repo      string    `json:"repo"`
	Path      string    `json:"path"`
	Created   time.Time `json:"created"`
	CreatedBy string    `json:"createdBy"`
	URI       string    `json:"uri"`
	Children  []struct {
		URI    string `json:"uri"`
		Folder bool   `json:"folder"`
	} `json:"children"`
}

func GetArtifactoryFolderInfo added in v0.53.1

func GetArtifactoryFolderInfo(ctx context.Context, c *actionplugin.Common, config ArtifactoryConfig, repo, path string) (*ArtifactoryFolderInfo, error)

type ArtifactoryUploadResult added in v0.53.1

type ArtifactoryUploadResult struct {
	Repo        string    `json:"repo"`
	Path        string    `json:"path"`
	Created     time.Time `json:"created"`
	CreatedBy   string    `json:"createdBy"`
	DownloadURI string    `json:"downloadUri"`
	MimeType    string    `json:"mimeType"`
	Size        string    `json:"size"`
	Checksums   struct {
		Sha1   string `json:"sha1"`
		Md5    string `json:"md5"`
		Sha256 string `json:"sha256"`
	} `json:"checksums"`
	OriginalChecksums struct {
		Sha1   string `json:"sha1"`
		Md5    string `json:"md5"`
		Sha256 string `json:"sha256"`
	} `json:"originalChecksums"`
	URI string `json:"uri"`
}

func ArtifactoryItemUpload added in v0.53.1

type ChecksumResult added in v0.53.1

type ChecksumResult struct {
	Md5    string
	Sha1   string
	Sha256 string
}

type IntegrationCache added in v0.53.1

type IntegrationCache struct {
	// contains filtered or unexported fields
}

func NewIntegrationCache added in v0.53.1

func NewIntegrationCache() *IntegrationCache

Jump to

Keyboard shortcuts

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