backup

package
v0.0.0-...-7d312d8 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: BSD-3-Clause Imports: 11 Imported by: 2

Documentation

Overview

Common code for backing up datastore entities.

At the time of this writing there is a cloud golang client, but it is ugly, filled with default named types such as GoogleDatastoreAdminV1beta1ExportEntitiesRequest, which I presume will change before leaving beta. We can update to the cloud golang client once it leaves beta.

Index

Constants

View Source
const (
	URL = "https://datastore.googleapis.com/v1beta1/projects/%s:export"
)

Variables

This section is empty.

Functions

func Step

func Step(client *http.Client, project, bucket string) error

Step runs a single backup of all the entities listed in ds.KindsToBackup for the given project, data is written to the given GCS bucket.

Types

type EntityFilter

type EntityFilter struct {
	Kinds        []ds.Kind `json:"kinds"`
	NamespaceIds []string  `json:"namespaceIds"`
}

type Request

type Request struct {
	OutputUrlPrefix string       `json:"outputUrlPrefix"`
	EntityFilter    EntityFilter `json:"entityFilter"`
}

Jump to

Keyboard shortcuts

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