universe

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2015 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseVersion

func ParseVersion(v string) (*version.Version, error)

ParseVersion returns a version object from a parsed string. This normalizes semver strings, and adds the ability to parse strings with 'v' leader. so that `v1.0.1`-> `1.0.1` which we need for berkshelf to work

Types

type Config

type Config struct {
	BerksOnly bool
}

Config is a universe config for setting the cachpath/github token and berks compat

type Entry

type Entry struct {
	//	EndpointPriority int               `json:"endpoint_priority"`
	// Platforms    map[string]string `json:"platforms"`
	Dependencies map[string]string `json:"dependencies"`
	LocationType string            `json:"location_type"`
	LocationPath string            `json:"location_path"`
	DownloadUrl  string            `json:"download_url"`
	// contains filtered or unexported fields
}

type ResolvedEntry

type ResolvedEntry struct {
	Source  string
	Name    string
	Version version.Version
	Entry   Entry
}

func (ResolvedEntry) String

func (r ResolvedEntry) String() string

type Source

type Source interface {
	Name() string
	Sync() error
	SyncInterval() time.Duration
}

Source is the backend cookbook data source Interface for providing other sources of universe data in a pluggable manner

type Universe

type Universe struct {
	// ugh ruby     cook    version   data
	Universe map[string]map[string]Entry
	Config   Config
	sync.Mutex
}

func NewCache

func NewCache(conf Config) *Universe

NewCache sets up a Universe object

func (*Universe) AddEntry

func (u *Universe) AddEntry(r ResolvedEntry)

func (*Universe) Handler

func (u *Universe) Handler(w http.ResponseWriter, r *http.Request)

universeHandler responds with the current known universe of cookbook metadata https://github.com/chef/chef-rfc/blob/master/rfc0)14-universe-endpoint.md

func (Universe) ServiceInfo

func (u Universe) ServiceInfo() map[string]interface{}

Jump to

Keyboard shortcuts

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