client

package
v0.0.0-...-e826d4e Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Config struct {
	// type ConfigStruct struct {
	URL      string            `yaml:"url"`
	Repo     string            `yaml:"repo"`
	Compress bool              `yaml:"compress"`
	Username string            `yaml:"user"`
	Password string            `yaml:"pass"`
	Only     []string          `yaml:"only"`
	Ignore   []string          `yaml:"ignore"`
	NoData   []string          `yaml:"nodata"`
	Where    []string          `yaml:"where"`
	WhereMap map[string]string // for key => val lookups
}

Config struct

View Source
var UserAgent = "MyBack client"

UserAgent string

Functions

func Backup

func Backup() []error

Backup will perform the backup

func CreateDirIfNotExists

func CreateDirIfNotExists(path string) error

CreateDirIfNotExists will try create a directry if it does not exist

func ExtractPaths

func ExtractPaths(writeTo string, paths []string) error

ExtractPaths will extract compressed backups and write a SQL file

func ParseConfig

func ParseConfig(configFile string) error

ParseConfig will set the encironment based on a config

Types

type Database

type Database struct {
	Database string `json:"database"`
	Create   string `json:"create"`
	Tables   []struct {
		Name       string `json:"name"`
		Type       string `json:"Type"`
		Rows       int    `json:"rows"`
		CreateTime string `json:"create_time"`
		Checksum   int    `json:"checksum"`
		Create     string `json:"create"`
		CreateHash string `json:"create_hash"`
	} `json:"tables"`
}

Database struct

type GHMDDatabase

type GHMDDatabase struct {
	Name string `json:"name"`
}

GHMDDatabase struct

Jump to

Keyboard shortcuts

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