keyencode

package
v0.0.0-...-7ddc71e Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2017 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewKV

func NewKV(kv etcd.KV, xfm KeyEncoder) etcd.KV

func NewWatcher

func NewWatcher(w etcd.Watcher, xfm KeyEncoder) etcd.Watcher

Types

type KeyEncoder

type KeyEncoder interface {
	Encode(s string) string
	Decode(s string) (string, error)
}

KeyEncoder transforms a string 1:1 between encoded and decoded representations.

func NewKeyEncoderHMAC

func NewKeyEncoderHMAC(h func() hash.Hash, b cipher.Block) KeyEncoder

NewKeyEncoderHMAC use an hmac hash and a block cipher to encode keys.

func NewKeyEncoderNop

func NewKeyEncoderNop() KeyEncoder

Jump to

Keyboard shortcuts

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