github

package
v0.7.38 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2024 License: Apache-2.0 Imports: 16 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ErrGenerateGitHubPackageCode  = "meshkit-11139"
	ErrInvalidGitHubSourceURLCode = "meshkit-11140"
)

Variables

This section is empty.

Functions

func ErrGenerateGitHubPackage

func ErrGenerateGitHubPackage(err error, pkgName string) error

func ErrInvalidGitHubSourceURL

func ErrInvalidGitHubSourceURL(err error) error

func ProcessContent

func ProcessContent(w io.Writer, downloadDirPath, downloadfilePath string) error

Types

type DownloaderScheme

type DownloaderScheme interface {
	GetContent() (models.Package, error)
}

func NewDownloaderForScheme

func NewDownloaderForScheme(scheme string, url *url.URL, packageName string) DownloaderScheme

type GitHubPackage

type GitHubPackage struct {
	Name string `yaml:"name" json:"name"`

	SourceURL string `yaml:"source_url" json:"source_url"`
	// contains filtered or unexported fields
}

func (GitHubPackage) GenerateComponents

func (gp GitHubPackage) GenerateComponents() ([]v1beta1.ComponentDefinition, error)

func (GitHubPackage) GetVersion

func (gp GitHubPackage) GetVersion() string

type GitHubPackageManager

type GitHubPackageManager struct {
	PackageName string
	SourceURL   string
}

func (GitHubPackageManager) GetPackage

func (ghpm GitHubPackageManager) GetPackage() (models.Package, error)

type GitRepo

type GitRepo struct {
	// <git://github.com/owner/repo/branch/versiontag/root(path to the directory/file)>
	URL         *url.URL
	PackageName string
}

func (GitRepo) ExtractRepoDetailsFromSourceURL added in v0.7.19

func (gr GitRepo) ExtractRepoDetailsFromSourceURL() (owner, repo, branch, root string, err error)

func (GitRepo) GetContent

func (gr GitRepo) GetContent() (models.Package, error)

type URL

type URL struct {
	URL         *url.URL
	PackageName string
}

func (URL) GetContent

func (u URL) GetContent() (models.Package, error)

Jump to

Keyboard shortcuts

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