Documentation ¶
Index ¶
- type Adder
- type AdminService
- type Base64URLByte
- type CodecRequest
- type ContentTopicArgs
- type DebugService
- type Empty
- type Error
- type FilterContentArgs
- type FilterService
- func (f *FilterService) DeleteV1Subscription(req *http.Request, args *FilterContentArgs, reply *SuccessReply) error
- func (f *FilterService) GetV1Messages(req *http.Request, args *ContentTopicArgs, reply *MessagesReply) error
- func (f *FilterService) PostV1Subscription(req *http.Request, args *FilterContentArgs, reply *SuccessReply) error
- func (f *FilterService) Start()
- func (f *FilterService) Stop()
- type GetPeersArgs
- type InfoArgs
- type InfoReply
- type MessagesReply
- type PeerReply
- type PeersArgs
- type PeersReply
- type RPCWakuMessage
- type RateLimitProof
- type RelayMessageArgs
- type RelayService
- func (r *RelayService) DeleteV1Subscription(req *http.Request, args *TopicsArgs, reply *SuccessReply) error
- func (r *RelayService) GetV1Messages(req *http.Request, args *TopicArgs, reply *MessagesReply) error
- func (r *RelayService) PostV1Message(req *http.Request, args *RelayMessageArgs, reply *SuccessReply) error
- func (r *RelayService) PostV1Subscription(req *http.Request, args *TopicsArgs, reply *SuccessReply) error
- func (r *RelayService) Start()
- func (r *RelayService) Stop()
- type SnakeCaseCodec
- type StoreMessagesArgs
- type StoreMessagesReply
- type StorePagingOptions
- type StoreService
- type SuccessReply
- type TopicArgs
- type TopicsArgs
- type VersionResponse
- type WakuRPC
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdminService ¶
type AdminService struct {
// contains filtered or unexported fields
}
func (*AdminService) GetV1Peers ¶
func (a *AdminService) GetV1Peers(req *http.Request, args *GetPeersArgs, reply *PeersReply) error
func (*AdminService) PostV1Peers ¶
func (a *AdminService) PostV1Peers(req *http.Request, args *PeersArgs, reply *SuccessReply) error
type Base64URLByte ¶
type Base64URLByte []byte
func (*Base64URLByte) UnmarshalText ¶
func (h *Base64URLByte) UnmarshalText(b []byte) error
UnmarshalText is used by json.Unmarshal to decode both url-safe and standard base64 encoded strings with and without padding
type CodecRequest ¶
type CodecRequest struct {
// contains filtered or unexported fields
}
CodecRequest decodes and encodes a single request.
func (*CodecRequest) Method ¶
func (c *CodecRequest) Method() (string, error)
Method returns the RPC method for the current request.
The method uses a dotted notation as in "Service.Method".
func (*CodecRequest) ReadRequest ¶
func (c *CodecRequest) ReadRequest(args interface{}) error
ReadRequest fills the request object for the RPC method.
func (*CodecRequest) WriteError ¶
func (c *CodecRequest) WriteError(w http.ResponseWriter, _ int, err error)
func (*CodecRequest) WriteResponse ¶
func (c *CodecRequest) WriteResponse(w http.ResponseWriter, reply interface{})
WriteResponse encodes the response and writes it to the ResponseWriter.
type ContentTopicArgs ¶
type ContentTopicArgs struct {
ContentTopic string `json:"contentTopic,omitempty"`
}
type DebugService ¶
type DebugService struct {
// contains filtered or unexported fields
}
func NewDebugService ¶
func NewDebugService(node *node.WakuNode) *DebugService
func (*DebugService) GetV1Version ¶
func (d *DebugService) GetV1Version(r *http.Request, args *InfoArgs, reply *VersionResponse) error
type Error ¶
type Error struct {
Data interface{}
}
An Error is a wrapper for a JSON interface value. It can be used by either a service's handler func to write more complex JSON data to an error field of a server's response, or by a client to read it.
type FilterContentArgs ¶
type FilterContentArgs struct { Topic string `json:"topic,omitempty"` ContentFilters []*pb.FilterRequest_ContentFilter `json:"contentFilters,omitempty"` }
type FilterService ¶
type FilterService struct {
// contains filtered or unexported fields
}
func NewFilterService ¶
func (*FilterService) DeleteV1Subscription ¶
func (f *FilterService) DeleteV1Subscription(req *http.Request, args *FilterContentArgs, reply *SuccessReply) error
func (*FilterService) GetV1Messages ¶
func (f *FilterService) GetV1Messages(req *http.Request, args *ContentTopicArgs, reply *MessagesReply) error
func (*FilterService) PostV1Subscription ¶
func (f *FilterService) PostV1Subscription(req *http.Request, args *FilterContentArgs, reply *SuccessReply) error
func (*FilterService) Start ¶
func (f *FilterService) Start()
func (*FilterService) Stop ¶
func (f *FilterService) Stop()
type GetPeersArgs ¶
type GetPeersArgs struct { }
type MessagesReply ¶
type MessagesReply = []*RPCWakuMessage
type PeersReply ¶
type PeersReply []PeerReply
type RPCWakuMessage ¶
type RPCWakuMessage struct { Payload Base64URLByte `json:"payload,omitempty"` ContentTopic string `json:"contentTopic,omitempty"` Version uint32 `json:"version"` Timestamp int64 `json:"timestamp,omitempty"` RateLimitProof *RateLimitProof `json:"rateLimitProof,omitempty"` Ephemeral bool `json:"ephemeral,omitempty"` }
func ProtoToRPC ¶
func ProtoToRPC(input *pb.WakuMessage) *RPCWakuMessage
type RateLimitProof ¶
type RateLimitProof struct { Proof Base64URLByte `json:"proof,omitempty"` MerkleRoot Base64URLByte `json:"merkle_root,omitempty"` Epoch Base64URLByte `json:"epoch,omitempty"` Nullifier Base64URLByte `json:"nullifier,omitempty"` RlnIdentifier Base64URLByte `json:"rln_identifier,omitempty"` }
type RelayMessageArgs ¶
type RelayMessageArgs struct { Topic string `json:"topic,omitempty"` Message *RPCWakuMessage `json:"message,omitempty"` }
RelayMessageArgs represents the requests used for posting messages
type RelayService ¶
type RelayService struct {
// contains filtered or unexported fields
}
RelayService represents the JSON RPC service for WakuRelay
func NewRelayService ¶
NewRelayService returns an instance of RelayService
func (*RelayService) DeleteV1Subscription ¶
func (r *RelayService) DeleteV1Subscription(req *http.Request, args *TopicsArgs, reply *SuccessReply) error
DeleteV1Subscription is invoked when the json rpc request uses the delete_waku_v2_relay_v1_subscription method
func (*RelayService) GetV1Messages ¶
func (r *RelayService) GetV1Messages(req *http.Request, args *TopicArgs, reply *MessagesReply) error
GetV1Messages is invoked when the json rpc request uses the get_waku_v2_relay_v1_messages method
func (*RelayService) PostV1Message ¶
func (r *RelayService) PostV1Message(req *http.Request, args *RelayMessageArgs, reply *SuccessReply) error
PostV1Message is invoked when the json rpc request uses the post_waku_v2_relay_v1_message method
func (*RelayService) PostV1Subscription ¶
func (r *RelayService) PostV1Subscription(req *http.Request, args *TopicsArgs, reply *SuccessReply) error
PostV1Subscription is invoked when the json rpc request uses the post_waku_v2_relay_v1_subscription method
type SnakeCaseCodec ¶
type SnakeCaseCodec struct { }
SnakeCaseCodec creates a CodecRequest to process each request.
func NewSnakeCaseCodec ¶
func NewSnakeCaseCodec() *SnakeCaseCodec
NewCodec returns a new SnakeCaseCodec Codec.
func (*SnakeCaseCodec) NewRequest ¶
func (c *SnakeCaseCodec) NewRequest(r *http.Request) rpc.CodecRequest
NewRequest returns a CodecRequest.
type StoreMessagesArgs ¶
type StoreMessagesArgs struct { Topic string `json:"pubsubTopic,omitempty"` ContentFilters []string `json:"contentFilters,omitempty"` StartTime int64 `json:"startTime,omitempty"` EndTime int64 `json:"endTime,omitempty"` PagingOptions StorePagingOptions `json:"pagingOptions,omitempty"` }
type StoreMessagesReply ¶
type StoreMessagesReply struct { Messages []*RPCWakuMessage `json:"messages,omitempty"` PagingInfo StorePagingOptions `json:"pagingInfo,omitempty"` Error string `json:"error,omitempty"` }
type StorePagingOptions ¶
type StoreService ¶
type StoreService struct {
// contains filtered or unexported fields
}
func (*StoreService) GetV1Messages ¶
func (s *StoreService) GetV1Messages(req *http.Request, args *StoreMessagesArgs, reply *StoreMessagesReply) error
type SuccessReply ¶
type SuccessReply = bool
type TopicArgs ¶
type TopicArgs struct {
Topic string `json:"topic,omitempty"`
}
TopicArgs represents a request that contains a single topic
type TopicsArgs ¶
type TopicsArgs struct {
Topics []string `json:"topics,omitempty"`
}
TopicsArgs represents the lists of topics to use when subscribing / unsubscribing
type VersionResponse ¶
type VersionResponse string