config

package
v0.11.2 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBackupDir

func GetBackupDir(backupDir string) string

func GetConfigFile

func GetConfigFile(cfgFile string) string

func SaveConfig

func SaveConfig(config Config, cfgFile string) error

func ValidateConfig added in v0.4.1

func ValidateConfig(cfg Config) error

Types

type Config

type Config struct {
	Username     string   `mapstructure:"username"`
	Token        string   `mapstructure:"token"`
	Platform     string   `mapstructure:"platform"`
	Server       Server   `mapstructure:"server"`
	IncludeRepos []string `mapstructure:"include_repos"`
	ExcludeRepos []string `mapstructure:"exclude_repos"`
	IncludeOrgs  []string `mapstructure:"include_orgs"`
	ExcludeOrgs  []string `mapstructure:"exclude_orgs"`
	IncludeForks bool     `mapstructure:"include_forks"`
	IncludeWiki  bool     `mapstructure:"include_wiki"`
	BackupDir    string   `mapstructure:"backup_dir"`
	Workspace    string   `mapstructure:"workspace"`
	Cron         string   `mapstructure:"cron"`
	CloneType    string   `mapstructure:"clone_type"`
}

func GetInitialConfig added in v0.11.1

func GetInitialConfig() Config

func LoadConfig

func LoadConfig(cfgFile string) (Config, error)

type Server added in v0.4.0

type Server struct {
	Domain   string `mapstructure:"domain"`
	Protocol string `mapstructure:"protocol"`
}

Jump to

Keyboard shortcuts

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