dto

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FILENAME_META = "meta.json.enc"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type FileSet

type FileSet struct {
	Name         string               `json:"name"`
	Type         FileSetType          `json:"type"`
	MysqlDump    *FileSetMysqlDump    `json:"mysqlDump"`
	PostgresDump *FileSetPostgresDump `json:"postgresDump"`
	PublicFiles  *FileSetPublicFiles  `json:"publicFiles"`
}

func (*FileSet) Label

func (fileSet *FileSet) Label() string

type FileSetMysqlDump

type FileSetMysqlDump struct {
	FileName  string `json:"fileName"`
	SizeBytes uint64 `json:"sizeBytes"`
}

type FileSetPostgresDump

type FileSetPostgresDump struct {
	FileName  string `json:"fileName"`
	SizeBytes uint64 `json:"sizeBytes"`
}

type FileSetPublicFiles

type FileSetPublicFiles struct {
	IndexFileName string `json:"indexFileName"`
	SizeBytes     uint64 `json:"sizeBytes"`
}

type FileSetType

type FileSetType string
const (
	TYPE_MYSQLDUMP    FileSetType = "MysqlDump"
	TYPE_POSTGRESDUMP FileSetType = "PostgresDump"
	TYPE_PUBLICFILES  FileSetType = "PublicFiles"
)

type Meta

type Meta struct {
	State         State      `json:"state"`
	FrameworkName string     `json:"frameworkName"`
	FileSets      []*FileSet `json:"fileSets"`
}

Meta is the main structure which is serialized into meta.json.enc files. It contains the entry points for an exported file.

func (Meta) FileSetByLabel

func (m Meta) FileSetByLabel(label string) *FileSet

type PublicFilesIndex

type PublicFilesIndex map[string]PublicFilesIndexEntry

PublicFilesIndex is the structure of the "index" file for FileSetPublicFiles.

type PublicFilesIndexEntry

type PublicFilesIndexEntry struct {
	SizeBytes int64  `json:"sizeBytes"`
	MTime     int64  `json:"mTime"`
	PublicUri string `json:"publicUri"`
}

type State

type State string
const (
	STATE_CREATED      State = "Created"
	STATE_INITIALIZING State = "Initializing"
	STATE_READY        State = "Ready"
)

Jump to

Keyboard shortcuts

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