parser

package
v0.0.0-...-65ee0f0 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: MIT, Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateCRC32

func CalculateCRC32(name, params, restype string) uint32

func IsBuiltInType

func IsBuiltInType(t Type) bool

func IsBuiltInTypeByName

func IsBuiltInTypeByName(n string) bool

Types

type BoolType

type BoolType struct {
	HasFlags bool
	Mask     string
}

func (BoolType) GetGoType

func (this BoolType) GetGoType() string

func (BoolType) Name

func (this BoolType) Name() string

func (BoolType) OriginName

func (this BoolType) OriginName() string

func (BoolType) TypeName

func (this BoolType) TypeName() string

type BuiltInVectorType

type BuiltInVectorType struct {
	Type
}

func (BuiltInVectorType) GetGoType

func (this BuiltInVectorType) GetGoType() string

func (BuiltInVectorType) Name

func (this BuiltInVectorType) Name() string

func (BuiltInVectorType) OriginName

func (this BuiltInVectorType) OriginName() string

func (BuiltInVectorType) TypeName

func (this BuiltInVectorType) TypeName() string

type BytesType

type BytesType struct {
	HasFlags bool
	Mask     string
}

func (BytesType) GetGoType

func (this BytesType) GetGoType() string

func (BytesType) Name

func (this BytesType) Name() string

func (BytesType) OriginName

func (this BytesType) OriginName() string

func (BytesType) TypeName

func (this BytesType) TypeName() string

type Constructor

type Constructor struct {
	Predicate string
	Id        int32
	TypeId    string
	//PrmsList []string
	//Prms map[string]Type
	//HasFlags bool
	//ConditionsList []string
	//Conditions map[string]string
	//TrivialConditions []string
	ParamList    []Param
	RawParamList []string
	BaseType     Type
	RawBaseType  string
	Line         string
}

typesDict[restype].append([name, typeid, prmsList, prms, hasFlags, conditionsList, conditions, trivialConditions, line]);

func NewConstructor

func NewConstructor(id int32, predicate, params, typeName string) Constructor

func (Constructor) GetGoType

func (this Constructor) GetGoType() string

func (Constructor) Name

func (this Constructor) Name() string

func (Constructor) OriginName

func (this Constructor) OriginName() string

func (Constructor) TypeName

func (this Constructor) TypeName() string

type CustomType

type CustomType struct {
	CustomName string
}

func MakeCustomType

func MakeCustomType(restype string) CustomType

func (CustomType) GetGoType

func (this CustomType) GetGoType() string

func (CustomType) Name

func (this CustomType) Name() string

func (CustomType) OriginName

func (this CustomType) OriginName() string

func (CustomType) TypeName

func (this CustomType) TypeName() string

type DoubleType

type DoubleType struct {
	HasFlags bool
	Mask     string
}

func (DoubleType) GetGoType

func (this DoubleType) GetGoType() string

func (DoubleType) Name

func (this DoubleType) Name() string

func (DoubleType) OriginName

func (this DoubleType) OriginName() string

func (DoubleType) TypeName

func (this DoubleType) TypeName() string

type FlagsType

type FlagsType struct {
	Mask string
}

/////////////////////////////////////////////////////////////////////////////

func (FlagsType) GetGoType

func (this FlagsType) GetGoType() string

func (FlagsType) Name

func (this FlagsType) Name() string

func (FlagsType) OriginName

func (this FlagsType) OriginName() string

func (FlagsType) TypeName

func (this FlagsType) TypeName() string

type Function

type Function struct {
	Method string
	Id     int32
	TypeId string
	//PrmsList []string
	//Prms map[string]Type
	//HasFlags bool
	//ConditionsList []string
	//Conditions map[string]string
	//TrivialConditions []string
	ParamList    []Param
	RawParamList []string
	ResType      Type
	RawResType   string
	Line         string
}

funcsDict[restype].append([name, typeid, prmsList, prms, hasFlags, conditionsList, conditions, trivialConditions, line]);

func NewFunction

func NewFunction(id int32, method, params, typeName string) Function

type Int128Type

type Int128Type struct {
	HasFlags bool
	Mask     string
}

func (Int128Type) GetGoType

func (this Int128Type) GetGoType() string

func (Int128Type) Name

func (this Int128Type) Name() string

func (Int128Type) OriginName

