Documentation ¶
Index ¶
- Constants
- Variables
- func Atoi(str string) int
- func B64Decode(encoded string) []byte
- func B64DecodeStr(encoded string) string
- func B64Encode(decoded []byte) string
- func B64EncodeStr(decoded string) string
- func Crypt(contents, key []byte) []byte
- func Digest(message, key []byte) []byte
- func HasOption(args []string, opt string) ([]string, bool)
- func HexDecode(encoded string) []byte
- func HexDecodeStr(encoded string) string
- func HexEncode(decoded []byte) string
- func HexEncodeStr(decoded string) string
- func KmsDecrypt(svc kmsiface.KMSAPI, blob []byte, context map[string]string) ([]byte, []byte, error)
- func KmsGenerateDataKey(svc kmsiface.KMSAPI, keyID string, context map[string]string) ([]byte, []byte, []byte, error)
- func MapToJSON(m map[string]string) string
- func MaxKeyLen(items map[*string]*string) int
- func ParseContext(strs []string) (map[string]string, error)
- func ParseOptionWithValue(args []string, key string) ([]string, string, error)
- func ParseVersion(args []string) ([]string, string, error)
- func ReadFile(filename string) (string, error)
- func ReadStdin() string
- func ValidateHMAC(message, digest, key []byte) bool
- func VersionNumToStr(version int) string
- type Driver
- func (driver *Driver) CreateDdbTable(table string) error
- func (driver *Driver) CreateTable(table string) error
- func (driver *Driver) DecryptMaterial(name string, material map[string]*dynamodb.AttributeValue, ...) (string, error)
- func (driver *Driver) DeleteItem(name, version, table string) error
- func (driver *Driver) DeleteSecrets(name, version, table string) error
- func (driver *Driver) GetDeleteTargetWithVersion(name, version, table string) (map[*string]*string, error)
- func (driver *Driver) GetDeleteTargetWithoutVersion(name, table string) (map[*string]*string, error)
- func (driver *Driver) GetHighestVersion(name, table string) (int, error)
- func (driver *Driver) GetMaterialWithVersion(name, version, table string) (map[string]*dynamodb.AttributeValue, error)
- func (driver *Driver) GetMaterialWithoutVersion(name, table string) (map[string]*dynamodb.AttributeValue, error)
- func (driver *Driver) GetSecret(name, version, table string, context map[string]string) (string, error)
- func (driver *Driver) IsTableExists(table string) (bool, error)
- func (driver *Driver) ListSecrets(table string) (map[*string]*string, error)
- func (driver *Driver) PutItem(name, version string, key, contents, hmac []byte, table string) error
- func (driver *Driver) PutSecret(name, secret, version, kmsKey, table string, context map[string]string) error
- func (driver *Driver) WaitUntilTableExists(table string) error
Constants ¶
View Source
const (
VersionFormat = "%019d"
)
Variables ¶
View Source
var ( ErrItemNotFound = errors.New("item couldn't be found") ErrNeedContext = errors.New("could not decrypt HMAC key with KMS: the credential may require that an encryption context be provided to decrypt it") ErrCredNotMatched = errors.New("could not decrypt HMAC key with KMS: the encryption context provided may not match the one used when the credential was stored") ErrBadHMAC = errors.New("computed HMAC does not match stored HMAC") ErrVersionExists = errors.New("version already in the credential store - use the -v flag to specify a new version") )
View Source
var ( ErrAttemptsExceeded = errors.New("timeout while creating table") ErrTableExists = errors.New("credential store table already exists") )
Functions ¶
func B64DecodeStr ¶ added in v0.2.0
func B64EncodeStr ¶ added in v0.2.0
func HexDecodeStr ¶ added in v0.2.0
func HexEncodeStr ¶ added in v0.2.0
func KmsDecrypt ¶ added in v0.2.0
func KmsGenerateDataKey ¶ added in v0.2.0
func ParseOptionWithValue ¶ added in v0.2.0
func ValidateHMAC ¶ added in v0.2.0
func VersionNumToStr ¶ added in v0.2.0
Types ¶
type Driver ¶ added in v0.2.0
type Driver struct { Ddb dynamodbiface.DynamoDBAPI Kms kmsiface.KMSAPI }
func (*Driver) CreateDdbTable ¶ added in v0.2.0
func (*Driver) CreateTable ¶ added in v0.2.0
func (*Driver) DecryptMaterial ¶ added in v0.2.0
func (*Driver) DeleteItem ¶ added in v0.2.0
func (*Driver) DeleteSecrets ¶ added in v0.2.0
func (*Driver) GetDeleteTargetWithVersion ¶ added in v0.2.0
func (*Driver) GetDeleteTargetWithoutVersion ¶ added in v0.2.0
func (*Driver) GetHighestVersion ¶ added in v0.2.0
func (*Driver) GetMaterialWithVersion ¶ added in v0.2.0
func (*Driver) GetMaterialWithoutVersion ¶ added in v0.2.0
func (*Driver) IsTableExists ¶ added in v0.2.0
func (*Driver) ListSecrets ¶ added in v0.2.0
func (*Driver) WaitUntilTableExists ¶ added in v0.2.0
Source Files ¶
Click to show internal directories.
Click to hide internal directories.