api

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2026 License: MPL-2.0 Imports: 27 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package api implements the tfctl CLI API command.

Index

Constants

View Source
const (
	// MaxPaginateRecords is the maximum number of records that will be returned
	// when using the --paginate argument, regardless of how many records are available.
	MaxPaginateRecords = 2000
)

Variables

This section is empty.

Functions

func NewCmdAPI

func NewCmdAPI(inv *cmd.Invocation) *cmd.Command

NewCmdAPI creates the `api` command.

func NewCmdAPISchema

func NewCmdAPISchema(inv *cmd.Invocation) *cmd.Command

NewCmdAPISchema creates the api schema command group.

func RunAPI

func RunAPI(ctx context.Context, opts *Opts) error

RunAPI executes a low-level API request with the given options.

Types

type Opts

type Opts struct {
	IO           iostreams.IOStreams
	Output       *format.Outputter
	Client       *client.Client
	Quiet        bool
	DryRun       bool
	Headers      []string
	URL          *url.URL
	Attributes   map[string]string
	Query        map[string]string
	PathParams   map[string]string
	InputRequest string
	Method       string
	ResourceType string
	All          bool
	PageSize     int
	PageNumber   int

	// Authorizer, when set, can permit a noninteractive DELETE based on an
	// active exec session. Nil in tests that don't exercise session behavior.
	Authorizer execsession.Authorizer
}

Opts stores the options parsed from flags for the API command.

func NewOpts

func NewOpts(io iostreams.IOStreams, output *format.Outputter, apiClient *client.Client) *Opts

NewOpts creates an Opts with required context fields set and nil-dangerous maps/slices initialized to empty values.

type SchemaSearchResultsDisplayer

type SchemaSearchResultsDisplayer struct {
	// contains filtered or unexported fields
}

SchemaSearchResultsDisplayer is the displayer for schema search results.

func (SchemaSearchResultsDisplayer) DefaultFormat

func (d SchemaSearchResultsDisplayer) DefaultFormat() format.Format

DefaultFormat implements the Displayer interface.

func (SchemaSearchResultsDisplayer) FieldTemplates

func (d SchemaSearchResultsDisplayer) FieldTemplates() []format.Field

FieldTemplates implements the Displayer interface.

func (SchemaSearchResultsDisplayer) Payload

func (d SchemaSearchResultsDisplayer) Payload() any

Payload implements the Displayer interface.

Jump to

Keyboard shortcuts

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