func (this Int128Type) OriginName() string

func (Int128Type) TypeName

func (this Int128Type) TypeName() string

type Int256Type

type Int256Type struct {
	HasFlags bool
	Mask     string
}

func (Int256Type) GetGoType

func (this Int256Type) GetGoType() string

func (Int256Type) Name

func (this Int256Type) Name() string

func (Int256Type) OriginName

func (this Int256Type) OriginName() string

func (Int256Type) TypeName

func (this Int256Type) TypeName() string

type IntType

type IntType struct {
	Mask string
	// contains filtered or unexported fields
}

func (IntType) GetGoType

func (this IntType) GetGoType() string

func (IntType) Name

func (this IntType) Name() string

func (IntType) OriginName

func (this IntType) OriginName() string

func (IntType) TypeName

func (this IntType) TypeName() string

type LongType

type LongType struct {
	Mask string
	// contains filtered or unexported fields
}

func (LongType) GetGoType

func (this LongType) GetGoType() string

func (LongType) Name

func (this LongType) Name() string

func (LongType) OriginName

func (this LongType) OriginName() string

func (LongType) TypeName

func (this LongType) TypeName() string

type MTProtoSchemas

type MTProtoSchemas struct {
	Name  string
	Layer string // layer

	/////////////////// Layer cons
	LayerCons *Schemas
	/// Authorization key creation
	Handshake *Schemas
	////////////// System messages
	Transport *Schemas
	///////// Main application API
	Sync *Schemas
}

func NewMTProtoSchemas

func NewMTProtoSchemas(name string, layer string) *MTProtoSchemas

func Parse

func Parse(filePaths []string, name, layer string) (mtProtoSchemas *MTProtoSchemas, err error)

func (*MTProtoSchemas) GetSchemas

func (this *MTProtoSchemas) GetSchemas(schemaType string) *Schemas

type MTProtoSchemasFixed

type MTProtoSchemasFixed struct {
	Name  string
	Layer string // layer

	/////////////////// Layer cons
	LayerCons Schemas
	/// Authorization key creation
	Handshake Schemas
	////////////// System messages
	Transport Schemas
	///////// Main application API
	Sync Schemas
}

type Param

type Param struct {
	Name string
	Type
	SubParams []Param
}

type Schemas

type Schemas struct {
	Name            string
	Layer           string // layer
	TypeMap         map[string]Type
	ConstructorList []Constructor
	FunctionList    []Function
}

///////////////// Layer cons

func NewSchemas

func NewSchemas(name string, layer string) *Schemas

type StringType

type StringType struct {
	HasFlags bool
	Mask     string
}

func (StringType) GetGoType

func (this StringType) GetGoType() string

func (StringType) Name

func (this StringType) Name() string

func (StringType) OriginName

func (this StringType) OriginName() string

func (StringType) TypeName

func (this StringType) TypeName() string

type SubFlagsType

type SubFlagsType struct {
	// name string	// flags.0:true
	Mask       string
	ParentMask string
	Type
}

func (SubFlagsType) GetGoType

func (this SubFlagsType) GetGoType() string

func (SubFlagsType) Name

func (this SubFlagsType) Name() string

func (SubFlagsType) OriginName

func (this SubFlagsType) OriginName() string

func (SubFlagsType) TypeName

func (this SubFlagsType) TypeName() string

type TVectorType

type TVectorType struct {
	Type
}

func (TVectorType) GetGoType

func (this TVectorType) GetGoType() string

func (TVectorType) Name

func (this TVectorType) Name() string

func (TVectorType) OriginName

func (this TVectorType) OriginName() string

func (TVectorType) TypeName

func (this TVectorType) TypeName() string

type TemplateType

type TemplateType struct {
}

////////////////////////////////////////////////////////////////////////

func (TemplateType) GetGoType

func (this TemplateType) GetGoType() string

func (TemplateType) Name

func (this TemplateType) Name() string

func (TemplateType) OriginName

func (this TemplateType) OriginName() string

func (TemplateType) TypeName

func (this TemplateType) TypeName() string

type Type

type Type interface {
	Name() string
	OriginName() string
	TypeName() string
	GetGoType() string
}

func MakeBuiltInType

func MakeBuiltInType(n string, hasFlags bool, parentMask string) Type

Jump to

Keyboard shortcuts

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