Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) ServiceAccountByID(id string) (ServiceAccount, error)
- func (c *Client) ServiceAccountByName(name string) (ServiceAccount, error)
- func (c *Client) ServiceAccountCreate(name string, description string) (ServiceAccount, error)
- func (c *Client) ServiceAccountDelete(id string) error
- func (c *Client) ServiceAccountList() ([]ServiceAccount, error)
- func (c *Client) ServiceAccountUpdate(id string, description string) error
- type IClient
- type List
- type ServiceAccount
Constants ¶
const ( ErrAlreadyInUse = "service account already in use" ErrDescriptionTooLong = "service account description exceed 128 characters" ErrNameTooLong = "service account name exceed 64 characters" ErrNotExists = "service account does not exists" )
Errors
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { }
Client is a struct for service account client
func (*Client) ServiceAccountByID ¶
func (c *Client) ServiceAccountByID(id string) (ServiceAccount, error)
ServiceAccountByID Executes Confluent CLI command to list all ServiceAccounts in Confluent Cloud, filter by id & return a non-empty ServiceAccount object if found
func (*Client) ServiceAccountByName ¶
func (c *Client) ServiceAccountByName(name string) (ServiceAccount, error)
ServiceAccountByName Executes Confluent CLI command to list all ServiceAccounts in Confluent Cloud, filter by name & return a non-empty ServiceAccount object if found
func (*Client) ServiceAccountCreate ¶
func (c *Client) ServiceAccountCreate(name string, description string) (ServiceAccount, error)
ServiceAccountCreate Executes Confluent CLI command to create ServiceAccount in Confluent Cloud & return a ServiceAccount object
func (*Client) ServiceAccountDelete ¶
ServiceAccountDelete Executes Confluent CLI command to delete a ServiceAccount in Confluent Cloud
func (*Client) ServiceAccountList ¶
func (c *Client) ServiceAccountList() ([]ServiceAccount, error)
ServiceAccountList Executes Confluent CLI command to list all ServiceAccounts in Confluent Cloud & return a slice of ServiceAccount objects
type IClient ¶
type IClient interface { ServiceAccountCreate(name string, description string) (ServiceAccount, error) ServiceAccountDelete(id string) error ServiceAccountList() ([]ServiceAccount, error) ServiceAccountByName(name string) (ServiceAccount, error) ServiceAccountByID(id string) (ServiceAccount, error) ServiceAccountUpdate(id string, description string) error }
IClient interface for service account client
type ServiceAccount ¶
type ServiceAccount struct { Name string `json:"name"` Description string `json:"description"` ID string `json:"id"` }
ServiceAccount struct for deserialising Confluent Cloud response