initial go implementation

This commit is contained in:
2025-11-23 12:12:20 +08:00
commit f40ace4058
12 changed files with 368 additions and 0 deletions

5
pkg/types/params.go Normal file
View File

@@ -0,0 +1,5 @@
package types
type Params interface {
param()
}

10
pkg/types/request.go Normal file
View File

@@ -0,0 +1,10 @@
package types
type Request struct {
Version int `json:"!version"`
ClientVersion string `json:"client_version"`
Id int `json:"id"`
JsonRPC string `json:"jsonrpc"`
Method string `json:"method"`
Params Params `json:"params"`
}

7
pkg/types/response.go Normal file
View File

@@ -0,0 +1,7 @@
package types
type Response struct {
Code int32 `json:"code"`
Type string `json:"type"`
Data string `json:"data"`
}