Documentation ¶
Index ¶
- type Repository
- type Secret
- func (s *Secret) Create(ciphertext string, hasPassphrase bool, expiresAt time.Time, revealOnce bool, ...) (secretify.Secret, error)
- func (s *Secret) CreateWithFile(ciphertext string, hasPassphrase bool, expiresAt time.Time, revealOnce bool, ...) (secretify.Secret, error)
- func (s *Secret) Delete(identifier string) error
- func (s *Secret) DeleteExpired() error
- func (s *Secret) ServiceConfig() setting.Service
- func (s *Secret) View(identifier string, onlyMeta bool) (secret secretify.Secret, deleted bool, err error)
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository interface { Create(utildb.DB, secretify.Secret) (secretify.Secret, error) ViewByIdentifier(utildb.DB, string) (secretify.Secret, error) Delete(utildb.DB, string) error ViewAllExpired(utildb.DB) ([]secretify.Secret, error) DeleteExpired(utildb.DB) error }
Repository represents secret repository interface
type Secret ¶
type Secret struct {
// contains filtered or unexported fields
}
Secret represents secret application service
func Initialize ¶
Initialize initalizes secret application service with defaults
func (*Secret) Create ¶
func (s *Secret) Create(ciphertext string, hasPassphrase bool, expiresAt time.Time, revealOnce bool, destroyManual bool, fileID int) (secretify.Secret, error)
Create creates a new encrypted secret
func (*Secret) CreateWithFile ¶
func (s *Secret) CreateWithFile(ciphertext string, hasPassphrase bool, expiresAt time.Time, revealOnce bool, destroyManual bool, fileIdentifier string) (secretify.Secret, error)
Create creates a new encrypted secret with an encrypted file
func (*Secret) DeleteExpired ¶
DeleteExpired all expired secrets (and associated files)
func (*Secret) ServiceConfig ¶
type Service ¶
type Service interface { Create(ciphertext string, hasPassphrase bool, expiresAt time.Time, revealOnce bool, destroyManual bool, fileID int) (secretify.Secret, error) CreateWithFile(ciphertext string, hasPassphrase bool, expiresAt time.Time, revealOnce bool, destroyManual bool, fileIdentifier string) (secretify.Secret, error) View(identifier string, onlyMeta bool) (secret secretify.Secret, deleted bool, err error) Delete(identifier string) error DeleteExpired() error ServiceConfig() setting.Service }
Service represents secret application interface
Click to show internal directories.
Click to hide internal directories.