mirror of
https://github.com/mitchell/selfpass.git
synced 2025-12-14 21:27:22 +00:00
Add 2 migrations for ids and boltdb; minor refactor to creds service
This commit is contained in:
parent
cf90993d4e
commit
a67be14fcb
13 changed files with 203 additions and 58 deletions
|
|
@ -5,7 +5,7 @@ import (
|
|||
"time"
|
||||
)
|
||||
|
||||
const TypePrefixCred = "cred"
|
||||
const KeyCredential = "cred"
|
||||
|
||||
type Credential struct {
|
||||
Metadata
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ type Service interface {
|
|||
Create(ctx context.Context, ci CredentialInput) (output Credential, err error)
|
||||
Update(ctx context.Context, id string, ci CredentialInput) (output Credential, err error)
|
||||
Delete(ctx context.Context, id string) (err error)
|
||||
DumpDB(ctx context.Context) (bs []byte, err error)
|
||||
}
|
||||
|
||||
type CredentialsRepo interface {
|
||||
|
|
@ -16,7 +15,6 @@ type CredentialsRepo interface {
|
|||
Get(ctx context.Context, id string) (output Credential, err error)
|
||||
Put(ctx context.Context, c Credential) (err error)
|
||||
Delete(ctx context.Context, id string) (err error)
|
||||
DumpDB(ctx context.Context) (bs []byte, err error)
|
||||
}
|
||||
|
||||
type CredentialsClientInit func(ctx context.Context, target, ca, cert, key string) (c CredentialsClient, err error)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue