client

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(url, token string) *Client

NewClient initializes and returns a API client.

func (*Client) AddOrgMember

func (c *Client) AddOrgMember(ctx context.Context, orgRef, userRef string, role gwapitypes.MemberRole) (*gwapitypes.AddOrgMemberResponse, *Response, error)

func (*Client) CreateOrg

func (*Client) CreateOrgInvitation added in v0.8.0

func (*Client) CreateProjectGroupSecret

func (c *Client) CreateProjectGroupSecret(ctx context.Context, projectGroupRef string, req *gwapitypes.CreateSecretRequest) (*gwapitypes.SecretResponse, *Response, error)

func (*Client) CreateProjectGroupVariable

func (c *Client) CreateProjectGroupVariable(ctx context.Context, projectGroupRef string, req *gwapitypes.CreateVariableRequest) (*gwapitypes.VariableResponse, *Response, error)

func (*Client) CreateProjectSecret

func (c *Client) CreateProjectSecret(ctx context.Context, projectRef string, req *gwapitypes.CreateSecretRequest) (*gwapitypes.SecretResponse, *Response, error)

func (*Client) CreateProjectVariable

func (c *Client) CreateProjectVariable(ctx context.Context, projectRef string, req *gwapitypes.CreateVariableRequest) (*gwapitypes.VariableResponse, *Response, error)

func (*Client) CreateUser

func (*Client) CreateUserLA

func (*Client) DeleteOrg

func (c *Client) DeleteOrg(ctx context.Context, orgRef string) (*Response, error)

func (*Client) DeleteOrgInvitation added in v0.8.0

func (c *Client) DeleteOrgInvitation(ctx context.Context, orgRef string, userRef string) (*Response, error)

func (*Client) DeleteProject

func (c *Client) DeleteProject(ctx context.Context, projectRef string) (*Response, error)

func (*Client) DeleteProjectGroup

func (c *Client) DeleteProjectGroup(ctx context.Context, projectGroupRef string) (*Response, error)

func (*Client) DeleteProjectGroupSecret

func (c *Client) DeleteProjectGroupSecret(ctx context.Context, projectGroupRef, secretName string) (*Response, error)

func (*Client) DeleteProjectGroupVariable

func (c *Client) DeleteProjectGroupVariable(ctx context.Context, projectGroupRef, variableName string) (*Response, error)

func (*Client) DeleteProjectLogs added in v0.7.0

func (c *Client) DeleteProjectLogs(ctx context.Context, projectRef string, runNumber uint64, taskID string, setup bool, step int) (*Response, error)

func (*Client) DeleteProjectSecret

func (c *Client) DeleteProjectSecret(ctx context.Context, projectRef, secretName string) (*Response, error)

func (*Client) DeleteProjectVariable

func (c *Client) DeleteProjectVariable(ctx context.Context, projectRef, variableName string) (*Response, error)

func (*Client) DeleteRemoteSource

func (c *Client) DeleteRemoteSource(ctx context.Context, rsRef string) (*Response, error)

func (*Client) DeleteUser

func (c *Client) DeleteUser(ctx context.Context, userRef string) (*Response, error)

func (*Client) DeleteUserLA

func (c *Client) DeleteUserLA(ctx context.Context, userRef, laID string) (*Response, error)

func (*Client) DeleteUserLogs added in v0.7.0

func (c *Client) DeleteUserLogs(ctx context.Context, userRef string, runNumber uint64, taskID string, setup bool, step int) (*Response, error)

func (*Client) DeleteUserToken

func (c *Client) DeleteUserToken(ctx context.Context, userRef, tokenName string) (*Response, error)

func (*Client) DisableMaintenance added in v0.8.0

func (c *Client) DisableMaintenance(ctx context.Context, serviceName string) (*Response, error)

func (*Client) EnableMaintenance added in v0.8.0

func (c *Client) EnableMaintenance(ctx context.Context, serviceName string) (*Response, error)

