Documentation
¶
Index ¶
- Constants
- func GetTempDir() string
- func SanitizeFilePath(path string) string
- func Save(dir string, workflow *Workflow) error
- func SaveLockfile(dir string, lockfile *LockFile) error
- type Auth
- type CodeSamples
- type Document
- type Java
- type LockFile
- type NPM
- type Nuget
- type Packagist
- type Publishing
- type PyPi
- type RubyGems
- type Source
- type SourceLock
- type SourcePublishLocation
- type SourcePublishing
- type SpeakeasyRegistryDocument
- type Target
- type TargetLock
- type Version
- type Workflow
Constants ¶
const (
WorkflowVersion = "1.0.0"
)
Variables ¶
This section is empty.
Functions ¶
func GetTempDir ¶
func GetTempDir() string
func SanitizeFilePath ¶ added in v1.7.2
func Save ¶
Save the workflow to the given directory, dir should generally be the root of the project, and the workflow will be saved to ${projectRoot}/.speakeasy/workflow.yaml
func SaveLockfile ¶ added in v1.11.0
Save the workflow lockfile to the given directory, dir should generally be the root of the project, and the lockfile will be saved to ${projectRoot}/.speakeasy/workflow.lock
Types ¶
type CodeSamples ¶ added in v1.9.0
type CodeSamples struct {
Output string `yaml:"output"`
}
type Document ¶
func (Document) GetTempDownloadPath ¶
func (Document) GetTempRegistryDir ¶ added in v1.11.3
func (Document) IsSpeakeasyRegistry ¶ added in v1.11.3
type LockFile ¶ added in v1.11.0
type LockFile struct {
SpeakeasyVersion string `yaml:"speakeasyVersion"`
Sources map[string]SourceLock `yaml:"sources"`
Targets map[string]TargetLock `yaml:"targets"`
Workflow Workflow `yaml:"workflow"`
}
func LoadLockfile ¶ added in v1.11.0
type Publishing ¶
type Publishing struct {
NPM *NPM `yaml:"npm,omitempty"`
PyPi *PyPi `yaml:"pypi,omitempty"`
Packagist *Packagist `yaml:"packagist,omitempty"`
Java *Java `yaml:"java,omitempty"`
RubyGems *RubyGems `yaml:"rubygems,omitempty"`
Nuget *Nuget `yaml:"nuget,omitempty"`
}
func (Publishing) IsPublished ¶
func (p Publishing) IsPublished(target string) bool
func (Publishing) Validate ¶
func (p Publishing) Validate(target string) error
type Source ¶
type Source struct {
Inputs []Document `yaml:"inputs"`
Overlays []Document `yaml:"overlays,omitempty"`
Output *string `yaml:"output,omitempty"`
Ruleset *string `yaml:"ruleset,omitempty"`
Publish *SourcePublishing `yaml:"publish,omitempty"`
}
Ensure your update schema/workflow.schema.json on changes
func (Source) GetOutputLocation ¶
func (Source) GetTempMergeLocation ¶
func (Source) GetTempOverlayLocation ¶
type SourceLock ¶ added in v1.11.0
type SourcePublishLocation ¶ added in v1.10.1
type SourcePublishLocation string
func (SourcePublishLocation) Namespace ¶ added in v1.10.1
func (n SourcePublishLocation) Namespace() string
@<org>/<workspace>/<namespace_name> => <org>/<workspace>/<namespace_name>
func (SourcePublishLocation) NamespaceName ¶ added in v1.10.1
func (n SourcePublishLocation) NamespaceName() string
@<org>/<workspace>/<namespace_name> => <namespace_name>
func (SourcePublishLocation) String ¶ added in v1.10.1
func (n SourcePublishLocation) String() string
type SourcePublishing ¶ added in v1.10.1
type SourcePublishing struct {
Location SourcePublishLocation `yaml:"location"`
Tags []string `yaml:"tags,omitempty"`
}
func (SourcePublishing) SetNamespace ¶ added in v1.10.1
func (p SourcePublishing) SetNamespace(namespace string) error
func (SourcePublishing) Validate ¶ added in v1.10.1
func (p SourcePublishing) Validate() error
type SpeakeasyRegistryDocument ¶ added in v1.11.3
type SpeakeasyRegistryDocument struct {
NamespaceID string
// Reference could be tag or revision hash sha256:...
Reference string
}
func ParseSpeakeasyRegistryReference ¶ added in v1.11.3
func ParseSpeakeasyRegistryReference(location string) *SpeakeasyRegistryDocument
ParseSpeakeasyRegistryReference Exposed utility that can be used outside of purely documents
type Target ¶
type Target struct {
Target string `yaml:"target"`
Source string `yaml:"source"`
Output *string `yaml:"output,omitempty"`
Publishing *Publishing `yaml:"publish,omitempty"`
CodeSamples *CodeSamples `yaml:"codeSamples,omitempty"`
}
Ensure your update schema/workflow.schema.json on changes
func (Target) IsPublished ¶ added in v1.6.5
type TargetLock ¶ added in v1.11.0
type Workflow ¶
type Workflow struct {
Version string `yaml:"workflowVersion"`
SpeakeasyVersion Version `yaml:"speakeasyVersion,omitempty"`
Sources map[string]Source `yaml:"sources"`
Targets map[string]Target `yaml:"targets"`
}
Ensure your update schema/workflow.schema.json on changes