api

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2026 License: MPL-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTFEAPI

func NewTFEAPI(
	client tfeClient,
	responder *tfeapi.Responder,
	signer *surl.Signer,
) *tfe

Types

type API

type API struct {
	*tfeapi.Responder
	Client apiClient
	TFEAPI *tfe
}

func (*API) AddHandlers

func (a *API) AddHandlers(r *mux.Router)

type Client

type Client struct {
	*otfhttp.Client
}

func (*Client) CreateStateVersion

func (c *Client) CreateStateVersion(ctx context.Context, opts state.CreateStateVersionOptions) (*state.Version, error)

func (*Client) DeleteStateVersion

func (c *Client) DeleteStateVersion(ctx context.Context, svID resource.TfeID) error

func (*Client) DownloadCurrentState

func (c *Client) DownloadCurrentState(ctx context.Context, workspaceID resource.TfeID) ([]byte, error)

func (*Client) DownloadState

func (c *Client) DownloadState(ctx context.Context, svID resource.TfeID) ([]byte, error)

func (*Client) GetCurrentStateVersion

func (c *Client) GetCurrentStateVersion(ctx context.Context, workspaceID resource.TfeID) (*state.Version, error)

func (*Client) ListStateVersions

func (c *Client) ListStateVersions(ctx context.Context, workspaceID resource.TfeID, opts resource.PageOptions) (*resource.Page[*state.Version], error)

func (*Client) RollbackStateVersion

func (c *Client) RollbackStateVersion(ctx context.Context, svID resource.TfeID) (*state.Version, error)

type StateClient

type StateClient = Client

Alias client to permit embedding it with other clients in a struct without a name clash.

Jump to

Keyboard shortcuts

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