Documentation ¶
Index ¶
- func GetDocument(gs GrantService, grant *grant.Grant) (*meta.Document, []byte, error)
- func NewHoardServer(gs GrantService, chunkSize int) *hoardService
- func PostDocument(gs GrantService, document *meta.Document, spec *grant.Spec, salt []byte) (*grant.Grant, error)
- func ReceiveCiphertext(srv CiphertextReceiver) ([]byte, error)
- func ReceiveDocument(srv DocumentReceiver) (*meta.Document, []byte, error)
- func ReceiveDocumentAndGrant(srv DocumentAndGrantReceiver) (*meta.Document, *grant.Spec, []byte, error)
- func ReceivePlaintext(srv PlaintextReceiver) ([]byte, []byte, error)
- func ReceivePlaintextAndGrantSpec(srv PlaintextAndGrantSpecReceiver) ([]byte, []byte, *grant.Spec, error)
- func SendCiphertext(srv CiphertextSender, data []byte, cs int) error
- func SendDocument(srv DocumentSender, doc *meta.Document, salt []byte, cs int) error
- func SendDocumentAndGrant(srv DocumentAndGrantSender, doc *meta.Document, salt []byte, spec *grant.Spec, ...) error
- func SendPlaintext(srv PlaintextSender, data, salt []byte, cs int) error
- func SendPlaintextAndGrantSpec(srv PlaintextAndGrantSpecSender, spec *grant.Spec, data, salt []byte, cs int) error
- type CiphertextReceiver
- type CiphertextSender
- type DocumentAndGrantReceiver
- type DocumentAndGrantSender
- type DocumentReceiver
- type DocumentSender
- type EncryptionService
- type GrantService
- type Hoard
- func (hrd *Hoard) Decrypt(ref *reference.Ref, encryptedData []byte) ([]byte, error)
- func (hrd *Hoard) Delete(address []byte) error
- func (hrd *Hoard) Encrypt(data, salt []byte) (*reference.Ref, []byte, error)
- func (hrd *Hoard) Get(ref *reference.Ref) ([]byte, error)
- func (hrd *Hoard) Name() string
- func (hrd *Hoard) Put(data, salt []byte) (*reference.Ref, error)
- func (hrd *Hoard) Seal(ref *reference.Ref, spec *grant.Spec) (*grant.Grant, error)
- func (hrd *Hoard) Store() stores.ContentAddressedStore
- func (hrd *Hoard) Unseal(grt *grant.Grant) (*reference.Ref, error)
- type ObjectService
- type PlaintextAndGrantSpecReceiver
- type PlaintextAndGrantSpecSender
- type PlaintextReceiver
- type PlaintextSender
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDocument ¶
GetDocument retrieves a document from hoard and parses it into a document struct. NOTE: if this schema changes hoard will break.
func NewHoardServer ¶
func NewHoardServer(gs GrantService, chunkSize int) *hoardService
func PostDocument ¶
func PostDocument(gs GrantService, document *meta.Document, spec *grant.Spec, salt []byte) (*grant.Grant, error)
PostDocument is given a document struct which is then parsed into a document object which matches the encoding system established. NOTE: if this schema changes hoard will break.
This function puts and seals the document into hoard's store and returns back the grant which is given from hoard.
func ReceiveCiphertext ¶
func ReceiveCiphertext(srv CiphertextReceiver) ([]byte, error)
func ReceiveDocument ¶
func ReceiveDocument(srv DocumentReceiver) (*meta.Document, []byte, error)
func ReceiveDocumentAndGrant ¶
func ReceivePlaintext ¶
func ReceivePlaintext(srv PlaintextReceiver) ([]byte, []byte, error)
func SendCiphertext ¶
func SendCiphertext(srv CiphertextSender, data []byte, cs int) error
func SendDocument ¶
func SendDocumentAndGrant ¶
func SendPlaintext ¶
func SendPlaintext(srv PlaintextSender, data, salt []byte, cs int) error
Types ¶
type CiphertextReceiver ¶
type CiphertextReceiver interface {
Recv() (*api.Ciphertext, error)
}
type CiphertextSender ¶
type CiphertextSender interface {
Send(*api.Ciphertext) error
}
type DocumentAndGrantReceiver ¶
type DocumentAndGrantReceiver interface {
Recv() (*api.PlaintextAndGrantSpecAndMeta, error)
}
type DocumentAndGrantSender ¶
type DocumentAndGrantSender interface {
Send(*api.PlaintextAndGrantSpecAndMeta) error
}
type DocumentReceiver ¶
type DocumentReceiver interface {
Recv() (*api.PlaintextAndMeta, error)
}
type DocumentSender ¶
type DocumentSender interface {
Send(*api.PlaintextAndMeta) error
}
type EncryptionService ¶
type GrantService ¶
type Hoard ¶
type Hoard struct {
// contains filtered or unexported fields
}
This is our top level API object providing library acting as a deterministic encrypted store and a grant issuer. It can be consumed as a Go library or as a GRPC service through grpcService which just plumbs this object into the hoard.proto interface.
func NewHoard ¶
func NewHoard(store stores.NamedStore, secrets config.SecretsManager, logger log.Logger) *Hoard
func (*Hoard) Store ¶
func (hrd *Hoard) Store() stores.ContentAddressedStore
type ObjectService ¶
type ObjectService interface { EncryptionService // Get encrypted data from underlying storage at address and decrypt it Get(ref *reference.Ref) (data []byte, err error) // Encrypt data and put it in underlying storage Put(data, salt []byte) (*reference.Ref, error) // Delete underlying data obtained by address Delete(address []byte) error // Get the underlying ContentAddressedStore Store() stores.ContentAddressedStore }
type PlaintextAndGrantSpecReceiver ¶
type PlaintextAndGrantSpecReceiver interface {
Recv() (*api.PlaintextAndGrantSpec, error)
}
type PlaintextAndGrantSpecSender ¶
type PlaintextAndGrantSpecSender interface {
Send(*api.PlaintextAndGrantSpec) error
}
type PlaintextReceiver ¶
type PlaintextSender ¶
Directories ¶
Path | Synopsis |
---|---|
Contains core types and logic pertaining to Hoard's backend storage services - but not the implementations of those stores to avoid a large number of possibly unwanted dependencies
|
Contains core types and logic pertaining to Hoard's backend storage services - but not the implementations of those stores to avoid a large number of possibly unwanted dependencies |
test
|
|