Documentation ¶
Index ¶
- type Adder
- type AdminService
- type AsymmetricMessageArgs
- type AsymmetricMessagesArgs
- type ByteArray
- 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 HexBytes
- type InfoArgs
- type InfoReply
- type KeyPairReply
- type MessagesReply
- type PeerReply
- type PeersArgs
- type PeersReply
- type PrivateService
- func (p *PrivateService) GetV1AsymmetricKeypair(req *http.Request, args *Empty, reply *KeyPairReply) error
- func (p *PrivateService) GetV1AsymmetricMessages(req *http.Request, args *AsymmetricMessagesArgs, reply *MessagesReply) error
- func (p *PrivateService) GetV1SymmetricKey(req *http.Request, args *Empty, reply *SymmetricKeyReply) error
- func (p *PrivateService) GetV1SymmetricMessages(req *http.Request, args *SymmetricMessagesArgs, reply *MessagesReply) error
- func (p *PrivateService) PostV1AsymmetricMessage(req *http.Request, args *AsymmetricMessageArgs, reply *bool) error
- func (p *PrivateService) PostV1SymmetricMessage(req *http.Request, args *SymmetricMessageArgs, reply *SuccessReply) error
- func (p *PrivateService) Start()
- func (p *PrivateService) Stop()
- type RPCWakuMessage
- type RPCWakuRelayMessage
- type RateLimitProof
- type RelayMessageArgs
- type RelayMessagesReply
- type RelayService
- func (r *RelayService) DeleteV1Subscription(req *http.Request, args *TopicsArgs, reply *SuccessReply) error
- func (r *RelayService) GetV1Messages(req *http.Request, args *TopicArgs, reply *RelayMessagesReply) 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 SymmetricKeyReply
- type SymmetricMessageArgs
- type SymmetricMessagesArgs
- 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 AsymmetricMessageArgs ¶
type AsymmetricMessageArgs struct { Topic string `json:"topic"` Message RPCWakuMessage `json:"message"` PublicKey string `json:"publicKey"` }
type AsymmetricMessagesArgs ¶
type ByteArray ¶ added in v0.1.0
type ByteArray []byte
ByteArray is marshalled to a uint8 array
func (ByteArray) MarshalText ¶ added in v0.1.0
func (*ByteArray) UnmarshalText ¶ added in v0.1.0
type CodecRequest ¶ added in v0.1.0
type CodecRequest struct {
// contains filtered or unexported fields
}
CodecRequest decodes and encodes a single request.
func (*CodecRequest) Method ¶ added in v0.1.0
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 ¶ added in v0.1.0
func (c *CodecRequest) ReadRequest(args interface{}) error
ReadRequest fills the request object for the RPC method.
func (*CodecRequest) WriteError ¶ added in v0.1.0
func (c *CodecRequest) WriteError(w http.ResponseWriter, _ int, err error)
func (*CodecRequest) WriteResponse ¶ added in v0.1.0
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 ¶ added in v0.2.0
func NewDebugService(node *node.WakuNode) *DebugService
func (*DebugService) GetV1Version ¶
func (d *DebugService) GetV1Version(r *http.Request, args *InfoArgs, reply *VersionResponse) error
type Error ¶ added in v0.1.0
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.ContentFilter `json:"contentFilters,omitempty"` }
type FilterService ¶
type FilterService struct {
// contains filtered or unexported fields
}
func NewFilterService ¶
func NewFilterService(node *node.WakuNode, log *zap.Logger) *FilterService
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 HexBytes ¶ added in v0.1.0
type HexBytes []byte
HexBytes is marshalled to a hex string
func (HexBytes) MarshalJSON ¶ added in v0.1.0
func (*HexBytes) UnmarshalText ¶ added in v0.1.0
type KeyPairReply ¶
type MessagesReply ¶
type MessagesReply = []*RPCWakuMessage
type PeersReply ¶
type PeersReply []PeerReply
type PrivateService ¶
type PrivateService struct {
// contains filtered or unexported fields
}
func NewPrivateService ¶
func NewPrivateService(node *node.WakuNode, log *zap.Logger) *PrivateService
func (*PrivateService) GetV1AsymmetricKeypair ¶
func (p *PrivateService) GetV1AsymmetricKeypair(req *http.Request, args *Empty, reply *KeyPairReply) error
func (*PrivateService) GetV1AsymmetricMessages ¶
func (p *PrivateService) GetV1AsymmetricMessages(req *http.Request, args *AsymmetricMessagesArgs, reply *MessagesReply) error
func (*PrivateService) GetV1SymmetricKey ¶
func (p *PrivateService) GetV1SymmetricKey(req *http.Request, args *Empty, reply *SymmetricKeyReply) error
func (*PrivateService) GetV1SymmetricMessages ¶
func (p *PrivateService) GetV1SymmetricMessages(req *http.Request, args *SymmetricMessagesArgs, reply *MessagesReply) error
func (*PrivateService) PostV1AsymmetricMessage ¶
func (p *PrivateService) PostV1AsymmetricMessage(req *http.Request, args *AsymmetricMessageArgs, reply *bool) error
func (*PrivateService) PostV1SymmetricMessage ¶
func (p *PrivateService) PostV1SymmetricMessage(req *http.Request, args *SymmetricMessageArgs, reply *SuccessReply) error
func (*PrivateService) Start ¶ added in v0.1.0
func (p *PrivateService) Start()
func (*PrivateService) Stop ¶ added in v0.1.0
func (p *PrivateService) Stop()
type RPCWakuMessage ¶ added in v0.1.0
type RPCWakuMessage struct { Payload ByteArray `json:"payload,omitempty"` ContentTopic string `json:"contentTopic,omitempty"` Version uint32 `json:"version"` Timestamp int64 `json:"timestamp,omitempty"` RateLimitProof *RateLimitProof `json:"rateLimitProof,omitempty"` }
func ProtoWakuMessageToRPCWakuMessage ¶ added in v0.1.0
func ProtoWakuMessageToRPCWakuMessage(input *pb.WakuMessage) *RPCWakuMessage
type RPCWakuRelayMessage ¶ added in v0.1.0
type RPCWakuRelayMessage struct { Payload HexBytes `json:"payload,omitempty"` ContentTopic string `json:"contentTopic,omitempty"` Timestamp int64 `json:"timestamp,omitempty"` RateLimitProof *RateLimitProof `json:"rateLimitProof,omitempty"` Version uint32 `json:"version"` }
func ProtoWakuMessageToRPCWakuRelayMessage ¶ added in v0.1.0
func ProtoWakuMessageToRPCWakuRelayMessage(input *pb.WakuMessage) *RPCWakuRelayMessage
type RateLimitProof ¶ added in v0.2.0
type RelayMessageArgs ¶
type RelayMessageArgs struct { Topic string `json:"topic,omitempty"` Message RPCWakuRelayMessage `json:"message,omitempty"` }
type RelayMessagesReply ¶ added in v0.1.0
type RelayMessagesReply = []*RPCWakuRelayMessage
type RelayService ¶
type RelayService struct {
// contains filtered or unexported fields
}
func NewRelayService ¶
func NewRelayService(node *node.WakuNode, log *zap.Logger) *RelayService
func (*RelayService) DeleteV1Subscription ¶
func (r *RelayService) DeleteV1Subscription(req *http.Request, args *TopicsArgs, reply *SuccessReply) error
func (*RelayService) GetV1Messages ¶
func (r *RelayService) GetV1Messages(req *http.Request, args *TopicArgs, reply *RelayMessagesReply) error
func (*RelayService) PostV1Message ¶
func (r *RelayService) PostV1Message(req *http.Request, args *RelayMessageArgs, reply *SuccessReply) error
func (*RelayService) PostV1Subscription ¶
func (r *RelayService) PostV1Subscription(req *http.Request, args *TopicsArgs, reply *SuccessReply) error
func (*RelayService) Start ¶
func (r *RelayService) Start()
func (*RelayService) Stop ¶
func (r *RelayService) Stop()
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 SymmetricKeyReply ¶
type SymmetricKeyReply string
type SymmetricMessageArgs ¶
type SymmetricMessageArgs struct { Topic string `json:"topic"` Message RPCWakuMessage `json:"message"` SymKey string `json:"symkey"` }
type SymmetricMessagesArgs ¶
type TopicsArgs ¶
type TopicsArgs struct {
Topics []string `json:"topics,omitempty"`
}
type VersionResponse ¶
type VersionResponse string