proto

package
v0.5.9 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrepareOptions added in v0.3.0

func PrepareOptions(options orderedmap.OrderedMap[string, interface{}]) map[string]Option

Types

type ConstValue added in v0.5.6

type ConstValue string

type Enum added in v0.3.0

type Enum struct {
	Name   gds.String
	Values []string
	// contains filtered or unexported fields
}

func NewEnum added in v0.3.0

func NewEnum(name gds.String, valuesCount int) *Enum

func NewEnumWithValues added in v0.3.0

func NewEnumWithValues(name gds.String, values []string) *Enum

func (*Enum) AddValue added in v0.3.0

func (e *Enum) AddValue(value ...string)

type Field

type Field struct {
	Repeated   bool
	TopComment string
	Type       string
	Name       string
	ID         int
	Options    []*FieldOption
}

type FieldOption added in v0.5.5

type FieldOption struct {
	Name  string
	Value interface{}
}

type File

type File struct {
	Package  string
	Services []*Service
	Messages []*Message
	Enums    []*Enum
	Imports  *gds.Set[string]
	Options  map[string]Option
}

func (*File) Render added in v0.5.5

func (f *File) Render(indent *iox.Indent) string

type Message

type Message struct {
	Name       string
	TopComment string
	Fields     []*Field
}

type Option added in v0.3.0

type Option struct {
	Value  string
	Quotes bool
}

type Service

type Service struct {
	Name       string
	Procedures []*ServiceProcedure

	CommentTop string
}

type ServiceProcedure

type ServiceProcedure struct {
	Name    string
	Param   string
	Returns string
	Options []*ServiceProcedureOption

	CommentTop string
}

type ServiceProcedureOption added in v0.5.5

type ServiceProcedureOption struct {
	Name   string
	Params map[string]string
}

Directories

Path Synopsis
opts

Jump to

Keyboard shortcuts

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