storage

package
v0.0.0-...-82caf8f Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2016 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MetaDataCounter

type MetaDataCounter struct {
	Key          string
	Value        int64
	CreationDate time.Time
	TTL          int
	Hash         int
}

func (*MetaDataCounter) IsExpired

func (obj *MetaDataCounter) IsExpired() bool

func (*MetaDataCounter) MetaDataUpdObj

func (obj *MetaDataCounter) MetaDataUpdObj() *MetaDataUpdObj

type MetaDataObj

type MetaDataObj struct {
	Key          string
	Data         []byte
	Collection   string
	CreationDate time.Time
	TTL          int
	Hash         int
}

func NewMetaDataObj

func NewMetaDataObj(key string, data []byte, collection string, ttl int, hash int) MetaDataObj

func (MetaDataObj) IsExpired

func (obj MetaDataObj) IsExpired() bool

func (*MetaDataObj) MetaDataUpdObj

func (obj *MetaDataObj) MetaDataUpdObj() *MetaDataUpdObj

type MetaDataUpdObj

type MetaDataUpdObj struct {
	Key          string
	NewKey       string
	Data         []byte
	NewData      []byte
	Collection   string
	CreationDate time.Time
	TTL          int
	Hash         int
	NewHash      int
	Value        int64
}

func (*MetaDataUpdObj) MetaDataCounter

func (obj *MetaDataUpdObj) MetaDataCounter() *MetaDataCounter

func (*MetaDataUpdObj) MetaDataObj

func (obj *MetaDataUpdObj) MetaDataObj() *MetaDataObj

type OvoStorage

type OvoStorage interface {
	Get(key string) (obj *MetaDataObj, err error)
	Put(obj *MetaDataObj) error
	Delete(key string)
	GetAndRemove(key string) (obj *MetaDataObj, err error)
	UpdateValueIfEqual(obj *MetaDataUpdObj) error
	UpdateKeyAndValueIfEqual(obj *MetaDataUpdObj) error
	UpdateKey(obj *MetaDataUpdObj) error
	Touch(key string)
	Count() int
	List() []*MetaDataObj
	Keys() []string
	Increment(c *MetaDataCounter) *MetaDataCounter
	SetCounter(c *MetaDataCounter) *MetaDataCounter
	GetCounter(key string) (obj *MetaDataCounter, err error)
	DeleteCounter(key string)
	ListCounters() []*MetaDataCounter
	DeleteValueIfEqual(obj *MetaDataObj) error
}

Jump to

Keyboard shortcuts

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