ast

package
v0.30.4 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2022 License: MIT Imports: 12 Imported by: 1

Documentation ΒΆ

Index ΒΆ

Constants ΒΆ

This section is empty.

Variables ΒΆ

This section is empty.

Functions ΒΆ

func CheckOption ΒΆ added in v0.30.1

func CheckOption(bearer OptionsBearer, optName string) *optChecker

func Equal ΒΆ

func Equal(x, y Unique) bool

Equal ΠΏΡ€ΠΎΠ²Π΅Ρ€ΠΊΠ° равСнства Π½ΠΎΠ΄ Unique

func FieldIndex ΒΆ

func FieldIndex(f Field) int

FieldIndex Π²ΠΎΠ·Π²Ρ€Π°Ρ‰Π°Π΅Ρ‚ индСкс поля

func FieldName ΒΆ

func FieldName(f Field) string

FieldName Π²ΠΎΠ·Π²Ρ€Π°Ρ‰Π°Π΅Ρ‚ Π½Π°Π·Π²Π°Π½ΠΈΠ΅ поля

func GetFieldKey ΒΆ

func GetFieldKey(k Unique, fieldAddr interface{}) string

GetFieldKey ΠΏΠΎΠ»ΡƒΡ‡Π°Π΅Ρ‚ ΠΊΠ»ΡŽΡ‡ для поля Π΄Π°Π½Π½ΠΎΠ³ΠΎ k

func GetUnique ΒΆ

func GetUnique(k Unique) string

GetUnique ΠΏΠΎΠ»ΡƒΡ‡Π°Π΅Ρ‚ ΠΊΠ»ΡŽΡ‡ для Π΄Π°Π½Π½ΠΎΠ³ΠΎ k

func IsErrorTypeNotFound ΒΆ

func IsErrorTypeNotFound(err error) bool

IsErrorTypeNotFound ΠΏΡ€ΠΎΠ²Π΅Ρ€ΠΊΠ°, Ρ‡Ρ‚ΠΎ данная ошибка являСтся ΠΎΠ±Ρ‘Ρ€Ρ‚ΠΊΠΎΠΉ для ErrorTypeNotFound

func SamePrimitive ΒΆ

func SamePrimitive(x, y Type) bool

SamePrimitive ΠΏΡ€ΠΎΠ²Π΅Ρ€ΠΊΠ° равСнства ΠΏΡ€ΠΈΠΌΠΈΡ‚ΠΈΠ²Π½Ρ‹Ρ… Ρ‚ΠΈΠΏΠΎΠ²

func SetUnique ΒΆ

func SetUnique(k Unique, ctx UniqueContext)

SetUnique устанавливаСт ΡƒΠ½ΠΈΠΊΠ°Π»ΡŒΠ½ΠΎΠ΅ Π² Ρ€Π°ΠΌΠΊΠ°Ρ… UniqueContext Π·Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ для Π΄Π°Π½Π½ΠΎΠ³ΠΎ Unique

Types ΒΆ

type Any ΒΆ

type Any struct {
	File *File
	// contains filtered or unexported fields
}

Any прСдставлСниС Ρ‚ΠΈΠΏΠ° golang.protobuf.Any

func (*Any) GetFullName ΒΆ added in v0.30.3

func (*Any) GetFullName() string

func (*Any) GetName ΒΆ added in v0.30.3

func (*Any) GetName() string

type ArrayOption ΒΆ

type ArrayOption struct {
	Value []OptionValue
	// contains filtered or unexported fields
}

ArrayOption branch of OptionValue

type Bool ΒΆ

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

Bool прСдставлСниС булСвского Ρ‚ΠΈΠΏΠ°

func (*Bool) GetFullName ΒΆ added in v0.30.3

func (*Bool) GetFullName() string

func (*Bool) GetName ΒΆ added in v0.30.3

func (*Bool) GetName() string

type BoolOption ΒΆ

type BoolOption struct {
	Value bool
	// contains filtered or unexported fields
}

BoolOption branch of OptionValue

func (*BoolOption) GetValue ΒΆ added in v0.30.2

func (o *BoolOption) GetValue() interface{}

func (*BoolOption) String ΒΆ

func (o *BoolOption) String() string

type Bytes ΒΆ

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

Bytes прСдставлСниС Ρ‚ΠΈΠΏΠ° bytes

func (*Bytes) GetFullName ΒΆ added in v0.30.3

func (*Bytes) GetFullName() string

func (*Bytes) GetName ΒΆ added in v0.30.3

func (*Bytes) GetName() string

type Comment ΒΆ

type Comment struct {
	Value string
	Lines []string
	// contains filtered or unexported fields
}

Comment прСдставлСниС коммСнтария

func (*Comment) GetLines ΒΆ added in v0.30.1

func (c *Comment) GetLines() []string

func (*Comment) GetValue ΒΆ added in v0.30.1

func (c *Comment) GetValue() string

type Commented ΒΆ added in v0.30.1

type Commented interface {
	GetComment() *Comment
}

type Compound ΒΆ added in v0.30.1

type Compound interface {
	Named
	GetParentMsg() *Message
}

Compound Ρ‚ΠΈΠΏΡ‹, входящиС Π² состав Π΄Ρ€ΡƒΠ³ΠΈΡ… Ρ‚ΠΈΠΏΠΎΠ².

type EmbeddedOption ΒΆ

type EmbeddedOption struct {
	Value string
	// contains filtered or unexported fields
}

EmbeddedOption прСдставлСниС встроСнной ΠΎΠΏΡ†ΠΈΠΈ

func (*EmbeddedOption) GetValue ΒΆ added in v0.30.1

func (o *EmbeddedOption) GetValue() interface{}

type Enum ΒΆ

type Enum struct {
	File      *File
	ParentMsg *Message

	Name    string
	Comment *Comment
	Options []*Option
	Values  []*EnumValue
	// contains filtered or unexported fields
}

Enum прСдставлСниС Ρ‚ΠΈΠΏΠ° enum

func (*Enum) GetComment ΒΆ added in v0.30.1

