Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
// SetClient sets the http.Client.
SetClient(*http.Client)
// SetAddress sets the server address.
SetAddress(string)
// ArtifactPost creates a new artifact.
ArtifactPost(artifact *dx.Artifact) (*dx.Artifact, error)
// ArtifactsGet returns all artifacts in the database within the given constraints
ArtifactsGet(
repo, branch string,
event *dx.GitEvent,
sourceBranch string,
sha []string,
limit, offset int,
since, until *time.Time,
) ([]*dx.Artifact, error)
// ReleasesGet returns all releases from the gitops repo within the given constraints
ReleasesGet(
app string,
env string,
limit, offset int,
gitRepo string,
since, until *time.Time,
) ([]*dx.Release, error)
// StatusGet returns release status for all apps in an env
StatusGet(
app string,
env string,
) (map[string]*dx.Release, error)
// ReleasesPost releases the given artifact to the given environment
ReleasesPost(request dx.ReleaseRequest) (string, error)
// RollbackPost rolls back to the given sha
RollbackPost(env string, app string, targetSHA string) (string, error)
// DeletePost deletes an application in an env
DeletePost(env string, app string) error
// TrackGet returns the state of an event
TrackGet(trackingID string) (*dx.ReleaseStatus, error)
// UserGet returns the user with the given login
UserGet(login string, withToken bool) (*model.User, error)
// UserPost creates a user
UserPost(user *model.User) (*model.User, error)
// GitopsRepoGet returns the configured gitops repo name
GitopsRepoGet() (string, error)
}
Client is used to communicate with a Drone server.
type GitopsRepoResult ¶ added in v0.4.0
type GitopsRepoResult struct {
GitopsRepo string `json:"gitopsRepo"`
}
Click to show internal directories.
Click to hide internal directories.