Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Blackbox ¶
type Blackbox interface {
contract.Base64Decoder
}
type Client ¶
type Client interface {
Blackbox
contract.PubSubOperator
}
func NewClient ¶
func NewClient(d Dependencies) (Client, error)
type DefaultTool ¶ added in v0.1.11
func NewTool ¶
func NewTool(c Client, opts contract.ToolOptions[Client]) *DefaultTool
func (*DefaultTool) DecodePayload ¶ added in v0.1.11
func (d *DefaultTool) DecodePayload(ctx context.Context, r *http.Request) (contract.PubSubMessage, error)
DecodePayload extracts and decodes a Pub/Sub message from an HTTP request.
func (*DefaultTool) MockPubSubPayload ¶ added in v0.1.11
func (d *DefaultTool) MockPubSubPayload(ctx context.Context, msg contract.PubSubMessage, subscription string) (io.Reader, error)
MockPubSubPayload creates a mock Pub/Sub payload for testing purposes.
type Dependencies ¶ added in v0.1.8
type Dependencies struct {
M contract.Marshaler
U contract.Unmarshaler
}
type PubSubMessageWrapper ¶
func (*PubSubMessageWrapper) GetAttributes ¶
func (p *PubSubMessageWrapper) GetAttributes() map[string]string
func (*PubSubMessageWrapper) GetData ¶
func (p *PubSubMessageWrapper) GetData() []byte
func (*PubSubMessageWrapper) GetMessageID ¶
func (p *PubSubMessageWrapper) GetMessageID() string
func (*PubSubMessageWrapper) GetPublishTime ¶
func (p *PubSubMessageWrapper) GetPublishTime() time.Time
Click to show internal directories.
Click to hide internal directories.