Documentation
¶
Index ¶
- type Cache
- func (c *Cache) AddKey(k string)
- func (c *Cache) B(b ...[]byte) []byte
- func (c *Cache) BE(b []byte, e error) error
- func (c *Cache) C1(i ...int) int
- func (c *Cache) C2(i ...int) int
- func (c *Cache) C3(i ...int) int
- func (c *Cache) Clear()
- func (c *Cache) DropKeys()
- func (c *Cache) DropLastKey()
- func (c *Cache) DropV3()
- func (c *Cache) E(e ...error) error
- func (c *Cache) GetKeys() []string
- func (c *Cache) V1(v ...interface{}) interface{}
- func (c *Cache) V1E(v interface{}, e error) error
- func (c *Cache) V2(v ...interface{}) interface{}
- func (c *Cache) V3(v ...interface{}) []interface{}
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache for easily sharing state between map operations and methods V{1,2} are common interface{} placeholders, C{1,2,3} are counters used for condition, while []Keys is used by path discovery methods to keep track and derive the right path.
func (*Cache) B ¶
B can be used to set or get b. If no argument is passed the method returns b value. If an argument is passed, the method sets b's value to that of the arguments
func (*Cache) BE ¶ added in v0.3.2
BE expects 2 inputs, a byte array and an error. If byte array is not nil, b will be set to the value of the new byte array. Error is returned with the new/old byte array at the end always
func (*Cache) C1 ¶
C1 can be used to set or get c1. If no argument is passed the method returns c1 value. If an argument is passed, the method sets c1's value to that of the arguments
func (*Cache) C2 ¶
C2 can be used to set or get c2. If no argument is passed the method returns c2 value. If an argument is passed, the method sets c2's value to that of the arguments
func (*Cache) C3 ¶
C3 can be used to set or get c3. If no argument is passed the method returns c3 value. If an argument is passed, the method sets c3's value to that of the arguments
func (*Cache) Clear ¶
func (c *Cache) Clear()
Clear for clearing the cache and setting all content to nil
func (*Cache) DropLastKey ¶
func (c *Cache) DropLastKey()
DropLastKey removes the last key added from the list
func (*Cache) DropV3 ¶ added in v0.3.2
func (c *Cache) DropV3()
DropV3 removes all keys from the list
func (*Cache) E ¶
E can be used to set or get e. If no argument is passed the method returns e value. If an argument is passed, the method sets e's value to that of the arguments
func (*Cache) V1 ¶
func (c *Cache) V1(v ...interface{}) interface{}
V1 can be used to set or get v1. If no argument is passed the method returns v1 value. If an argument is passed, the method sets v1's value to that of the arguments
func (*Cache) V1E ¶ added in v0.3.2
V1E expects 2 inputs, a byte array and an error. If byte array is not nil, b will be set to the value of the new byte array. Error is returned with the new/old byte array at the end always