core

package
v0.0.0-...-5b13e22 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conf

type Conf struct {
	Workspace      string   `json:"workspace" yaml:"workspace"`
	SourceRepo     string   `json:"source_repo" yaml:"source_repo"`
	SourceUsername string   `json:"source_username" yaml:"source_username"`
	SourceToken    string   `json:"source_token" yaml:"source_token"`
	TargetRepo     string   `json:"target_repo" yaml:"target_repo"`
	TargetUsername string   `json:"target_username" yaml:"target_username"`
	TargetToken    string   `json:"target_token" yaml:"target_token"`
	Force          bool     `json:"force" yaml:"force"`
	Branches       []string `json:"branches" yaml:"branches"`
	Tags           []string `json:"tags" yaml:"tags"`
	Tag            string   `json:"tag" yaml:"tag"`
	Files          []string `json:"files" yaml:"files"`
	Ignores        []string `json:"ignore" yaml:"ignore"`
	// contains filtered or unexported fields
}

func (*Conf) GetSourceProvider

func (c *Conf) GetSourceProvider() (constants.IProvider, error)

func (*Conf) GetSourceProviderWithRepo

func (c *Conf) GetSourceProviderWithRepo() (constants.IProvider, error)

func (*Conf) GetTargetProvider

func (c *Conf) GetTargetProvider() (constants.IProvider, error)

func (*Conf) GetTargetProviderWithRepo

func (c *Conf) GetTargetProviderWithRepo() (constants.IProvider, error)

func (*Conf) VerifyFiles

func (c *Conf) VerifyFiles() error

func (*Conf) VerifySource

func (c *Conf) VerifySource() error

func (*Conf) VerifyTag

func (c *Conf) VerifyTag() error

func (*Conf) VerifyTags

func (c *Conf) VerifyTags() error

func (*Conf) VerifyTarget

func (c *Conf) VerifyTarget() error

type GitRepo

type GitRepo struct {
	Conf *Conf
}

func NewGitRepo

func NewGitRepo(conf *Conf) *GitRepo

func (*GitRepo) Clone

func (p *GitRepo) Clone() (*git.Repository, []config.RefSpec, error)

func (*GitRepo) Sync

func (p *GitRepo) Sync() error

Sync Sync 同步所有分支和 tag Sync Sync synchronizes all branches and tags

type ReleaseProvider

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

func NewReleaseProvider

func NewReleaseProvider(workspace string, provider constants.IProvider) *ReleaseProvider

func (*ReleaseProvider) Create

func (p *ReleaseProvider) Create(tags []string) error

func (*ReleaseProvider) Download

func (this *ReleaseProvider) Download(tag string) (*constants.ReleaseInfo, []string, error)

func (*ReleaseProvider) Upload

func (this *ReleaseProvider) Upload(force bool, releaseInfo *constants.ReleaseInfo, files []string) error

type ReleaseProviders

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

func NewReleaseProviders

func NewReleaseProviders(workspace string, sourceProvider constants.IProvider, targetProvider constants.IProvider, tags []string) *ReleaseProviders

func (*ReleaseProviders) SyncRun

func (s *ReleaseProviders) SyncRun() error

type RepoProvider

type RepoProvider struct {
	Repo     string
	RepoInfo *constants.RepoInfo
	Username string
	Token    string
	// contains filtered or unexported fields
}

func NewRepoProvider

func NewRepoProvider(repoUrl string, repoInfo *constants.RepoInfo, username, token string) (*RepoProvider, error)

func (*RepoProvider) Clone

func (p *RepoProvider) Clone(cfg *Conf) error

func (*RepoProvider) CreateRepo

func (p *RepoProvider) CreateRepo() error

func (*RepoProvider) GetProvider

func (p *RepoProvider) GetProvider() (constants.IProvider, error)

func (*RepoProvider) Sync

func (p *RepoProvider) Sync(cfg *Conf) error

type Rewriter

type Rewriter struct {
	Dir      string
	OldEmail string
	NewName  string
	NewEmail string
}

func NewRewriter

func NewRewriter(dir, oldEmail, newName, newEmail string) *Rewriter

func (*Rewriter) Run

func (r *Rewriter) Run() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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