serviceaccount

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
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

func (c *Client) ServiceAccountDelete(id string) error

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

func (*Client) ServiceAccountUpdate

func (c *Client) ServiceAccountUpdate(id string, description string) error

ServiceAccountUpdate Executes Confluent CLI command to update the description of a ServiceAccount in Confluent Cloud

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

func NewClient

func NewClient() IClient

NewClient is a factory method for serviceaccount client

type List

type List []ServiceAccount

List type for deserialising Confluent Cloud list response

type ServiceAccount

type ServiceAccount struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	ID          string `json:"id"`
}

ServiceAccount struct for deserialising Confluent Cloud response

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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