Add 2 migrations for ids and boltdb; minor refactor to creds service

This commit is contained in:
mitchell 2019-07-20 04:12:58 -04:00
parent cf90993d4e
commit a67be14fcb
13 changed files with 203 additions and 58 deletions

View file

@ -5,7 +5,7 @@ import (
"time"
)
const TypePrefixCred = "cred"
const KeyCredential = "cred"
type Credential struct {
Metadata

View file

@ -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)