func (e *Enum) GetComment() *Comment

func (*Enum) GetFullName ΒΆ added in v0.30.3

func (e *Enum) GetFullName() string

func (*Enum) GetName ΒΆ

func (e *Enum) GetName() string

func (*Enum) String ΒΆ

func (e *Enum) String() string

Enum рСфСрСнс-имя пСрСчислСния, Π²ΠΊΠ»ΡŽΡ‡Π°Π΅Ρ‚ Π² сСбя Π½Π°Π·Π²Π°Π½ΠΈΠ΅ ΠΏΠ°ΠΊΠ΅Ρ‚Π°, ΠΈΠΌΠ΅Π½Π° Ρ€ΠΎΠ΄ΠΈΡ‚Π΅Π»ΡŒΡΠΊΠΈΡ… сообщСний, Π² пространствС ΠΈΠΌΡ‘Π½ ΠΊΠΎΡ‚ΠΎΡ€Ρ‹Ρ… ΠΎΠ½ΠΎ ΠΎΠΏΡ€Π΅Π΄Π΅Π»Π΅Π½ΠΎ.

type EnumOption ΒΆ

type EnumOption struct {
	Value *EnumValue
	// contains filtered or unexported fields
}

EnumOption прСдставлСниС ΠΎΠΏΡ†ΠΈΠΉ Ρ‚ΠΈΠΏΠ° Enum

func (*EnumOption) GetValue ΒΆ added in v0.30.1

func (o *EnumOption) GetValue() interface{}

type EnumValue ΒΆ

type EnumValue struct {
	Name    string
	Comment *Comment
	Integer int
	Options []*Option
	// contains filtered or unexported fields
}

EnumValue прСдставлСниС поля для Enum-Π°

func (*EnumValue) GetComment ΒΆ added in v0.30.1

func (e *EnumValue) GetComment() *Comment

func (*EnumValue) GetFullName ΒΆ added in v0.30.3

func (e *EnumValue) GetFullName() string

func (*EnumValue) GetName ΒΆ

func (e *EnumValue) GetName() string

type ErrorPackageMissingFiles ΒΆ

type ErrorPackageMissingFiles struct{}

ErrorPackageMissingFiles ошибка ΡƒΠΊΠ°Π·Ρ‹Π²Π°ΡŽΡ‰Π°Ρ Π½Π° отсутствиС proto-Ρ„Π°ΠΉΠ»ΠΎΠ² Π² ΠΏΠ°ΠΊΠ΅Ρ‚Π΅

func (ErrorPackageMissingFiles) Error ΒΆ

type ErrorTypeNotFound ΒΆ

type ErrorTypeNotFound string

ErrorTypeNotFound ошибка возвращаСмая Ссли Ρ‚ΠΈΠΏ Π½Π΅ Π±Ρ‹Π» Π½Π°ΠΉΠ΄Π΅Π½

func (ErrorTypeNotFound) Error ΒΆ

func (e ErrorTypeNotFound) Error() string

type Extension ΒΆ

type Extension struct {
	File      *File
	ParentMsg *Message

	Name   string
	Fields []*ExtensionField
	Types  []Type
	// contains filtered or unexported fields
}

Extension прСдставлСниС extension

func MessageToExtension ΒΆ

func MessageToExtension(msg *Message) *Extension

MessageToExtension ΠΊΠΎΠΏΠΈΡ€ΡƒΠ΅Ρ‚ Message Π² Extension с сохранСниСм всСй ΠΈΠ½Ρ„ΠΎΡ€ΠΌΠ°Ρ†ΠΈΠΈ

type ExtensionField ΒΆ

type ExtensionField struct {
	Name     string
	Sequence int
	Type     Type
	Options  []*Option
	// contains filtered or unexported fields
}

ExtensionField прСдставлСниС поля extension-Π°

type Field ΒΆ

type Field interface {
	Unique
	Named
	Commented
	OptionsBearer
	// contains filtered or unexported methods
}

Field прСдставлСниС сущности ΡΠ²Π»ΡΡŽΡ‰Π΅ΠΉΡΡ ΠΏΠΎΠ»Π΅ΠΌ сообщСния. Π­Ρ‚ΠΎ ΠΌΠΎΠΆΠ΅Ρ‚ Π±Ρ‹Ρ‚ΡŒ ΠΊΠ°ΠΊ нСпосрСдствСнно ΠΏΠΎΠ»Π΅, Ρ‚Π°ΠΊ ΠΈ Π²Π΅Ρ‚Π²ΡŒ oneof-Π°

type File ΒΆ

type File struct {
	Name    string
	Package string
	Syntax  string

	Imports    []*Import
	Types      []Type
	Extensions []*Extension
	Services   []*Service
	Options    []*Option

	GoPath string
	GoPkg  string
	// contains filtered or unexported fields
}

File прСдставлСниС для Ρ„Π°ΠΉΠ»Π°

func (*File) Enum ΒΆ

func (f *File) Enum(name string) (*Enum, error)

Enum поиск пСрСчислСния ΠΏΠΎ ΠΈΠΌΠ΅Π½ΠΈ Π’ΠΎΠ·Π²Ρ€Π°Ρ‰Π°Π΅Ρ‚ ΠΎΡˆΠΈΠ±ΠΊΡƒ ErrorTypeNotFound Ссли Ρ‚Π°ΠΊΠΎΠΉ Ρ‚ΠΈΠΏ с Ρ‚Π°ΠΊΠΈΠΌ ΠΈΠΌΠ΅Π½Π΅ΠΌ Π½Π΅ Π½Π°ΠΉΠ΄Π΅Π½.

func (*File) GetOptions ΒΆ added in v0.30.1

func (f *File) GetOptions() []*Option

func (*File) Message ΒΆ

func (f *File) Message(name string) (*Message, error)

