-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathregistration.go
36 lines (29 loc) · 1.08 KB
/
registration.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package lsp
// Registration contains general parameters to register for a capability.
type Registration struct {
// The id used to register the request. The id can be used to deregister
// the request again.
ID string `json:"id"`
// The method/capability to register for.
Method string `json:"method"`
// Options necessary for the registration.
RegisterOptions interface{} `json:"registerOptions,omitempty"`
}
// RegistrationParams is the req payload sent in a `client/registerCapability`
// request.
type RegistrationParams struct {
Registrations []Registration `json:"registrations"`
}
// Unregistration contains general parameters to unregister a capability.
type Unregistration struct {
// The id used to unregister the request or notification. Usually an id
// provided during the register request.
ID string `json:"id"`
// The method/capability to unregister for.
Method string `json:"method"`
}
// UnregistrationParams is the payload sent in a `client/unregisterCapability`
// request.
type UnregistrationParams struct {
Unregistrations []Unregistration `json:"unregisterations"`
}