Documentation ¶
Overview ¶
Package kms config
nolint
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Adapter defaultAdapter
Adapter variable must be defined nolint
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { SecretId string SecretKey string Address string Region string SDKScheme string IsPublic bool }
Config Kms Configuration
type IKMSAdapter ¶
type IKMSAdapter interface { // NewPrivateKey returns a kms PrivateKey NewPrivateKey(key PrivateKey) (bccrypto.PrivateKey, error) // NewPublicKey returns a kms PublicKey NewPublicKey(keyId string) (bccrypto.PublicKey, error) }
IKMSAdapter is kms adapter interface
func GetKMSAdapter ¶
func GetKMSAdapter(config *Config) IKMSAdapter
GetKMSAdapter returns a kms adapter
func LoadFromEnv ¶
func LoadFromEnv() (IKMSAdapter, error)
LoadFromEnv load a kms adapter which set by env
func NewDefaultAdapter ¶
func NewDefaultAdapter(config *Config) (IKMSAdapter, error)
NewDefaultAdapter return a default kms adapter
Click to show internal directories.
Click to hide internal directories.