Documentation ¶
Index ¶
- Constants
- type APIKey
- type Client
- func (c *Client) APIKeyCreate(resource string, description string, serviceAccount string, environment string) (APIKey, error)
- func (c *Client) APIKeyDelete(key string) error
- func (c *Client) APIKeyUpdate(key string, description string) error
- func (c *Client) GetAPIKeyByKey(key string) (Metadata, error)
- type IClient
- type List
- type Metadata
Constants ¶
View Source
const (
ErrNotExists = "api key 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) APIKeyCreate ¶
func (c *Client) APIKeyCreate(resource string, description string, serviceAccount string, environment string) (APIKey, error)
APIKeyCreate create API key
func (*Client) APIKeyDelete ¶
APIKeyDelete delete API key by key
func (*Client) APIKeyUpdate ¶
APIKeyUpdate update API key description by key
type IClient ¶
type IClient interface { APIKeyCreate(resource string, description string, serviceAccount string, environment string) (APIKey, error) APIKeyDelete(key string) error GetAPIKeyByKey(key string) (Metadata, error) APIKeyUpdate(key string, description string) error }
IClient interface for service account client
type Metadata ¶
type Metadata struct { Created string `json:"created"` Description string `json:"description"` Key string `json:"key"` OwnerEmail string `json:"owner_email"` OwnerResourceID string `json:"owner_resource_id"` ResourceID string `json:"resource_id"` ResourceType string `json:"resource_type"` }
Metadata response from get/list method
Click to show internal directories.
Click to hide internal directories.