storage

package
v0.1.14 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

type Entry struct {
	DumpId         int32   `json:"dumpId" yaml:"dumpId"`
	DatabaseOid    int32   `json:"databaseOid" yaml:"databaseOid"`
	ObjectOid      int32   `json:"objectOid" yaml:"objectOid"`
	ObjectType     string  `json:"objectType" yaml:"objectType"`
	Schema         string  `json:"schema" yaml:"schema"`
	Name           string  `json:"name" yaml:"name"`
	Owner          string  `json:"owner" yaml:"owner"`
	Section        string  `json:"section" yaml:"section"`
	OriginalSize   int64   `json:"originalSize" yaml:"originalSize"`
	CompressedSize int64   `json:"compressedSize" yaml:"compressedSize"`
	FileName       string  `json:"fileName" yaml:"fileName"`
	Dependencies   []int32 `json:"dependencies" yaml:"dependencies"`
}
type Header struct {
	CreationDate    time.Time `json:"creationDate" yaml:"creationDate"`
	DbName          string    `json:"dbName" yaml:"dbName"`
	TocEntriesCount int       `json:"tocEntriesCount" yaml:"tocEntriesCount"`
	DumpVersion     string    `json:"dumpVersion" yaml:"dumpVersion"`
	Format          string    `json:"format" yaml:"format"`
	Integer         uint32    `json:"integer" yaml:"integer"`
	Offset          uint32    `json:"offset" yaml:"offset"`
	DumpedFrom      string    `json:"dumpedFrom" yaml:"dumpedFrom"`
	DumpedBy        string    `json:"dumpedBy" yaml:"dumpedBy"`
	TocFileSize     int64     `json:"tocFileSize" yaml:"tocFileSize"`
	Compression     int32     `json:"compression" yaml:"compression"`
}

type Metadata

type Metadata struct {
	StartedAt      time.Time              `yaml:"startedAt" json:"startedAt"`
	CompletedAt    time.Time              `yaml:"completedAt" json:"completedAt"`
	OriginalSize   int64                  `yaml:"originalSize" json:"originalSize"`
	CompressedSize int64                  `yaml:"compressedSize" json:"compressedSize"`
	Transformers   []*domains.Table       `yaml:"transformers" json:"transformers"`
	DatabaseSchema toolkit.DatabaseSchema `yaml:"database_schema" json:"database_schema"`
	Header         Header                 `yaml:"header" json:"header"`
	Entries        []*Entry               `yaml:"entries" json:"entries"`
}

func NewMetadata

func NewMetadata(
	tocObj *toc.Toc, tocFileSize int64, startedAt,
	completedAt time.Time, transformers []*domains.Table,
	stats map[int32]ObjectSizeStat, databaseSchema []*toolkit.Table,
) (*Metadata, error)

type ObjectSizeStat

type ObjectSizeStat struct {
	Original   int64
	Compressed int64
}

Jump to

Keyboard shortcuts

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