cli

package
v0.0.0-...-908e76c Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Plugin

type Plugin struct {
	core.Plugin
}

Plugin is a protoc plugin to generate cli code.

func NewPlugin

func NewPlugin() *Plugin

NewPlugin returns a new Plugin with stdin and stdout.

type RequestMessageDescriptor

type RequestMessageDescriptor struct {

	// StringFlags is a list of string flags.
	StringFlags []*v1.Flag
	// Int32Flags is a list of number flags.
	Int32Flags []*v1.Flag
	// EnumFlags is a list of enum flags.
	EnumFlags []*v1.EnumFlag
	// Message is a construct of a request message.
	Message *v1.RequestMessage
	// contains filtered or unexported fields
}

RequestMessageDescriptor describes a construct of a request message from a proto file. It describes relationships between flags and a request message.

func (*RequestMessageDescriptor) RequestMessage

func (r *RequestMessageDescriptor) RequestMessage(typ string, withName bool, withPath bool) (*RequestMessageDescriptor, error)

RequestMessage returns a request message descriptor. It sets and returns itself.

typ is a type of the request message. It is resolved in the same way as FieldDescriptorProto.type_name, but must refer to a message type. (e.g. ".com.example.FooRequest")

Jump to

Keyboard shortcuts

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