Documentation
¶
Index ¶
- type API
- type ActivateOutputPaths
- type ActivateResult
- type Client
- type HTTPAPI
- func (h *HTTPAPI) GetAllStepIDs(ctx context.Context) ([]string, error)
- func (h *HTTPAPI) GetAllStepVersions(ctx context.Context, id string) ([]string, error)
- func (h *HTTPAPI) GetLatestStepVersions(ctx context.Context, id string) (steplibindex.LatestPointer, error)
- func (h *HTTPAPI) GetStepGroupInfo(ctx context.Context, id string) (steplibindex.StepInfo, error)
- func (h *HTTPAPI) GetStepModel(ctx context.Context, step ResolvedStepVersion) (models.StepModel, error)
- type ResolvedStepVersion
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API interface {
GetAllStepIDs(ctx context.Context) ([]string, error)
GetLatestStepVersions(ctx context.Context, id string) (steplibindex.LatestPointer, error)
// GetAllStepVersions returns all available versions of a step.
// Mirrors `index/steps/<id>/versions.json` from the V2 inventory layout.
GetAllStepVersions(ctx context.Context, id string) ([]string, error)
// GetStepGroupInfo returns version-independent step metadata
// (maintainer, deprecation, asset URLs). Mirrors `steps/<id>/step-info.json`.
GetStepGroupInfo(ctx context.Context, id string) (steplibindex.StepInfo, error)
// GetStepModel fetches the V2 per-version step manifest (mirrors
// `steps/<id>/<version>/step.json`, which serializes models.StepModel).
GetStepModel(ctx context.Context, step ResolvedStepVersion) (models.StepModel, error)
}
type ActivateOutputPaths ¶
type ActivateOutputPaths struct {
YMLPath, CodePath string
}
type ActivateResult ¶ added in v0.21.2
type ActivateResult struct {
StepInfo models.StepInfoModel
StepYMLPath string
}
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func New ¶
func New(log stepman.Logger, steplibURI, inventoryURL string, fileManager fileutil.FileManager) *Client
New builds a Client. steplibURI is the steplib identity; inventoryURL is the base URL the V2 inventory JSON is fetched from.
func (*Client) FetchStepMetadata ¶ added in v0.23.0
func (c *Client) FetchStepMetadata(ctx context.Context, stepID, version string, outputPaths ActivateOutputPaths) (ActivateResult, error)
type HTTPAPI ¶
HTTPAPI fetches the V2 inventory (step_ids/latest/versions/step-info/step.json) over HTTP from a base URL.
func (*HTTPAPI) GetAllStepIDs ¶
func (*HTTPAPI) GetAllStepVersions ¶
func (*HTTPAPI) GetLatestStepVersions ¶
func (h *HTTPAPI) GetLatestStepVersions(ctx context.Context, id string) (steplibindex.LatestPointer, error)
func (*HTTPAPI) GetStepGroupInfo ¶
func (*HTTPAPI) GetStepModel ¶
type ResolvedStepVersion ¶
type ResolvedStepVersion struct {
ID, Version string
}
Directories
¶
| Path | Synopsis |
|---|---|
|
Package indexgen generates the V2 step library inventory tree from a bitrise-steplib source.
|
Package indexgen generates the V2 step library inventory tree from a bitrise-steplib source. |
|
Package steplibindex defines the Go types for the V2 step library inventory wire format.
|
Package steplibindex defines the Go types for the V2 step library inventory wire format. |
Click to show internal directories.
Click to hide internal directories.