Documentation ¶
Index ¶
- func HTTPGetWithClient[T protoreflect.ProtoMessage](url string, client *http.Client, val T, authHeader string) error
- func HTTPPostWithClient[T protoreflect.ProtoMessage](url string, client *http.Client, body interface{}, val T, authHeader string) error
- type FeedUpdate
- type HTTPError
- type Streamer
- type SubscribeParams
- type UnsubscribeParams
- type WS
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HTTPGetWithClient ¶
func HTTPGetWithClient[T protoreflect.ProtoMessage](url string, client *http.Client, val T, authHeader string) error
func HTTPPostWithClient ¶
func HTTPPostWithClient[T protoreflect.ProtoMessage](url string, client *http.Client, body interface{}, val T, authHeader string) error
Types ¶
type FeedUpdate ¶
type FeedUpdate struct { SubscriptionID string `json:"subscription"` Result json.RawMessage `json:"result"` }
FeedUpdate wraps the result from any particular stream with the subscription ID it's associated with
type HTTPError ¶
type Streamer ¶
func GRPCStream ¶
func GRPCStream[T any](stream grpc.ClientStream, input string) Streamer[*T]
type SubscribeParams ¶
type SubscribeParams struct { StreamName string StreamOpts json.RawMessage }
SubscribeParams exist because subscribe arguments usually look like ["streamName", {"some": "opts"}], which doesn't map elegantly to Go structs
func (SubscribeParams) MarshalJSON ¶
func (s SubscribeParams) MarshalJSON() ([]byte, error)
func (*SubscribeParams) UnmarshalJSON ¶
func (s *SubscribeParams) UnmarshalJSON(b []byte) error
type UnsubscribeParams ¶
type UnsubscribeParams struct {
SubscriptionID string
}
UnsubscribeParams exist because unsubscribe arguments usually look like ["subscriptionID"], which doesn't map elegantly to Go structs
func (UnsubscribeParams) MarshalJSON ¶
func (s UnsubscribeParams) MarshalJSON() ([]byte, error)
func (*UnsubscribeParams) UnmarshalJSON ¶
func (s *UnsubscribeParams) UnmarshalJSON(b []byte) error
Click to show internal directories.
Click to hide internal directories.