mongodb_backup

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListBackups

func ListBackups() ([]string, error)

Types

type Config

type Config struct {
	Host       string `json:"Host"`
	Port       string `json:"Port"`
	DB         string `json:"Db"`
	AuthDB     string `json:"AuthDb"`
	Username   string `json:"Username"`
	Password   string `json:"Password"`
	CronBackup string `json:"CronBackup"`
}

func InitConfig

func InitConfig() *Config

func (*Config) Backup

func (cfg *Config) Backup() (string, error)

func (*Config) Restore

func (cfg *Config) Restore(s3Key string) error

func (*Config) RunBackup

func (cfg *Config) RunBackup() (*JsonResponse, error)

func (*Config) StartBackup

func (cfg *Config) StartBackup() func()

type JsonResponse

type JsonResponse struct {
	Request string `json:"request"`
}

type SwaggerBackupRequest

type SwaggerBackupRequest struct {
	Host     string `json:"Host"`
	Port     string `json:"Port"`
	DB       string `json:"Db"`
	Username string `json:"Username"`
	Password string `json:"Password"`
}

type SwaggerListBackupsRequest

type SwaggerListBackupsRequest struct {
}

type SwaggerRestoreRequest

type SwaggerRestoreRequest struct {
	S3Key string `json:"S3Key"`
}

Jump to

Keyboard shortcuts

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