Documentation
¶
Index ¶
- Constants
- Variables
- func Decrypt(spider_key, contents []byte) (string, error)
- func Encrypt(spider_key, contents []byte) (string, error)
- func UnRegisterCredential(credentialName string) (bool, error)
- type CredentialInfo
- func GetCredential(credentialName string) (*CredentialInfo, error)
- func GetCredentialDecrypt(credentialName string) (*CredentialInfo, error)
- func ListCredential() ([]*CredentialInfo, error)
- func ListCredentialByProvider(providerName string) ([]*CredentialInfo, error)
- func RegisterCredential(credentialName string, providerName string, keyValueInfoList []icdrs.KeyValue) (*CredentialInfo, error)
- func RegisterCredentialInfo(crdInfo CredentialInfo) (*CredentialInfo, error)
Constants ¶
View Source
const KEY_COLUMN_NAME = "credential_name"
====================================================================
View Source
const PROVIDER_NAME_COLUMN = "provider_name"
Variables ¶
View Source
var SPIDER_KEY = []byte("cloud-barista-cb-spider-cloud-ba") // 32 bytes
####################################################################### @todo get from Env file. by powerkim, 2020.06.01.
Functions ¶
func UnRegisterCredential ¶
Types ¶
type CredentialInfo ¶
type CredentialInfo struct { CredentialName string `json:"CredentialName" gorm:"primaryKey" validate:"required" example:"credential01"` // The name of the credential, used as a unique identifier. ProviderName string `json:"ProviderName" validate:"required" example:"AWS"` // The name of the cloud provider (e.g., AWS, Azure, GCP). KeyValueInfoList infostore.KVList `json:"KeyValueInfoList" gorm:"type:blob" validate:"required"` // Key-value pairs for credential authentication. }
CredentialInfo represents the information of a cloud credential. @Description Information about a specific cloud credential used for authentication.
func GetCredential ¶
func GetCredential(credentialName string) (*CredentialInfo, error)
1. check params 2. get CredentialInfo from info-store
func GetCredentialDecrypt ¶ added in v0.2.1
func GetCredentialDecrypt(credentialName string) (*CredentialInfo, error)
1. check params 2. get CredentialInfo from info-store 3. decrypt CrednetialInfo
func ListCredential ¶
func ListCredential() ([]*CredentialInfo, error)
func ListCredentialByProvider ¶ added in v0.9.1
func ListCredentialByProvider(providerName string) ([]*CredentialInfo, error)
func RegisterCredential ¶
func RegisterCredentialInfo ¶
func RegisterCredentialInfo(crdInfo CredentialInfo) (*CredentialInfo, error)
1. check params 2. insert them into info-store
Click to show internal directories.
Click to hide internal directories.