artifacts

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2022 License: BlueOak-1.0.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection interface {
	NewReleaser(tag, ref, version string) (Releaser, error)
}

type GitHubClient

type GitHubClient struct {
	*github.Client
	context.Context
	Owner string
	Name  string
}

func (*GitHubClient) NewReleaser

func (c *GitHubClient) NewReleaser(tag, ref, version string) (Releaser, error)

type GitHubRelease

type GitHubRelease struct {
	Conn *GitHubClient
	ID   int64
	Tag  string
	Ref  string
	Ver  string
}

func (*GitHubRelease) Release

func (rel *GitHubRelease) Release(name, notes string) error

func (*GitHubRelease) String

func (rel *GitHubRelease) String() string

func (*GitHubRelease) Upload

func (rel *GitHubRelease) Upload(art *ctx.Artifact) error

type GitHubService

type GitHubService struct{}

func (*GitHubService) DefaultTokenEnv

func (*GitHubService) DefaultTokenEnv() string

func (*GitHubService) DefaultTokenFile

func (*GitHubService) DefaultTokenFile() string

func (*GitHubService) New

func (*GitHubService) New(
	ctx context.Context,
	url, token, owner, name string,
	options *tls.Config,
) (Connection, error)

type GitLabClient

type GitLabClient struct {
	*gitlab.Client
	context.Context
	Namespace string
	Name      string
}

func (*GitLabClient) NewReleaser

func (c *GitLabClient) NewReleaser(tag, ref, version string) (Releaser, error)

func (*GitLabClient) ProjectID

func (c *GitLabClient) ProjectID() string

func (*GitLabClient) ProjectPath

func (c *GitLabClient) ProjectPath() string

type GitLabRelease

type GitLabRelease struct {
	Base string
	Conn *GitLabClient
	ID   string
	Ref  string
	Tag  string
	Ver  string
}

func (*GitLabRelease) Release

func (rel *GitLabRelease) Release(name, notes string) error

func (*GitLabRelease) String

func (rel *GitLabRelease) String() string

func (*GitLabRelease) Upload

func (rel *GitLabRelease) Upload(art *ctx.Artifact) error

type GitLabService

type GitLabService struct{}

func (*GitLabService) DefaultTokenEnv

func (*GitLabService) DefaultTokenEnv() string

func (*GitLabService) DefaultTokenFile

func (*GitLabService) DefaultTokenFile() string

func (*GitLabService) New

func (*GitLabService) New(
	ctx context.Context,
	url, token, namespace, name string,
	options *tls.Config,
) (Connection, error)

type Releaser

type Releaser interface {
	Release(name, notes string) error
	Upload(*ctx.Artifact) error
}

type Service

type Service interface {
	DefaultTokenEnv() string
	DefaultTokenFile() string
	New(ctx context.Context, url, token, owner, name string, opts *tls.Config) (Connection, error)
}

type Storage

type Storage struct {
	Service
}

func New

func New(name string) (*Storage, error)

func (*Storage) GetToken

func (s *Storage) GetToken(cx context.Context, tokenEnv, tokenFile string) string

func (*Storage) Load

func (s *Storage) Load(name string) (Service, error)

func (*Storage) UnmarshalYAML

func (s *Storage) UnmarshalYAML(node *yaml.Node) error

Jump to

Keyboard shortcuts

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