Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BaseClient ¶
type BaseClient struct { apiclient.BaseClient RemoteProviderURL string }
BaseClient implements a subset of the Client interface, and has fields that are common to all current implementations of it.
func (*BaseClient) GetRemoteProviderURL ¶
func (c *BaseClient) GetRemoteProviderURL() string
func (*BaseClient) SetRemoteProviderURL ¶
func (c *BaseClient) SetRemoteProviderURL(remoteProviderURL string)
type Client ¶
type Client interface { apiclient.Client // FetchFile fetches a file from the API. FetchFile(projectIdentifiers ProjectIdentifier, fileName string) ([]byte, error) // FetchBranches fetches branches for a specific project from the API. FetchBranches(projectIdentifier ProjectIdentifier) ([]WharfBranch, error) // FetchProjectByGroupAndProjectName should only be used if the remote // project ID for the project is not available. If it is available then // FetchProjectByID should be used instead. // // Mainly used for migrations for projects added prior to when we started // tracking projects by their remote project ID in wharf-api. FetchProjectByGroupAndProjectName(groupName, projectName string) (WharfProject, error) // GetRemoteProviderURL returns the set remote provider URL. // // Implemented by BaseClient for convenience. GetRemoteProviderURL() string // SetRemoteProviderURL sets the remote provider URL. // // Implemented by BaseClient for convenience. SetRemoteProviderURL(remoteProviderURL string) // WharfProjectToIdentifier extracts the required information to uniquely // identify a project when communicating with the API, and returns it in the // form of a ProjectIdentifier object. // // The order of the values are up to the implementation. WharfProjectToIdentifier(project WharfProject) ProjectIdentifier }
type ProjectIdentifier ¶
type ProjectIdentifier struct {
Values []string
}
ProjectIdentifier holds the values necessary to uniquely identify a project when communicating with the remote provider.
Instances of this object should be obtained through the Client.WharfProjectToIdentifier method.
type WharfBranch ¶
type WharfBranch = apiclient.WharfBranch
WharfBranch is an alias for apiclient's WharfBranch.
type WharfProject ¶
type WharfProject = apiclient.WharfProject
WharfProject is an alias for apiclient's WharfProject.
Click to show internal directories.
Click to hide internal directories.