factory

package
v0.0.0-...-6f5dceb Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DoubleRepo

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

DoubleRepo represents a repository sync context between a source and a target repository. It contains context, CLI command, source and target platforms, credentials, and repository full names.

func NewDoubleRepo

func NewDoubleRepo(ctx context.Context, cmd *cli.Command) (*DoubleRepo, error)

NewDoubleRepo initializes a DoubleRepo instance with source and target repository information. It sets up the context, CLI command, credentials, platform interfaces, and full repository names.

func (*DoubleRepo) ReleaseSync

func (t *DoubleRepo) ReleaseSync(tags []string) error

ReleaseSync synchronizes releases from the source repository to the target repository. It can optionally filter by specific tags provided in the `tags` slice. Parameters:

  • tags: a slice of tag names to be synchronized. If empty, all tags will be considered.

Returns:

  • error: any error encountered during the synchronization process.

type Git

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

func NewCmdDoubleGit

func NewCmdDoubleGit(ctx context.Context, cmd *cli.Command) (*Git, error)

NewCmdDoubleGit creates a new Git instance based on CLI command flags and credentials. It initializes the source and target repository information, including authentication and full repository names.

func NewCredentialGit

func NewCredentialGit(cmd *cli.Command, credential *credential.Credential) (*Git, error)

func NewDoubleCredentialGit

func NewDoubleCredentialGit(cmd *cli.Command, credential *credential.Credential, targetCredential *credential.Credential) (*Git, error)

NewDoubleCredentialGit creates a new Git instance using provided source and target credentials. It initializes the workspace, branches, tags, and parses the full names of source and target repositories.

func (*Git) Clone

func (g *Git) Clone() error

func (*Git) Push

func (g *Git) Push() error

type Repo

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

Repo represents a repository with context, CLI command, URL, platform, credentials, and full name.

func NewRepo

func NewRepo(ctx context.Context, cmd *cli.Command) (*Repo, error)

NewRepo creates a new Repo instance based on the CLI command flags and credentials. It initializes the repository URL, authentication credentials, platform, and full repository name.

func (*Repo) CloneRepo

func (r *Repo) CloneRepo() error

func (*Repo) CreateRelease

func (r *Repo) CreateRelease() error

func (*Repo) Download

func (r *Repo) Download(tags []string) (map[string][]string, error)

func (*Repo) ListRepo

func (r *Repo) ListRepo() (repo []*platforms.RepoInfo, err error)

func (*Repo) RepoSync

func (r *Repo) RepoSync() error

func (*Repo) Upload

func (r *Repo) Upload(tag string, filenames []string) error

Jump to

Keyboard shortcuts

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