release

package
v0.0.0-...-ea980e2 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2015 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Factory

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

Factory is responsible for instantiating slices of Releases based upon queries given from the API.

func NewFactory

func NewFactory(modulepath string, fileurl string) *Factory

NewFactory returns a new instance of Factory with the given modulepath.

func (*Factory) AllForModule

func (f *Factory) AllForModule(slug string) (releases []*Release, err error)

AllForModule returns an instance of Release for each available version of a given module. Each instance will have had .FromDisk() called on it already prior to returning. An error will be returned if an error is encountered during the process of loading each release from disk.

type Release

type Release struct {
	Metadata metadata.Metadata `json:"metadata"`
	FileUri  string            `json:"file_uri"`
	FileMd5  string            `json:"file_md5"`
	// contains filtered or unexported fields
}

Release represents a specific Puppet module release on disk.

func New

func New(path string) *Release

New instantiates a new release object given the path to the tarball on disk.

func (*Release) FromDisk

func (r *Release) FromDisk() (err error)

FromDisk populates the applicable properties given the tarball on disk.

func (*Release) Slug

func (r *Release) Slug() string

Slug will return the author-module-version formatted slug. Any slashes will be replaced with dashes.

func (*Release) Tarball

func (r *Release) Tarball() string

Tarball returns the path to the release's tarball on disk.

Jump to

Keyboard shortcuts

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