Documentation ¶
Index ¶
Constants ¶
View Source
const ( SectionNone int32 = iota + 1 SectionPreData /* stuff to be processed before data */ SectionData /* table data, large objects, LO comments */ SectionPostData /* stuff to be processed after data */ )
View Source
const ( ArchUnknown byte = 0 ArchCustom byte = 1 ArchTar byte = 3 ArchNull byte = 4 ArchDirectory byte = 5 )
View Source
const ( PgCompressionNone int32 = iota PgCompressionGzip PgCompressionLz4 PgCompressionZSTD )
View Source
const InvalidOid = 0
View Source
const MaxVersion = "1.16"
Variables ¶
View Source
var ( TableDataDesc = "TABLE DATA" LargeObjectsDesc = "BLOB" BlobsDesc = "BLOBS" SequenceSetDesc = "SEQUENCE SET" CommentDesc = "COMMENT" AclDesc = "ACL" )
View Source
var ( BackupVersions = map[string]int{ "1.0": MakeArchiveVersion(1, 0, 0), "1.2": MakeArchiveVersion(1, 2, 0), "1.3": MakeArchiveVersion(1, 3, 0), "1.4": MakeArchiveVersion(1, 4, 0), "1.5": MakeArchiveVersion(1, 5, 0), "1.6": MakeArchiveVersion(1, 6, 0), "1.7": MakeArchiveVersion(1, 7, 0), "1.8": MakeArchiveVersion(1, 8, 0), "1.9": MakeArchiveVersion(1, 9, 0), "1.10": MakeArchiveVersion(1, 10, 0), "1.11": MakeArchiveVersion(1, 11, 0), "1.12": MakeArchiveVersion(1, 12, 0), "1.13": MakeArchiveVersion(1, 13, 0), "1.14": MakeArchiveVersion(1, 14, 0), "1.15": MakeArchiveVersion(1, 15, 0), "1.16": MakeArchiveVersion(1, 16, 0), } BackupFormats = map[byte]string{ ArchUnknown: "unknown", ArchCustom: "custom", ArchTar: "tar", ArchNull: "null", ArchDirectory: "directory", } )
View Source
var SectionMap = map[int32]string{ SectionNone: "None", SectionPreData: "PreData", SectionData: "Data", SectionPostData: "PostData", }
Functions ¶
func MakeArchiveVersion ¶
Types ¶
type Crtm ¶
type DumpIdSequence ¶
type DumpIdSequence struct {
// contains filtered or unexported fields
}
func NewDumpSequence ¶
func NewDumpSequence(initVal int32) *DumpIdSequence
func (*DumpIdSequence) Next ¶
func (dis *DumpIdSequence) Next() int32
type Entry ¶
type Entry struct { CatalogId CatalogId DumpId int32 Section int32 HadDumper int32 /* Archiver was passed a dumper routine (used * in restore) */ Tag *string /* index Tag */ Namespace *string /* null or empty string if not in a schema */ Tablespace *string /* null if not in a Tablespace; empty string * means use database default */ Tableam *string /* table access method, only for TABLE tags */ Owner *string Desc *string Defn *string DropStmt *string CopyStmt *string Dependencies []int32 /* dumpIds of objects this one depends on */ NDeps int32 /* number of Dependencies */ FileName *string Relkind byte /* relation kind, only for TABLE tags */ DataDumper int32 /* Routine to dump data for object */ /* working state while dumping/restoring */ DataLength uint32 /* item's data size; 0 if none or unknown */ }
type Header ¶
type Header struct { VersionMajor byte VersionMinor byte VersionRev byte Version int /* Version of file */ IntSize uint32 // TODO: How affects that offset size for reading the file OffSize uint32 /* Size of a file offset in the archive - Added V1.7 */ Format byte CompressionSpec CompressionSpecification CrtmDateTime Crtm ArchDbName *string ArchiveRemoteVersion *string /* When reading an archive, the version of the dumped DB */ ArchiveDumpVersion *string /* When reading an archive, the version of the dumper */ TocCount int32 MaxDumpId int32 }
Click to show internal directories.
Click to hide internal directories.