resources

package
v1.12.1 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2025 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddAllResourceCmds

func AddAllResourceCmds(
	rootCmd *cobra.Command,
	client resources.Client,
	analyticsTrackerFn analytics.TrackerFn,
)

func NewOperationCmd

func NewOperationCmd(
	parentCmd *cobra.Command,
	client resources.Client,
	markdownRenderer *glamour.TermRenderer,
	op OperationData,
) *cobra.Command

func NewResourceCmd

func NewResourceCmd(
	parentCmd *cobra.Command,
	analyticsTrackerFn analytics.TrackerFn,
	markdownRenderer *glamour.TermRenderer,
	resourceName, longDescription string,
) *cobra.Command

func NewResources

func NewResources(tags openapi3.Tags) map[string]ResourceData

func NewResourcesCmd

func NewResourcesCmd() *cobra.Command

func SubcommandUsageTemplate

func SubcommandUsageTemplate() string

Types

type OperationCmd

type OperationCmd struct {
	OperationData
	// contains filtered or unexported fields
}

type OperationData

type OperationData struct {
	Short                 string
	Long                  string
	Use                   string
	Params                []Param
	HTTPMethod            string
	HasBody               bool
	IsBeta                bool
	RequiresBody          bool
	Path                  string
	SupportsSemanticPatch bool
}

type Param

type Param struct {
	Name        string
	In          string
	Description string
	Type        string
	Required    bool
}

type ResourceData

type ResourceData struct {
	GoName      string
	DisplayName string
	Description string
	Operations  map[string]OperationData
}

func NewResourceData

func NewResourceData(tag openapi3.Tag) ResourceData

type TemplateData

type TemplateData struct {
	Resources map[string]ResourceData
}

func GetTemplateData

func GetTemplateData(fileName string) (TemplateData, error)

Jump to

Keyboard shortcuts

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