Documentation
¶
Index ¶
- func New(c *config.Config) (backend.Backend, error)
- type Mystery
- type Postgres
- func (m *Postgres) Delete(masterKey, namespace []byte) error
- func (m *Postgres) Get(masterKey, namespace []byte) (backend.Secret, error)
- func (m *Postgres) List(masterKey []byte) ([]backend.MysteryResp, error)
- func (m *Postgres) Put(masterKey []byte, secret backend.Secret) error
- func (m *Postgres) Update(masterKey []byte, secret backend.Secret) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Mystery ¶
type Mystery struct { ID uint64 `gorm:"primaryKey;AUTO_INCREMENT;NOT NULL"` Namespace string `gorm:"NOT NULL"` Data []byte `gorm:"NOT NULL"` UserID string `gorm:"index"` CreatedAt time.Time `gorm:"NOT NULL"` CurrentVersion uint64 `gorm:"NOT NULL;default:0"` MaxVersion uint64 `gorm:"NOT NULL;default:0"` Compressed bool ExpiredAfter *time.Duration UpdatedAt time.Time }
Mystery defines structure for store in Postgres
type Postgres ¶
type Postgres struct {
// contains filtered or unexported fields
}
Postgres defines backend for postgres
func (*Postgres) List ¶
func (m *Postgres) List(masterKey []byte) ([]backend.MysteryResp, error)
List defines getting list of secrets
Click to show internal directories.
Click to hide internal directories.