dsutil

package
v0.0.0-...-ed9fe1d Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2018 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultExportOption = &ExportOption{}
View Source
var DefaultImportOption = &ImportOption{}
View Source
var ErrNoRemoteAPIKeyIsConfigured = fmt.Errorf("no GOOGLE_APPLICATION_CREDENTIALS environment key is configured")

Functions

func Export

func Export(ctx context.Context, kind string, w io.Writer, option *ExportOption) error

func GetRemoteContext

func GetRemoteContext(ctx context.Context, host string, namespace string, keyfile string) (context.Context, error)

func Import

func Import(ctx context.Context, kind string, r io.Reader, option *ImportOption) (int, error)

Types

type ExportOption

type ExportOption struct {
}

type ImportOption

type ImportOption struct {
	AppID string
	Skip  int
}

type Iterator

type Iterator struct {
	BatchSize     int
	StopOnError   bool
	QueryInterval time.Duration
	// contains filtered or unexported fields
}

func NewIterator

func NewIterator(q *datastore.Query) *Iterator

NewIterator returns a new *Iterator object

func (*Iterator) Run

func (i *Iterator) Run(ctx context.Context, gen func() interface{}, f func(v interface{}) error) error

Run runs the iterator

type Row

type Row struct {
	Key  *datastore.Key
	Data entity
}

Jump to

Keyboard shortcuts

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