db

package
v0.0.0-...-e984f34 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2024 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB *pg.DB

Functions

func Close

func Close() error

func DeletePolicy

func DeletePolicy(id string, username string) error

func DeleteSecret

func DeleteSecret(secret models.Secret) error

func Get

func Get() *pg.DB

func GetPathByID

func GetPathByID(id string) (models.Path, error)

func GetPathByName

func GetPathByName(name string) (models.Path, error)

func GetPaths

func GetPaths() ([]models.Path, error)

func GetSecret

func GetSecret(path string, key string, version int64) (models.Secret, error)

func GetSecretByID

func GetSecretByID(id string, version int64) (models.Secret, error)

func GetSecrets

func GetSecrets(pathId int) ([]models.Secret, error)

func GetSecretsByPathName

func GetSecretsByPathName(pathName string) ([]models.Secret, error)

func GetTransitEncryptionKey

func GetTransitEncryptionKey(keyId string, version int) (models.Secret, error)

func GetUser

func GetUser(username string) (models.User, error)

func GetUserGroups

func GetUserGroups(userID string) ([]string, error)

func Init

func Init(config *config.Config) *pg.DB

func SavePolicy

func SavePolicy(policy models.Policy, username string) error

func WriteSecret

func WriteSecret(userID string, request models.Secret, c crypt.CryptographicOperations) (models.Secret, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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