stemcell

package
v0.0.0-...-1eff689 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Navigation() nav.Link

Types

type Distro

type Distro struct {
	NameName string // e.g. 'ubuntu-trusty' TODO rename this to Name, Name to Title/Label
	Name     string // e.g. 'Ubuntu Trusty'
	Sort     uint8  // smaller == more important

	Deprecated bool

	OSMatches                []StemcellOSMatch
	SupportedInfrastructures Infrastructures
}

func (Distro) IsVisible

func (d Distro) IsVisible(includeDeprecated bool) bool

func (Distro) Matches

func (d Distro) Matches(s bhstemsrepo.Stemcell) bool

type DistroGroup

type DistroGroup struct {
	Distro Distro
	ByName UniqueNameStemcells
	// contains filtered or unexported fields
}

func (DistroGroup) HasAnyStemcells

func (g DistroGroup) HasAnyStemcells() bool

func (DistroGroup) Infrastructures

func (g DistroGroup) Infrastructures() []string

func (DistroGroup) IsVisible

func (g DistroGroup) IsVisible(includeDeprecated bool) bool

type DistroGroupSorting

type DistroGroupSorting []DistroGroup

func (DistroGroupSorting) Len

func (s DistroGroupSorting) Len() int

func (DistroGroupSorting) Less

func (s DistroGroupSorting) Less(i, j int) bool

func (DistroGroupSorting) Swap

func (s DistroGroupSorting) Swap(i, j int)

type DistroGroups

type DistroGroups []DistroGroup

func NewDistroGroups

func NewDistroGroups(ss []bhstemsrepo.Stemcell, filter StemcellFilter) DistroGroups

func (DistroGroups) AllURL

func (g DistroGroups) AllURL() string

func (DistroGroups) FirstStemcell

func (g DistroGroups) FirstStemcell() *Stemcell

type Format

type Format struct {
	Name string
}

type Hypervisor

type Hypervisor struct {
	Name  string
	Title string
}

type Hypervisors

type Hypervisors []Hypervisor

func (Hypervisors) ByName

func (i Hypervisors) ByName(name string) (Hypervisor, error)

type Infrastructure

type Infrastructure struct {
	Name                    string
	Title                   string
	DocumentationURL        string
	LightStemcellsPublished bool

	SupportedHypervisors InfrastructureHypervisors
}

type InfrastructureHypervisor

type InfrastructureHypervisor struct {
	Hypervisor Hypervisor
	Deprecated bool
}

type InfrastructureHypervisors

type InfrastructureHypervisors []InfrastructureHypervisor

type Infrastructures

type Infrastructures []Infrastructure

func (Infrastructures) ByName

func (i Infrastructures) ByName(name string) (Infrastructure, error)

type SameNameStemcells

type SameNameStemcells struct {
	Name      string
	ByVersion UniqueVersionStemcells
}

func NewSameNameStemcells

func NewSameNameStemcells(name string, ss []bhstemsrepo.Stemcell, filter StemcellFilter) SameNameStemcells

func (SameNameStemcells) HasAnyStemcells

func (s SameNameStemcells) HasAnyStemcells() bool

type SameVersionStemcells

type SameVersionStemcells struct {
	Version   semiver.Version
	Stemcells []Stemcell

	ShowingAllVersions bool
}

func NewSameVersionStemcells

func NewSameVersionStemcells(version semiver.Version, ss []bhstemsrepo.Stemcell) SameVersionStemcells

func (SameVersionStemcells) AllURL

func (s SameVersionStemcells) AllURL() string

type Stemcell

type Stemcell struct {
	ManifestName string
	Version      semiver.Version

	OSName    string
	OSVersion string

	RegularSource *StemcellSource
	LightSource   *StemcellSource

	// todo china stemcell will be consolidated into light stemcell at some point
	LightChinaSource *StemcellSource
	// contains filtered or unexported fields
}

func NewStemcell

func NewStemcell(s bhstemsrepo.Stemcell) Stemcell

func (Stemcell) ActualDownloadURL

func (s Stemcell) ActualDownloadURL(preferLight bool, mustBeForChina bool) (string, error)

func (*Stemcell) AddAsSource

func (s *Stemcell) AddAsSource(s_ bhstemsrepo.Stemcell)

func (Stemcell) AllVersionsURL

func (s Stemcell) AllVersionsURL() string

func (Stemcell) MarshalJSON

func (s Stemcell) MarshalJSON() ([]byte, error)

func (*Stemcell) NotesInMarkdown

func (s *Stemcell) NotesInMarkdown() (template.HTML, error)

func (Stemcell) SHA1

