Documentation ¶
Overview ¶
Package metamodel parses and represents the LSP meta-model.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Enumeration ¶
type Enumeration struct { Documentation string `json:"documentation"` Name string `json:"name"` Type *Type `json:"type"` Members []EnumerationMember `json:"values"` }
Enumeration defines a named enumeration data type.
type EnumerationMember ¶
type EnumerationMember struct { Documentation string `json:"documentation"` Name string `json:"name"` Value any `json:"value"` }
EnumerationMember is a member of an enumeration.
type Notification ¶
type Notification struct { Documentation string `json:"documentation"` Method string `json:"method"` Direction string `json:"messageDirection"` Params *Type `json:"params"` RegistrationMethod string `json:"registrationMethod"` RegistrationOptions *Type `json:"registrationOptions"` }
Notification defines a JSON-RPC notification.
type Property ¶
type Property struct { Documentation string `json:"documentation"` Name string `json:"name"` Type *Type `json:"type"` Optional bool `json:"optional"` }
Property is a member of a structure.
type Request ¶
type Request struct { Documentation string `json:"documentation"` Method string `json:"method"` Direction string `json:"messageDirection"` Params *Type `json:"params"` Result *Type `json:"result"` PartialResult *Type `json:"partialResult"` RegistrationMethod string `json:"registrationMethod"` RegistrationOptions *Type `json:"registrationOptions"` }
Request defines a JSON-RPC call (request/response).
type Root ¶
type Root struct { Requests []Request `json:"requests"` Notifications []Notification `json:"notifications"` Structures []Structure `json:"structures"` Enumerations []Enumeration `json:"enumerations"` TypeAliases []TypeAlias `json:"typeAliases"` }
Root is the root of the model.
type Structure ¶
type Structure struct { Documentation string `json:"documentation"` Name string `json:"name"` Properties []Property `json:"properties"` Extends []*Type `json:"extends"` Mixins []*Type `json:"mixins"` }
Structure defines a named structure data type.
type Type ¶
type Type struct { Kind string `json:"kind"` Name string `json:"name"` Items []*Type `json:"items"` ArrayElement *Type `json:"element"` MapKey *Type `json:"key"` RawValue json.RawMessage `json:"value"` }
Type is a reference to a named type, or an inline anonymous type.
func (*Type) LiteralString ¶
LiteralString unserializes RawValue for use as a literal string type.
func (*Type) LiteralStructProperties ¶
LiteralStructProperties unserializes RawValue for use as a literal type's properties.
Click to show internal directories.
Click to hide internal directories.