Documentation ¶
Index ¶
Constants ¶
View Source
const AnyOSDirectoryName = "any-os"
Variables ¶
View Source
var (
ErrArtifactNotFound = errors.New("artifact not found in repository")
)
View Source
var ErrNoSuchRepository = errors.New("no configuration for this repository name")
View Source
var Fatalf = log.Fatalf
View Source
var Printf = log.Printf
View Source
var Verbose = false
Functions ¶
Types ¶
type Artifact ¶
type Artifact struct { // Descriptor api version. 1 is the default. Api int `json:"api" yaml:"api"` // Name of the group of artifacts. Cannot contain "/" or whitespace characters. Group string // Name of the artifact. Cannot contain "/" or whitespace characters. Name string `yaml:"artifact"` // Use semantic versioning or include the "SNAPSHOT" keyword for non-fixed versions. Version string // Represents the file extension. Type string // If true then use "any" for the operating system name when archiving/fetching. AnyOS bool `yaml:"any-os"` // if not empty use this value for the actual storage file OverrideStorageBase string // optionally specify the repository to archive/fetch this artifact RepositoryName string `yaml:"repository"` }
func LoadArtifact ¶
LoadArtifact parses an Artifact by reading the src file.
func (Artifact) IsSnapshot ¶
IsSnapshot returns true if the version has the substring "SNAPSHOT".
func (Artifact) PluginParameters ¶
func (Artifact) StorageBase ¶
StorageBase returns the file name to which the artifact is stored.
func (Artifact) StorageLocation ¶
StorageLocation returns the relative resource path to store the artifact.
func (*Artifact) UseStorageBase ¶
UseStorageBase is used to override the default format of the actual file to archive/fetch.
type Assembly ¶
func LoadAssembly ¶
LoadAssembly parses an Assembly by reading the src file.
type CachingRepository ¶
type CachingRepository struct {
// contains filtered or unexported fields
}
func (CachingRepository) Exists ¶
func (c CachingRepository) Exists(a Artifact) bool
func (CachingRepository) Fetch ¶
func (c CachingRepository) Fetch(a Artifact, destination string) error
func (CachingRepository) ID ¶
func (r CachingRepository) ID() string
type Config ¶
type Config struct { Api int Repositories []RepositoryConfig // contains filtered or unexported fields }
func LoadConfig ¶
type EmptyRepository ¶
type EmptyRepository struct{}
func (EmptyRepository) Exists ¶
func (r EmptyRepository) Exists(a Artifact) bool
type Repository ¶
type Repository interface { ID() string Exists(a Artifact) bool // destination cannot be a directory Fetch(a Artifact, destination string) error // source cannot be a directory Store(a Artifact, source string) error }
func NewCachingRepository ¶
func NewCachingRepository(main, cache Repository) Repository
type RepositoryConfig ¶
type RepositoryConfig struct { Name string Plugin string URL string Path string User string Password string Snapshots bool Bucket string AccessFile string `yaml":access-file"` SecretFile string `yaml":secret-file"` }
func RepositoryConfigNamed ¶
func RepositoryConfigNamed(settings *Settings, name string) RepositoryConfig
Click to show internal directories.
Click to hide internal directories.