func (*Client) Export added in v0.8.0

func (c *Client) Export(ctx context.Context, serviceName string) (*Response, error)

func (*Client) GetCurrentUser

func (c *Client) GetCurrentUser(ctx context.Context) (*gwapitypes.PrivateUserResponse, *Response, error)

func (*Client) GetMaintenanceStatus added in v0.8.0

func (c *Client) GetMaintenanceStatus(ctx context.Context, serviceName string) (*gwapitypes.MaintenanceStatusResponse, *Response, error)

func (*Client) GetOrg added in v0.8.0

func (c *Client) GetOrg(ctx context.Context, orgRef string) (*gwapitypes.OrgResponse, *Response, error)

func (*Client) GetOrgInvitation added in v0.8.0

func (c *Client) GetOrgInvitation(ctx context.Context, orgRef, userRef string) (*gwapitypes.OrgInvitationResponse, *Response, error)

func (*Client) GetOrgInvitations added in v0.8.0

func (c *Client) GetOrgInvitations(ctx context.Context, orgRef string) ([]*gwapitypes.OrgInvitationResponse, *Response, error)

func (*Client) GetOrgMembers

func (c *Client) GetOrgMembers(ctx context.Context, orgRef string, opts *ListOptions) (*gwapitypes.OrgMembersResponse, *Response, error)

func (*Client) GetOrgs added in v0.8.0

func (c *Client) GetOrgs(ctx context.Context, opts *ListOptions) ([]*gwapitypes.OrgResponse, *Response, error)

func (*Client) GetProject

func (c *Client) GetProject(ctx context.Context, projectRef string) (*gwapitypes.ProjectResponse, *Response, error)

func (*Client) GetProjectCommitStatusDeliveries added in v0.9.0

func (c *Client) GetProjectCommitStatusDeliveries(ctx context.Context, projectRef string, opts *DeliveriesOptions) ([]*gwapitypes.CommitStatusDeliveryResponse, *Response, error)

func (*Client) GetProjectGroup

func (c *Client) GetProjectGroup(ctx context.Context, projectGroupRef string) (*gwapitypes.ProjectGroupResponse, *Response, error)

func (*Client) GetProjectGroupProjects

func (c *Client) GetProjectGroupProjects(ctx context.Context, projectGroupRef string) ([]*gwapitypes.ProjectResponse, *Response, error)

func (*Client) GetProjectGroupSecrets added in v0.3.0

func (c *Client) GetProjectGroupSecrets(ctx context.Context, projectRef string, tree, removeoverridden bool) ([]*gwapitypes.SecretResponse, *Response, error)

func (*Client) GetProjectGroupSubgroups

func (c *Client) GetProjectGroupSubgroups(ctx context.Context, projectGroupRef string) ([]*gwapitypes.ProjectGroupResponse, *Response, error)

func (*Client) GetProjectGroupVariables added in v0.3.0

func (c *Client) GetProjectGroupVariables(ctx context.Context, projectRef string, tree, removeoverridden bool) ([]*gwapitypes.VariableResponse, *Response, error)

func (*Client) GetProjectLogs added in v0.7.0

func (c *Client) GetProjectLogs(ctx context.Context, projectRef string, runNumber uint64, taskID string, setup bool, step int, follow bool) (*Response, error)

func (*Client) GetProjectRun added in v0.7.0

func (c *Client) GetProjectRun(ctx context.Context, projectRef string, runNumber uint64) (*gwapitypes.RunResponse, *Response, error)

func (*Client) GetProjectRunTask added in v0.7.0

func (c *Client) GetProjectRunTask(ctx context.Context, projectRef string, runNumber uint64, taskID string) (*gwapitypes.RunTaskResponse, *Response, error)

func (*Client) GetProjectRunWebhookDeliveries added in v0.9.0

func (c *Client) GetProjectRunWebhookDeliveries(ctx context.Context, projectRef string, opts *DeliveriesOptions) ([]*gwapitypes.RunWebhookDeliveryResponse, *Response, error)

