datastore

package
v0.0.0-...-8d604f6 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entity

type Entity struct {
	Context context.Context
	Entity  string
}

Entity represents the entity being stored.

func New

func New(ctx context.Context, entityName string) *Entity

New returns a new entity with the given context and entityName

func (*Entity) Del

func (e *Entity) Del(key string) error

Del implements the "kv.Cache".Del() interface

func (*Entity) Get

func (e *Entity) Get(key string, dstVal interface{}) error

Get implements the "kv.Cache".Get() interface

func (*Entity) Key

func (e *Entity) Key(key string) *ae.Key

Key returns the datastore Key string associated with the entity

func (*Entity) Set

func (e *Entity) Set(key string, value interface{}) (err error)

Set implements the "kv.Cache".Set() interface

func (*Entity) WithContext

func (e *Entity) WithContext(ctx context.Context) *Entity

WithContext sets the internal context

Jump to

Keyboard shortcuts

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