Message поиск структуры ΠΏΠΎ ΠΈΠΌΠ΅Π½ΠΈ. Π’ΠΎΠ·Π²Ρ€Π°Ρ‰Π°Π΅Ρ‚ ΠΎΡˆΠΈΠ±ΠΊΡƒ ErrorTypeNotFound Ссли Ρ‚Π°ΠΊΠΎΠΉ Ρ‚ΠΈΠΏ с Ρ‚Π°ΠΊΠΈΠΌ ΠΈΠΌΠ΅Π½Π΅ΠΌ Π½Π΅ Π½Π°ΠΉΠ΄Π΅Π½.

func (*File) ScanTypes ΒΆ

func (f *File) ScanTypes(inspector func(typ Type) bool)

ScanTypes ΠΏΡ€ΠΎΠ±Π΅ΠΆΠΊΠ° ΠΏΠΎ Ρ‚ΠΈΠΏΠ°ΠΌ Π΄Π°Π½Π½ΠΎΠ³ΠΎ ΠΏΠ°ΠΊΠ΅Ρ‚Π°

func (*File) Service ΒΆ

func (f *File) Service(name string) *Service

Service поиск сСрвиса ΠΏΠΎ ΠΈΠΌΠ΅Π½ΠΈ

func (*File) Type ΒΆ

func (f *File) Type(name string) Type

Type поиск Ρ‚ΠΈΠΏΠ° ΠΏΠΎ ΠΈΠΌΠ΅Π½ΠΈ.

type FileManager ΒΆ

type FileManager interface {
	// Create Π²ΠΎΠ·Π²Ρ€Π°Ρ‰Π°Π΅ΠΌ ΠΏΠ°Ρ€Ρƒ writer ΠΈ Ρ„ΡƒΠ½ΠΊΡ†ΠΈΡŽ закрытия Ρ„Π°ΠΉΠ»Π° вмСсто ΠΎΠ΄Π½ΠΎΠ³ΠΎ io.WriteClose для удобства Π² тСстах
	// Плюс, этот интСрфСйс Π±ΡƒΠ΄Π΅Ρ‚ ΠΈΡΠΏΠΎΠ»ΡŒΠ·ΠΎΠ²Π°Ρ‚ΡŒΡΡ Ρ‚ΠΎΠ»ΡŒΠΊΠΎ Π²Π½ΡƒΡ‚Ρ€ΠΈ прилоТСния
	Create(name string) (writer io.Writer, closer func() error, err error)
}

FileManager Ρ€Π°Π±ΠΎΡ‚Π° с записываСмыми Ρ„Π°ΠΉΠ»Π°ΠΌΠΈ

func NewFileManager ΒΆ

func NewFileManager(root string) FileManager

NewFileManager рСализация управлСния Ρ„Π°ΠΉΠ»Π°ΠΌΠΈ Π½Π° ΡƒΡ€ΠΎΠ²Π½Π΅ Ρ„Π°ΠΉΠ»ΠΎΠ²ΠΎΠΉ систСмы

type Fixed32 ΒΆ

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

Fixed32 прСдставлСниС Ρ‚ΠΈΠΏΠ° fixed32

func (*Fixed32) GetFullName ΒΆ added in v0.30.3

func (*Fixed32) GetFullName() string

func (*Fixed32) GetName ΒΆ added in v0.30.3

func (*Fixed32) GetName() string

type Fixed64 ΒΆ

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

Fixed64 прСдставлСниС Ρ‚ΠΈΠΏΠ° fixed64

func (*Fixed64) GetFullName ΒΆ added in v0.30.3

func (*Fixed64) GetFullName() string

func (*Fixed64) GetName ΒΆ added in v0.30.3

func (*Fixed64) GetName() string

type Float32 ΒΆ

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

Float32 прСдставлСниС Ρ‚ΠΈΠΏΠ° float

func (*Float32) GetFullName ΒΆ added in v0.30.3

func (*Float32) GetFullName() string

func (*Float32) GetName ΒΆ added in v0.30.3

func (*Float32) GetName() string

type Float64 ΒΆ

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

Float64 прСдставлСниС Ρ‚ΠΈΠΏΠ° double

func (*Float64) GetFullName ΒΆ added in v0.30.3

func (*Float64) GetFullName() string

func (*Float64) GetName ΒΆ added in v0.30.3

func (*Float64) GetName() string

type FloatOption ΒΆ

type FloatOption struct {
	Value float64
	// contains filtered or unexported fields
}

FloatOption branch of OptionValue

func (*FloatOption) GetValue ΒΆ added in v0.30.1

func (o *FloatOption) GetValue() interface{}

func (*FloatOption) String ΒΆ

func (o *FloatOption) String() string

type Hashable ΒΆ

type Hashable interface {
	ScalarNode
	// contains filtered or unexported methods
}

Hashable Ρ‚ΠΈΠΏΡ‹ ΠΌΠΎΠ³ΡƒΡ‰ΠΈΠ΅ ΡΠ²Π»ΡΡ‚ΡŒΡΡ ΠΊΠ»ΡŽΡ‡Π°ΠΌΠΈ словарСй

type Import ΒΆ

type Import struct {
	Path string
	File *File
	// contains filtered or unexported fields
}

Import прСдставлСниС для ΠΈΠΌΠΏΠΎΡ€Ρ‚ΠΎΠ²

type Int32 ΒΆ

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

Int32 прСдставлСниС Ρ‚ΠΈΠΏΠ° int32

func (*Int32) GetFullName ΒΆ added in v0.30.3

func (*Int32) GetFullName() string

func (*Int32) GetName ΒΆ added in v0.30.3

func (*Int32) GetName() string

type Int64 ΒΆ

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

Int64 прСдставлСниС Ρ‚ΠΈΠΏΠ° int64

func (*Int64) GetFullName ΒΆ added in v0.30.3

func (*Int64) GetFullName() string

func (*Int64) GetName ΒΆ added in v0.30.3

func (*Int64) GetName() string

type IntOption ΒΆ

type IntOption struct {
	Value int64
	// contains filtered or unexported fields
}

IntOption branch of OptionValue

func (*IntOption) GetValue ΒΆ added in v0.30.1

func (o *IntOption) GetValue() interface{}

