backup

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: May 13, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backup

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

func NewBackup

func NewBackup(conf client.Config) *Backup

NewBackup create a backup instance.

func (*Backup) Export

func (b *Backup) Export(ctx context.Context, appID string, w io.Writer) error

func (*Backup) Import

func (b *Backup) Import(ctx context.Context, appID string, r io.Reader) error

type BackupReq

type BackupReq struct {
	AppID string `json:"appID"`
	Page  int    `json:"page"`
	Size  int    `json:"size"`
}

BackupReq is the request of export.

type BackupResp

type BackupResp struct {
	Result  `json:",inline"`
	Data    Object `json:"data"`
	Count   int    `json:"count"`
	HasNext bool   `json:"hasNext"`
}

BackupResp is the response of export.

type ImportReq

type ImportReq struct {
	Data Object `json:"data"`
}

type ImportResp

type ImportResp struct{}

type Object

type Object []interface{}

Object is the backup object.

type Result

type Result struct {
	Permits        Object `json:"permits"`
	Schemas        Object `json:"schemas"`
	Roles          Object `json:"roles"`
	Tables         Object `json:"tables"`
	TableRelations Object `json:"tableRelations"`
}

Result is the result of export.

Jump to

Keyboard shortcuts

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