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 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"
====================================================================
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 `gorm:"primaryKey"` // ex) "credential01" ProviderName string // ex) "AWS" KeyValueInfoList infostore.KVList `gorm:"type:blob"` // stored with json format, ex) { {ClientId, XXX}, {ClientSecret, XXX}, ...} }
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 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.