cli

package
v0.0.0-...-9e34962 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: MIT Imports: 28 Imported by: 3

Documentation

Index

Constants

View Source
const (
	// DebugEnvKey ...
	DebugEnvKey = "STEPMAN_DEBUG"
	// LogLevelEnvKey ...
	LogLevelEnvKey = "LOGLEVEL"
	// CollectionPathEnvKey ...
	CollectionPathEnvKey = "STEPMAN_COLLECTION"

	// HelpKey ...
	HelpKey = "help"

	// VersionKey ...
	VersionKey = "version"

	// CollectionKey ...
	CollectionKey = "collection"

	// LocalCollectionKey ...
	LocalCollectionKey = "local"
	// CopySpecJSONKey ...
	CopySpecJSONKey = "copy-spec-json"

	// DebugKey ...
	DebugKey = "debug"

	// LogLevelKey ...
	LogLevelKey = "loglevel"

	// IDKey ...
	IDKey = "id"

	// PathKey ...
	PathKey = "path"

	// CopyYMLKey ...
	CopyYMLKey = "copyyml"

	// UpdateKey ...
	UpdateKey = "update"

	// TagKey ...
	TagKey = "tag"

	// GitKey ...
	GitKey = "git"

	// StepIDKey ...
	StepIDKey = "stepid"

	// ShortKey ...
	ShortKey = "short"

	// ToolMode ...
	ToolMode = "toolmode"

	// FormatKey ...
	FormatKey = "format"

	// OutputFormatRaw ...
	OutputFormatRaw = "raw"
	// OutputFormatJSON ...
	OutputFormatJSON = "json"

	// StepYMLKey ...
	StepYMLKey = "step-yml"
)
View Source
const (
	// ShareFilename ...
	ShareFilename string = "share.json"
)

Variables

This section is empty.

Functions

func Activate

func Activate(stepLibURI, id, version, destination, destinationStepYML string, updateLibrary bool, log stepman.Logger) error

Activate ...

func Collections

func Collections() ([]models.SteplibInfoModel, error)

Collections returns SteplibInfoModels about the locally configured step collections.

func DeleteShareSteplibFile

func DeleteShareSteplibFile() error

DeleteShareSteplibFile ...

func GuideTextForAudit

func GuideTextForAudit(toolMode bool) string

GuideTextForAudit ...

func GuideTextForFinish

func GuideTextForFinish() string

GuideTextForFinish ...

func GuideTextForShareCreate

func GuideTextForShareCreate(toolMode bool) string

GuideTextForShareCreate ...

func GuideTextForShareFinish

func GuideTextForShareFinish(toolMode bool) string

GuideTextForShareFinish ...

func GuideTextForShareStart

func GuideTextForShareStart(toolMode bool) string

GuideTextForShareStart ...

func GuideTextForStart

func GuideTextForStart() string

GuideTextForStart ...

func GuideTextForStepAudit

func GuideTextForStepAudit(toolMode bool) string

GuideTextForStepAudit ...

func QueryStepInfo

func QueryStepInfo(library, id, version string, log stepman.Logger) (models.StepInfoModel, error)

QueryStepInfo returns a matching step info. In cases of git and path sources the step.yml is read, otherwise the step is looked up in a step library.

func QueryStepInfoFromGit

func QueryStepInfoFromGit(gitURL, tagOrBranch string) (models.StepInfoModel, error)

QueryStepInfoFromGit returns step info from git source.

func QueryStepInfoFromLibrary

func QueryStepInfoFromLibrary(library, id, version string, log stepman.Logger) (models.StepInfoModel, error)

QueryStepInfoFromLibrary returns a step version based on the version string, which can be latest or locked to major or minor versions

func QueryStepInfoFromPath

func QueryStepInfoFromPath(dir string) (models.StepInfoModel, error)

QueryStepInfoFromPath returns step info from a local path source

func Run

func Run()

Run ...

func Setup

func Setup(steplibURI, copySpecJSONPath string, log stepman.Logger) error

Setup ...

func UpdateLibrary

func UpdateLibrary(uri string, log stepman.Logger) error

UpdateLibrary ...

func WriteShareSteplibToFile

func WriteShareSteplibToFile(share ShareModel) error

WriteShareSteplibToFile ...

Types

type ExportType

type ExportType int8

ExportType ...

type OutputModel

type OutputModel struct {
	Data  *([]models.SteplibInfoModel) `json:"data,omitempty" yaml:"data,omitempty"`
	Error string                       `json:"error,omitempty" yaml:"error,omitempty"`
}

OutputModel ...

func NewErrorOutput

func NewErrorOutput(err error) OutputModel

NewErrorOutput ...

func NewOutput

func NewOutput(steplibInfos []models.SteplibInfoModel) OutputModel

NewOutput ...

func (OutputModel) JSON

func (output OutputModel) JSON() string

JSON ...

func (OutputModel) String

func (output OutputModel) String() string

String ...

type ShareModel

type ShareModel struct {
	Collection string
	StepID     string
	StepTag    string
}

ShareModel ...

func ReadShareSteplibFromFile

func ReadShareSteplibFromFile() (ShareModel, error)

ReadShareSteplibFromFile ...

func (ShareModel) ShareBranchName

func (share ShareModel) ShareBranchName() string

ShareBranchName ...

type VersionOutputModel

type VersionOutputModel struct {
	Version     string `json:"version,omitempty"`
	OS          string `json:"os,omitempty"`
	GO          string `json:"go,omitempty"`
	BuildNumber string `json:"build_number,omitempty"`
	Commit      string `json:"commit,omitempty"`

	FullVersion bool `json:"-"`
}

VersionOutputModel ...

func (VersionOutputModel) JSON

func (version VersionOutputModel) JSON() string

JSON ...

func (VersionOutputModel) String

func (version VersionOutputModel) String() string

String ...

Jump to

Keyboard shortcuts

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