Documentation ¶
Index ¶
- type Result
- func (r *Result) Bool() (bool, error, bool)
- func (r *Result) BoolSlice() ([]bool, error, bool)
- func (r *Result) ByteSlice() ([]byte, error, bool)
- func (r *Result) Bytes() ([]byte, error, bool)
- func (r *Result) Err() error
- func (r *Result) Float() (float64, error, bool)
- func (r *Result) Float32() (float32, error, bool)
- func (r *Result) Float32Slice() ([]float32, error, bool)
- func (r *Result) Float64() (float64, error, bool)
- func (r *Result) Float64Slice() ([]float64, error, bool)
- func (r *Result) Hit() bool
- func (r *Result) Int() (int, error, bool)
- func (r *Result) Int64() (int64, error, bool)
- func (r *Result) Int64Slice() ([]int64, error, bool)
- func (r *Result) IntSlice() ([]int, error, bool)
- func (r *Result) Interface() (any, error, bool)
- func (r *Result) Miss() bool
- func (r *Result) Result() (any, error, bool)
- func (r *Result) String() (string, error, bool)
- func (r *Result) StringSlice() ([]string, error, bool)
- func (r *Result) Text() (string, error, bool)
- func (r *Result) TextSlice() ([]string, error, bool)
- func (r *Result) UUID() (uuid.UUID, error, bool)
- func (r *Result) Uint64() (uint64, error, bool)
- func (r *Result) Uint64Slice() ([]uint64, error, bool)
- func (r *Result) Val() any
- type Storage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Result ¶ added in v0.0.4
Result struct for returning data back to its original types
func (*Result) Float32Slice ¶ added in v0.0.4
Return the result back as a float32 slice
func (*Result) Float64Slice ¶ added in v0.0.4
Return the result back as a float64 slice
func (*Result) Int64Slice ¶ added in v0.0.4
Return the result back as an int64 slice
func (*Result) StringSlice ¶ added in v0.0.4
Return the result back as a string slice
func (*Result) Uint64Slice ¶ added in v0.0.4
Return the result back as a uint64 slice
type Storage ¶
type Storage interface { // Get the value for the given key. // A Result struct is returned allowing various extraction options. Get(key string) *Result // Set the value for the given key along with an optional expiration value, 0 means no expiration. // An empty key will flag an error, but empty values are allowed. Set(key string, val any, expiry ...time.Duration) error // Deletes the values for the given keys. // It returns no error if the storage does not contain the keys. Delete(key ...string) error // Removes all keys for the specified namespace. Reset() error // Close the storage, stop any running garbage collectors and closes open connections. Close() error }
Storage interface for communicating with different database/key-value providers
Click to show internal directories.
Click to hide internal directories.