key_storage

package
v1.17.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 4, 2026 License: MPL-2.0 Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	StorageVersion_name = map[int32]string{
		0: "STORAGE_VERSION_UNSPECIFIED",
		1: "STORAGE_VERSION_1",
	}
	StorageVersion_value = map[string]int32{
		"STORAGE_VERSION_UNSPECIFIED": 0,
		"STORAGE_VERSION_1":           1,
	}
)

Enum value maps for StorageVersion.

View Source
var (
	Algorithm_name = map[int32]string{
		0: "UNKNOWN",
		1: "PGP_AES_GCM_256",
	}
	Algorithm_value = map[string]int32{
		"UNKNOWN":         0,
		"PGP_AES_GCM_256": 1,
	}
)

Enum value maps for Algorithm.

View Source
var File_key_storage_key_storage_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Algorithm

type Algorithm int32

Algorithm is an algorithm used for encryption.

const (
	Algorithm_UNKNOWN         Algorithm = 0
	Algorithm_PGP_AES_GCM_256 Algorithm = 1 // PGP encrypted AES-256-GCM key
)

func (Algorithm) Descriptor

func (Algorithm) Descriptor() protoreflect.EnumDescriptor

func (Algorithm) Enum

func (x Algorithm) Enum() *Algorithm

func (Algorithm) EnumDescriptor deprecated

func (Algorithm) EnumDescriptor() ([]byte, []int)

Deprecated: Use Algorithm.Descriptor instead.

func (Algorithm) Number

func (x Algorithm) Number() protoreflect.EnumNumber

func (Algorithm) String

func (x Algorithm) String() string

func (Algorithm) Type

type KeySlot

type KeySlot struct {
	Algorithm    Algorithm `protobuf:"varint,1,opt,name=algorithm,proto3,enum=cosi.internal.key_storage.Algorithm" json:"algorithm,omitempty"`
	EncryptedKey []byte    `protobuf:"bytes,2,opt,name=encrypted_key,json=encryptedKey,proto3" json:"encrypted_key,omitempty"`
	// contains filtered or unexported fields
}

KeySlot is a single key slot in KeyStorage.

func (*KeySlot) CloneMessageVT added in v0.3.1

func (m *KeySlot) CloneMessageVT() proto.Message

func (*KeySlot) CloneVT added in v0.3.1

func (m *KeySlot) CloneVT() *KeySlot

func (*KeySlot) Descriptor deprecated

func (*KeySlot) Descriptor() ([]byte, []int)

Deprecated: Use KeySlot.ProtoReflect.Descriptor instead.

func (*KeySlot) EqualMessageVT added in v0.3.0

func (this *KeySlot) EqualMessageVT(thatMsg proto.Message) bool

func (*KeySlot) EqualVT added in v0.3.0

func (this *KeySlot) EqualVT(that *KeySlot) bool

func (*KeySlot) GetAlgorithm

func (x *KeySlot) GetAlgorithm() Algorithm

func (*KeySlot) GetEncryptedKey

func (x *KeySlot) GetEncryptedKey() []byte

func (*KeySlot) MarshalToSizedBufferVT

func (m *KeySlot) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*KeySlot) MarshalToVT

func (m *KeySlot) MarshalToVT(dAtA []byte) (int, error)

func (*KeySlot) MarshalVT

func (m *KeySlot) MarshalVT() (dAtA []byte, err error)

func (*KeySlot) ProtoMessage

func (*KeySlot) ProtoMessage()

func (*KeySlot) ProtoReflect

func (x *KeySlot) ProtoReflect() protoreflect.Message

func (*KeySlot) Reset

func (x *KeySlot) Reset()

func (*KeySlot) SizeVT

func (m *KeySlot) SizeVT() (n int)

func (*KeySlot) String

func (x *KeySlot) String() string

func (*KeySlot) UnmarshalVT

func (m *KeySlot) UnmarshalVT(dAtA []byte) error

type Storage

type Storage struct {
	StorageVersion StorageVersion      `` /* 150-byte string literal not displayed */
	KeySlots       map[string]*KeySlot `` /* 159-byte string literal not displayed */
	KeysHmacHash   []byte              `protobuf:"bytes,3,opt,name=keys_hmac_hash,json=keysHmacHash,proto3" json:"keys_hmac_hash,omitempty"`
	// contains filtered or unexported fields
}

Storage is a main storage for keys in memory and in db.

func (*Storage) CloneMessageVT added in v0.3.1

func (m *Storage) CloneMessageVT() proto.Message

func (*Storage) CloneVT added in v0.3.1

func (m *Storage) CloneVT() *Storage

func (*Storage) Descriptor deprecated

func (*Storage) Descriptor() ([]byte, []int)

Deprecated: Use Storage.ProtoReflect.Descriptor instead.

func (*Storage) EqualMessageVT added in v0.3.0

func (this *Storage) EqualMessageVT(thatMsg proto.Message) bool

func (*Storage) EqualVT added in v0.3.0

func (this *Storage) EqualVT(that *Storage) bool

func (*Storage) GetKeySlots

func (x *Storage) GetKeySlots() map[string]*KeySlot

func (*Storage) GetKeysHmacHash

func (x *Storage) GetKeysHmacHash() []byte

func (*Storage) GetStorageVersion

func (x *Storage) GetStorageVersion() StorageVersion

func (*Storage) MarshalToSizedBufferVT

func (m *Storage) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Storage) MarshalToVT

func (m *Storage) MarshalToVT(dAtA []byte) (int, error)

func (*Storage) MarshalVT

func (m *Storage) MarshalVT() (dAtA []byte, err error)

func (*Storage) ProtoMessage

func (*Storage) ProtoMessage()

func (*Storage) ProtoReflect

func (x *Storage) ProtoReflect() protoreflect.Message

func (*Storage) Reset

func (x *Storage) Reset()

func (*Storage) SizeVT

func (m *Storage) SizeVT() (n int)

func (*Storage) String

func (x *Storage) String() string

func (*Storage) UnmarshalVT

func (m *Storage) UnmarshalVT(dAtA []byte) error

type StorageVersion

type StorageVersion int32

StorageVersion is a version of KeyStorage.

const (
	StorageVersion_STORAGE_VERSION_UNSPECIFIED StorageVersion = 0
	StorageVersion_STORAGE_VERSION_1           StorageVersion = 1
)

func (StorageVersion) Descriptor

func (StorageVersion) Enum

func (x StorageVersion) Enum() *StorageVersion

func (StorageVersion) EnumDescriptor deprecated

func (StorageVersion) EnumDescriptor() ([]byte, []int)

Deprecated: Use StorageVersion.Descriptor instead.

func (StorageVersion) Number

func (StorageVersion) String

func (x StorageVersion) String() string

func (StorageVersion) Type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL