Documentation ¶
Index ¶
- Constants
- func CmpSemver(a, b Semver) int
- func JSONMarshallable(source map[string]interface{}) (map[string]interface{}, error)
- type AptGetDepModel
- type BashStepToolkitModel
- type BrewDepModel
- type DependencyModel
- type DepsModel
- type DownloadLocationModel
- type EnvInfoModel
- type GoStepToolkitModel
- type Semver
- type StepCollectionModel
- func (collection StepCollectionModel) GetDownloadLocations(id, version string) ([]DownloadLocationModel, error)
- func (collection StepCollectionModel) GetLatestStepVersion(id string) (string, error)
- func (collection StepCollectionModel) GetStep(id, version string) (StepModel, bool, bool)
- func (collection StepCollectionModel) GetStepVersion(id, version string) (stepVersion StepVersionModel, stepFound bool, versionFound bool)
- func (collection StepCollectionModel) IsStepExist(id, version string) bool
- type StepGroupInfoModel
- type StepGroupModel
- type StepHash
- type StepInfoModel
- type StepListModel
- type StepModel
- type StepSourceModel
- type StepToolkitModel
- type StepVersionModel
- type SteplibInfoModel
- type SwiftStepToolkitModel
- type VersionConstraint
- type VersionLockType
Constants ¶
View Source
const ( // DefaultIsAlwaysRun ... DefaultIsAlwaysRun = false // DefaultIsRequiresAdminUser ... DefaultIsRequiresAdminUser = false // DefaultIsSkippable ... DefaultIsSkippable = false // DefaultTimeout ... DefaultTimeout = 0 )
Variables ¶
This section is empty.
Functions ¶
func JSONMarshallable ¶
JSONMarshallable replaces map[interface{}]interface{} with map[string]string recursively map[interface{}]interface{} is usually returned by parser go-yaml/v2
Types ¶
type AptGetDepModel ¶
type AptGetDepModel struct { // Name is the package name for Apt-get Name string `json:"name,omitempty" yaml:"name,omitempty"` // BinName is the binary's name, if it doesn't match the package's name. // Can be used for e.g. calling `which`. // E.g. in case of "AWS CLI" the package is `awscli` and the binary is `aws`. // If BinName is empty Name will be used as BinName too. BinName string `json:"bin_name,omitempty" yaml:"bin_name,omitempty"` }
func (AptGetDepModel) GetBinaryName ¶
func (aptGetDep AptGetDepModel) GetBinaryName() string
GetBinaryName ...
type BashStepToolkitModel ¶
type BashStepToolkitModel struct {
EntryFile string `json:"entry_file,omitempty" yaml:"entry_file,omitempty"`
}
type BrewDepModel ¶
type BrewDepModel struct { // Name is the package name for Brew Name string `json:"name,omitempty" yaml:"name,omitempty"` // BinName is the binary's name, if it doesn't match the package's name. // Can be used for e.g. calling `which`. // E.g. in case of "AWS CLI" the package is `awscli` and the binary is `aws`. // If BinName is empty Name will be used as BinName too. BinName string `json:"bin_name,omitempty" yaml:"bin_name,omitempty"` }
func (BrewDepModel) GetBinaryName ¶
func (brewDep BrewDepModel) GetBinaryName() string
GetBinaryName ...
type DependencyModel ¶
type DepsModel ¶
type DepsModel struct { Brew []BrewDepModel `json:"brew,omitempty" yaml:"brew,omitempty"` AptGet []AptGetDepModel `json:"apt_get,omitempty" yaml:"apt_get,omitempty"` }
type DownloadLocationModel ¶
type EnvInfoModel ¶
type EnvInfoModel struct { Key string `json:"key,omitempty" yaml:"key,omitempty"` Title string `json:"title,omitempty" yaml:"title,omitempty"` Description string `json:"description,omitempty" yaml:"description,omitempty"` ValueOptions []string `json:"value_options,omitempty" yaml:"value_options,omitempty"` DefaultValue string `json:"default_value,omitempty" yaml:"default_value,omitempty"` IsExpand bool `json:"is_expand" yaml:"is_expand"` IsSensitive bool `json:"is_sensitive" yaml:"is_sensitive"` }
type GoStepToolkitModel ¶
type GoStepToolkitModel struct { // PackageName - required PackageName string `json:"package_name" yaml:"package_name"` }
type Semver ¶
type Semver struct {
Major, Minor, Patch uint64
}
Semver represents a semantic version
func ParseSemver ¶
type StepCollectionModel ¶
type StepCollectionModel struct { FormatVersion string `json:"format_version" yaml:"format_version"` GeneratedAtTimeStamp int64 `json:"generated_at_timestamp" yaml:"generated_at_timestamp"` SteplibSource string `json:"steplib_source" yaml:"steplib_source"` DownloadLocations []DownloadLocationModel `json:"download_locations" yaml:"download_locations"` AssetsDownloadBaseURI string `json:"assets_download_base_uri" yaml:"assets_download_base_uri"` Steps StepHash `json:"steps" yaml:"steps"` }
func (StepCollectionModel) GetDownloadLocations ¶
func (collection StepCollectionModel) GetDownloadLocations(id, version string) ([]DownloadLocationModel, error)
GetDownloadLocations ...
func (StepCollectionModel) GetLatestStepVersion ¶
func (collection StepCollectionModel) GetLatestStepVersion(id string) (string, error)
GetLatestStepVersion ...
func (StepCollectionModel) GetStep ¶
func (collection StepCollectionModel) GetStep(id, version string) (StepModel, bool, bool)
GetStep ...
func (StepCollectionModel) GetStepVersion ¶
func (collection StepCollectionModel) GetStepVersion(id, version string) (stepVersion StepVersionModel, stepFound bool, versionFound bool)
GetStepVersion ...
func (StepCollectionModel) IsStepExist ¶
func (collection StepCollectionModel) IsStepExist(id, version string) bool
IsStepExist ...
type StepGroupInfoModel ¶
type StepGroupInfoModel struct { RemovalDate string `json:"removal_date,omitempty" yaml:"removal_date,omitempty"` DeprecateNotes string `json:"deprecate_notes,omitempty" yaml:"deprecate_notes,omitempty"` AssetURLs map[string]string `json:"asset_urls,omitempty" yaml:"asset_urls,omitempty"` Maintainer string `json:"maintainer,omitempty" yaml:"maintainer,omitempty"` }
type StepGroupModel ¶
type StepGroupModel struct { Info StepGroupInfoModel `json:"info,omitempty" yaml:"info,omitempty"` LatestVersionNumber string `json:"latest_version_number,omitempty" yaml:"latest_version_number,omitempty"` Versions map[string]StepModel `json:"versions,omitempty" yaml:"versions,omitempty"` }
func (StepGroupModel) LatestVersion ¶
func (stepGroup StepGroupModel) LatestVersion() (StepModel, bool)
type StepHash ¶
type StepHash map[string]StepGroupModel
type StepInfoModel ¶
type StepInfoModel struct { Library string `json:"library,omitempty" yaml:"library,omitempty"` ID string `json:"id,omitempty" yaml:"id,omitempty"` Version string `json:"version,omitempty" yaml:"version,omitempty"` OriginalVersion string `json:"original_version,omitempty" yaml:"original_version,omitempty"` LatestVersion string `json:"latest_version,omitempty" yaml:"latest_version,omitempty"` GroupInfo StepGroupInfoModel `json:"info,omitempty" yaml:"info,omitempty"` Step StepModel `json:"step,omitempty" yaml:"step,omitempty"` DefinitionPth string `json:"definition_pth,omitempty" yaml:"definition_pth,omitempty"` }
func (StepInfoModel) CreateFromJSON ¶
func (stepInfo StepInfoModel) CreateFromJSON(jsonStr string) (StepInfoModel, error)
CreateFromJSON ...
type StepListModel ¶
type StepModel ¶
type StepModel struct { Title *string `json:"title,omitempty" yaml:"title,omitempty"` Summary *string `json:"summary,omitempty" yaml:"summary,omitempty"` Description *string `json:"description,omitempty" yaml:"description,omitempty"` // Website *string `json:"website,omitempty" yaml:"website,omitempty"` SourceCodeURL *string `json:"source_code_url,omitempty" yaml:"source_code_url,omitempty"` SupportURL *string `json:"support_url,omitempty" yaml:"support_url,omitempty"` // auto-generated at share PublishedAt *time.Time `json:"published_at,omitempty" yaml:"published_at,omitempty"` Source *StepSourceModel `json:"source,omitempty" yaml:"source,omitempty"` AssetURLs map[string]string `json:"asset_urls,omitempty" yaml:"asset_urls,omitempty"` // HostOsTags []string `json:"host_os_tags,omitempty" yaml:"host_os_tags,omitempty"` ProjectTypeTags []string `json:"project_type_tags,omitempty" yaml:"project_type_tags,omitempty"` TypeTags []string `json:"type_tags,omitempty" yaml:"type_tags,omitempty"` Dependencies []DependencyModel `json:"dependencies,omitempty" yaml:"dependencies,omitempty"` Toolkit *StepToolkitModel `json:"toolkit,omitempty" yaml:"toolkit,omitempty"` Deps *DepsModel `json:"deps,omitempty" yaml:"deps,omitempty"` IsRequiresAdminUser *bool `json:"is_requires_admin_user,omitempty" yaml:"is_requires_admin_user,omitempty"` // IsAlwaysRun : if true then this step will always run, // even if a previous step fails. IsAlwaysRun *bool `json:"is_always_run,omitempty" yaml:"is_always_run,omitempty"` // IsSkippable : if true and this step fails the build will still continue. // If false then the build will be marked as failed and only those // steps will run which are marked with IsAlwaysRun. IsSkippable *bool `json:"is_skippable,omitempty" yaml:"is_skippable,omitempty"` // RunIf : only run the step if the template example evaluates to true RunIf *string `json:"run_if,omitempty" yaml:"run_if,omitempty"` Timeout *int `json:"timeout,omitempty" yaml:"timeout,omitempty"` // The timeout (in seconds) until a Step with no output (stdout/stderr) is aborted // 0 means timeout is disabled. NoOutputTimeout *int `json:"no_output_timeout,omitempty" yaml:"no_output_timeout,omitempty"` Meta map[string]interface{} `json:"meta,omitempty" yaml:"meta,omitempty"` // Inputs []envmanModels.EnvironmentItemModel `json:"inputs,omitempty" yaml:"inputs,omitempty"` Outputs []envmanModels.EnvironmentItemModel `json:"outputs,omitempty" yaml:"outputs,omitempty"` }
StepModel ...
func (*StepModel) AuditBeforeShare ¶
AuditBeforeShare ...
func (*StepModel) FillMissingDefaults ¶
FillMissingDefaults ...
func (*StepModel) ValidateInputAndOutputEnvs ¶
ValidateInputAndOutputEnvs ...
type StepSourceModel ¶
type StepToolkitModel ¶
type StepToolkitModel struct { Bash *BashStepToolkitModel `json:"bash,omitempty" yaml:"bash,omitempty"` Go *GoStepToolkitModel `json:"go,omitempty" yaml:"go,omitempty"` Swift *SwiftStepToolkitModel `json:"swift,omitempty" yaml:"swift,omitempty"` }
type StepVersionModel ¶
type SteplibInfoModel ¶
type SwiftStepToolkitModel ¶
type VersionConstraint ¶
type VersionConstraint struct { VersionLockType VersionLockType Version Semver }
VersionConstraint describes a version and a cosntraint (e.g. use latest major version available)
func ParseRequiredVersion ¶
func ParseRequiredVersion(version string) (VersionConstraint, error)
ParseRequiredVersion returns VersionConstraint model from raw version string
type VersionLockType ¶
type VersionLockType int
VersionLockType is the type of version lock
const ( // InvalidVersionConstraint is the value assigned to a VersionLockType if not explicitly initialized InvalidVersionConstraint VersionLockType = iota // Fixed is an exact version, e.g. 1.2.5 Fixed // Latest means the latest available version Latest // MajorLocked means the latest available version with a given major version, e.g. 1.*.* MajorLocked // MinorLocked means the latest available version with a given major and minor version, e.g. 1.2.* MinorLocked )
Click to show internal directories.
Click to hide internal directories.