packagecloud

package
v0.0.0-...-68e4e56 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrPackageAlreadyExists = errors.New("package already exists")
)

Functions

func GetSupportedFileExtensions

func GetSupportedFileExtensions() []string

TODO: packagecloud supports more than this, implement the others

func ValidateFileExtensions

func ValidateFileExtensions(paths []string) error

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(config Config) *Client

func (*Client) GetDistributions

func (c *Client) GetDistributions() ([]byte, error)

func (*Client) PushPackage

func (c *Client) PushPackage(options PushPackageOptions) ([]byte, error)

type Config

type Config struct {
	ServiceURL string `mapstructure:"url"`
	Token      string `mapstructure:"token"`
	Verbose    bool   `mapstructure:"verbose"`
}

func (Config) Validate

func (c Config) Validate() error

type GetClientFn

type GetClientFn func() (*Client, error)

type PushPackageOptions

type PushPackageOptions struct {
	RepoUser string
	RepoName string
	DistroID string
	FilePath string
}

Jump to

Keyboard shortcuts

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