Documentation
¶
Overview ¶
Package mucl provides a parser for the MuCL (Micro Configuration Language) protocol.
Index ¶
- Variables
- type Broker
- type Definition
- type Endpoint
- type EndpointEntry
- type Entry
- type Enum
- type EnumEntry
- type EnumValue
- type Field
- type MServer
- type MapType
- type Message
- type MessageEntry
- type Method
- type Option
- type Protocol
- type Registry
- type Scalar
- type Service
- type ServiceEntry
- type Transport
- type Type
- type Value
Constants ¶
This section is empty.
Variables ¶
View Source
var Parser = participle.MustBuild[Definition](participle.UseLookahead(2))
Functions ¶
This section is empty.
Types ¶
type Definition ¶
func (*Definition) Enums ¶
func (d *Definition) Enums() []*Enum
func (*Definition) Import ¶
func (d *Definition) Import() string
func (*Definition) Messages ¶
func (d *Definition) Messages() []*Message
func (*Definition) Servers ¶
func (d *Definition) Servers() []*Endpoint
func (*Definition) ServiceName ¶
func (d *Definition) ServiceName() string
type Endpoint ¶
type Endpoint struct {
Pos lexer.Position
Name string `"endpoint" @Ident`
Entry []*EndpointEntry `"{" ( @@ ";"? )* "}"`
}
func (*Endpoint) ClientFileName ¶
func (*Endpoint) ClientStructName ¶
func (*Endpoint) DirectoryName ¶
type EndpointEntry ¶
type Enum ¶
type EnumValue ¶
type EnumValue struct {
Pos lexer.Position
Key string `@Ident`
Value int `"=" @( [ "-" ] Int )`
Options []*Option `( "[" @@ ( "," @@ )* "]" )?`
}
func (*EnumValue) ExportedName ¶
type Field ¶
type Field struct {
Pos lexer.Position
Optional bool `( @"optional"`
Required bool ` | @"required"`
Repeated bool ` | @"repeated" )?`
Name string `@Ident`
Type *Type `@@`
Options []*Option `( "[" @@ ( "," @@ )* "]" )?`
}
func (*Field) ExportedName ¶
type Message ¶
type Message struct {
Pos lexer.Position
Name string `"type" @Ident`
Entries []*MessageEntry `"{" @@* "}"`
}
type MessageEntry ¶
type Method ¶
type Service ¶
type Service struct {
Pos lexer.Position
Name string `"service" @Ident`
Entries []*ServiceEntry `"{" @@* "}"`
}
type ServiceEntry ¶
Click to show internal directories.
Click to hide internal directories.