credentialinfomanager

package
v0.8.21 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2024 License: Apache-2.0 Imports: 12 Imported by: 4

Documentation

Index

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 Decrypt added in v0.7.6

func Decrypt(spider_key, contents []byte) (string, error)

decryption with spider key

func Encrypt added in v0.7.6

func Encrypt(spider_key, contents []byte) (string, error)

encription with spider key

func UnRegisterCredential

func UnRegisterCredential(credentialName string) (bool, error)

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 RegisterCredential(credentialName string, providerName string, keyValueInfoList []icdrs.KeyValue) (*CredentialInfo, error)

func RegisterCredentialInfo

func RegisterCredentialInfo(crdInfo CredentialInfo) (*CredentialInfo, error)

1. check params 2. insert them into info-store

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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