backend

package
v0.0.0-...-7fca2f4 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend interface {
	Get(masterKey, key []byte) (Secret, error)
	Put(masterKey []byte, secret Secret) error
	Update(masterKey []byte, secret Secret) error
	Delete(masterKey, key []byte) error
	List(masterKey []byte) ([]MysteryResp, error)
}

Backend defines way for store secrets

type DeleteSecret

type DeleteSecret struct {
	Namespace []byte
	Version   int
	Force     bool
}

DeleteSecret defines request for delete secret

type MasterPassBackend

type MasterPassBackend interface {
	Get(pass string) ([]byte, error)
	Put(pass string) error
}

MasterPassBackend defines backend for master pass

type MysteryResp

type MysteryResp struct {
	Namespace      string
	UserID         string
	CreatedAt      time.Time
	CurrentVersion uint64
	MaxVersion     uint64
}

type Secret

type Secret struct {
	Namespace    []byte
	Data         []byte
	ExpiredAfter *time.Duration
	Compressed   bool
}

Secret defines struct for store secrets

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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