func (*IntOption) String ΒΆ

func (o *IntOption) String() string

type Map ΒΆ

type Map struct {
	KeyType   Hashable
	ValueType Type
	// contains filtered or unexported fields
}

Map прСдставлСниС Ρ‚ΠΈΠΏΠ° map<KeyType, ValueType>

type MapOption ΒΆ

type MapOption struct {
	Value map[string]OptionValue
	// contains filtered or unexported fields
}

MapOption branch of OptionValue

type Message ΒΆ

type Message struct {
	File      *File
	ParentMsg *Message

	Name    string
	Comment *Comment
	Fields  []*MessageField
	Types   []Type
	Options []*Option
	// contains filtered or unexported fields
}

Message прСдставлСниС message

func (*Message) AllFields ΒΆ

func (m *Message) AllFields() []Field

AllFields Π²ΠΎΠ·Π²Ρ€Π°Ρ‰Π°Π΅Ρ‚ поля ΠΈ Π²Π΅Ρ‚Π²ΠΈ oneof Π΄Π°Π½Π½ΠΎΠ³ΠΎ сообщСния Π΅Π΄ΠΈΠ½Ρ‹ΠΌ списком

func (*Message) Enum ΒΆ

func (m *Message) Enum(name string) (*Enum, error)

Enum поиск Π²Π»ΠΎΠΆΠ΅Π½Π½ΠΎΠ³ΠΎ пСрСчислСния ΠΏΠΎ ΠΈΠΌΠ΅Π½ΠΈ. Π’ΠΎΠ·Π²Ρ€Π°Ρ‰Π°Π΅Ρ‚ ΠΎΡˆΠΈΠ±ΠΊΡƒ ErrorTypeNotFound Ссли Ρ‚Π°ΠΊΠΎΠΉ Ρ‚ΠΈΠΏ с Ρ‚Π°ΠΊΠΈΠΌ ΠΈΠΌΠ΅Π½Π΅ΠΌ Π½Π΅ Π½Π°ΠΉΠ΄Π΅Π½.

func (*Message) Field ΒΆ

func (m *Message) Field(name string) *MessageField

Field Π²ΠΎΠ·Π²Ρ€Π°Ρ‰Π°Π΅Ρ‚ ΠΏΠΎΠ»Π΅ мСссадТа ΠΏΠΎ ΠΈΠΌΠ΅Π½ΠΈ. НС ΠΏΡ€ΠΎΠΈΠ·Π²ΠΎΠ΄ΠΈΡ‚ Π½ΠΎΡ€ΠΌΠ°Π»ΠΈΠ·Π°Ρ†ΠΈΠΈ ΠΏΠΎ oneof-Π°ΠΌ.

func (*Message) FieldOneof ΒΆ

func (m *Message) FieldOneof(name string) Field

FieldOneof Π²ΠΎΠ·Π²Ρ€Π°Ρ‰Π°Π΅Ρ‚ ΠΏΠΎΠ»Π΅ мСссадТа ΠΏΠΎ ΠΈΠΌΠ΅Π½ΠΈ, ΠΏΡ€ΠΈ этом Π·Π°Π»Π΅Π·Π°Π΅Ρ‚, Ссли Π½ΡƒΠΆΠ½ΠΎ, Π²Π½ΡƒΡ‚Ρ€ΡŒ oneof-Π°

func (*Message) GetComment ΒΆ added in v0.30.1

func (m *Message) GetComment() *Comment

func (*Message) GetFullName ΒΆ added in v0.30.3

func (m *Message) GetFullName() string

func (*Message) GetName ΒΆ

func (m *Message) GetName() string

func (*Message) GetOptions ΒΆ added in v0.30.1

func (m *Message) GetOptions() []*Option

func (*Message) GetParentMsg ΒΆ

func (m *Message) GetParentMsg() *Message

func (*Message) Message ΒΆ

func (m *Message) Message(name string) (*Message, error)

Message поиск подструктуры ΠΏΠΎ ΠΈΠΌΠ΅Π½ΠΈ. Π’ΠΎΠ·Π²Ρ€Π°Ρ‰Π°Π΅Ρ‚ ΠΎΡˆΠΈΠ±ΠΊΡƒ ErrorTypeNotFound Ссли Ρ‚Π°ΠΊΠΎΠΉ Ρ‚ΠΈΠΏ с Ρ‚Π°ΠΊΠΈΠΌ ΠΈΠΌΠ΅Π½Π΅ΠΌ Π½Π΅ Π½Π°ΠΉΠ΄Π΅Π½.

func (*Message) ScanTypes ΒΆ

func (m *Message) ScanTypes(inspector func(typ Type) bool)

ScanTypes ΠΏΡ€ΠΎΠ±Π΅ΠΆΠΊΠ° ΠΏΠΎ Π²Π½ΡƒΡ‚Ρ€Π΅Π½Π½ΠΈΠΌ Ρ‚ΠΈΠΏΠ°ΠΌ Π΄Π°Π½Π½ΠΎΠΉ структуры

func (*Message) String ΒΆ

func (m *Message) String() string

String рСфСрСнс-имя сообщСния, Π²ΠΊΠ»ΡŽΡ‡Π°Π΅Ρ‚ Π² сСбя Π½Π°Π·Π²Π°Π½ΠΈΠ΅ ΠΏΠ°ΠΊΠ΅Ρ‚Π°, ΠΈΠΌΠ΅Π½Π° Ρ€ΠΎΠ΄ΠΈΡ‚Π΅Π»ΡŒΡΠΊΠΈΡ… сообщСний, Π² пространствС ΠΈΠΌΡ‘Π½ ΠΊΠΎΡ‚ΠΎΡ€Ρ‹Ρ… ΠΎΠ½ΠΎ ΠΎΠΏΡ€Π΅Π΄Π΅Π»Π΅Π½ΠΎ.

func (*Message) Type ΒΆ

func (m *Message) Type(name string) Type

Type поиск ΠΏΠΎΠ΄Ρ‚ΠΈΠΏΠ° ΠΏΠΎ ΠΈΠΌΠ΅Π½ΠΈ

