tc

package
v50.1.3 Latest Latest
Warning

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

Go to latest
Published: May 17, 2023 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Overview

The interfaces in this package contain the methods of each taskcluster service, allowing the use of fakes that provide the same methods.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

type Auth interface {
	ExpandScopes(payload *tcauth.SetOfScopes) (*tcauth.SetOfScopes, error)
	SentryDSN(project string) (*tcauth.SentryDSNResponse, error)
	WebsocktunnelToken(wstAudience, wstClient string) (*tcauth.WebsocktunnelTokenResponse, error)
}

type ClientFactory

type ClientFactory struct {
}

func (*ClientFactory) Auth

func (cf *ClientFactory) Auth(creds *tcclient.Credentials, rootURL string) Auth

func (*ClientFactory) Object

func (cf *ClientFactory) Object(creds *tcclient.Credentials, rootURL string) Object

func (*ClientFactory) PurgeCache

func (cf *ClientFactory) PurgeCache(creds *tcclient.Credentials, rootURL string) PurgeCache

func (*ClientFactory) Queue

func (cf *ClientFactory) Queue(creds *tcclient.Credentials, rootURL string) Queue

func (*ClientFactory) Secrets

func (cf *ClientFactory) Secrets(creds *tcclient.Credentials, rootURL string) Secrets

func (*ClientFactory) WorkerManager

func (cf *ClientFactory) WorkerManager(creds *tcclient.Credentials, rootURL string) WorkerManager

type Object

type Object interface {
	CreateUpload(name string, payload *tcobject.CreateUploadRequest) (*tcobject.CreateUploadResponse, error)
	FinishUpload(name string, payload *tcobject.FinishUploadRequest) error
	StartDownload(name string, payload *tcobject.DownloadObjectRequest) (*tcobject.DownloadObjectResponse, error)

	// non-API functions
	UploadFromFile(projectID string, name string, contentType string, expires time.Time, uploadID string, filepath string) error
}

type PurgeCache

type PurgeCache interface {
	PurgeRequests(workerPoolId, since string) (*tcpurgecache.OpenPurgeRequestList, error)
}

type Queue

type Queue interface {
	CancelTask(taskId string) (*tcqueue.TaskStatusResponse, error)
	ClaimWork(taskQueueId string, payload *tcqueue.ClaimWorkRequest) (*tcqueue.ClaimWorkResponse, error)
	CreateArtifact(taskId, runId, name string, payload *tcqueue.PostArtifactRequest) (*tcqueue.PostArtifactResponse, error)
	CreateTask(taskId string, payload *tcqueue.TaskDefinitionRequest) (*tcqueue.TaskStatusResponse, error)
	FinishArtifact(taskId, runId, name string, payload *tcqueue.FinishArtifactRequest) error
	GetLatestArtifact_SignedURL(taskId, name string, duration time.Duration) (*url.URL, error)
	ListArtifacts(taskId, runId, continuationToken, limit string) (*tcqueue.ListArtifactsResponse, error)
	Artifact(taskId, runId, name string) (*tcqueue.GetArtifactContentResponse, error)
	LatestArtifact(taskId, name string) (*tcqueue.GetArtifactContentResponse, error)
	ReclaimTask(taskId, runId string) (*tcqueue.TaskReclaimResponse, error)
	ReportCompleted(taskId, runId string) (*tcqueue.TaskStatusResponse, error)
	ReportException(taskId, runId string, payload *tcqueue.TaskExceptionRequest) (*tcqueue.TaskStatusResponse, error)
	ReportFailed(taskId, runId string) (*tcqueue.TaskStatusResponse, error)
	Status(taskId string) (*tcqueue.TaskStatusResponse, error)
	Task(taskId string) (*tcqueue.TaskDefinitionResponse, error)
	DownloadArtifactToFile(taskId string, runId int64, name string, filename string) (string, int64, error)
	DownloadArtifactToBuf(taskId string, runId int64, name string) ([]byte, string, int64, error)
}

type Secrets

type Secrets interface {
	Ping() error
	Set(name string, payload *tcsecrets.Secret) error
	Remove(name string) error
	Get(name string) (*tcsecrets.Secret, error)
	List(continuationToken, limit string) (*tcsecrets.SecretsList, error)
}

type ServiceFactory

type ServiceFactory interface {
	Auth(creds *tcclient.Credentials, rootURL string) Auth
	Queue(creds *tcclient.Credentials, rootURL string) Queue
	Object(creds *tcclient.Credentials, rootURL string) Object
	PurgeCache(creds *tcclient.Credentials, rootURL string) PurgeCache
	Secrets(creds *tcclient.Credentials, rootURL string) Secrets
	WorkerManager(creds *tcclient.Credentials, rootURL string) WorkerManager
}

type WorkerManager

type WorkerManager interface {
	RegisterWorker(payload *tcworkermanager.RegisterWorkerRequest) (*tcworkermanager.RegisterWorkerResponse, error)
	WorkerPool(workerPoolId string) (*tcworkermanager.WorkerPoolFullDefinition, error)
	CreateWorkerPool(workerPoolId string, payload *tcworkermanager.WorkerPoolDefinition) (*tcworkermanager.WorkerPoolFullDefinition, error)
}

Jump to

Keyboard shortcuts

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