datastore

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Export

func Export(ctx context.Context, projectID string, outputGCSPrefix string, entityFilter *EntityFilter) (*datastore.GoogleLongrunningOperation, error)

Export is Datastore Export APIを実行する

func GetAllKinds

func GetAllKinds(ctx context.Context, projectID string) (kinds []string, rerr error)

GetAllKinds is Kind名一覧を返す ただし、 _ で始まるものは無視する

Types

type EntityFilter

type EntityFilter struct {
	Kinds           []string `json:"kinds,omitempty"`
	NamespaceIds    []string `json:"namespaceIds,omitempty"`
	ForceSendFields []string `json:"-"`
	NullFields      []string `json:"-"`
}

EntityFilter is Entity condition to export

type ExportOperationResponseMetadata added in v0.1.0

type ExportOperationResponseMetadata struct {
	Common           ExportOperationResponseMetadataCommon           `json:"common"`
	ProgressEntities ExportOperationResponseMetadataProgressEntities `json:"progressEntities"`
	ProgressBytes    ExportOperationResponseMetadataProgressBytes    `json:"progressBytes"`
	EntityFilter     ExportOperationResponseMetadataEntityFilter     `json:"entityFilter"`
	OutputURLPrefix  string                                          `json:"outputUrlPrefix"`
}

ExportOperationResponseMetadata is Datastore Export JobがDoneになった時のMetadataの内容

type ExportOperationResponseMetadataCommon added in v0.1.0

type ExportOperationResponseMetadataCommon struct {
	StartTime     time.Time `json:"startTime"`
	EndTime       time.Time `json:"endTime"`
	OperationType string    `json:"operationType"`
	State         string    `json:"state"`
}

ExportOperationResponseMetadataCommon is Datastore Export JobがDoneになった時のMetadataのCommonの内容

type ExportOperationResponseMetadataEntityFilter added in v0.1.0

type ExportOperationResponseMetadataEntityFilter struct {
	Kinds []string `json:"kinds"`
}

ExportOperationResponseMetadataEntityFilter is Datastore Export JobがDoneになった時のMetadataのEntityFilterの内容

type ExportOperationResponseMetadataProgressBytes added in v0.1.0

type ExportOperationResponseMetadataProgressBytes struct {
	WorkCompleted int64 `json:"workCompleted,string"`
	WorkEstimated int64 `json:"workEstimated,string"`
}

ExportOperationResponseMetadataProgressBytes is Datastore Export JobがDoneになった時のMetadataのProgressBytesの内容

type ExportOperationResponseMetadataProgressEntities added in v0.1.0

type ExportOperationResponseMetadataProgressEntities struct {
	WorkCompleted int64 `json:"workCompleted,string"`
	WorkEstimated int64 `json:"workEstimated,string"`
}

ExportOperationResponseMetadataProgressEntities is Datastore Export JobがDoneになった時のMetadataのProgressEntitiesの内容

type JobStatus

type JobStatus int

JobStatus is Datastore Export Jobの状態

const (
	Running JobStatus = iota
	Fail
	Done
)

type JobStatusResponse

type JobStatusResponse struct {
	Status     JobStatus
	ErrCode    int64
	ErrMessage string
	Metadata   *ExportOperationResponseMetadata
}

JobStatusResponse is Datastore Export Jobの状態の取得結果を表すstruct

func CheckJobStatus

func CheckJobStatus(ctx context.Context, jobID string) (*JobStatusResponse, error)

CheckJobStatus is Datastore Export Jobの状態を取得する

Jump to

Keyboard shortcuts

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