jsonrpc_request.go 471 B

12345678910111213141516171819
  1. package jsonrpclite
  2. import "reflect"
  3. type rpcParam struct {
  4. _type reflect.Type //The type of the param
  5. value any //The value of the param.
  6. }
  7. type rpcRequest struct {
  8. id any //The id of the request
  9. method string //The method name of the request
  10. params []rpcParam // params stored in this request
  11. }
  12. // isNotification Check whether the request is a notification.
  13. func (request rpcRequest) isNotification() bool {
  14. return request.id == nil
  15. }