feed

package
v0.18.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2019 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTemplate

func CreateTemplate(cxt *context.Context) error

func NewTemplatesBox

func NewTemplatesBox() *packr.Box

NewSchemas creates or retrieves the packr box with the porter template files.

Types

type GenerateOptions

type GenerateOptions struct {
	SearchDirectory string
	AtomFile        string
	TemplateFile    string
}

func (*GenerateOptions) Validate

func (o *GenerateOptions) Validate(c *context.Context) error

func (*GenerateOptions) ValidateSearchDirectory

func (o *GenerateOptions) ValidateSearchDirectory(cxt *context.Context) error

func (*GenerateOptions) ValidateTemplateFile

func (o *GenerateOptions) ValidateTemplateFile(cxt *context.Context) error

type MixinEntries

type MixinEntries []*MixinFileset

MixinEntries is used to sort the entries in a mixin feed by when they were last updated

func (MixinEntries) Len

func (e MixinEntries) Len() int

func (MixinEntries) Less

func (e MixinEntries) Less(i, j int) bool

func (MixinEntries) Swap

func (e MixinEntries) Swap(i, j int)

type MixinFeed

type MixinFeed struct {
	*context.Context

	// Index of mixin files
	Index map[string]map[string]*MixinFileset

	// Mixins present in the feed
	Mixins []string

	// Updated timestamp according to the atom xml feed
	Updated *time.Time
}

func NewMixinFeed

func NewMixinFeed(cxt *context.Context) *MixinFeed

func (*MixinFeed) Generate

func (feed *MixinFeed) Generate(opts GenerateOptions) error

func (*MixinFeed) Load

func (feed *MixinFeed) Load(file string) error

func (*MixinFeed) Save

func (feed *MixinFeed) Save(opts GenerateOptions) error

func (*MixinFeed) Search

func (feed *MixinFeed) Search(mixin string, version string) *MixinFileset

type MixinFile

type MixinFile struct {
	File    string
	URL     *url.URL
	Updated time.Time
}

type MixinFileset

type MixinFileset struct {
	Mixin   string
	Version string
	Files   []*MixinFile
}

func (*MixinFileset) FindDownloadURL

func (f *MixinFileset) FindDownloadURL(os string, arch string) *url.URL

func (*MixinFileset) GetLastUpdated

func (f *MixinFileset) GetLastUpdated() time.Time

func (*MixinFileset) Updated

func (f *MixinFileset) Updated() string

Jump to

Keyboard shortcuts

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