program

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2023 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Usage added in v0.3.0

func Usage(errMsg string) error

Types

type Config added in v0.3.0

type Config struct {
	ProtoFiles  *protoregistry.Files
	ProtoTypes  *protoregistry.Types
	File        string
	Entrypoint  string
	Vars        starlark.StringDict
	Interactive bool
	OutputType  OutputType
	Marshaler   func(m protoreflect.ProtoMessage) ([]byte, error)
}

func NewConfig added in v0.4.0

func NewConfig() *Config

func (*Config) ParseArgs added in v0.4.0

func (cfg *Config) ParseArgs(args []string) error

type OutputType added in v0.3.0

type OutputType string
const (
	OutputJson       OutputType = "json"
	OutputStableJson OutputType = "stablejson"
	OutputProto      OutputType = "proto"
	OutputText       OutputType = "text"
	OutputYaml       OutputType = "yaml"
)

type Program added in v0.2.0

type Program struct {
	// contains filtered or unexported fields
}

func NewProgram added in v0.2.0

func NewProgram(cfg *Config, loadOptions ...skycfg.LoadOption) (*Program, error)

func (*Program) Exec added in v0.3.0

func (p *Program) Exec() ([]protoreflect.ProtoMessage, error)

func (*Program) Format added in v0.4.0

func (p *Program) Format(msgs ...protoreflect.ProtoMessage) error

func (*Program) REPL added in v0.3.0

func (p *Program) REPL()

func (*Program) Run added in v0.3.0

func (p *Program) Run(options ...skycfg.ExecOption) error

Jump to

Keyboard shortcuts

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