kex.go 459 B

123456789101112131415161718192021
  1. package kex
  2. import (
  3. "github.com/ente-io/museum/pkg/repo/kex"
  4. )
  5. type Controller struct {
  6. Repo *kex.Repository
  7. }
  8. func (c *Controller) AddKey(wrappedKey string, customIdentifier string) (identifier string, err error) {
  9. return c.Repo.AddKey(wrappedKey, customIdentifier)
  10. }
  11. func (c *Controller) GetKey(identifier string) (wrappedKey string, err error) {
  12. return c.Repo.GetKey(identifier)
  13. }
  14. func (c *Controller) DeleteOldKeys() {
  15. c.Repo.DeleteOldKeys()
  16. }