Documentation
¶
Index ¶
- func CreateKey(key Key) (string, string, error)
- func CreateKeyFromScratch(provider Provider, account string) (string, string, error)
- func DeleteKey(key Key) error
- func RegisterProvider(providerName string, provider ProviderInterface)
- type AivenKey
- type AwsKey
- type CreateTokenResponse
- type Error
- type GcpKey
- type Key
- type ListTokensResponse
- type Provider
- type ProviderInterface
- type RevokeTokenResponse
- type Token
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateKeyFromScratch ¶
CreateKeyFromScratch creates a new key from just provider and account parameters (an existing key is not required)
func RegisterProvider ¶
func RegisterProvider(providerName string, provider ProviderInterface)
RegisterProvider informs the tool about a new cloud provider, in addition to AWS and GCP, and registers it under a unique key
Types ¶
type AivenKey ¶ added in v0.4.0
type AivenKey struct{}
AivenKey type
func (AivenKey) CreateKey ¶ added in v0.4.0
func (a AivenKey) CreateKey(project, account, token string) (keyID string, newKey string, err error)
CreateKey creates a new Aiven API token
type AwsKey ¶
type AwsKey struct{}
AwsKey type
type CreateTokenResponse ¶ added in v0.4.0
type CreateTokenResponse struct { CreateTime string `json:"create_time"` CreatedManually bool `json:"created_manually"` Errors []Error `json:"errors"` ExtendWhenUsed bool `json:"extend_when_used"` FullToken string `json:"full_token"` MaxAgeSeconds int `json:"max_age_seconds"` Message string `json:"message"` TokenPrefix string `json:"token_prefix"` }
CreateTokenResponse type
type Error ¶ added in v0.4.0
type Error struct { Message string `json:"message"` MoreInfo string `json:"more_info"` Status int `json:"status"` }
Error type
type GcpKey ¶
type GcpKey struct{}
GcpKey type
type Key ¶
type Key struct { Account string FullAccount string Age float64 ID string LifeRemaining float64 Name string Provider Provider Status string }
Key type
type ListTokensResponse ¶ added in v0.4.0
type ListTokensResponse struct { Errors []Error `json:"errors"` Message string `json:"message"` Tokens []Token `json:"tokens"` }
ListTokensResponse type
type ProviderInterface ¶
type ProviderInterface interface { Keys(project string, includeInactiveKeys bool, token string) (keys []Key, err error) CreateKey(project, account, token string) (keyID, newKey string, err error) DeleteKey(project, account, keyID, token string) (err error) }
ProviderInterface type
type RevokeTokenResponse ¶ added in v0.4.0
RevokeTokenResponse type
Click to show internal directories.
Click to hide internal directories.