api

package
v0.2.0 Latest Latest
Warning

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

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

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
}

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