data

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: BSD-2-Clause Imports: 9 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) DetailDescriptionLiteral added in v0.0.11

func (d Command) DetailDescriptionLiteral() string

func (Command) FullPathLiteral added in v0.0.10

func (d Command) FullPathLiteral() string

func (Command) SimpleDescriptionLiteral added in v0.0.11

func (d Command) SimpleDescriptionLiteral() string

type Data

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

func Construct

func Construct(packageName string, s *schema.Schema) (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) DetailDescriptionLiteral added in v0.0.11

func (d Program) DetailDescriptionLiteral() string

func (Program) FullPathLiteral added in v0.0.10

func (d Program) FullPathLiteral() string

func (Program) SimpleDescriptionLiteral added in v0.0.11

func (d Program) SimpleDescriptionLiteral() 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