dumper

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package dumper contains utils for extracting data from GCP datastore

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Client     *datastore.Client
	Encoder    Encoder
	BatchSize  int
	EntityName string
}

type Dumper

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

func New

func New(cfg Config) *Dumper

func (*Dumper) Dump

func (d *Dumper) Dump(ctx context.Context) error

type Encoder

type Encoder interface {
	Encode(v any) error
}

type Entity

type Entity map[string]interface{}

func (Entity) Load

func (e Entity) Load(properties []datastore.Property) error

func (*Entity) Save

func (e *Entity) Save() ([]datastore.Property, error)

Jump to

Keyboard shortcuts

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