type MessageField ΒΆ

type MessageField struct {
	Name     string
	Comment  *Comment
	Sequence int
	Type     Type
	Options  []*Option
	// contains filtered or unexported fields
}

MessageField прСдставлСниС поля message-Π°

func (*MessageField) GetComment ΒΆ added in v0.30.1

func (m *MessageField) GetComment() *Comment

func (*MessageField) GetFullName ΒΆ added in v0.30.3

func (m *MessageField) GetFullName() string

func (*MessageField) GetName ΒΆ added in v0.30.1

func (m *MessageField) GetName() string

func (*MessageField) GetOptions ΒΆ added in v0.30.1

func (m *MessageField) GetOptions() []*Option

type Method ΒΆ

type Method struct {
	File    *File
	Service *Service

	Name    string
	Comment *Comment
	Input   Type
	Output  Type

	Options []*Option
	// contains filtered or unexported fields
}

Method прСдставлСниС для ΠΌΠ΅Ρ‚ΠΎΠ΄Π°

func (*Method) GetComment ΒΆ added in v0.30.1

func (m *Method) GetComment() *Comment

func (*Method) GetFullName ΒΆ added in v0.30.3

func (m *Method) GetFullName() string

func (*Method) GetMethodType ΒΆ added in v0.30.4

func (m *Method) GetMethodType() MethodType

GetMethodType Π²ΠΎΠ·Π²Ρ€Π°Ρ‰Π°Π΅Ρ‚ Ρ‚ΠΈΠΏ ΠΌΠ΅Ρ‚ΠΎΠ΄Π°.

func (*Method) GetName ΒΆ

func (m *Method) GetName() string

func (*Method) GetOptions ΒΆ added in v0.30.1

func (m *Method) GetOptions() []*Option

func (*Method) InputMessage ΒΆ

func (m *Method) InputMessage() *Message

InputMessage Π²ΠΎΠ·Π²Ρ€Π°Ρ‰Π°Π΅Ρ‚ структуру запроса (минуя ΠΎΠ±ΠΎΡ€Π°Ρ‡ΠΈΠ²Π°ΡŽΡ‰ΠΈΠΉ Stream, Ссли Π½ΡƒΠΆΠ½ΠΎ)

func (*Method) OutputMessage ΒΆ

func (m *Method) OutputMessage() *Message

OutputMessage Π°Π½Π°Π»ΠΎΠ³ΠΈΡ‡Π½ΠΎ InputMessage, Π²ΠΎΠ·Π²Ρ€Π°Ρ‰Π°Π΅Ρ‚ структуру ΠΎΡ‚Π²Π΅Ρ‚Π°, ΠΏΡ€ΠΈ нСобходимости снимая stream

type MethodType ΒΆ added in v0.30.4

type MethodType byte

MethodType Ρ‚ΠΈΠΏ ΠΌΠ΅Ρ‚ΠΎΠ΄Π°: ΡƒΠ½Π°Ρ€Π½Ρ‹ΠΉ, входящий/исходящий/Π΄Π²ΡƒΠ½Π°ΠΏΡ€Π°Π²Π»Π΅Π½Π½Ρ‹ΠΉ ΠΏΠΎΡ‚ΠΎΠΊΠΎΠ²Ρ‹ΠΉ.

const (
	Unary MethodType
	InputStream
	OutputStream
	BidirectionalStream
)

Π’ΠΈΠΏΡ‹ ΠΌΠ΅Ρ‚ΠΎΠ΄ΠΎΠ².

type Named ΒΆ

type Named interface {
	GetName() string
	GetFullName() string
}

Named Ρ‚ΠΈΠΏΡ‹ ΠΈΠΌΠ΅ΡŽΡ‰ΠΈΠ΅ имя.

type Node ΒΆ

type Node interface {
	Unique
	// contains filtered or unexported methods
}

Node прСдставлСниС Π±Π°Π·ΠΎΠ²ΠΎΠΉ Π½ΠΎΠ΄Ρ‹

type OneOf ΒΆ

type OneOf struct {
	ParentMsg *Message

	Name     string
	Branches []*OneOfBranch
	// contains filtered or unexported fields
}

OneOf прСдставлСниС для oneof поля message-Π°

func (*OneOf) GetFullName ΒΆ added in v0.30.3

func (o *OneOf) GetFullName() string

func (*OneOf) GetName ΒΆ

func (o *OneOf) GetName() string

func (*OneOf) GetParentMsg ΒΆ

func (o *OneOf) GetParentMsg() *Message

func (*OneOf) String ΒΆ added in v0.30.3

func (m *OneOf) String() string

String рСфСрСнс-имя сообщСния, Π²ΠΊΠ»ΡŽΡ‡Π°Π΅Ρ‚ Π² сСбя Π½Π°Π·Π²Π°Π½ΠΈΠ΅ ΠΏΠ°ΠΊΠ΅Ρ‚Π°, ΠΈΠΌΠ΅Π½Π° Ρ€ΠΎΠ΄ΠΈΡ‚Π΅Π»ΡŒΡΠΊΠΈΡ… сообщСний, Π² пространствС ΠΈΠΌΡ‘Π½ ΠΊΠΎΡ‚ΠΎΡ€Ρ‹Ρ… ΠΎΠ½ΠΎ ΠΎΠΏΡ€Π΅Π΄Π΅Π»Π΅Π½ΠΎ.

type OneOfBranch ΒΆ

type OneOfBranch struct {
	Name     string
	Comment  *Comment
	Type     Type
	ParentOO *OneOf
	Sequence int
	Options  []*Option
	// contains filtered or unexported fields
}

OneOfBranch прСдставлСниС для Π²Π΅Ρ‚Π²ΠΈ

func (*OneOfBranch) GetComment ΒΆ added in v0.30.1

func (o *OneOfBranch) GetComment() *Comment

func (*OneOfBranch) GetFullName ΒΆ added in v0.30.3

func (o *OneOfBranch) GetFullName() string

