forked from go-language-server/protocol
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathregistration.go
44 lines (35 loc) · 1.49 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
37
38
39
40
41
42
43
44
// SPDX-FileCopyrightText: 2019 The Go Language Server Authors
// SPDX-License-Identifier: BSD-3-Clause
package protocol
// Registration general parameters to register for a capability.
type Registration struct {
// ID is the id used to register the request. The id can be used to deregister
// the request again.
ID string `json:"id"`
// Method is the method / capability to register for.
Method string `json:"method"`
// RegisterOptions options necessary for the registration.
RegisterOptions interface{} `json:"registerOptions,omitempty"`
}
// RegistrationParams params of Register Capability.
type RegistrationParams struct {
Registrations []Registration `json:"registrations"`
}
// TextDocumentRegistrationOptions TextDocumentRegistration options.
type TextDocumentRegistrationOptions struct {
// DocumentSelector a document selector to identify the scope of the registration. If set to null
// the document selector provided on the client side will be used.
DocumentSelector DocumentSelector `json:"documentSelector"`
}
// Unregistration general parameters to unregister a capability.
type Unregistration struct {
// ID is the id used to unregister the request or notification. Usually an id
// provided during the register request.
ID string `json:"id"`
// Method is the method / capability to unregister for.
Method string `json:"method"`
}
// UnregistrationParams params of Unregistration.
type UnregistrationParams struct {
Unregisterations []Unregistration `json:"unregisterations"`
}