Documentation
¶
Index ¶
- type BufferingHints
- type DeliveryStream
- type Destination
- type FirehoseService
- type Record
- type Store
- func (s *Store) CreateDeliveryStream(name, streamType string, dest Destination) (string, *service.AWSError)
- func (s *Store) DeleteDeliveryStream(name string) *service.AWSError
- func (s *Store) GetDeliveryStream(name string) (*DeliveryStream, *service.AWSError)
- func (s *Store) ListDeliveryStreams() []string
- func (s *Store) ListTags(streamName string) (map[string]string, *service.AWSError)
- func (s *Store) PutRecord(streamName string, data []byte) (string, *service.AWSError)
- func (s *Store) PutRecordBatch(streamName string, records [][]byte) ([]string, *service.AWSError)
- func (s *Store) TagStream(streamName string, tags map[string]string) *service.AWSError
- func (s *Store) UntagStream(streamName string, tagKeys []string) *service.AWSError
- func (s *Store) UpdateDestination(streamName, destinationID string, update Destination) *service.AWSError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BufferingHints ¶
BufferingHints holds S3 buffering configuration for a destination.
type DeliveryStream ¶
type DeliveryStream struct {
Name string
ARN string
Status deliveryStreamStatus
Type string
Destinations []Destination
Tags map[string]string
Records []Record
CreatedAt time.Time
}
DeliveryStream represents an in-memory Firehose delivery stream.
type Destination ¶
type Destination struct {
DestinationId string
S3BucketARN string
S3Prefix string
RoleARN string
BufferingHints BufferingHints
}
Destination holds a single delivery destination for a stream.
type FirehoseService ¶
type FirehoseService struct {
// contains filtered or unexported fields
}
FirehoseService is the cloudmock implementation of the AWS Data Firehose API.
func New ¶
func New(accountID, region string) *FirehoseService
New returns a new FirehoseService for the given AWS account ID and region.
func (*FirehoseService) Actions ¶
func (s *FirehoseService) Actions() []service.Action
Actions returns the list of Firehose API actions supported by this service.
func (*FirehoseService) HandleRequest ¶
func (s *FirehoseService) HandleRequest(ctx *service.RequestContext) (*service.Response, error)
HandleRequest routes an incoming Firehose request to the appropriate handler. Firehose uses the JSON protocol; the action is parsed from X-Amz-Target by the gateway and placed in ctx.Action (e.g. "CreateDeliveryStream").
func (*FirehoseService) HealthCheck ¶
func (s *FirehoseService) HealthCheck() error
HealthCheck always returns nil (no external dependencies).
func (*FirehoseService) Name ¶
func (s *FirehoseService) Name() string
Name returns the AWS service name used for routing.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is the in-memory store for Firehose delivery streams.
func (*Store) CreateDeliveryStream ¶
func (s *Store) CreateDeliveryStream( name, streamType string, dest Destination, ) (string, *service.AWSError)
CreateDeliveryStream creates a new delivery stream.
func (*Store) DeleteDeliveryStream ¶
DeleteDeliveryStream removes a delivery stream by name.
func (*Store) GetDeliveryStream ¶
func (s *Store) GetDeliveryStream(name string) (*DeliveryStream, *service.AWSError)
GetDeliveryStream returns the delivery stream by name.
func (*Store) ListDeliveryStreams ¶
ListDeliveryStreams returns a sorted list of delivery stream names.
func (*Store) PutRecord ¶
PutRecord appends a single record to the delivery stream and returns its RecordId.
func (*Store) PutRecordBatch ¶
PutRecordBatch appends multiple records and returns a slice of RecordIds in the same order as the input. All records are appended; no partial failures occur in this in-memory implementation.
func (*Store) UntagStream ¶
UntagStream removes tags from a delivery stream.
func (*Store) UpdateDestination ¶
func (s *Store) UpdateDestination(streamName, destinationID string, update Destination) *service.AWSError
UpdateDestination replaces the S3 configuration for an existing destination.