func (*Client) GetProjectRuns added in v0.7.0

func (c *Client) GetProjectRuns(ctx context.Context, projectRef string, opts *GetRunsOptions) ([]*gwapitypes.RunsResponse, *Response, error)

func (*Client) GetProjectSecrets added in v0.3.0

func (c *Client) GetProjectSecrets(ctx context.Context, projectRef string, tree, removeoverridden bool) ([]*gwapitypes.SecretResponse, *Response, error)

func (*Client) GetProjectVariables added in v0.3.0

func (c *Client) GetProjectVariables(ctx context.Context, projectRef string, tree, removeoverridden bool) ([]*gwapitypes.VariableResponse, *Response, error)

func (*Client) GetRemoteSource

func (c *Client) GetRemoteSource(ctx context.Context, rsRef string) (*gwapitypes.RemoteSourceResponse, *Response, error)

func (*Client) GetRemoteSources

func (c *Client) GetRemoteSources(ctx context.Context, opts *ListOptions) ([]*gwapitypes.RemoteSourceResponse, *Response, error)

func (*Client) GetUser

func (c *Client) GetUser(ctx context.Context, userRef string) (*gwapitypes.UserResponse, *Response, error)

func (*Client) GetUserByLinkedAccountRemoteUserAndSource added in v0.8.0

func (c *Client) GetUserByLinkedAccountRemoteUserAndSource(ctx context.Context, remoteUserID, remoteSourceRef string) (*gwapitypes.PrivateUserResponse, *Response, error)

func (*Client) GetUserLogs added in v0.7.0

func (c *Client) GetUserLogs(ctx context.Context, userRef string, runNumber uint64, taskID string, setup bool, step int, follow bool) (*Response, error)

func (*Client) GetUserOrgInvitations added in v0.8.0

func (c *Client) GetUserOrgInvitations(ctx context.Context) ([]*gwapitypes.OrgInvitationResponse, *Response, error)

func (*Client) GetUserOrgs added in v0.7.0

func (c *Client) GetUserOrgs(ctx context.Context, opts *ListOptions) ([]*gwapitypes.UserOrgResponse, *Response, error)

func (*Client) GetUserRemoteRepos added in v0.8.0

func (c *Client) GetUserRemoteRepos(ctx context.Context, rsRef string) ([]*gwapitypes.RemoteRepoResponse, *Response, error)

func (*Client) GetUserRun added in v0.7.0

func (c *Client) GetUserRun(ctx context.Context, userRef string, runNumber uint64) (*gwapitypes.RunResponse, *Response, error)

func (*Client) GetUserRunTask added in v0.7.0

func (c *Client) GetUserRunTask(ctx context.Context, userRef string, runNumber uint64, taskID string) (*gwapitypes.RunTaskResponse, *Response, error)

func (*Client) GetUserRuns added in v0.7.0

func (c *Client) GetUserRuns(ctx context.Context, userRef string, opts *GetRunsOptions) ([]*gwapitypes.RunsResponse, *Response, error)

func (*Client) GetUsers

func (*Client) GetVersion added in v0.3.0

func (c *Client) GetVersion(ctx context.Context) (*gwapitypes.VersionResponse, *Response, error)

func (*Client) Import added in v0.8.0

func (c *Client) Import(ctx context.Context, serviceName string, r io.Reader) (*Response, error)

func (*Client) Login added in v0.8.0

func (*Client) ProjectCommitStatusRedelivery added in v0.9.0

func (c *Client) ProjectCommitStatusRedelivery(ctx context.Context, projectRef string, commitStatusDeliveryID string) (*Response, error)

func (*Client) ProjectCreateRun

func (c *Client) ProjectCreateRun(ctx context.Context, projectRef string, req *gwapitypes.ProjectCreateRunRequest) (*Response, error)

func (*Client) ProjectRunAction added in v0.9.0

