client

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: Apache-2.0 Imports: 13 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 {
	*common.Client
}

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 cstypes.MemberRole) (*cstypes.OrganizationMember, *Response, error)

func (*Client) CreateOrg

func (*Client) CreateOrgInvitation added in v0.8.0

func (c *Client) CreateOrgInvitation(ctx context.Context, orgRef string, req *csapitypes.CreateOrgInvitationRequest) (*cstypes.OrgInvitation, *Response, error)

func (*Client) CreateProject

func (*Client) CreateProjectGroupSecret

func (c *Client) CreateProjectGroupSecret(ctx context.Context, projectGroupRef string, req *csapitypes.CreateUpdateSecretRequest) (*csapitypes.Secret, *Response, error)

func (*Client) CreateProjectGroupVariable

func (c *Client) CreateProjectGroupVariable(ctx context.Context, projectGroupRef string, req *csapitypes.CreateUpdateVariableRequest) (*csapitypes.Variable, *Response, error)

func (*Client) CreateProjectSecret

func (c *Client) CreateProjectSecret(ctx context.Context, projectRef string, req *csapitypes.CreateUpdateSecretRequest) (*csapitypes.Secret, *Response, error)

func (*Client) CreateProjectVariable

func (c *Client) CreateProjectVariable(ctx context.Context, projectRef string, req *csapitypes.CreateUpdateVariableRequest) (*csapitypes.Variable, *Response, error)

func (*Client) CreateUser

func (c *Client) CreateUser(ctx context.Context, req *csapitypes.CreateUserRequest) (*cstypes.User, *Response, error)

func (*Client) CreateUserLA

func (c *Client) CreateUserLA(ctx context.Context, userRef string, req *csapitypes.CreateUserLARequest) (*cstypes.LinkedAccount, *Response, error)

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) 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) 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) (*Response, error)

func (*Client) EnableMaintenance added in v0.8.0

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

func (*Client) Export added in v0.8.0

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

func (*Client) GetLinkedAccountByRemoteUserAndSource added in v0.8.0

func (c *Client) GetLinkedAccountByRemoteUserAndSource(ctx context.Context, remoteUserID, remoteSourceID string) (*cstypes.LinkedAccount, *Response, error)

func (*Client) GetMaintenanceStatus added in v0.8.0

func (c *Client) GetMaintenanceStatus(ctx context.Context) (*csapitypes.MaintenanceStatusResponse, *Response, error)

func (*Client) GetOrg

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

func (*Client) GetOrgInvitation added in v0.8.0

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

func (*Client) GetOrgInvitations added in v0.8.0

func (c *Client) GetOrgInvitations(ctx context.Context, orgRef string, limit int) ([]*cstypes.OrgInvitation, *Response, error)

func (*Client) GetOrgMembers

func (c *Client) GetOrgMembers(ctx context.Context, orgRef string, opts *GetOrgMembersOptions) ([]*csapitypes.OrgMemberResponse, *Response, error)

func (*Client) GetOrgs

func (c *Client) GetOrgs(ctx context.Context, opts *GetOrgsOptions) ([]*cstypes.Organization, *Response, error)

func (*Client) GetParsedResponse added in v0.9.0

func (c *Client) GetParsedResponse(ctx context.Context, method, path string, query url.Values, header http.Header, ibody io.Reader, obj interface{}) (*Response, error)

func (*Client) GetProject

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

func (*Client) GetProjectGroup

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

func (*Client) GetProjectGroupProjects

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

func (*Client) GetProjectGroupSecrets

func (c *Client) GetProjectGroupSecrets(ctx context.Context, projectGroupRef string, tree bool) ([]*csapitypes.Secret, *Response, error)

func (*Client) GetProjectGroupSubgroups

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

func (*Client) GetProjectGroupVariables

func (c *Client) GetProjectGroupVariables(ctx context.Context, projectGroupRef string, tree bool) ([]*csapitypes.Variable, *Response, error)

func (*Client) GetProjectSecrets

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

func (*Client) GetProjectVariables

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

func (*Client) GetRemoteSource

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

func (*Client) GetRemoteSources

func (c *Client) GetRemoteSources(ctx context.Context, opts *GetRemoteSourcesOptions) ([]*cstypes.RemoteSource, *Response, error)

func (*Client) GetResponse added in v0.9.0

func (c *Client) GetResponse(ctx context.Context, method, path string, query url.Values, contentLength int64, header http.Header, ibody io.Reader) (*Response, error)

func (*Client) GetUser

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

func (*Client) GetUserByLinkedAccount

func (c *Client) GetUserByLinkedAccount(ctx context.Context, linkedAccountID string) (*cstypes.User, *Response, error)

func (*Client) GetUserByLinkedAccountRemoteUserAndSource

func (c *Client) GetUserByLinkedAccountRemoteUserAndSource(ctx context.Context, remoteUserID, remoteSourceID string) (*cstypes.User, *Response, error)

