proto

package
v0.5.5 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2025 License: MIT Imports: 7 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 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
	Type     string
	Name     string
	ID       int
	Options  []*FieldOption
}

func (*Field) Clone added in v0.5.5

func (f *Field) Clone() *Field

type FieldOption added in v0.5.5

type FieldOption struct {
	Name  string
	Value string
}

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 *indentx.Indent) string

type Message

type Message struct {
	Name   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