github

package
v0.0.0-...-38f4d7b Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Artifact

type Artifact struct {
	Name        string
	URL         string
	ContentType string
}

type GHManager

type GHManager struct {
	GHManagerConfig
	// contains filtered or unexported fields
}

func NewGHManager

func NewGHManager(conf ...GHManagerConfig) GHManager

NewGHManager takes an optional configuration (conf) and returns a GHManager. If required configuration values are not set, defaults are used. While conf is variadic, only the last conf argument passed will be used.

func (*GHManager) GetArtifacts

func (g *GHManager) GetArtifacts(repoURL string) ([]Release, error)

type GHManagerConfig

type GHManagerConfig struct {
	// the access token to use when interacting with GitHub. If you plan to
	// access private repositories, this must be set.
	GHToken string
}

GHManagerConfig provide configuration options for creating a GitHub Manager.

type GHRetriever

type GHRetriever interface {
	GetArtifacts(repoURL string) []Artifact
}

type Release

type Release struct {
	Name      string
	Tag       string
	Artifacts []Artifact
}

Jump to

Keyboard shortcuts

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