data

package
v1.1.7 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2024 License: BSD-2-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GoType

func GoType(t schema.Type, variadic bool) string

Types

type Argument

type Argument struct {
	Name     name.Path
	Type     schema.Type
	Variadic bool
}

func (Argument) InputFieldName

func (d Argument) InputFieldName() string

func (Argument) InputFieldType

func (d Argument) InputFieldType() string

type Command

type Command struct {
	Name        name.Path
	Options     []Option
	Arguments   []Argument
	Subcommands []Subcommand
	// contains filtered or unexported fields
}

func (Command) CLIFuncMethodChain

func (d Command) CLIFuncMethodChain() string

func (Command) CLIInputStructName

func (d Command) CLIInputStructName() string

func (Command) CLIStructName

func (d Command) CLIStructName() string

func (Command) DocText added in v1.0.0

func (d Command) DocText() string

func (Command) FullPathLiteral added in v0.0.10

func (d Command) FullPathLiteral() string

type Data

type Data struct {
	Package          string
	Generator        string
	GeneratorVersion string
	SchemaYAML       string
	Program          Program
	Commands         []Command
}

func Construct

func Construct(s *schema.Schema, generatorName, generatorVersion string, packageName string) (Data, error)

type Option

type Option struct {
	Name    name.Path
	Short   name.Path
	Type    schema.Type
	Default string
}

func (Option) DefaultLiteral

func (d Option) DefaultLiteral() string

func (Option) InputFieldName

func (d Option) InputFieldName() string

func (Option) InputFieldType

func (d Option) InputFieldType() string

func (Option) NameLiteral

func (d Option) NameLiteral() string

func (Option) ShortNameLiteral

func (d Option) ShortNameLiteral() string

type Program

type Program struct {
	Name        name.Path
	Version     string
	Options     []Option
	Arguments   []Argument
	Subcommands []Subcommand
	// contains filtered or unexported fields
}

func (Program) CLIFuncMethodChain

func (d Program) CLIFuncMethodChain() string

func (Program) CLIInputStructName

func (d Program) CLIInputStructName() string

func (Program) CLIStructName

func (d Program) CLIStructName() string

func (Program) DocText added in v1.0.0

func (d Program) DocText() string

func (Program) FullPathLiteral added in v0.0.10

func (d Program) FullPathLiteral() string

type Subcommand

type Subcommand struct {
	Name name.Path
}

func (Subcommand) SubcommandFieldName

func (d Subcommand) SubcommandFieldName() string

func (Subcommand) SubcommandFieldType

func (d Subcommand) SubcommandFieldType() string

Jump to

Keyboard shortcuts

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