Documentation ¶
Index ¶
- func NewBoxProvider(storage interfaces.KeyStorage, options ...BoxApply) interfaces.Encryption
- func NewDefaultProvider(key []byte) interfaces.Encryption
- func NewDefaultStorage(fileLoc string, inMem bool, log loggerInterfaces.Logger) listener.KeyStorage
- func NewSecretBoxProvider(key string) interfaces.Encryption
- type Apply
- type BadgerStorage
- func (c *BadgerStorage) Debugf(val string, arg ...interface{})
- func (c *BadgerStorage) Errorf(val string, arg ...interface{})
- func (c *BadgerStorage) Get(id string) (response *listenerProto.DefaultStorageItem, err error)
- func (c *BadgerStorage) Infof(val string, arg ...interface{})
- func (c *BadgerStorage) Set(id string, clientPublicKey []byte, serverPair encrypt.BoxKeyPair, ...) error
- func (c *BadgerStorage) Warningf(val string, arg ...interface{})
- type Box
- type BoxApply
- type DefaultProvider
- type Encryption
- type SecretBox
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewBoxProvider ¶
func NewBoxProvider(storage interfaces.KeyStorage, options ...BoxApply) interfaces.Encryption
func NewDefaultProvider ¶
func NewDefaultProvider(key []byte) interfaces.Encryption
func NewDefaultStorage ¶
func NewDefaultStorage(fileLoc string, inMem bool, log loggerInterfaces.Logger) listener.KeyStorage
func NewSecretBoxProvider ¶
func NewSecretBoxProvider(key string) interfaces.Encryption
Types ¶
type Apply ¶
type Apply interface {
// contains filtered or unexported methods
}
func WithKeyStorage ¶
func WithKeyStorage(keyStorage interfaces.KeyStorage) Apply
type BadgerStorage ¶
type BadgerStorage struct {
// contains filtered or unexported fields
}
func (*BadgerStorage) Debugf ¶
func (c *BadgerStorage) Debugf(val string, arg ...interface{})
func (*BadgerStorage) Errorf ¶
func (c *BadgerStorage) Errorf(val string, arg ...interface{})
func (*BadgerStorage) Get ¶
func (c *BadgerStorage) Get(id string) (response *listenerProto.DefaultStorageItem, err error)
func (*BadgerStorage) Infof ¶
func (c *BadgerStorage) Infof(val string, arg ...interface{})
func (*BadgerStorage) Set ¶
func (c *BadgerStorage) Set(id string, clientPublicKey []byte, serverPair encrypt.BoxKeyPair, alive time.Duration) error
func (*BadgerStorage) Warningf ¶
func (c *BadgerStorage) Warningf(val string, arg ...interface{})
type BoxApply ¶
type BoxApply interface {
// contains filtered or unexported methods
}
func BoxWithAnonymous ¶
func BoxWithIgnoreRequest ¶
func BoxWithPairKeys ¶
type DefaultProvider ¶
type DefaultProvider struct {
// contains filtered or unexported fields
}
type Encryption ¶
type Encryption struct {
// contains filtered or unexported fields
}
func NewEncryptionCodec ¶
func NewEncryptionCodec(provider interfaces.Encryption, options ...Apply) *Encryption
func (*Encryption) Marshal ¶
func (c *Encryption) Marshal(v interface{}) ([]byte, error)
func (*Encryption) Name ¶
func (c *Encryption) Name() string
func (*Encryption) Unmarshal ¶
func (c *Encryption) Unmarshal(data []byte, v interface{}) error
Click to show internal directories.
Click to hide internal directories.