func (*OneOfBranch) GetName ΒΆ

func (o *OneOfBranch) GetName() string

func (*OneOfBranch) GetOptions ΒΆ added in v0.30.1

func (o *OneOfBranch) GetOptions() []*Option

type Option ΒΆ

type Option struct {
	Name      string
	Value     OptionValue
	Extension *Extension
	// contains filtered or unexported fields
}

Option опция

func FieldOptions ΒΆ

func FieldOptions(f Field) []*Option

FieldOptions Π²ΠΎΠ·Π²Ρ€Π°Ρ‰Π°Π΅Ρ‚ ΠΎΠΏΡ†ΠΈΠΈ поля

func (*Option) GetFullName ΒΆ added in v0.30.3

func (o *Option) GetFullName() string

func (*Option) GetName ΒΆ

func (o *Option) GetName() string

type OptionValue ΒΆ

type OptionValue interface {
	Unique
	// contains filtered or unexported methods
}

OptionValue Π·Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ ΠΎΠΏΡ†ΠΈΠΈ

type Optional ΒΆ

type Optional struct {
	Type Type
	// contains filtered or unexported fields
}

Optional прСдставлСниС для ΠΎΠΏΡ†ΠΈΠΎΠ½Π°Π»ΡŒΠ½Ρ‹Ρ… ΠΏΠΎΠ»Π΅ΠΉ

type OptionsBearer ΒΆ added in v0.30.1

type OptionsBearer interface {
	GetOptions() []*Option
}

OptionsBearer Ρ‚ΠΈΠΏΡ‹, ΠΊΠΎΡ‚ΠΎΡ€Ρ‹Π΅ ΠΌΠΎΠ³ΡƒΡ‚ ΡΠΎΠ΄Π΅Ρ€ΠΆΠ°Ρ‚ΡŒ proto-ΠΎΠΏΡ†ΠΈΠΈ.

type Package ΒΆ

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

Package прСдставлСниС ΠΏΠ°ΠΊΠ΅Ρ‚Π° ΠΏΡ€ΠΎΡ‚ΠΎ-Ρ„Π°ΠΉΠ»ΠΎΠ². Данная структура Π²Π²Π΅Π΄Π΅Π½Π° скорСС для удобства, Ρ‚.ΠΊ. понятия ΠΏΠ°ΠΊΠ΅Ρ‚ Π² смыслС Π³Ρ€ΡƒΠΏΠΏΠ° Ρ„Π°ΠΉΠ»ΠΎΠ² с ΠΎΠ΄ΠΈΠ½Π°ΠΊΠΎΠ²Ρ‹ΠΌ ΠΈΠΌΠ΅Π½Π΅ΠΌ package Π² protobuf Π½Π΅Ρ‚ β€” Ρ„Π°ΠΉΠ»Ρ‹ Π½Π΅ ΠΏΠΎΠΏΠ°Π΄Π°ΡŽΡ‚ Π½Π° Ρ‚Ρ€Π°Π½ΡΠ»ΡΡ†ΠΈΡŽ автоматичСски, Π° Π΄ΠΎΠ±Π°Π²Π»ΡΡŽΡ‚ΡΡ Ρ‚ΡƒΠ΄Π° Π²Ρ€ΡƒΡ‡Π½ΡƒΡŽ, ΠΏΡ€ΠΈ трансляции ΠΎΠ½ΠΈ ΠΌΠΎΠ³ΡƒΡ‚ ΠΏΠΎΠΏΠ°ΡΡ‚ΡŒ Π² Ρ€Π°Π·Π»ΠΈΡ‡Π½Ρ‹Π΅ Ρ†Π΅Π»Π΅Π²Ρ‹Π΅ ΠΊΠ°Ρ‚Π°Π»ΠΎΠ³ΠΈ ΠΈ Ρ‚.Π΄.

func NewPackage ΒΆ

func NewPackage(files []*File) (*Package, error)

NewPackage конструктор ΠΏΠ°ΠΊΠ΅Ρ‚Π° ΠΏΡ€ΠΎΡ‚ΠΎ-Ρ„Π°ΠΉΠ»ΠΎΠ². Если список files пуст возвращаСтся ошибка ErrorPackageMissingFiles

func (*Package) Enum ΒΆ

func (s *Package) Enum(name string) (*Enum, error)

Enum поиск пСрСчислСния ΠΏΠΎ ΠΈΠΌΠ΅Π½ΠΈ Π’ΠΎΠ·Π²Ρ€Π°Ρ‰Π°Π΅Ρ‚ ΠΎΡˆΠΈΠ±ΠΊΡƒ ast.ErrorTypeNotFound Ссли Ρ‚Π°ΠΊΠΎΠΉ Ρ‚ΠΈΠΏ с Ρ‚Π°ΠΊΠΈΠΌ ΠΈΠΌΠ΅Π½Π΅ΠΌ Π½Π΅ Π½Π°ΠΉΠ΄Π΅Π½.

func (*Package) File ΒΆ

func (s *Package) File(name string) (*File, error)

File ΠΎΡ‚Π΄Π°Ρ‚ΡŒ Ρ„Π°ΠΉΠ» с Π΄Π°Π½Π½Ρ‹ΠΌ ΠΈΠΌΠ΅Π½Π΅ΠΌ. Ѐункция path.Split вызванная Π½Π° ΠΈΠΌΠ΅Π½ΠΈ Ρ„Π°ΠΉΠ»Π° Π΄ΠΎΠ»ΠΆΠ½Π° Π²ΠΎΠ·Π²Ρ€Π°Ρ‰Π°Ρ‚ΡŒ Ρ‚ΠΎΠ»ΡŒΠΊΠΎ пустоС Π·Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ dir.

ΠŸΡ€Π°Π²ΠΈΠ»ΡŒΠ½Ρ‹Π΅ названия Ρ„Π°ΠΉΠ»ΠΎΠ² ΠΏΡ€ΠΈ Π²Ρ‹Π·ΠΎΠ²Π΅: error_codes.proto, marker.proto, atlas ΠΠ΅ΠΏΡ€Π°Π²ΠΈΠ»ΡŒΠ½Ρ‹Π΅ названия Ρ„Π°ΠΉΠ»ΠΎΠ²: atlas/atlas.proto, /atlas.proto

