Documentation
¶
Index ¶
- type Client
- func (c *Client) Create(ctx context.Context, organizationID ids.OrganizationID, ...) (*openapi.ServiceAccountCreate, error)
- func (c *Client) Delete(ctx context.Context, organizationID ids.OrganizationID, ...) error
- func (c *Client) Get(ctx context.Context, organizationID ids.OrganizationID, ...) (*openapi.ServiceAccountRead, error)
- func (c *Client) List(ctx context.Context, organizationID ids.OrganizationID) (openapi.ServiceAccounts, error)
- func (c *Client) Rotate(ctx context.Context, organizationID ids.OrganizationID, ...) (*openapi.ServiceAccountCreate, error)
- func (c *Client) Update(ctx context.Context, organizationID ids.OrganizationID, ...) (*openapi.ServiceAccountRead, error)
- type Options
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
}
Client is responsible for service account management.
func New ¶
func New(client client.Client, namespace string, issuer common.IssuerValue, oauth2 *oauth2.Authenticator, options *Options) *Client
New creates a new service account client.
func (*Client) Create ¶
func (c *Client) Create(ctx context.Context, organizationID ids.OrganizationID, request *openapi.ServiceAccountWrite) (*openapi.ServiceAccountCreate, error)
Create makes a new service account and issues an access token.
func (*Client) Delete ¶
func (c *Client) Delete(ctx context.Context, organizationID ids.OrganizationID, serviceAccountID string) error
Delete removes the service account and revokes the access token.
func (*Client) Get ¶
func (c *Client) Get(ctx context.Context, organizationID ids.OrganizationID, serviceAccountID string) (*openapi.ServiceAccountRead, error)
Get retrieves information about a service account.
func (*Client) List ¶
func (c *Client) List(ctx context.Context, organizationID ids.OrganizationID) (openapi.ServiceAccounts, error)
List retrieves information about all service accounts in the organization.
func (*Client) Rotate ¶
func (c *Client) Rotate(ctx context.Context, organizationID ids.OrganizationID, serviceAccountID string) (*openapi.ServiceAccountCreate, error)
Rotate is a special version of Update where everything about the resource is preserved with the exception of the access token.
func (*Client) Update ¶
func (c *Client) Update(ctx context.Context, organizationID ids.OrganizationID, serviceAccountID string, request *openapi.ServiceAccountWrite) (*openapi.ServiceAccountRead, error)
Update modifies any metadata for the service account if it exists. If a matching account doesn't exist it raises an error.
Click to show internal directories.
Click to hide internal directories.