steplibrary

package
v0.23.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 29, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

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

type HTTPAPI struct {
	BaseURL string
	Fetcher httpfetch.Client
}

HTTPAPI fetches the V2 inventory (step_ids/latest/versions/step-info/step.json) over HTTP from a base URL.

func NewHTTPAPI

func NewHTTPAPI(baseURL string, fetcher httpfetch.Client) *HTTPAPI

func (*HTTPAPI) GetAllStepIDs

func (h *HTTPAPI) GetAllStepIDs(ctx context.Context) ([]string, error)

func (*HTTPAPI) GetAllStepVersions

func (h *HTTPAPI) GetAllStepVersions(ctx context.Context, id string) ([]string, error)

func (*HTTPAPI) GetLatestStepVersions

func (h *HTTPAPI) GetLatestStepVersions(ctx context.Context, id string) (steplibindex.LatestPointer, error)

func (*HTTPAPI) GetStepGroupInfo

func (h *HTTPAPI) GetStepGroupInfo(ctx context.Context, id string) (steplibindex.StepInfo, error)

func (*HTTPAPI) GetStepModel

func (h *HTTPAPI) GetStepModel(ctx context.Context, step ResolvedStepVersion) (models.StepModel, error)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL