Documentation
¶
Index ¶
- type API
- 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)
- func (h *HTTPAPI) GetStepSourceDownloadLocations(ctx context.Context) ([]models.DownloadLocationModel, 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)
// GetStepSourceDownloadLocations returns the inventory-wide base download locations
// (mirrors meta.json's download_locations): a zip base and a git marker,
// from which per-step source URLs are built.
GetStepSourceDownloadLocations(ctx context.Context) ([]models.DownloadLocationModel, error)
}
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func New ¶
New builds a stepman.Client. inventoryURL: the base URL of the API where metadata is fetched from.
func (*Client) FetchStepMetadata ¶ added in v0.23.0
func (c *Client) FetchStepMetadata(ctx context.Context, stepRef stepid.CanonicalID) (models.StepInfoModel, error)
func (*Client) StepSourceDownloadLocations ¶ added in v0.24.0
func (c *Client) StepSourceDownloadLocations(ctx context.Context, id, version, sourceGit string) ([]models.DownloadLocationModel, error)
StepSourceDownloadLocations returns a priority order of step source zip download locations
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 ¶
func (*HTTPAPI) GetStepSourceDownloadLocations ¶ added in v0.24.0
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.