keys: transactions.go -> types.go

This commit is contained in:
Ethan Buchman 2017-10-26 16:43:32 -04:00
parent db5603e374
commit 57346134a5
2 changed files with 9 additions and 10 deletions

View File

@ -1,10 +0,0 @@
package keys
// Storage has many implementation, based on security and sharing requirements
// like disk-backed, mem-backed, vault, db, etc.
type Storage interface {
Put(name string, salt []byte, key []byte, info Info) error
Get(name string) (salt []byte, key []byte, info Info, err error)
List() (Infos, error)
Delete(name string) error
}

View File

@ -9,6 +9,15 @@ import (
data "github.com/tendermint/go-wire/data" data "github.com/tendermint/go-wire/data"
) )
// Storage has many implementation, based on security and sharing requirements
// like disk-backed, mem-backed, vault, db, etc.
type Storage interface {
Put(name string, salt []byte, key []byte, info Info) error
Get(name string) (salt []byte, key []byte, info Info, err error)
List() (Infos, error)
Delete(name string) error
}
// Info is the public information about a key // Info is the public information about a key
type Info struct { type Info struct {
Name string `json:"name"` Name string `json:"name"`