Documentation
¶
Overview ¶
Package arx is a generated protocol buffer package.
It is generated from these files:
src/github.com/keithballdotnet/arx/proto/arx.proto
It has these top-level messages:
KeyMetadata Key KeyVersion CreateKeyRequest ListKeysRequest RotateKeyRequest RotateKeyResponse EnableKeyRequest DisableKeyRequest GenerateDataKeyRequest GenerateDataKeyResponse EncryptRequest EncryptResponse DecryptRequest DecryptResponse ReEncryptRequest ReEncryptResponse
Index ¶
- func RegisterArxServer(s *grpc.Server, srv ArxServer)
- type ArxClient
- type ArxServer
- type Arx_ListKeysClient
- type Arx_ListKeysServer
- type CreateKeyRequest
- type DecryptRequest
- type DecryptResponse
- type DisableKeyRequest
- type EnableKeyRequest
- type EncryptRequest
- type EncryptResponse
- type GenerateDataKeyRequest
- type GenerateDataKeyResponse
- type Key
- func (*Key) Descriptor() ([]byte, []int)
- func (key *Key) GetLatest() []byte
- func (key *Key) GetLatestVersion() int64
- func (m *Key) GetMetadata() *KeyMetadata
- func (key *Key) GetVersion(version int) []byte
- func (m *Key) GetVersions() []*KeyVersion
- func (*Key) ProtoMessage()
- func (m *Key) Reset()
- func (m *Key) String() string
- type KeyByVersion
- type KeyMetadata
- type KeyVersion
- type ListKeysRequest
- type ReEncryptRequest
- type ReEncryptResponse
- type RotateKeyRequest
- type RotateKeyResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterArxServer ¶
Types ¶
type ArxClient ¶
type ArxClient interface { // // Creates a new key // CreateKey(ctx context.Context, in *CreateKeyRequest, opts ...grpc.CallOption) (*KeyMetadata, error) // // Stream a list of keys back to the client // ListKeys(ctx context.Context, in *ListKeysRequest, opts ...grpc.CallOption) (Arx_ListKeysClient, error) // // Rotate a key // RotateKey(ctx context.Context, in *RotateKeyRequest, opts ...grpc.CallOption) (*RotateKeyResponse, error) // // Enable a key // EnableKey(ctx context.Context, in *EnableKeyRequest, opts ...grpc.CallOption) (*KeyMetadata, error) // // Disable a key // DisableKey(ctx context.Context, in *DisableKeyRequest, opts ...grpc.CallOption) (*KeyMetadata, error) // // Generate a data key // GenerateDataKey(ctx context.Context, in *GenerateDataKeyRequest, opts ...grpc.CallOption) (*GenerateDataKeyResponse, error) // // Encrypt data // Encrypt(ctx context.Context, in *EncryptRequest, opts ...grpc.CallOption) (*EncryptResponse, error) // // Decrypt data // Decrypt(ctx context.Context, in *DecryptRequest, opts ...grpc.CallOption) (*DecryptResponse, error) // // ReEncrypt data // ReEncrypt(ctx context.Context, in *ReEncryptRequest, opts ...grpc.CallOption) (*ReEncryptResponse, error) }
func NewArxClient ¶
func NewArxClient(cc *grpc.ClientConn) ArxClient
type ArxServer ¶
type ArxServer interface { // // Creates a new key // CreateKey(context.Context, *CreateKeyRequest) (*KeyMetadata, error) // // Stream a list of keys back to the client // ListKeys(*ListKeysRequest, Arx_ListKeysServer) error // // Rotate a key // RotateKey(context.Context, *RotateKeyRequest) (*RotateKeyResponse, error) // // Enable a key // EnableKey(context.Context, *EnableKeyRequest) (*KeyMetadata, error) // // Disable a key // DisableKey(context.Context, *DisableKeyRequest) (*KeyMetadata, error) // // Generate a data key // GenerateDataKey(context.Context, *GenerateDataKeyRequest) (*GenerateDataKeyResponse, error) // // Encrypt data // Encrypt(context.Context, *EncryptRequest) (*EncryptResponse, error) // // Decrypt data // Decrypt(context.Context, *DecryptRequest) (*DecryptResponse, error) // // ReEncrypt data // ReEncrypt(context.Context, *ReEncryptRequest) (*ReEncryptResponse, error) }
type Arx_ListKeysClient ¶
type Arx_ListKeysClient interface { Recv() (*KeyMetadata, error) grpc.ClientStream }
type Arx_ListKeysServer ¶
type Arx_ListKeysServer interface { Send(*KeyMetadata) error grpc.ServerStream }
type CreateKeyRequest ¶
type CreateKeyRequest struct {
Description string `protobuf:"bytes,1,opt,name=Description,json=description" json:"Description,omitempty"`
}
CreateKeyRequest will create a key
func (*CreateKeyRequest) Descriptor ¶
func (*CreateKeyRequest) Descriptor() ([]byte, []int)
func (*CreateKeyRequest) ProtoMessage ¶
func (*CreateKeyRequest) ProtoMessage()
func (*CreateKeyRequest) Reset ¶
func (m *CreateKeyRequest) Reset()
func (*CreateKeyRequest) String ¶
func (m *CreateKeyRequest) String() string
type DecryptRequest ¶
type DecryptRequest struct {
CiphertextBlob []byte `protobuf:"bytes,1,opt,name=CiphertextBlob,json=ciphertextBlob,proto3" json:"CiphertextBlob,omitempty"`
}
DecryptRequest ...
func (*DecryptRequest) Descriptor ¶
func (*DecryptRequest) Descriptor() ([]byte, []int)
func (*DecryptRequest) ProtoMessage ¶
func (*DecryptRequest) ProtoMessage()
func (*DecryptRequest) Reset ¶
func (m *DecryptRequest) Reset()
func (*DecryptRequest) String ¶
func (m *DecryptRequest) String() string
type DecryptResponse ¶
type DecryptResponse struct {
Plaintext []byte `protobuf:"bytes,1,opt,name=Plaintext,json=plaintext,proto3" json:"Plaintext,omitempty"`
}
DecryptResponse ...
func (*DecryptResponse) Descriptor ¶
func (*DecryptResponse) Descriptor() ([]byte, []int)
func (*DecryptResponse) ProtoMessage ¶
func (*DecryptResponse) ProtoMessage()
func (*DecryptResponse) Reset ¶
func (m *DecryptResponse) Reset()
func (*DecryptResponse) String ¶
func (m *DecryptResponse) String() string
type DisableKeyRequest ¶
type DisableKeyRequest struct {
KeyID string `protobuf:"bytes,1,opt,name=KeyID,json=keyID" json:"KeyID,omitempty"`
}
DisableKeyRequest will disable a key
func (*DisableKeyRequest) Descriptor ¶
func (*DisableKeyRequest) Descriptor() ([]byte, []int)
func (*DisableKeyRequest) ProtoMessage ¶
func (*DisableKeyRequest) ProtoMessage()
func (*DisableKeyRequest) Reset ¶
func (m *DisableKeyRequest) Reset()
func (*DisableKeyRequest) String ¶
func (m *DisableKeyRequest) String() string
type EnableKeyRequest ¶
type EnableKeyRequest struct {
KeyID string `protobuf:"bytes,1,opt,name=KeyID,json=keyID" json:"KeyID,omitempty"`
}
EnableKeyRequest will enable a key
func (*EnableKeyRequest) Descriptor ¶
func (*EnableKeyRequest) Descriptor() ([]byte, []int)
func (*EnableKeyRequest) ProtoMessage ¶
func (*EnableKeyRequest) ProtoMessage()
func (*EnableKeyRequest) Reset ¶
func (m *EnableKeyRequest) Reset()
func (*EnableKeyRequest) String ¶
func (m *EnableKeyRequest) String() string
type EncryptRequest ¶
type EncryptRequest struct { KeyID string `protobuf:"bytes,1,opt,name=KeyID,json=keyID" json:"KeyID,omitempty"` Plaintext []byte `protobuf:"bytes,2,opt,name=Plaintext,json=plaintext,proto3" json:"Plaintext,omitempty"` }
EncryptRequest ...
func (*EncryptRequest) Descriptor ¶
func (*EncryptRequest) Descriptor() ([]byte, []int)
func (*EncryptRequest) ProtoMessage ¶
func (*EncryptRequest) ProtoMessage()
func (*EncryptRequest) Reset ¶
func (m *EncryptRequest) Reset()
func (*EncryptRequest) String ¶
func (m *EncryptRequest) String() string
type EncryptResponse ¶
type EncryptResponse struct {
CiphertextBlob []byte `protobuf:"bytes,1,opt,name=CiphertextBlob,json=ciphertextBlob,proto3" json:"CiphertextBlob,omitempty"`
}
EncryptResponse ...
func (*EncryptResponse) Descriptor ¶
func (*EncryptResponse) Descriptor() ([]byte, []int)
func (*EncryptResponse) ProtoMessage ¶
func (*EncryptResponse) ProtoMessage()
func (*EncryptResponse) Reset ¶
func (m *EncryptResponse) Reset()
func (*EncryptResponse) String ¶
func (m *EncryptResponse) String() string
type GenerateDataKeyRequest ¶
type GenerateDataKeyRequest struct {
KeyID string `protobuf:"bytes,1,opt,name=KeyID,json=keyID" json:"KeyID,omitempty"`
}
GenerateDataKeyRequest will request a new data key
func (*GenerateDataKeyRequest) Descriptor ¶
func (*GenerateDataKeyRequest) Descriptor() ([]byte, []int)
func (*GenerateDataKeyRequest) ProtoMessage ¶
func (*GenerateDataKeyRequest) ProtoMessage()
func (*GenerateDataKeyRequest) Reset ¶
func (m *GenerateDataKeyRequest) Reset()
func (*GenerateDataKeyRequest) String ¶
func (m *GenerateDataKeyRequest) String() string
type GenerateDataKeyResponse ¶
type GenerateDataKeyResponse struct { Plaintext []byte `protobuf:"bytes,1,opt,name=Plaintext,json=plaintext,proto3" json:"Plaintext,omitempty"` CiphertextBlob []byte `protobuf:"bytes,2,opt,name=CiphertextBlob,json=ciphertextBlob,proto3" json:"CiphertextBlob,omitempty"` }
GenerateDataKeyResponse ...
func (*GenerateDataKeyResponse) Descriptor ¶
func (*GenerateDataKeyResponse) Descriptor() ([]byte, []int)
func (*GenerateDataKeyResponse) ProtoMessage ¶
func (*GenerateDataKeyResponse) ProtoMessage()
func (*GenerateDataKeyResponse) Reset ¶
func (m *GenerateDataKeyResponse) Reset()
func (*GenerateDataKeyResponse) String ¶
func (m *GenerateDataKeyResponse) String() string
type Key ¶
type Key struct { Metadata *KeyMetadata `protobuf:"bytes,1,opt,name=Metadata,json=metadata" json:"Metadata,omitempty"` Versions []*KeyVersion `protobuf:"bytes,2,rep,name=Versions,json=versions" json:"Versions,omitempty"` }
Key is a represention of a key
func (*Key) Descriptor ¶
func (*Key) GetLatestVersion ¶
GetLatestVersion will return the latest version number
func (*Key) GetMetadata ¶
func (m *Key) GetMetadata() *KeyMetadata
func (*Key) GetVersion ¶
GetVersion will return a specific versioned key
func (*Key) GetVersions ¶
func (m *Key) GetVersions() []*KeyVersion
func (*Key) ProtoMessage ¶
func (*Key) ProtoMessage()
type KeyByVersion ¶
type KeyByVersion []*KeyVersion
KeyByVersion - Will sort the Keys by Version (highest version at top i.e. Version 5 will be 4 in index, v3 index 2)
func (KeyByVersion) Len ¶
func (a KeyByVersion) Len() int
func (KeyByVersion) Less ¶
func (a KeyByVersion) Less(i, j int) bool
func (KeyByVersion) Swap ¶
func (a KeyByVersion) Swap(i, j int)
type KeyMetadata ¶
type KeyMetadata struct { KeyID string `protobuf:"bytes,1,opt,name=KeyID,json=keyID" json:"KeyID,omitempty"` CreationDateRFC3339Nano string `protobuf:"bytes,2,opt,name=CreationDateRFC3339Nano,json=creationDateRFC3339Nano" json:"CreationDateRFC3339Nano,omitempty"` Description string `protobuf:"bytes,3,opt,name=Description,json=description" json:"Description,omitempty"` Enabled bool `protobuf:"varint,4,opt,name=Enabled,json=enabled" json:"Enabled,omitempty"` }
KeyMetadata is a representation of an Encryption Key
func (*KeyMetadata) Descriptor ¶
func (*KeyMetadata) Descriptor() ([]byte, []int)
func (*KeyMetadata) ProtoMessage ¶
func (*KeyMetadata) ProtoMessage()
func (*KeyMetadata) Reset ¶
func (m *KeyMetadata) Reset()
func (*KeyMetadata) String ¶
func (m *KeyMetadata) String() string
type KeyVersion ¶
type KeyVersion struct { Version int64 `protobuf:"varint,1,opt,name=Version,json=version" json:"Version,omitempty"` Key []byte `protobuf:"bytes,2,opt,name=Key,json=key,proto3" json:"Key,omitempty"` }
KeyVersion is a version of a key
func (*KeyVersion) Descriptor ¶
func (*KeyVersion) Descriptor() ([]byte, []int)
func (*KeyVersion) ProtoMessage ¶
func (*KeyVersion) ProtoMessage()
func (*KeyVersion) Reset ¶
func (m *KeyVersion) Reset()
func (*KeyVersion) String ¶
func (m *KeyVersion) String() string
type ListKeysRequest ¶
type ListKeysRequest struct { }
ListKeysRequest will stream a list of available keys back to the user
func (*ListKeysRequest) Descriptor ¶
func (*ListKeysRequest) Descriptor() ([]byte, []int)
func (*ListKeysRequest) ProtoMessage ¶
func (*ListKeysRequest) ProtoMessage()
func (*ListKeysRequest) Reset ¶
func (m *ListKeysRequest) Reset()
func (*ListKeysRequest) String ¶
func (m *ListKeysRequest) String() string
type ReEncryptRequest ¶
type ReEncryptRequest struct { CiphertextBlob []byte `protobuf:"bytes,1,opt,name=CiphertextBlob,json=ciphertextBlob,proto3" json:"CiphertextBlob,omitempty"` DestinationKeyID string `protobuf:"bytes,2,opt,name=DestinationKeyID,json=destinationKeyID" json:"DestinationKeyID,omitempty"` }
ReEncryptRequest ...
func (*ReEncryptRequest) Descriptor ¶
func (*ReEncryptRequest) Descriptor() ([]byte, []int)
func (*ReEncryptRequest) ProtoMessage ¶
func (*ReEncryptRequest) ProtoMessage()
func (*ReEncryptRequest) Reset ¶
func (m *ReEncryptRequest) Reset()
func (*ReEncryptRequest) String ¶
func (m *ReEncryptRequest) String() string
type ReEncryptResponse ¶
type ReEncryptResponse struct { CiphertextBlob []byte `protobuf:"bytes,1,opt,name=CiphertextBlob,json=ciphertextBlob,proto3" json:"CiphertextBlob,omitempty"` KeyID string `protobuf:"bytes,2,opt,name=KeyID,json=keyID" json:"KeyID,omitempty"` SourceKeyID string `protobuf:"bytes,3,opt,name=SourceKeyID,json=sourceKeyID" json:"SourceKeyID,omitempty"` }
ReEncryptResponse ...
func (*ReEncryptResponse) Descriptor ¶
func (*ReEncryptResponse) Descriptor() ([]byte, []int)
func (*ReEncryptResponse) ProtoMessage ¶
func (*ReEncryptResponse) ProtoMessage()
func (*ReEncryptResponse) Reset ¶
func (m *ReEncryptResponse) Reset()
func (*ReEncryptResponse) String ¶
func (m *ReEncryptResponse) String() string
type RotateKeyRequest ¶
type RotateKeyRequest struct {
KeyID string `protobuf:"bytes,1,opt,name=KeyID,json=keyID" json:"KeyID,omitempty"`
}
RotateKeyRequest will rotate a key
func (*RotateKeyRequest) Descriptor ¶
func (*RotateKeyRequest) Descriptor() ([]byte, []int)
func (*RotateKeyRequest) ProtoMessage ¶
func (*RotateKeyRequest) ProtoMessage()
func (*RotateKeyRequest) Reset ¶
func (m *RotateKeyRequest) Reset()
func (*RotateKeyRequest) String ¶
func (m *RotateKeyRequest) String() string
type RotateKeyResponse ¶
type RotateKeyResponse struct {
Success bool `protobuf:"varint,1,opt,name=Success,json=success" json:"Success,omitempty"`
}
RotateKeyResponse will rotate a key
func (*RotateKeyResponse) Descriptor ¶
func (*RotateKeyResponse) Descriptor() ([]byte, []int)
func (*RotateKeyResponse) ProtoMessage ¶
func (*RotateKeyResponse) ProtoMessage()
func (*RotateKeyResponse) Reset ¶
func (m *RotateKeyResponse) Reset()
func (*RotateKeyResponse) String ¶
func (m *RotateKeyResponse) String() string