commandsmd

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package commandsmd is built to read the markdown format described in temporalcli/commands.md and generate code from it.

Index

Constants

This section is empty.

Variables

View Source
var CommandsMarkdown []byte

Functions

func GenerateCommandsCode

func GenerateCommandsCode(pkg string, commands []*Command) ([]byte, error)

Types

type Command

type Command struct {
	FullName        string
	NamePath        []string
	UseSuffix       string
	Short           string
	LongPlain       string
	LongHighlighted string
	LongMarkdown    string
	OptionsSets     []CommandOptions
	HasInit         bool
	ExactArgs       int
	MaximumArgs     int
}

func ParseMarkdownCommands

func ParseMarkdownCommands() ([]*Command, error)

type CommandOption

type CommandOption struct {
	Name         string
	Alias        string
	DataType     string
	Desc         string
	Required     bool
	DefaultValue string
	EnumValues   []string
	EnvVar       string
}

type CommandOptions

type CommandOptions struct {
	SetName            string
	Options            []CommandOption
	IncludeOptionsSets []string
}

Jump to

Keyboard shortcuts

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