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: 18 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,
	authorizer *authz.Authorizer,
) *tfe

Types

type API

type API struct {
	*tfeapi.Responder
	Client apiClient
}

func (*API) AddHandlers

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

type Client

type Client struct {
	*otfhttp.Client
}

func (*Client) GetWorkspace

func (c *Client) GetWorkspace(ctx context.Context, workspaceID resource.TfeID) (*workspace.Workspace, error)

func (*Client) GetWorkspaceByName

func (c *Client) GetWorkspaceByName(ctx context.Context, organization organization.Name, name string) (*workspace.Workspace, error)

func (*Client) ListWorkspaces

func (c *Client) ListWorkspaces(ctx context.Context, opts workspace.ListOptions) (*resource.Page[*workspace.Workspace], error)

func (*Client) Lock

func (c *Client) Lock(ctx context.Context, workspaceID resource.TfeID, runID *resource.TfeID) (*workspace.Workspace, error)

func (*Client) Unlock

func (c *Client) Unlock(ctx context.Context, workspaceID resource.TfeID, runID *resource.TfeID, force bool) (*workspace.Workspace, error)

func (*Client) UpdateWorkspace

func (c *Client) UpdateWorkspace(ctx context.Context, workspaceID resource.TfeID, opts workspace.UpdateOptions) (*workspace.Workspace, error)

type WorkspaceClient

type WorkspaceClient = 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