func (*Package) Files ΒΆ

func (s *Package) Files() []*File

Files ΠΏΠΎΠ»ΡƒΡ‡ΠΈΡ‚ΡŒ всС Ρ„Π°ΠΉΠ»Ρ‹ Ρ‚Π΅ΠΊΡƒΡ‰Π΅Π³ΠΎ ΠΏΠ°ΠΊΠ΅Ρ‚Π°

func (*Package) GoPkg ΒΆ

func (s *Package) GoPkg() string

GoPkg go-ΠΏΠ°ΠΊΠ΅Ρ‚Π°

func (*Package) Message ΒΆ

func (s *Package) Message(name string) (*Message, error)

Message поиск структуры ΠΏΠΎ ΠΈΠΌΠ΅Π½ΠΈ. Π’ΠΎΠ·Π²Ρ€Π°Ρ‰Π°Π΅Ρ‚ ΠΎΡˆΠΈΠ±ΠΊΡƒ ast.ErrorTypeNotFound Ссли Ρ‚Π°ΠΊΠΎΠΉ Ρ‚ΠΈΠΏ с Ρ‚Π°ΠΊΠΈΠΌ ΠΈΠΌΠ΅Π½Π΅ΠΌ Π½Π΅ Π½Π°ΠΉΠ΄Π΅Π½.

func (*Package) Pkg ΒΆ

func (s *Package) Pkg() string

Pkg имя proto-ΠΏΠ°ΠΊΠ΅Ρ‚Π°

func (*Package) ScanTypes ΒΆ

func (s *Package) ScanTypes(inspector func(p Type) bool)

ScanTypes ΠΏΡ€ΠΎΠ±Π΅ΠΆΠΊΠ° ΠΏΠΎ всСм Ρ‚ΠΈΠΏΠ°ΠΌ ΠΏΠ°ΠΊΠ΅Ρ‚Π°, Π²ΠΊΠ»ΡŽΡ‡Π°Ρ ΠΈ Π²Π»ΠΎΠΆΠ΅Π½Π½Ρ‹Π΅

func (*Package) Service ΒΆ

func (s *Package) Service(name string) *Service

Service поиск сСрвиса с Π΄Π°Π½Π½Ρ‹ΠΌ ΠΈΠΌΠ΅Π½Π΅ΠΌ Π² пространствС ΠΈΠΌΡ‘Π½ ΠΏΠ°ΠΊΠ΅Ρ‚Π°

func (*Package) Services ΒΆ

func (s *Package) Services() []*Service

Services ΠΏΠΎΠ»ΡƒΡ‡ΠΈΡ‚ΡŒ всС сСрвисы Ρ‚Π΅ΠΊΡƒΡ‰Π΅Π³ΠΎ ΠΏΠ°ΠΊΠ΅Ρ‚Π°

func (*Package) Type ΒΆ

func (s *Package) Type(name string) Type

Type поиск Ρ‚ΠΈΠΏΠ° с Π΄Π°Π½Π½Ρ‹ΠΌ ΠΈΠΌΠ΅Π½Π΅ΠΌ Π² ΠΊΠΎΡ€Π½Π΅Π²ΠΎΠΌ пространствС ΠΈΠΌΡ‘Π½ ΠΏΠ°ΠΊΠ΅Ρ‚Π°

func (*Package) Types ΒΆ

func (s *Package) Types() []Type

Types ΠΏΠΎΠ»ΡƒΡ‡ΠΈΡ‚ΡŒ всС Ρ‚ΠΈΠΏΡ‹ Ρ‚Π΅ΠΊΡƒΡ‰Π΅Π³ΠΎ ΠΏΠ°ΠΊΠ΅Ρ‚Π° Π»Π΅ΠΆΠ°Ρ‰ΠΈΠ΅ Π² ΠΊΠΎΡ€Π½Π΅ ΠΏΠ°ΠΊΠ΅Ρ‚Π°

type Printer ΒΆ

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

Printer ΠΏΠ΅Ρ‡Π°Ρ‚ΡŒ Ρ„Π°ΠΉΠ»ΠΎΠ²

func NewPrinter ΒΆ

func NewPrinter(fm FileManager) *Printer

NewPrinter конструктор ΠΏΡ€ΠΈΠ½Ρ‚Π΅Ρ€Π° Ρ„Π°ΠΉΠ»ΠΎΠ²

func (*Printer) Plan ΒΆ

func (p *Printer) Plan(f *File)

Plan Π΄ΠΎΠ±Π°Π²ΠΈΡ‚ΡŒ Ρ„Π°ΠΉΠ» Π² ΠΏΠ»Π°Π½ ΠΏΠ΅Ρ‡Π°Ρ‚ΠΈ

func (*Printer) Print ΒΆ

func (p *Printer) Print(file *File) error

Print ΠΏΠ΅Ρ‡Π°Ρ‚ΡŒ Ρ„Π°ΠΉΠ»Π° ΠΈ всСх Π΅Π³ΠΎ зависимостСй

type Repeated ΒΆ

type Repeated struct {
	Type Type
	// contains filtered or unexported fields
}

Repeated прСдставлСниС для ΠΏΠΎΠ»Π΅ΠΉ с repeeated

type ScalarNode ΒΆ

type ScalarNode interface {
	Type
	// contains filtered or unexported methods
}

ScalarNode скалярныС Ρ‚ΠΈΠΏΡ‹

type Service ΒΆ

type Service struct {
	File *File

	Name    string
	Comment *Comment
	Methods []*Method
	Options []*Option
	// contains filtered or unexported fields
}

Service прСдставлСниС для сСрвисов

func (*Service) GetComment ΒΆ added in v0.30.1

func (s *Service) GetComment() *Comment

func (*Service) GetFullName ΒΆ added in v0.30.3

func (s *Service) GetFullName() string

