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 SourceRegistry
- type SourceRegistryLocation
- type SpeakeasyRegistryDocument
- type Target
- type TargetLock
- type Terraform
- 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"` Registry *SourceRegistry `yaml:"registry,omitempty"` }
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"` Terraform *Terraform `yaml:"terraform,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"` Registry *SourceRegistry `yaml:"registry,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 SourceRegistry ¶ added in v1.13.0
type SourceRegistry struct { Location SourceRegistryLocation `yaml:"location"` Tags []string `yaml:"tags,omitempty"` }
func (*SourceRegistry) ParseRegistryLocation ¶ added in v1.13.0
func (p *SourceRegistry) ParseRegistryLocation() (string, string, string, error)
func (*SourceRegistry) SetNamespace ¶ added in v1.13.0
func (p *SourceRegistry) SetNamespace(namespace string) error
func (SourceRegistry) Validate ¶ added in v1.13.0
func (p SourceRegistry) Validate() error
type SourceRegistryLocation ¶ added in v1.13.0
type SourceRegistryLocation string
func (SourceRegistryLocation) Namespace ¶ added in v1.13.0
func (n SourceRegistryLocation) Namespace() string
@<org>/<workspace>/<namespace_name> => <org>/<workspace>/<namespace_name>
func (SourceRegistryLocation) NamespaceName ¶ added in v1.13.0
func (n SourceRegistryLocation) NamespaceName() string
@<org>/<workspace>/<namespace_name> => <namespace_name>
func (SourceRegistryLocation) String ¶ added in v1.13.0
func (n SourceRegistryLocation) String() string
type SpeakeasyRegistryDocument ¶ added in v1.11.3
type SpeakeasyRegistryDocument struct { OrganizationSlug string WorkspaceSlug string NamespaceID string NamespaceName string // Reference could be tag or revision hash sha256:... Reference string }
func ParseSpeakeasyRegistryReference ¶ added in v1.11.3
func ParseSpeakeasyRegistryReference(location string) *SpeakeasyRegistryDocument
Parse the location to extract the namespace ID, namespace name, and reference The location should be in the format registry.speakeasyapi.dev/org/workspace/name[:tag|@sha256:digest]
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