internal

package
v0.4.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backup

type Backup struct {
	*Option
	GithubClient *github.Client
	// contains filtered or unexported fields
}

func NewBackup

func NewBackup(option *Option) *Backup

func (*Backup) AllFollower added in v0.2.0

func (r *Backup) AllFollower() ([]*github.User, error)

func (*Backup) AllFollowing added in v0.2.0

func (r *Backup) AllFollowing() ([]*github.User, error)

func (*Backup) AllGist added in v0.2.0

func (r *Backup) AllGist() ([]*github.Gist, error)

func (*Backup) AllIssueByRepo added in v0.2.0

func (r *Backup) AllIssueByRepo(repo *github.Repository) ([]*github.Issue, error)

func (*Backup) AllIssueComment added in v0.2.0

func (r *Backup) AllIssueComment(repo string, id int) ([]*github.IssueComment, error)

func (*Backup) AllRepo

func (r *Backup) AllRepo() ([]*github.Repository, error)

func (*Backup) AllStar added in v0.2.0

func (r *Backup) AllStar() ([]*github.StarredRepository, error)

func (*Backup) Download added in v0.2.0

func (r *Backup) Download(path string) error

func (*Backup) DownloadMeta added in v0.2.0

func (r *Backup) DownloadMeta() error

func (*Backup) Init added in v0.2.0

func (r *Backup) Init() error

func (*Backup) IsRepoProcessedRecently added in v0.2.0

func (r *Backup) IsRepoProcessedRecently(repoName string) bool

func (*Backup) Run added in v0.2.0

func (r *Backup) Run()

func (*Backup) SaveFollower added in v0.2.0

func (r *Backup) SaveFollower() error

func (*Backup) SaveFollowing added in v0.2.0

func (r *Backup) SaveFollowing() error

func (*Backup) SaveGist added in v0.2.0

func (r *Backup) SaveGist() error

func (*Backup) SaveRepoZip added in v0.2.0

func (r *Backup) SaveRepoZip(repo *github.Repository)

func (*Backup) SaveRepos added in v0.2.0

func (r *Backup) SaveRepos(enableRepoGit, issuesEnabled, issuesEnabledComment bool) error

func (*Backup) SaveStar added in v0.2.0

func (r *Backup) SaveStar() error

func (*Backup) SelfUser added in v0.2.0

func (r *Backup) SelfUser() (*github.User, error)

func (*Backup) SetRepoProcessedRecently added in v0.2.0

func (r *Backup) SetRepoProcessedRecently(repoName string)

func (*Backup) Upload added in v0.2.0

func (r *Backup) Upload(path string) error

func (*Backup) UploadMeta added in v0.2.0

func (r *Backup) UploadMeta() error

type LastProcessed added in v0.2.0

type LastProcessed struct {
	LastProcessedAt      int64  `json:"last_processed_at"`
	LastProcessedAtTitle string `json:"last_processed_at_title"`
}

type Meta

type Meta struct {
	Stars      map[string]*LastProcessed `json:"stars"`
	Followers  map[string]*LastProcessed `json:"followers"`
	Followings map[string]*LastProcessed `json:"followings"`
	Repos      map[string]*LastProcessed `json:"repos"`
	Gists      map[string]*LastProcessed `json:"gists"`
}

type Option added in v0.2.0

type Option struct {
	BackupDir    string
	DropboxToken string
	DropboxPath  string
	DropboxCli   string
	GithubToken  string

	EnableStar         bool
	EnableFollower     bool
	EnableFollowing    bool
	EnableRepo         bool
	EnableRepoGit      bool
	EnableGist         bool
	EnableIssue        bool
	EnableIssueComment bool
}

Jump to

Keyboard shortcuts

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