Documentation
¶
Overview ¶
DigiStratum GoLib - ByteMap
Index ¶
- type ByteMap
- func (r *ByteMap) Copy() *ByteMap
- func (r *ByteMap) Drop(key string) *ByteMap
- func (r *ByteMap) DropAll()
- func (r *ByteMap) DropSet(keys *[]string) *ByteMap
- func (r *ByteMap) Get(key string) *[]byte
- func (r *ByteMap) GetBool(key string) bool
- func (r *ByteMap) GetInt64(key string) *int64
- func (r *ByteMap) GetIterator() func() interface{}
- func (r *ByteMap) GetKeys() []string
- func (r *ByteMap) GetSubset(keys *[]string) *ByteMap
- func (r *ByteMap) Has(key string) bool
- func (r *ByteMap) HasAll(keys *[]string) bool
- func (r *ByteMap) IsEmpty() bool
- func (r *ByteMap) Merge(mergeHash ByteMapIfc)
- func (r *ByteMap) Set(key string, value []byte)
- func (r *ByteMap) Size() int
- type ByteMapIfc
- type KeyValuePair
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ByteMap ¶
type ByteMap struct {
// contains filtered or unexported fields
}
func NewByteMap ¶
func NewByteMap() *ByteMap
func (*ByteMap) Copy ¶
Get a full (deep) copy of this ByteMap This is so that we can give away a copy to someone else without allowing them to tamper with us ref: https://developer20.com/be-aware-of-coping-in-go/
func (*ByteMap) GetIterator ¶
func (r *ByteMap) GetIterator() func() interface{}
Iterate over all of our items, returning each as a *KeyValuePair in the form of an interface{}
func (*ByteMap) Merge ¶
func (r *ByteMap) Merge(mergeHash ByteMapIfc)
Merge some additional data on top of our own
type ByteMapIfc ¶
type ByteMapIfc interface {
Copy() *ByteMap
Merge(mergeHash ByteMapIfc)
IsEmpty() bool
Size() int
Set(key string, value []byte)
Get(key string) *[]byte
GetInt64(key string) *int64
GetBool(key string) bool
GetKeys() []string
Has(key string) bool
HasAll(keys *[]string) bool
GetSubset(keys *[]string) *ByteMap
Drop(key string) *ByteMap
DropSet(keys *[]string) *ByteMap
DropAll()
GetIterator() func() interface{}
}
ByteMap public interface
type KeyValuePair ¶
Click to show internal directories.
Click to hide internal directories.