func (s Stemcell) SHA1() string

func (Stemcell) SHA256

func (s Stemcell) SHA256() string

func (*Stemcell) Sources

func (s *Stemcell) Sources() []*StemcellSource

func (Stemcell) UserVisibleDownloadURL

func (s Stemcell) UserVisibleDownloadURL() string

func (Stemcell) UserVisibleLatestDownloadURL

func (s Stemcell) UserVisibleLatestDownloadURL() string

type StemcellFilter

type StemcellFilter struct {
	Name string

	IncludeAll               bool
	IncludeDeprecatedDistros bool
}

func (StemcellFilter) HasLimit

func (f StemcellFilter) HasLimit() bool

func (StemcellFilter) Limit

func (f StemcellFilter) Limit() int

func (StemcellFilter) ShowingAllVersions

func (f StemcellFilter) ShowingAllVersions() bool

type StemcellManifestNameSorting

type StemcellManifestNameSorting []Stemcell

func (StemcellManifestNameSorting) Len

func (StemcellManifestNameSorting) Less

func (s StemcellManifestNameSorting) Less(i, j int) bool

func (StemcellManifestNameSorting) Swap

func (s StemcellManifestNameSorting) Swap(i, j int)

type StemcellOSMatch

type StemcellOSMatch struct {
	OSName    string // e.g. ubuntu
	OSVersion string // e.g. trusty, ”
}

func (StemcellOSMatch) Matches

func (StemcellOSMatch) Name

func (m StemcellOSMatch) Name() string

type StemcellSource

type StemcellSource struct {
	URL    string `json:"url"`
	Size   uint64 `json:"size"`
	MD5    string `json:"md5"`
	SHA1   string `json:"sha1,omitempty"`
	SHA256 string `json:"sha256,omitempty"`

	UpdatedAt string `json:"-"`
	// contains filtered or unexported fields
}

func (StemcellSource) FormattedSize

func (s StemcellSource) FormattedSize() string

func (StemcellSource) FriendlyName

func (s StemcellSource) FriendlyName() string

func (StemcellSource) HypervisorName

func (s StemcellSource) HypervisorName() string

func (StemcellSource) Ignored

func (s StemcellSource) Ignored() bool

func (StemcellSource) InfrastructureName

func (s StemcellSource) InfrastructureName() string

func (StemcellSource) LinkName

func (s StemcellSource) LinkName() string

func (StemcellSource) UserVisibleDownloadURL

func (s StemcellSource) UserVisibleDownloadURL() string

type StemcellVersionSorting

type StemcellVersionSorting []Stemcell

func (StemcellVersionSorting) Len

func (s StemcellVersionSorting) Len() int

func (StemcellVersionSorting) Less

func (s StemcellVersionSorting) Less(i, j int) bool

func (StemcellVersionSorting) Swap

func (s StemcellVersionSorting) Swap(i, j int)

type UniqueNameStemcells

type UniqueNameStemcells []*SameNameStemcells

func NewUniqueNameStemcells

func NewUniqueNameStemcells(ss []bhstemsrepo.Stemcell, filter StemcellFilter) UniqueNameStemcells

func (UniqueNameStemcells) HasAnyStemcells

func (s UniqueNameStemcells) HasAnyStemcells() bool

type UniqueNameStemcellsSorting

type UniqueNameStemcellsSorting UniqueNameStemcells

func (UniqueNameStemcellsSorting) Len

func (UniqueNameStemcellsSorting) Less

func (s UniqueNameStemcellsSorting) Less(i, j int) bool

func (UniqueNameStemcellsSorting) Swap

func (s UniqueNameStemcellsSorting) Swap(i, j int)

type UniqueVersionStemcells

type UniqueVersionStemcells []*SameVersionStemcells

func NewUniqueVersionStemcells

func NewUniqueVersionStemcells(ss []bhstemsrepo.Stemcell, filter StemcellFilter) UniqueVersionStemcells

func (UniqueVersionStemcells) ForAPI

func (s UniqueVersionStemcells) ForAPI() []Stemcell

func (UniqueVersionStemcells) HasAnyStemcells

func (s UniqueVersionStemcells) HasAnyStemcells() bool

type UniqueVersionStemcellsSorting

type UniqueVersionStemcellsSorting UniqueVersionStemcells

func (UniqueVersionStemcellsSorting) Len

func (UniqueVersionStemcellsSorting) Less

func (s UniqueVersionStemcellsSorting) Less(i, j int) bool

func (UniqueVersionStemcellsSorting) Swap

func (s UniqueVersionStemcellsSorting) Swap(i, j int)

Jump to

Keyboard shortcuts

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