db

package
v0.0.0-...-2ce81c6 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2017 License: MIT Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Filter

type Filter int8

Filter can be passed to GetLessons to filter results.

const (
	// FilterNone will filter nothing.
	FilterNone Filter = iota
	// FilterOnlyConverted will return only converted lessons.
	FilterOnlyConverted
)

type Wrapper

type Wrapper interface {
	GetLessons(ctx context.Context, cursorStr string, filter Filter, size int) ([]data.Entry, string, error)
}

Wrapper wraps the datastore for easier testing.

func NewDatastoreWrapper

func NewDatastoreWrapper(ctx context.Context, projectID string) (Wrapper, error)

NewDatastoreWrapper creates a new datastore wrapper with the given context and for the given google cloud project ID.

Jump to

Keyboard shortcuts

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