func (c *Client) ProjectRunAction(ctx context.Context, projectRef string, runNumber uint64, req *gwapitypes.RunActionsRequest) (*gwapitypes.RunResponse, *Response, error)

func (*Client) ProjectRunWebhookRedelivery added in v0.9.0

func (c *Client) ProjectRunWebhookRedelivery(ctx context.Context, projectRef string, runWebhookDeliveryID string) (*Response, error)

func (*Client) ReconfigProject

func (c *Client) ReconfigProject(ctx context.Context, projectRef string) (*Response, error)

func (*Client) RefreshRemoteRepo added in v0.8.0

func (c *Client) RefreshRemoteRepo(ctx context.Context, projectRef string) (*gwapitypes.ProjectResponse, *Response, error)

func (*Client) RemoveOrgMember

func (c *Client) RemoveOrgMember(ctx context.Context, orgRef, userRef string) (*Response, error)

func (*Client) SetHTTPClient

func (c *Client) SetHTTPClient(client *http.Client)

SetHTTPClient replaces default http.Client with user given one.

func (*Client) UpdateOrg added in v0.8.0

func (*Client) UpdateProject added in v0.3.0

func (c *Client) UpdateProject(ctx context.Context, projectRef string, req *gwapitypes.UpdateProjectRequest) (*gwapitypes.ProjectResponse, *Response, error)

func (*Client) UpdateProjectGroup added in v0.3.0

func (c *Client) UpdateProjectGroup(ctx context.Context, projectGroupRef string, req *gwapitypes.UpdateProjectGroupRequest) (*gwapitypes.ProjectGroupResponse, *Response, error)

func (*Client) UpdateProjectGroupSecret

func (c *Client) UpdateProjectGroupSecret(ctx context.Context, projectGroupRef, secretName string, req *gwapitypes.UpdateSecretRequest) (*gwapitypes.SecretResponse, *Response, error)

func (*Client) UpdateProjectGroupVariable

func (c *Client) UpdateProjectGroupVariable(ctx context.Context, projectGroupRef, variableName string, req *gwapitypes.UpdateVariableRequest) (*gwapitypes.VariableResponse, *Response, error)

func (*Client) UpdateProjectSecret

func (c *Client) UpdateProjectSecret(ctx context.Context, projectRef, secretName string, req *gwapitypes.UpdateSecretRequest) (*gwapitypes.SecretResponse, *Response, error)

func (*Client) UpdateProjectVariable

func (c *Client) UpdateProjectVariable(ctx context.Context, projectRef, variableName string, req *gwapitypes.UpdateVariableRequest) (*gwapitypes.VariableResponse, *Response, error)

func (*Client) UserCreateRun

func (c *Client) UserCreateRun(ctx context.Context, req *gwapitypes.UserCreateRunRequest) (*Response, error)

func (*Client) UserOrgInvitationAction added in v0.8.0

func (c *Client) UserOrgInvitationAction(ctx context.Context, orgRef string, req *gwapitypes.OrgInvitationActionRequest) (*Response, error)

type DeliveriesOptions added in v0.9.0

type DeliveriesOptions struct {
	*ListOptions

	DeliveryStatusFilter []string
}

func (*DeliveriesOptions) Add added in v0.9.0

func (o *DeliveriesOptions) Add(q url.Values)

type GetRunsOptions added in v0.9.0

type GetRunsOptions struct {
	*ListOptions

	StartRunCounter uint64
	SubGroup        string
	PhaseFilter     []string
	ResultFilter    []string
}

func (*GetRunsOptions) Add added in v0.9.0

func (o *GetRunsOptions) Add(q url.Values)

type ListOptions added in v0.9.0

type ListOptions struct {
	Cursor string

	Limit         int
	SortDirection gwapitypes.SortDirection
}

func (*ListOptions) Add added in v0.9.0

func (o *ListOptions) Add(q url.Values)

type Response added in v0.9.0

type Response struct {
	*http.Response

	Cursor string
}

Jump to

Keyboard shortcuts

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