datastore

package
v0.0.0-...-11fd6c2 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2021 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is a wrapper around the datastore client. It should contain specific functions for this api.

func New

func New(ctx context.Context, project string) (Client, error)

New creates a wrapper around the datastore client, using the given GCP project.

func (Client) Close

func (c Client) Close()

Close will close the connection to datastore. Call this on program exit.

func (Client) GetUser

func (c Client) GetUser(ctx context.Context, id string) (planner.User, error)

GetUser retries a User struct from datastore.

func (Client) PutUser

func (c Client) PutUser(ctx context.Context, u planner.User) error

PutUser will save a User struct to datastore.

Jump to

Keyboard shortcuts

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