Documentation ¶
Index ¶
- Constants
- func QuickStartVersion(sha string) string
- type Options
- func (o *Options) LoadMLProjectSetsModel(gitHubOrganisations []string, ignoreTeam bool) (*QuickstartModel, error)
- func (o *Options) LoadQuickStartsFromLocations(locations []v1.QuickStartLocation) (*QuickstartModel, error)
- func (o *Options) LoadQuickStartsModel(gitHubOrganisations []string, ignoreTeam bool) (*QuickstartModel, error)
- func (o *Options) Validate() error
- type Quickstart
- type QuickstartFilter
- type QuickstartForm
- type QuickstartModel
- func (model *QuickstartModel) Add(q *Quickstart) bool
- func (model *QuickstartModel) CreateSurvey(filter *QuickstartFilter, batchMode bool, i input.Interface) (*QuickstartForm, error)
- func (model *QuickstartModel) Filter(filter *QuickstartFilter) []*Quickstart
- func (model *QuickstartModel) Languages() []string
- func (model *QuickstartModel) LoadQuickStarts(qs *v1alpha1.QuickstartsSpec, dir, fileName string) error
- func (model *QuickstartModel) SortedNames() []string
Constants ¶
const (
// JenkinsXQuickstartsOwner default quickstart owner
JenkinsXQuickstartsOwner = "jenkins-x-quickstarts"
)
Variables ¶
This section is empty.
Functions ¶
func QuickStartVersion ¶
QuickStartVersion creates a quickstart version string
Types ¶
type Options ¶
type Options struct { VersionsDir string Namespace string CurrentUser string JXClient versioned.Interface ScmClient *scm.Client }
func (*Options) LoadMLProjectSetsModel ¶ added in v0.2.0
func (o *Options) LoadMLProjectSetsModel(gitHubOrganisations []string, ignoreTeam bool) (*QuickstartModel, error)
LoadMLProjectSetsModel Load all quickstarts
func (*Options) LoadQuickStartsFromLocations ¶
func (o *Options) LoadQuickStartsFromLocations(locations []v1.QuickStartLocation) (*QuickstartModel, error)
LoadQuickStartsFromLocations Load all quickstarts from the given locatiotns
func (*Options) LoadQuickStartsModel ¶
func (o *Options) LoadQuickStartsModel(gitHubOrganisations []string, ignoreTeam bool) (*QuickstartModel, error)
LoadQuickStartsModel Load all quickstarts
type Quickstart ¶
type Quickstart struct { ID string Owner string Name string Version string Language string Framework string Tags []string DownloadZipURL string GitServer string GitKind string }
func GitQuickstart ¶
func GitQuickstart(owner, repo, version, downloadURL, language, framework string, tags ...string) *Quickstart
GitQuickstart returns a github based quickstart
func (*Quickstart) GetGitKind ¶
func (q *Quickstart) GetGitKind() string
GetGitKind returns the kind of git provider to use
func (*Quickstart) GetGitServer ¶
func (q *Quickstart) GetGitServer() string
GetGitServer returns the git server to use
func (*Quickstart) SurveyName ¶
func (q *Quickstart) SurveyName() string
type QuickstartFilter ¶
type QuickstartFilter struct { Language string Framework string Owner string Text string ProjectName string Tags []string AllowML bool }
func (*QuickstartFilter) Matches ¶
func (f *QuickstartFilter) Matches(q *Quickstart) bool
type QuickstartForm ¶
type QuickstartForm struct { Quickstart *Quickstart Name string }
type QuickstartModel ¶
type QuickstartModel struct {
Quickstarts map[string]*Quickstart
}
func NewQuickstartModel ¶
func NewQuickstartModel() *QuickstartModel
NewQuickstartModel creates a new quickstart model
func (*QuickstartModel) Add ¶
func (model *QuickstartModel) Add(q *Quickstart) bool
Add adds the given quickstart to this mode. Returns true if it was added
func (*QuickstartModel) CreateSurvey ¶
func (model *QuickstartModel) CreateSurvey(filter *QuickstartFilter, batchMode bool, i input.Interface) (*QuickstartForm, error)
CreateSurvey creates a survey to query pick a quickstart
func (*QuickstartModel) Filter ¶
func (model *QuickstartModel) Filter(filter *QuickstartFilter) []*Quickstart
Filter filters all the available quickstarts with the filter and return the matches
func (*QuickstartModel) Languages ¶
func (model *QuickstartModel) Languages() []string
Languages returns all the languages in the quickstarts sorted
func (*QuickstartModel) LoadQuickStarts ¶
func (model *QuickstartModel) LoadQuickStarts(qs *v1alpha1.QuickstartsSpec, dir, fileName string) error
func (*QuickstartModel) SortedNames ¶
func (model *QuickstartModel) SortedNames() []string
SortedNames returns the sorted names of the quickstarts