v1

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2021 License: MIT Imports: 0 Imported by: 0

Documentation

Index

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 NewCacheFactory

func NewCacheFactory() Cache

NewCacheFactory for creating a new Cache

func (*Cache) AddKey

func (c *Cache) AddKey(k string)

AddKey for appending a new Key to cache

func (*Cache) B

func (c *Cache) B(b ...[]byte) []byte

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

func (c *Cache) BE(b []byte, e error) error

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

func (c *Cache) C1(i ...int) int

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

func (c *Cache) C2(i ...int) int

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

func (c *Cache) C3(i ...int) int

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) DropKeys

func (c *Cache) DropKeys()

DropKeys removes all keys from the list

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

func (c *Cache) E(e ...error) error

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) GetKeys

func (c *Cache) GetKeys() []string

GetKeys returns Cache.Keys

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

func (c *Cache) V1E(v interface{}, e error) error

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

func (*Cache) V2

func (c *Cache) V2(v ...interface{}) interface{}

V2 can be used to set or get v2. If no argument is passed the method returns v2 value. If an argument is passed, the method sets v2's value to that of the arguments

func (*Cache) V3

func (c *Cache) V3(v ...interface{}) []interface{}

V3 returns Cache.V3

Jump to

Keyboard shortcuts

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