lib_gc_cache

package
v0.0.0-...-e28984d Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DOCacheAdapter

type DOCacheAdapter interface {

	// Init source
	InitSource() error

	// CO methods
	Put(data interface{}) error
	GetFromCacheable(cacheable MakeCacheable) (interface{}, error)
	MGetFromCacheable(cacheables []MakeCacheable) (*[]interface{}, error)
	GetFromKey(key string, dataType interface{}) (interface{}, error)
	RemoveFromCacheable(cacheable MakeCacheable) (bool, error)

	// Index methods
	AddValueToIndexKey(indexkey *string, value MakeSerializable, indexname string) error
	GetValuesFromIndexKey(indexkey *string, dataType MakeSerializable, indexname string) (interface{}, error)
	RemoveValueFromIndexKey(indexkey *string, value MakeSerializable, indexname *string) error
	RemoveIndexKey(indexkey, indexname *string) error

	Close() error
	// contains filtered or unexported methods
}

----------- Cache Adapter interface

var DOCache DOCacheAdapter

func GetCacheAdapter

func GetCacheAdapter() (DOCacheAdapter, error)

Get cache adapter

type MakeCacheable

type MakeCacheable interface {
	GetPK() string
	GetName() string
	GetMetadata() *map[string]interface{}
	SetMetadataField(field string, value interface{}) error
	Clone() interface{}
}

----------- MakeCacheable interface

type MakeSerializable

type MakeSerializable interface {
	ToBytes() (*[]byte, error)
	FromBytes(_b *[]byte) (interface{}, error)
}

----------- Serializable interface

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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