curl

package
v0.0.0-...-ed7d7af Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const DOWNLOAD_TIMEOUT = 30 * time.Second

Variables

This section is empty.

Functions

func NewRepository

func NewRepository(name string, installationPath string, config map[string]interface{}) (repository.Repository, error)

Types

type Auth

type Auth struct {
	// Type of the authentication
	Type AuthType
	// Config of the authentication
	Config AuthConfig
}

type AuthConfig

type AuthConfig interface {
	// Get the authentication header
	Header() string
}

type AuthFactory

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

type AuthType

type AuthType string
const (
	BasicAuthType AuthType = "basic"
	TokenAuthType AuthType = "token"
)

type BasicAuth

type BasicAuth struct {
	Username string
	Password string
}

func (BasicAuth) Header

func (b BasicAuth) Header() string

type Config

type Config struct {
	// URL of the file to download
	// Example "https://my-file-server.com/{app-name}-{app-version}.tar.gz"
	URL string
	// Auth configuration
	Auth *Auth
}

func (Config) Type

func (c Config) Type() string

type Repository

type Repository struct {
	Config           Config
	RepoName         string
	InstallationPath string
}

func (*Repository) InstallApp

func (r *Repository) InstallApp(appReference *app.Reference) (app.App, error)

func (*Repository) Name

func (r *Repository) Name() string

type TokenAuth

type TokenAuth struct {
	Token string
}

func (TokenAuth) Header

func (t TokenAuth) Header() string

Jump to

Keyboard shortcuts

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