models

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeKey

func DecodeKey(encoded string) (*datastore.Key, error)

Types

type AnyEntity

type AnyEntity map[string]interface{}

func (AnyEntity) Load

func (x AnyEntity) Load(props []datastore.Property) error

func (AnyEntity) Save

func (x AnyEntity) Save() ([]datastore.Property, error)

type Client

type Client struct {
	Namespace Namespace
	// contains filtered or unexported fields
}

func NewClient

func NewClient(projectID string, namespace string) *Client

func (*Client) Delete

func (c *Client) Delete(ctx context.Context, key *datastore.Key) error

func (*Client) Get

func (c *Client) Get(ctx context.Context, key *datastore.Key) (interface{}, error)

func (*Client) Put

func (c *Client) Put(ctx context.Context, key *datastore.Key, src interface{}) (*datastore.Key, error)

func (*Client) QueryData

func (c *Client) QueryData(ctx context.Context, kind string, offset, limit int) (*[]interface{}, error)

func (*Client) QueryKeys

func (c *Client) QueryKeys(ctx context.Context, kind string, offset, limit int) (*[]string, error)

type Namespace

type Namespace string

func (Namespace) BuildKey

func (s Namespace) BuildKey(args []string, encodedKey, incompleteKey bool, encodedParent string) (*datastore.Key, error)

func (Namespace) BuildQuery

func (s Namespace) BuildQuery(ctx context.Context, kind string, offset, limit int) *datastore.Query

func (Namespace) PrepareKey

func (s Namespace) PrepareKey(key *datastore.Key) *datastore.Key

func (Namespace) PrepareQuery

func (s Namespace) PrepareQuery(q *datastore.Query) *datastore.Query

Jump to

Keyboard shortcuts

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