backup

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IgnoreOrphaned = iota
	PullOrphaned
	RemoveOrphaned
)

Variables

This section is empty.

Functions

func SetLog

func SetLog(entty *logrus.Entry)

func SetLogger

func SetLogger(nLogger *logrus.Logger)

Types

type Account

type Account struct {
	Name       string   `yaml:"name"`
	Provider   Provider `yaml:"provider"`
	Token      string   `yaml:"token"`
	Args       []string `yaml:"args"`
	BlackList  []string `yaml:"blacklist"`
	FilterList []string `yaml:"filters"`
}

type Config

type Config struct {
	Repository string    `yaml:"repository"`
	Accounts   []Account `yaml:"accounts"`

	OverwriteOnConflict bool     `yaml:"overwrite_on_conflict"`
	HandleOrphaned      Orphaned `yaml:"handle_orphaned"`
}

type GoGitBackup

type GoGitBackup struct {
	// contains filtered or unexported fields
}

func NewGoBackup

func NewGoBackup(cnf *Config, logFile *os.File) (*GoGitBackup, error)

func (*GoGitBackup) Check

func (c *GoGitBackup) Check() error

func (*GoGitBackup) Close added in v0.7.0

func (c *GoGitBackup) Close()

func (*GoGitBackup) Do

func (c *GoGitBackup) Do()

func (*GoGitBackup) Update added in v0.8.0

func (c *GoGitBackup) Update() error

type Orphaned added in v0.8.0

type Orphaned int

type Provider

type Provider int
const (
	GitHub Provider = iota
	GitLab
)

type Repository

type Repository struct {
	CloneUrl     string
	Name         string
	Size         int64
	CreatedAt    time.Time
	Owner        bool
	Member       bool
	Visibility   Visibility
	ProviderName string
	Archived     bool
}

type Visibility added in v0.6.0

type Visibility int
const (
	Public Visibility = iota
	Private
	Internal
)

Jump to

Keyboard shortcuts

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