code

package
v0.0.0-...-d125d34 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GitRefTypeBranch = "branch"
	GitRefTypeTag    = "tag"
	GitRefTypeCommit = "commit"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Git

type Git struct {
	URL       string `json:"url"`
	Subfolder string `json:"subfolder"`
	Branch    string `json:"branch,omitempty"`
	Tag       string `json:"tag,omitempty"`
	Commit    string `json:"commit,omitempty"`
}

Git struct about git

func NewGit

func NewGit(url, subfolder, refType, ref string) *Git

func (*Git) Ref

func (g *Git) Ref() (ref string)

func (*Git) RefType

func (g *Git) RefType() (refType string)

type GitGetter

type GitGetter interface {
	// GetCommit to get commit of a branch/tag/commitID for a specified git URL
	GetCommit(ctx context.Context, gitURL string, refType string, ref string) (*git.Commit, error)
	ListBranch(ctx context.Context, gitURL string, params *git.SearchParams) ([]string, error)
	ListTag(ctx context.Context, gitURL string, params *git.SearchParams) ([]string, error)
	GetHTTPLink(gitURL string) (string, error)
	GetCommitHistoryLink(gitURL string, commit string) (string, error)
	GetTagArchive(ctx context.Context, gitURL, tagName string) (*git.Tag, error)
}

func NewGitGetter

func NewGitGetter(ctx context.Context, repos []*gitconfig.Repo) (GitGetter, error)

NewGitGetter new a GitGetter instance

type TemplateInfo

type TemplateInfo struct {
	Name    string `json:"name"`
	Release string `json:"release"`
}

Jump to

Keyboard shortcuts

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