Documentation ¶
Index ¶
- func KeyValueToRawMap(arr []*query.Kv) (json.RawMessage, error)
- func RawMapToKeyValue(rawJSON json.RawMessage) ([]*query.Kv, error)
- func Transact(db *DB, txFunc func(*DBTrans) error) error
- type DB
- func (secretsDb *DB) AddSecret(inSecret *secrets.Secret) (string, error)
- func (secretsDb *DB) DeleteSecret(id string) (int64, error)
- func (secretsDb *DB) GetSecret(id string) (*secrets.Secret, error)
- func (secretsDb *DB) GetSecrets(sortField string, insortOrder secrets.Query_OrderType, pageNr int32, ...) ([]*secrets.Secret, int64, error)
- func (secretsDb *DB) Ping() error
- func (secretsDb *DB) SecretExists(id string) (exists bool, err error)
- func (secretsDb *DB) UpdateSecret(inSecret *secrets.Secret) error
- type DBTrans
- type SecretTag
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func KeyValueToRawMap ¶
func KeyValueToRawMap(arr []*query.Kv) (json.RawMessage, error)
KeyValueToRawMap helps convert an array of KeyValues in a Map and convert it to json
func RawMapToKeyValue ¶
func RawMapToKeyValue(rawJSON json.RawMessage) ([]*query.Kv, error)
RawMapToKeyValue helps convert an array of KeyValues in a Map and convert it to json
Types ¶
type DB ¶
func (*DB) DeleteSecret ¶
DeleteSecret deletes a secret from the db
func (*DB) GetSecrets ¶
func (secretsDb *DB) GetSecrets(sortField string, insortOrder secrets.Query_OrderType, pageNr int32, perPage int32, filters []*query.Filter) ([]*secrets.Secret, int64, error)
GetSecrets retrieves all secrets from the db matching input query params
func (*DB) SecretExists ¶
SecretExists is used to tell us if the secret exists in the db
type DBTrans ¶
type DBTrans struct {
*gorp.Transaction
}
Click to show internal directories.
Click to hide internal directories.