serviceaccounts

package
v0.2.49 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2025 License: Apache-2.0 Imports: 16 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
}

Client is responsible for service account management.

func New

func New(client client.Client, namespace, host string, oauth2 *oauth2.Authenticator, options *Options) *Client

New creates a new service account client.

func (*Client) Create

func (c *Client) Create(ctx context.Context, organizationID string, 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, serviceAccountID string) error

Delete removes the service account and revokes the access token.

func (*Client) Get

func (c *Client) Get(ctx context.Context, organizationID, serviceAccountID string) (*openapi.ServiceAccountRead, error)

Get retrieves information about a service account.

func (*Client) List

func (c *Client) List(ctx context.Context, organizationID string) (openapi.ServiceAccounts, error)

List retrieves information about all service accounts in the organization.

func (*Client) Rotate

func (c *Client) Rotate(ctx context.Context, 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, 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.

type Options

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

func (*Options) AddFlags

func (o *Options) AddFlags(f *pflag.FlagSet)

Jump to

Keyboard shortcuts

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