types

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2023 License: Unlicense Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GithubAuthenticationProvider added in v0.2.1

type GithubAuthenticationProvider interface {
	GetToken(ctx context.Context) (string, bool, error)
}

GithubAuthenticationProvider defines how the gh client gets authentication material (if relevant).

type GithubClientOptions added in v0.2.1

type GithubClientOptions struct {
	HTTPClient          *http.Client
	UserAgent           string
	CustomConfigurators []func(*github.Client)
	Authentication      GithubAuthenticationProvider
	AuthTimeout         time.Duration
}

GithubClientOptions sets up how we communicate with github.

func NewOptions added in v0.2.1

func NewOptions(appName string, appVersion string) *GithubClientOptions

NewOptions creates a new github client for a given repo.

func (*GithubClientOptions) WithApp added in v0.2.1

func (o *GithubClientOptions) WithApp(appName string, appVersion string) *GithubClientOptions

WithApp sets the user agent of the GH client.

func (*GithubClientOptions) WithAuthenticationProvider added in v0.2.1

func (o *GithubClientOptions) WithAuthenticationProvider(provider GithubAuthenticationProvider) *GithubClientOptions

WithAuthenticationProvider sets the authentication provider for this client.

func (*GithubClientOptions) WithCustom added in v0.2.1

func (o *GithubClientOptions) WithCustom(cfg func(client *github.Client)) *GithubClientOptions

WithCustom allows for custom overrides of the GH client library.

func (*GithubClientOptions) WithHTTPClient added in v0.2.1

func (o *GithubClientOptions) WithHTTPClient(cl *http.Client) *GithubClientOptions

WithHTTPClient sets an override http client for GH API interactions.

type ReleaseCandidate

type ReleaseCandidate struct {
	ID   int64
	Name string
}

type VersioningStrategy

type VersioningStrategy interface {
	// IsAcceptable determines if the new version is a an accepted version (IE don't accept prerelease)
	IsAcceptable(version *semver.Version) bool
	// IsUpgrade determines if a new version is an upgrade from an old version
	IsUpgrade(oldV *semver.Version, newV *semver.Version) bool
}

VersioningStrategy defines if a version is an upgrade from a prior version.

Jump to

Keyboard shortcuts

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