utils

package
v0.0.0-...-4d35127 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WrapToList

func WrapToList(object interface{}) []interface{}

Types

type CachedArray

type CachedArray struct {
	Data      []map[string]interface{} `json:"data"`
	UpdatedAt string                   `json:"updated_at"`
}

type CachedMap

type CachedMap struct {
	Data      map[string]interface{} `json:"data"`
	UpdatedAt string                 `json:"updated_at"`
}

type Caching

type Caching struct {
	// contains filtered or unexported fields
}

func NewCachingService

func NewCachingService(r *redis.Client, logger *zap.SugaredLogger) *Caching

func (*Caching) ClearAll

func (s *Caching) ClearAll()

func (*Caching) Drop

func (s *Caching) Drop(key string)

func (*Caching) FromCacheArray

func (s *Caching) FromCacheArray(key string) CachedArray

func (*Caching) FromCacheMap

func (s *Caching) FromCacheMap(key string) CachedMap

func (*Caching) ToCache

func (s *Caching) ToCache(key string, value interface{})

Jump to

Keyboard shortcuts

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