Documentation
¶
Index ¶
- func NewHoardServer(des hoard.DeterministicEncryptedStore, gs hoard.GrantService) *grpcService
- func RegisterCleartextServer(s *grpc.Server, srv CleartextServer)
- func RegisterEncryptionServer(s *grpc.Server, srv EncryptionServer)
- func RegisterGrantServer(s *grpc.Server, srv GrantServer)
- func RegisterStorageServer(s *grpc.Server, srv StorageServer)
- type Address
- func (*Address) Descriptor() ([]byte, []int)
- func (m *Address) GetAddress() []byte
- func (*Address) ProtoMessage()
- func (m *Address) Reset()
- func (m *Address) String() string
- func (m *Address) XXX_DiscardUnknown()
- func (m *Address) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Address) XXX_Merge(src proto.Message)
- func (m *Address) XXX_Size() int
- func (m *Address) XXX_Unmarshal(b []byte) error
- type Ciphertext
- func (*Ciphertext) Descriptor() ([]byte, []int)
- func (m *Ciphertext) GetEncryptedData() []byte
- func (*Ciphertext) ProtoMessage()
- func (m *Ciphertext) Reset()
- func (m *Ciphertext) String() string
- func (m *Ciphertext) XXX_DiscardUnknown()
- func (m *Ciphertext) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Ciphertext) XXX_Merge(src proto.Message)
- func (m *Ciphertext) XXX_Size() int
- func (m *Ciphertext) XXX_Unmarshal(b []byte) error
- type CleartextClient
- type CleartextServer
- type EncryptionClient
- type EncryptionServer
- type GrantAndGrantSpec
- func (*GrantAndGrantSpec) Descriptor() ([]byte, []int)
- func (m *GrantAndGrantSpec) GetGrant() *grant.Grant
- func (m *GrantAndGrantSpec) GetGrantSpec() *grant.Spec
- func (*GrantAndGrantSpec) ProtoMessage()
- func (m *GrantAndGrantSpec) Reset()
- func (m *GrantAndGrantSpec) String() string
- func (m *GrantAndGrantSpec) XXX_DiscardUnknown()
- func (m *GrantAndGrantSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GrantAndGrantSpec) XXX_Merge(src proto.Message)
- func (m *GrantAndGrantSpec) XXX_Size() int
- func (m *GrantAndGrantSpec) XXX_Unmarshal(b []byte) error
- type GrantClient
- type GrantServer
- type Plaintext
- func (*Plaintext) Descriptor() ([]byte, []int)
- func (m *Plaintext) GetData() []byte
- func (m *Plaintext) GetSalt() []byte
- func (*Plaintext) ProtoMessage()
- func (m *Plaintext) Reset()
- func (m *Plaintext) String() string
- func (m *Plaintext) XXX_DiscardUnknown()
- func (m *Plaintext) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Plaintext) XXX_Merge(src proto.Message)
- func (m *Plaintext) XXX_Size() int
- func (m *Plaintext) XXX_Unmarshal(b []byte) error
- type PlaintextAndGrantSpec
- func (*PlaintextAndGrantSpec) Descriptor() ([]byte, []int)
- func (m *PlaintextAndGrantSpec) GetGrantSpec() *grant.Spec
- func (m *PlaintextAndGrantSpec) GetPlaintext() *Plaintext
- func (*PlaintextAndGrantSpec) ProtoMessage()
- func (m *PlaintextAndGrantSpec) Reset()
- func (m *PlaintextAndGrantSpec) String() string
- func (m *PlaintextAndGrantSpec) XXX_DiscardUnknown()
- func (m *PlaintextAndGrantSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PlaintextAndGrantSpec) XXX_Merge(src proto.Message)
- func (m *PlaintextAndGrantSpec) XXX_Size() int
- func (m *PlaintextAndGrantSpec) XXX_Unmarshal(b []byte) error
- type ReferenceAndCiphertext
- func (*ReferenceAndCiphertext) Descriptor() ([]byte, []int)
- func (m *ReferenceAndCiphertext) GetCiphertext() *Ciphertext
- func (m *ReferenceAndCiphertext) GetReference() *reference.Ref
- func (*ReferenceAndCiphertext) ProtoMessage()
- func (m *ReferenceAndCiphertext) Reset()
- func (m *ReferenceAndCiphertext) String() string
- func (m *ReferenceAndCiphertext) XXX_DiscardUnknown()
- func (m *ReferenceAndCiphertext) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ReferenceAndCiphertext) XXX_Merge(src proto.Message)
- func (m *ReferenceAndCiphertext) XXX_Size() int
- func (m *ReferenceAndCiphertext) XXX_Unmarshal(b []byte) error
- type ReferenceAndGrantSpec
- func (*ReferenceAndGrantSpec) Descriptor() ([]byte, []int)
- func (m *ReferenceAndGrantSpec) GetGrantSpec() *grant.Spec
- func (m *ReferenceAndGrantSpec) GetReference() *reference.Ref
- func (*ReferenceAndGrantSpec) ProtoMessage()
- func (m *ReferenceAndGrantSpec) Reset()
- func (m *ReferenceAndGrantSpec) String() string
- func (m *ReferenceAndGrantSpec) XXX_DiscardUnknown()
- func (m *ReferenceAndGrantSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ReferenceAndGrantSpec) XXX_Merge(src proto.Message)
- func (m *ReferenceAndGrantSpec) XXX_Size() int
- func (m *ReferenceAndGrantSpec) XXX_Unmarshal(b []byte) error
- type StorageClient
- type StorageServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHoardServer ¶
func NewHoardServer(des hoard.DeterministicEncryptedStore, gs hoard.GrantService) *grpcService
func RegisterCleartextServer ¶
func RegisterCleartextServer(s *grpc.Server, srv CleartextServer)
func RegisterEncryptionServer ¶
func RegisterEncryptionServer(s *grpc.Server, srv EncryptionServer)
func RegisterGrantServer ¶
func RegisterGrantServer(s *grpc.Server, srv GrantServer)
func RegisterStorageServer ¶
func RegisterStorageServer(s *grpc.Server, srv StorageServer)
Types ¶
type Address ¶
type Address struct {
Address []byte `protobuf:"bytes,1,opt,name=Address,proto3" json:"Address,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*Address) Descriptor ¶
func (*Address) GetAddress ¶
func (*Address) ProtoMessage ¶
func (*Address) ProtoMessage()
func (*Address) XXX_DiscardUnknown ¶
func (m *Address) XXX_DiscardUnknown()
func (*Address) XXX_Marshal ¶
func (*Address) XXX_Unmarshal ¶
type Ciphertext ¶
type Ciphertext struct {
EncryptedData []byte `protobuf:"bytes,1,opt,name=EncryptedData,proto3" json:"EncryptedData,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*Ciphertext) Descriptor ¶
func (*Ciphertext) Descriptor() ([]byte, []int)
func (*Ciphertext) GetEncryptedData ¶
func (m *Ciphertext) GetEncryptedData() []byte
func (*Ciphertext) ProtoMessage ¶
func (*Ciphertext) ProtoMessage()
func (*Ciphertext) Reset ¶
func (m *Ciphertext) Reset()
func (*Ciphertext) String ¶
func (m *Ciphertext) String() string
func (*Ciphertext) XXX_DiscardUnknown ¶
func (m *Ciphertext) XXX_DiscardUnknown()
func (*Ciphertext) XXX_Marshal ¶
func (m *Ciphertext) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Ciphertext) XXX_Merge ¶
func (m *Ciphertext) XXX_Merge(src proto.Message)
func (*Ciphertext) XXX_Size ¶
func (m *Ciphertext) XXX_Size() int
func (*Ciphertext) XXX_Unmarshal ¶
func (m *Ciphertext) XXX_Unmarshal(b []byte) error
type CleartextClient ¶
type CleartextClient interface {
// Push some plaintext data into storage and get its deterministically
// generated secret reference.
Put(ctx context.Context, in *Plaintext, opts ...grpc.CallOption) (*reference.Ref, error)
// Provide a secret reference to an encrypted blob and get the plaintext
// data back.
Get(ctx context.Context, in *reference.Ref, opts ...grpc.CallOption) (*Plaintext, error)
}
CleartextClient is the client API for Cleartext service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewCleartextClient ¶
func NewCleartextClient(cc *grpc.ClientConn) CleartextClient
type CleartextServer ¶
type CleartextServer interface {
// Push some plaintext data into storage and get its deterministically
// generated secret reference.
Put(context.Context, *Plaintext) (*reference.Ref, error)
// Provide a secret reference to an encrypted blob and get the plaintext
// data back.
Get(context.Context, *reference.Ref) (*Plaintext, error)
}
CleartextServer is the server API for Cleartext service.
type EncryptionClient ¶
type EncryptionClient interface {
// Encrypt some data and get its deterministically generated
// secret reference including its address without storing the data.
Encrypt(ctx context.Context, in *Plaintext, opts ...grpc.CallOption) (*ReferenceAndCiphertext, error)
// Decrypt the provided data by supplying it alongside its secret
// reference. The address is not used for decryption and may be omitted.
Decrypt(ctx context.Context, in *ReferenceAndCiphertext, opts ...grpc.CallOption) (*Plaintext, error)
}
EncryptionClient is the client API for Encryption service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewEncryptionClient ¶
func NewEncryptionClient(cc *grpc.ClientConn) EncryptionClient
type EncryptionServer ¶
type EncryptionServer interface {
// Encrypt some data and get its deterministically generated
// secret reference including its address without storing the data.
Encrypt(context.Context, *Plaintext) (*ReferenceAndCiphertext, error)
// Decrypt the provided data by supplying it alongside its secret
// reference. The address is not used for decryption and may be omitted.
Decrypt(context.Context, *ReferenceAndCiphertext) (*Plaintext, error)
}
EncryptionServer is the server API for Encryption service.
type GrantAndGrantSpec ¶
type GrantAndGrantSpec struct {
Grant *grant.Grant `protobuf:"bytes,1,opt,name=Grant,proto3" json:"Grant,omitempty"`
// The type of grant to output
GrantSpec *grant.Spec `protobuf:"bytes,2,opt,name=GrantSpec,proto3" json:"GrantSpec,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*GrantAndGrantSpec) Descriptor ¶
func (*GrantAndGrantSpec) Descriptor() ([]byte, []int)
func (*GrantAndGrantSpec) GetGrant ¶
func (m *GrantAndGrantSpec) GetGrant() *grant.Grant
func (*GrantAndGrantSpec) GetGrantSpec ¶
func (m *GrantAndGrantSpec) GetGrantSpec() *grant.Spec
func (*GrantAndGrantSpec) ProtoMessage ¶
func (*GrantAndGrantSpec) ProtoMessage()
func (*GrantAndGrantSpec) Reset ¶
func (m *GrantAndGrantSpec) Reset()
func (*GrantAndGrantSpec) String ¶
func (m *GrantAndGrantSpec) String() string
func (*GrantAndGrantSpec) XXX_DiscardUnknown ¶
func (m *GrantAndGrantSpec) XXX_DiscardUnknown()
func (*GrantAndGrantSpec) XXX_Marshal ¶
func (m *GrantAndGrantSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GrantAndGrantSpec) XXX_Merge ¶
func (m *GrantAndGrantSpec) XXX_Merge(src proto.Message)
func (*GrantAndGrantSpec) XXX_Size ¶
func (m *GrantAndGrantSpec) XXX_Size() int
func (*GrantAndGrantSpec) XXX_Unmarshal ¶
func (m *GrantAndGrantSpec) XXX_Unmarshal(b []byte) error
type GrantClient ¶
type GrantClient interface {
// Seal a Reference to create a Grant
Seal(ctx context.Context, in *ReferenceAndGrantSpec, opts ...grpc.CallOption) (*grant.Grant, error)
// Unseal a Grant to recover the Reference
Unseal(ctx context.Context, in *grant.Grant, opts ...grpc.CallOption) (*reference.Ref, error)
// Convert one grant to another grant to re-share with another party or just
// to change grant type
Reseal(ctx context.Context, in *GrantAndGrantSpec, opts ...grpc.CallOption) (*grant.Grant, error)
// Put a Plaintext and returned the sealed Reference as a Grant
PutSeal(ctx context.Context, in *PlaintextAndGrantSpec, opts ...grpc.CallOption) (*grant.Grant, error)
// Unseal a Grant and follow the Reference to return a Plaintext
UnsealGet(ctx context.Context, in *grant.Grant, opts ...grpc.CallOption) (*Plaintext, error)
}
GrantClient is the client API for Grant service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewGrantClient ¶
func NewGrantClient(cc *grpc.ClientConn) GrantClient
type GrantServer ¶
type GrantServer interface {
// Seal a Reference to create a Grant
Seal(context.Context, *ReferenceAndGrantSpec) (*grant.Grant, error)
// Unseal a Grant to recover the Reference
Unseal(context.Context, *grant.Grant) (*reference.Ref, error)
// Convert one grant to another grant to re-share with another party or just
// to change grant type
Reseal(context.Context, *GrantAndGrantSpec) (*grant.Grant, error)
// Put a Plaintext and returned the sealed Reference as a Grant
PutSeal(context.Context, *PlaintextAndGrantSpec) (*grant.Grant, error)
// Unseal a Grant and follow the Reference to return a Plaintext
UnsealGet(context.Context, *grant.Grant) (*Plaintext, error)
}
GrantServer is the server API for Grant service.
type Plaintext ¶
type Plaintext struct {
Data []byte `protobuf:"bytes,1,opt,name=Data,proto3" json:"Data,omitempty"`
Salt []byte `protobuf:"bytes,2,opt,name=Salt,proto3" json:"Salt,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*Plaintext) Descriptor ¶
func (*Plaintext) ProtoMessage ¶
func (*Plaintext) ProtoMessage()
func (*Plaintext) XXX_DiscardUnknown ¶
func (m *Plaintext) XXX_DiscardUnknown()
func (*Plaintext) XXX_Marshal ¶
func (*Plaintext) XXX_Unmarshal ¶
type PlaintextAndGrantSpec ¶
type PlaintextAndGrantSpec struct {
Plaintext *Plaintext `protobuf:"bytes,1,opt,name=Plaintext,proto3" json:"Plaintext,omitempty"`
// The type of grant to output
GrantSpec *grant.Spec `protobuf:"bytes,2,opt,name=GrantSpec,proto3" json:"GrantSpec,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*PlaintextAndGrantSpec) Descriptor ¶
func (*PlaintextAndGrantSpec) Descriptor() ([]byte, []int)
func (*PlaintextAndGrantSpec) GetGrantSpec ¶
func (m *PlaintextAndGrantSpec) GetGrantSpec() *grant.Spec
func (*PlaintextAndGrantSpec) GetPlaintext ¶
func (m *PlaintextAndGrantSpec) GetPlaintext() *Plaintext
func (*PlaintextAndGrantSpec) ProtoMessage ¶
func (*PlaintextAndGrantSpec) ProtoMessage()
func (*PlaintextAndGrantSpec) Reset ¶
func (m *PlaintextAndGrantSpec) Reset()
func (*PlaintextAndGrantSpec) String ¶
func (m *PlaintextAndGrantSpec) String() string
func (*PlaintextAndGrantSpec) XXX_DiscardUnknown ¶
func (m *PlaintextAndGrantSpec) XXX_DiscardUnknown()
func (*PlaintextAndGrantSpec) XXX_Marshal ¶
func (m *PlaintextAndGrantSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PlaintextAndGrantSpec) XXX_Merge ¶
func (m *PlaintextAndGrantSpec) XXX_Merge(src proto.Message)
func (*PlaintextAndGrantSpec) XXX_Size ¶
func (m *PlaintextAndGrantSpec) XXX_Size() int
func (*PlaintextAndGrantSpec) XXX_Unmarshal ¶
func (m *PlaintextAndGrantSpec) XXX_Unmarshal(b []byte) error
type ReferenceAndCiphertext ¶
type ReferenceAndCiphertext struct {
Reference *reference.Ref `protobuf:"bytes,1,opt,name=Reference,proto3" json:"Reference,omitempty"`
Ciphertext *Ciphertext `protobuf:"bytes,2,opt,name=Ciphertext,proto3" json:"Ciphertext,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*ReferenceAndCiphertext) Descriptor ¶
func (*ReferenceAndCiphertext) Descriptor() ([]byte, []int)
func (*ReferenceAndCiphertext) GetCiphertext ¶
func (m *ReferenceAndCiphertext) GetCiphertext() *Ciphertext
func (*ReferenceAndCiphertext) GetReference ¶
func (m *ReferenceAndCiphertext) GetReference() *reference.Ref
func (*ReferenceAndCiphertext) ProtoMessage ¶
func (*ReferenceAndCiphertext) ProtoMessage()
func (*ReferenceAndCiphertext) Reset ¶
func (m *ReferenceAndCiphertext) Reset()
func (*ReferenceAndCiphertext) String ¶
func (m *ReferenceAndCiphertext) String() string
func (*ReferenceAndCiphertext) XXX_DiscardUnknown ¶
func (m *ReferenceAndCiphertext) XXX_DiscardUnknown()
func (*ReferenceAndCiphertext) XXX_Marshal ¶
func (m *ReferenceAndCiphertext) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ReferenceAndCiphertext) XXX_Merge ¶
func (m *ReferenceAndCiphertext) XXX_Merge(src proto.Message)
func (*ReferenceAndCiphertext) XXX_Size ¶
func (m *ReferenceAndCiphertext) XXX_Size() int
func (*ReferenceAndCiphertext) XXX_Unmarshal ¶
func (m *ReferenceAndCiphertext) XXX_Unmarshal(b []byte) error
type ReferenceAndGrantSpec ¶
type ReferenceAndGrantSpec struct {
Reference *reference.Ref `protobuf:"bytes,1,opt,name=Reference,proto3" json:"Reference,omitempty"`
// The type of grant to output
GrantSpec *grant.Spec `protobuf:"bytes,2,opt,name=GrantSpec,proto3" json:"GrantSpec,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*ReferenceAndGrantSpec) Descriptor ¶
func (*ReferenceAndGrantSpec) Descriptor() ([]byte, []int)
func (*ReferenceAndGrantSpec) GetGrantSpec ¶
func (m *ReferenceAndGrantSpec) GetGrantSpec() *grant.Spec
func (*ReferenceAndGrantSpec) GetReference ¶
func (m *ReferenceAndGrantSpec) GetReference() *reference.Ref
func (*ReferenceAndGrantSpec) ProtoMessage ¶
func (*ReferenceAndGrantSpec) ProtoMessage()
func (*ReferenceAndGrantSpec) Reset ¶
func (m *ReferenceAndGrantSpec) Reset()
func (*ReferenceAndGrantSpec) String ¶
func (m *ReferenceAndGrantSpec) String() string
func (*ReferenceAndGrantSpec) XXX_DiscardUnknown ¶
func (m *ReferenceAndGrantSpec) XXX_DiscardUnknown()
func (*ReferenceAndGrantSpec) XXX_Marshal ¶
func (m *ReferenceAndGrantSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ReferenceAndGrantSpec) XXX_Merge ¶
func (m *ReferenceAndGrantSpec) XXX_Merge(src proto.Message)
func (*ReferenceAndGrantSpec) XXX_Size ¶
func (m *ReferenceAndGrantSpec) XXX_Size() int
func (*ReferenceAndGrantSpec) XXX_Unmarshal ¶
func (m *ReferenceAndGrantSpec) XXX_Unmarshal(b []byte) error
type StorageClient ¶
type StorageClient interface {
// Insert the (presumably) encrypted data provided and get the its address.
Push(ctx context.Context, in *Ciphertext, opts ...grpc.CallOption) (*Address, error)
// Retrieve the (presumably) encrypted data stored at address.
Pull(ctx context.Context, in *Address, opts ...grpc.CallOption) (*Ciphertext, error)
// Get some information about the encrypted blob stored at an address,
// including whether it exists.
Stat(ctx context.Context, in *Address, opts ...grpc.CallOption) (*storage.StatInfo, error)
}
StorageClient is the client API for Storage service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewStorageClient ¶
func NewStorageClient(cc *grpc.ClientConn) StorageClient
type StorageServer ¶
type StorageServer interface {
// Insert the (presumably) encrypted data provided and get the its address.
Push(context.Context, *Ciphertext) (*Address, error)
// Retrieve the (presumably) encrypted data stored at address.
Pull(context.Context, *Address) (*Ciphertext, error)
// Get some information about the encrypted blob stored at an address,
// including whether it exists.
Stat(context.Context, *Address) (*storage.StatInfo, error)
}
StorageServer is the server API for Storage service.