func (*Service) GetName ΒΆ

func (s *Service) GetName() string

func (*Service) GetOptions ΒΆ added in v0.30.1

func (s *Service) GetOptions() []*Option

func (*Service) Method ΒΆ

func (s *Service) Method(name string) *Method

Method поиск ΠΌΠ΅Ρ‚ΠΎΠ΄Π° ΠΏΠΎ ΠΈΠΌΠ΅Π½ΠΈ

type Sfixed32 ΒΆ

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

Sfixed32 прСдставлСниС для Ρ‚ΠΈΠΏΠ° sfixed32

func (*Sfixed32) GetFullName ΒΆ added in v0.30.3

func (*Sfixed32) GetFullName() string

func (*Sfixed32) GetName ΒΆ added in v0.30.3

func (*Sfixed32) GetName() string

type Sfixed64 ΒΆ

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

Sfixed64 прСдставлСниС для Ρ‚ΠΈΠΏΠ° sfixed64

func (*Sfixed64) GetFullName ΒΆ added in v0.30.3

func (*Sfixed64) GetFullName() string

func (*Sfixed64) GetName ΒΆ added in v0.30.3

func (*Sfixed64) GetName() string

type Sint32 ΒΆ

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

Sint32 прСдставлСниС для Ρ‚ΠΈΠΏΠ° sint32

func (*Sint32) GetFullName ΒΆ added in v0.30.3

func (*Sint32) GetFullName() string

func (*Sint32) GetName ΒΆ added in v0.30.3

func (*Sint32) GetName() string

type Sint64 ΒΆ

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

Sint64 прСдставлСниС Ρ‚ΠΈΠΏΠ° sint64

func (*Sint64) GetFullName ΒΆ added in v0.30.3

func (*Sint64) GetFullName() string

func (*Sint64) GetName ΒΆ added in v0.30.3

func (*Sint64) GetName() string

type Stream ΒΆ

type Stream struct {
	Type Type
	// contains filtered or unexported fields
}

Stream прСдставлСниС для stream-Π°Ρ€Π³ΡƒΠΌΠ΅Π½Ρ‚ΠΎΠ² ΠΈ Π²ΠΎΠ·Π²Ρ€Π°Ρ‰Π°Π΅ΠΌΡ‹Ρ… Π·Π½Π°Ρ‡Π΅Π½ΠΈΠΉ ΠΌΠ΅Ρ‚ΠΎΠ΄Π°

type String ΒΆ

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

String прСдставлСниС для стрового Ρ‚ΠΈΠΏΠ°

func (*String) GetFullName ΒΆ added in v0.30.3

func (*String) GetFullName() string

func (*String) GetName ΒΆ added in v0.30.3

func (*String) GetName() string

type StringOption ΒΆ

type StringOption struct {
	Value string
	// contains filtered or unexported fields
}

StringOption branch of OptionValue

func (*StringOption) GetValue ΒΆ added in v0.30.1

func (o *StringOption) GetValue() interface{}

func (*StringOption) String ΒΆ

func (o *StringOption) String() string

type Type ΒΆ

type Type interface {
	Node
	// contains filtered or unexported methods
}

Type прСдставлСниС Ρ‚ΠΈΠΏΠ°

func FieldType ΒΆ

func FieldType(f Field) Type

FieldType Π²ΠΎΠ·Π²Ρ€Π°Ρ‰Π°Π΅Ρ‚ Ρ‚ΠΈΠΏ поля

type Uint32 ΒΆ

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

Uint32 прСдставлСниС для Ρ‚ΠΈΠΏΠ° uint32

func (*Uint32) GetFullName ΒΆ added in v0.30.3

func (*Uint32) GetFullName() string

func (*Uint32) GetName ΒΆ added in v0.30.3

func (*Uint32) GetName() string

type Uint64 ΒΆ

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

Uint64 прСдставлСниС для Ρ‚ΠΈΠΏΠ° uint64

func (*Uint64) GetFullName ΒΆ added in v0.30.3

func (*Uint64) GetFullName() string

func (*Uint64) GetName ΒΆ added in v0.30.3

func (*Uint64) GetName() string

type UintOption ΒΆ

type UintOption struct {
	Value uint64
	// contains filtered or unexported fields
}

UintOption branch of OptionValue

func (*UintOption) GetValue ΒΆ added in v0.30.1

func (o *UintOption) GetValue() interface{}

func (*UintOption) String ΒΆ

func (o *UintOption) String() string

type Unique ΒΆ

type Unique interface {
	// contains filtered or unexported methods
}

Unique интСрфСйс для ΡƒΠ½ΠΈΠΊΠ°Π»ΠΈΠ·Π°Ρ†ΠΈΠΈ инстансов Π² AST ΠΏΡ€ΠΈΠ²ΡΠ·Ρ‹Π²Π°ΡŽΡ‰ΠΈΠΉ ΠΊ Π΄Π°Π½Π½ΠΎΠΌΡƒ ΠΎΠ±ΡŠΠ΅ΠΊΡ‚Ρƒ Π½Π΅ΠΊΠΎΠ΅ ΡƒΠ½ΠΈΠΊΠ°Π»ΡŒΠ½ΠΎΠ΅ для контСкстного мноТСства Π·Π½Π°Ρ‡Π΅Π½ΠΈΠ΅

type UniqueContext ΒΆ

type UniqueContext map[string]struct{}

UniqueContext контСкст для создания ΡƒΠ½ΠΈΠΊΠ°Π»ΡŒΠ½Ρ‹Ρ… Π·Π½Π°Ρ‡Π΅Π½ΠΈΠΉ

type Valuable ΒΆ added in v0.30.1

type Valuable interface {
	GetValue() interface{}
}

Valuable Ρ‚ΠΈΠΏΡ‹ ΠΈΠΌΠ΅ΡŽΡ‰ΠΈΠ΅ Π·Π½Π°Ρ‡Π΅Π½ΠΈΠ΅.

Directories ΒΆ

Path Synopsis
internal

Jump to

Keyboard shortcuts

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