supermarket

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: May 20, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const ArtifactCookbook = "cookbook"
View Source
const ArtifactProfile = "profile"

Variables

This section is empty.

Functions

func ListCookBook added in v0.0.2

func ListCookBook(supermarketSite, sortBy, user, withUri string, ui core.UI, config core.Config)

func ShowCookBook added in v0.0.2

func ShowCookBook(cookbook, supermarketSite string, ui core.UI, config core.Config, version string)

func UnShareCookbook added in v0.0.2

func UnShareCookbook(cookbook, superMarketSite, nodeName, key string) error

func ValidateArgsAndType

func ValidateArgsAndType(args []string, artifact string, ui core.UI)

func ValidateArtifact

func ValidateArtifact(artifact string) bool

Types

type CookbookDownload

type CookbookDownload struct {
	CookbookName string

	SpecificVersion string
	// contains filtered or unexported fields
}

func (*CookbookDownload) Download

func (cd *CookbookDownload) Download(ui core.UI, config core.Config) error

Download will download given cookbook to given location or current dir

func (CookbookDownload) String

func (cd CookbookDownload) String() string

String implements the Stringer Interface for the SearchArtifact

func (*CookbookDownload) Version

func (cd *CookbookDownload) Version() string

type CookbookInstall

type CookbookInstall struct {
	UseCurrentBranch bool
	DefaultBranch    string
	InstallDep       bool
	InstallArtifact
}

func (CookbookInstall) ChangeArtifactName

func (ci CookbookInstall) ChangeArtifactName(artifactName string)

func (CookbookInstall) Install

func (ci CookbookInstall) Install(ui core.UI, config core.Config)

func (CookbookInstall) InstallDeps

func (ci CookbookInstall) InstallDeps() bool

type CookbookSearch

type CookbookSearch struct {
	SearchArtifact
}

func (CookbookSearch) Search

func (cs CookbookSearch) Search(ui core.UI, config core.Config)

Search will search for given term on supermarket site

func (CookbookSearch) String

func (cs CookbookSearch) String() string

String implements the Stringer Interface for the SearchArtifact

type DownloadArtifact

type DownloadArtifact struct {
	// artifact download location
	Location string
	// do we need to download forcefully
	Force bool
	// artifact name for download
	ArtifactName string
	// url form where artifact  need to download
	Url string
}

type DownloadProvider

type DownloadProvider interface {
	Download(ui core.UI, config core.Config) error
	Version() string
}

func NewDownloadProvider

func NewDownloadProvider(name, url, artifact, location, specificVersion string, force bool) DownloadProvider

type InstallArtifact

type InstallArtifact struct {
	// artifact install location
	Location string

	// artifact name for download
	ArtifactName string
	// contains filtered or unexported fields
}

type InstallProvider

type InstallProvider interface {
	Install(ui core.UI, config core.Config)
	InstallDeps() bool
	ChangeArtifactName(artifactName string)
}

func NewInstallProvider

func NewInstallProvider(cookbookName, url, location, defaultBranch, artifact string, installDeps, useCurrentBranch bool) InstallProvider

type SearchArtifact

type SearchArtifact struct {
	// The query you want to execute. This is the 'chef' query ex: 'db'
	Query string

	// Sort order you want the search results returned
	SortBy string

	// Starting position for search
	Start int
	// url for where search need to hit
	Url string
	// Number of rows to return
	Rows int
}

SearchArtifact Is the struct for holding a query request

type SearchProvider

type SearchProvider interface {
	Search(ui core.UI, config core.Config)
	String() string
}

func NewSearchProvider

func NewSearchProvider(query, url, artifact string) SearchProvider

Jump to

Keyboard shortcuts

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