config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const BackupInfoFile = "gh_backup_info.json"
View Source
const ConfigFileName = ".ghbackup.yaml"

Variables

View Source
var (
	NonInteractive            = false
	BackupPrivateRepos        = true
	ExludeRepos               = []string{}
	BackupOtherOwnersRepos    = false
	ConcurrentRepoDownloads   = 5
	ConcurrentBackupUploaders = 2
	LocalStoragePath          = "/tmp/ghbackup"
	ForceRedownload           = false
	DeleteDataAfterUpload     = true
	BackupMethods             []BackupMethod
	Debug                     = false
)

Functions

func GetYesNoInput

func GetYesNoInput(question string) bool

func LoadConfig

func LoadConfig()

func SanitizeRepoName

func SanitizeRepoName(repoName string) string

Types

type BackupMethod

type BackupMethod struct {
	Name          string            `yaml:"name"`
	Enabled       bool              `yaml:"enabled"`
	Type          string            `yaml:"type"`
	TokenInConfig bool              `yaml:"credentialsInConfig"`
	Token         string            `yaml:"token"`
	Parameters    map[string]string `yaml:"parameters"`
}

Jump to

Keyboard shortcuts

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