func (*Client) GetUserByToken

func (c *Client) GetUserByToken(ctx context.Context, token string) (*cstypes.User, *Response, error)

func (*Client) GetUserLinkedAccounts added in v0.8.0

func (c *Client) GetUserLinkedAccounts(ctx context.Context, userRef string) ([]*cstypes.LinkedAccount, *Response, error)

func (*Client) GetUserOrg added in v0.9.0

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

func (*Client) GetUserOrgInvitations added in v0.8.0

func (c *Client) GetUserOrgInvitations(ctx context.Context, userRef string, limit int) ([]*cstypes.OrgInvitation, *Response, error)

func (*Client) GetUserOrgs

func (c *Client) GetUserOrgs(ctx context.Context, userRef string, opts *GetUserOrgsOptions) ([]*csapitypes.UserOrgResponse, *Response, error)

func (*Client) GetUserTokens added in v0.8.0

func (c *Client) GetUserTokens(ctx context.Context, userRef string) ([]*cstypes.UserToken, *Response, error)

func (*Client) GetUsers

func (c *Client) GetUsers(ctx context.Context, opts *GetUsersOptions) ([]*cstypes.User, *Response, error)

func (*Client) Import added in v0.8.0

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

func (*Client) RemoveOrgMember

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

func (*Client) UpdateOrg added in v0.8.0

func (c *Client) UpdateOrg(ctx context.Context, orgRef string, req *csapitypes.UpdateOrgRequest) (*cstypes.Organization, *Response, error)

func (*Client) UpdateProject

func (c *Client) UpdateProject(ctx context.Context, projectRef string, req *csapitypes.CreateUpdateProjectRequest) (*csapitypes.Project, *Response, error)

func (*Client) UpdateProjectGroup

func (c *Client) UpdateProjectGroup(ctx context.Context, projectGroupRef string, req *csapitypes.CreateUpdateProjectGroupRequest) (*csapitypes.ProjectGroup, *Response, error)

func (*Client) UpdateProjectGroupSecret

func (c *Client) UpdateProjectGroupSecret(ctx context.Context, projectGroupRef, secretName string, req *csapitypes.CreateUpdateSecretRequest) (*csapitypes.Secret, *Response, error)

func (*Client) UpdateProjectGroupVariable

func (c *Client) UpdateProjectGroupVariable(ctx context.Context, projectGroupRef, variableName string, req *csapitypes.CreateUpdateVariableRequest) (*csapitypes.Variable, *Response, error)

func (*Client) UpdateProjectSecret

func (c *Client) UpdateProjectSecret(ctx context.Context, projectRef, secretName string, req *csapitypes.CreateUpdateSecretRequest) (*csapitypes.Secret, *Response, error)

func (*Client) UpdateProjectVariable

func (c *Client) UpdateProjectVariable(ctx context.Context, projectRef, variableName string, req *csapitypes.CreateUpdateVariableRequest) (*csapitypes.Variable, *Response, error)

func (*Client) UpdateRemoteSource

func (c *Client) UpdateRemoteSource(ctx context.Context, remoteSourceRef string, req *csapitypes.CreateUpdateRemoteSourceRequest) (*cstypes.RemoteSource, *Response, error)

func (*Client) UpdateUser

func (c *Client) UpdateUser(ctx context.Context, userRef string, req *csapitypes.UpdateUserRequest) (*cstypes.User, *Response, error)

func (*Client) UpdateUserLA

func (c *Client) UpdateUserLA(ctx context.Context, userRef, laID string, req *csapitypes.UpdateUserLARequest) (*cstypes.LinkedAccount, *Response, error)

func (*Client) UserOrgInvitationAction added in v0.8.0

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

type GetOrgMembersOptions added in v0.9.0

type GetOrgMembersOptions struct {
	*ListOptions

	StartUserName string
}

func (*GetOrgMembersOptions) Add added in v0.9.0

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

type GetOrgsOptions added in v0.9.0

type GetOrgsOptions struct {
	*ListOptions

	StartOrgName string

	Visibilities []cstypes.Visibility
}

func (*GetOrgsOptions) Add added in v0.9.0

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

type GetRemoteSourcesOptions added in v0.9.0

type GetRemoteSourcesOptions struct {
	*ListOptions

	StartRemoteSourceName string
}

func (*GetRemoteSourcesOptions) Add added in v0.9.0

type GetUserOrgsOptions added in v0.9.0

type GetUserOrgsOptions struct {
	*ListOptions

	StartOrgName string
}

func (*GetUserOrgsOptions) Add added in v0.9.0

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

type GetUsersOptions added in v0.9.0

type GetUsersOptions struct {
	*ListOptions

	StartUserName string
}

func (*GetUsersOptions) Add added in v0.9.0

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

type ListOptions added in v0.9.0

type ListOptions struct {
	Limit         int
	SortDirection cstypes.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

	HasMore bool
}

Jump to

Keyboard shortcuts

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