metadata

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BackupMetadata

type BackupMetadata struct {
	BackupName              string            `json:"backup_name"`
	Disks                   map[string]string `json:"disks"` // "default": "/var/lib/clickhouse"
	ClickhouseBackupVersion string            `json:"version"`
	CreationDate            time.Time         `json:"creation_date"`
	Tags                    string            `json:"tags,omitempty"` // "type=manual", "type=sheduled", "hostname": "", "shard="
	ClickHouseVersion       string            `json:"clickhouse_version,omitempty"`
	DataSize                int64             `json:"data_size,omitempty"`
	MetadataSize            int64             `json:"metadata_size"`
	CompressedSize          int64             `json:"compressed_size,omitempty"`
	Tables                  []TableTitle      `json:"tables"`
	DataFormat              string            `json:"data_format"`
}

type Part

type Part struct {
	Partition                         string    `json:"partition"`
	Name                              string    `json:"name"`
	Path                              string    `json:"path"`              // TODO: должен быть относительный путь вообще непонятно зачем он, его можно из name получить
	HashOfAllFiles                    string    `json:"hash_of_all_files"` // ???
	HashOfUncompressedFiles           string    `json:"hash_of_uncompressed_files"`
	UncompressedHashOfCompressedFiles string    `json:"uncompressed_hash_of_compressed_files"` // ???
	PartitionID                       string    `json:"partition_id"`
	ModificationTime                  time.Time `json:"modification_time"`
	Size                              int64     `json:"size"`
}

type TableMetadata

type TableMetadata struct {
	Files map[string][]string `json:"files,omitempty"`
	// Disks       map[string]string   `json:"disks"` // "default": "/var/lib/clickhouse"
	Table       string            `json:"table"`
	Database    string            `json:"database"`
	IncrementOf string            `json:"increment_of,omitempty"`
	Parts       map[string][]Part `json:"parts"`
	Query       string            `json:"query"`
	UUID        string            `json:"uuid,omitempty"`
	// Macros ???
	Size                 map[string]int64 `json:"size"`                  // сколько занимает бэкап на каждом диске
	TotalBytes           int64            `json:"total_bytes,omitempty"` // общий объём бэкапа
	DependencesTable     string           `json:"dependencies_table,omitempty"`
	DependenciesDatabase string           `json:"dependencies_database,omitempty"`
	MetadataOnly         bool             `json:"metadata_only"`
}

type TableTitle

type TableTitle struct {
	Database string `json:"database"`
	Table    string `json:"table"`
}

Jump to

Keyboard shortcuts

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