Documentation ¶
Index ¶
- Variables
- func BytesToString(b []byte) string
- func ListStringToBytes(lst []string) [][]byte
- func ListValueToBytes(lst []Value) [][]byte
- func MapBoolToMapBytes(h map[string]bool) map[string][]byte
- func MapBytesToValues(h map[string][]byte) map[string]Value
- func MapFloatToMapBytes(h map[string]float64) map[string][]byte
- func MapIntToMapBytes(h map[string]int64) map[string][]byte
- func MapStringToMapBytes(h map[string]string) map[string][]byte
- func MapValueToMapBytes(h map[string]Value) map[string][]byte
- func NewSelfCerts(orgName string) (cfg *tls.Config, err error)
- func StringToBytes(s string) []byte
- type Value
- func (v Value) Bool() (bool, error)
- func (v Value) Bytes() ([]byte, error)
- func (v Value) Duration() (time.Duration, error)
- func (v Value) Error() error
- func (v Value) Float() (float64, error)
- func (v Value) Int() (int64, error)
- func (v Value) List() ([]Value, error)
- func (v Value) Map() (map[string]Value, error)
- func (v Value) Proto(pb proto.Message) error
- func (v Value) RawBytes() []byte
- func (v Value) String() (string, error)
- func (v Value) Time() (time.Time, error)
Constants ¶
This section is empty.
Variables ¶
var ( // ErrKeyNotFound indicates the given key was not found. ErrKeyNotFound = errors.New("Key not found") // ErrKeyLocked menas that the key cannot be modified, as it's locked by another process. ErrKeyLocked = errors.New("Key is locked") // ErrInvalidKey signals that the given key name is invalid. ErrInvalidKey = errors.New("Invalid key name") // ErrTypeMismatch signals that the type of value being requested is unexpected. ErrTypeMismatch = errors.New("Type mismatch") // ErrListEmpty signals that the List is empty. ErrListEmpty = errors.New("List is empty") // ErrListIndexOutOfRange signals that the given index is out of range of the list. ErrListIndexOutOfRange = errors.New("Index out of range") // ErrHashFieldNotFound signals that the hash does not have the given field. ErrHashFieldNotFound = errors.New("Hash field does not exist") )
var ZeroByte = []byte{0}
ZeroByte represents a single zero byte in a byte slice.
Functions ¶
func BytesToString ¶
BytesToString efficiently converts a byte slice to a string without allocating any additional memory.
func ListStringToBytes ¶
ListStringToBytes converts a []string to [][]byte.
func ListValueToBytes ¶
ListValueToBytes converts a []Value to [][]byte.
func MapBoolToMapBytes ¶
MapBoolToMapBytes converts a map[string]string to map[string][]byte.
func MapBytesToValues ¶
MapBytesToValues converts a map[string][]byte to map[string]Value.
func MapFloatToMapBytes ¶
MapFloatToMapBytes converts a map[string]string to map[string][]byte.
func MapIntToMapBytes ¶
MapIntToMapBytes converts a map[string]string to map[string][]byte.
func MapStringToMapBytes ¶
MapStringToMapBytes converts a map[string]string to map[string][]byte.
func MapValueToMapBytes ¶
MapValueToMapBytes converts a map[string]Value to map[string][]byte.
func NewSelfCerts ¶
NewSelfCerts generates new self-signed certificates.
func StringToBytes ¶
StringToBytes efficiently converts a string to a byte slice without allocating any additional memory.
Types ¶
type Value ¶
type Value struct {
// contains filtered or unexported fields
}
Value object.
func ListStringToValues ¶
ListStringToValues converts a []string to []Value.
func ListToValues ¶
ListToValues converts a [][]byte to []Value.