# Packages
Package mock_cdsclient is a generated GoMock package.
# Functions
FilterByUser allow a provider to perform a request as a user identified by its username.
FilterByWritablePermission allow a provider to filter only writable objects.
Full allows to get job details on a workflow v3.
New returns a client from a config struct.
NewHTTPClient returns a new HTTP Client.
NewProviderClient returns an implementation for ProviderClient interface.
NewServiceClient returns client for a service.
NewWorker returns client for a worker.
SetHeader modify headers of http.Request.
WithDeepPipelines allows to get pipelines details on a workflow.
WithKeys allow a provider to retrieve a project with its keys.
WithLabels allow a provider to retrieve a workflow with its labels.
WithPermissions allow a provider to retrieve a workflow with its permissions.
WithQueryParameter add query parameters to your http.Request.
WithTemplate allow a provider to retrieve a workflow with template if exists.
WithUsage allow a provider to retrieve an application with its usage.
WithWorkflows allow a provider to retrieve a pipeline with its workflows usage.
# Constants
RequestedIfModifiedSinceHeader is used as HTTP header.
ResponseAPINanosecondsTimeHeader is used as HTTP header.
ResponseAPITimeHeader is used as HTTP header.
ResponseEtagHeader is used as HTTP header.
ResponseProcessTimeHeader is used as HTTP header.
# Structs
Config is the configuration data used by the cdsclient interface implementation.
ProviderConfig is the configuration data used by the cdsclient ProviderClient interface implementation.
ServiceConfig is the configuration data used by the cdsclient interface implementation.
WorkerModelFilter for model's calls.
# Interfaces
ActionClient exposes actions related functions.
Admin expose all function to CDS administration.
ApplicationClient exposes application related functions.
ApplicationKeysClient exposes application keys related functions.
ApplicationVariableClient exposes application variables related functions.
AuthClient is the interface for authentication management.
DownloadClient exposes download related functions.
EnvironmentClient exposes environment related functions.
EnvironmentKeysClient exposes environment keys related functions.
EnvironmentVariableClient exposes environment variables related functions.
EventsClient listen SSE Events from CDS API.
ExportImportInterface exposes pipeline and application export and import function.
GroupClient exposes groups related functions.
GRPCPluginsClient exposes plugins API.
HookClient exposes functions used for hooks services.
HTTPClient is a interface for HTTPClient mock.
IntegrationClient exposes integration functions.
Interface is the main interface for cdsclient package
go:generate mockgen -source=interface.go -destination=mock_cdsclient/interface_mock.go Interface.
MaintenanceClient manage maintenance mode on CDS.
MonitoringClient exposes monitoring functions.
PipelineClient exposes pipelines related functions.
ProjectClient exposes project related functions.
ProjectClientV2 exposes project related functions.
ProjectKeysClient exposes project keys related functions.
ProjectVariablesClient exposes project variables related functions.
ProviderClient exposes allowed methods for providers
Usage:
cfg := ProviderConfig{
Host: "https://my-cds-api:8081",
Name: "my-provider-name",
Token: "my-very-long-secret-token",
}
client := NewProviderClient(cfg)
//Get the writable projects of a user
projects, err := client.ProjectsList(FilterByUser("a-username"), FilterByWritablePermission())
..
QueueClient exposes queue related functions.
Raw is a low-level interface exposing HTTP functions.
RepositoriesManagerInterface exposes all repostories manager functions.
ServiceClient exposes functions used for services.
TemplateClient exposes templates functions.
UserClient exposes users functions.
WorkerClient exposes workers functions.
WorkflowAsCodeInterface exposes all workflow as code functions.
WorkflowClient exposes workflows functions.
# Type aliases
RequestModifier is used to modify behavior of Request and Steam functions.