Documentation ¶
Overview ¶
Package dbs provides support the HSDP Data Broker services
Index ¶
- Constants
- Variables
- type Client
- func (c *Client) Close()
- func (c *Client) Do(req *http.Request, v interface{}) (*Response, error)
- func (c *Client) GetBaseURL() string
- func (c *Client) GetEndpointURL() string
- func (c *Client) NewRequest(method, requestPath string, opt interface{}, options ...OptionFunc) (*http.Request, error)
- func (c *Client) SetBaseURL(urlStr string) error
- type Config
- type GetSQSSubscriberOptions
- type GetTopicSubscriptionOptions
- type Meta
- type OptionFunc
- type Response
- type SQSBundle
- type SQSSubscriber
- type SQSSubscriberConfig
- type Subscriber
- type SubscribersService
- func (b *SubscribersService) CreateSQS(sqsConfig SQSSubscriberConfig) (*SQSSubscriber, *Response, error)
- func (b *SubscribersService) DeleteSQS(subscriber SQSSubscriber) (bool, *Response, error)
- func (b *SubscribersService) FindSQS(opt *GetSQSSubscriberOptions, options ...OptionFunc) (*[]SQSSubscriber, *Response, error)
- func (b *SubscribersService) GetSQSByID(id string) (*SQSSubscriber, *Response, error)
- type SubscriptionService
- func (b *SubscriptionService) CreateTopicSubscription(subscriptionConfig TopicSubscriptionConfig) (*TopicSubscription, *Response, error)
- func (b *SubscriptionService) DeleteTopicSubscription(subscription TopicSubscription) (bool, *Response, error)
- func (b *SubscriptionService) FindTopicSubscription(opt *GetTopicSubscriptionOptions, options ...OptionFunc) (*[]TopicSubscription, *Response, error)
- func (b *SubscriptionService) GetTopicSubscriptionByID(id string) (*TopicSubscription, *Response, error)
- type TopicSubscription
- type TopicSubscriptionBundle
- type TopicSubscriptionConfig
Constants ¶
View Source
const (
APIVersion = "1"
)
Variables ¶
View Source
var ( ErrNotFound = errors.New("entity not found") ErrBaseURLCannotBeEmpty = errors.New("base URL cannot be empty") ErrEmptyResult = errors.New("empty result") ErrInvalidEndpointURL = errors.New("invalid endpoint URL") ErrMissingName = errors.New("missing name value") ErrMissingDescription = errors.New("missing description value") ErrMalformedInputValue = errors.New("malformed input value") ErrMissingOrganization = errors.New("missing organization") ErrMissingProposition = errors.New("missing proposition") ErrMissingGlobalReference = errors.New("missing global reference") ErrNotImplementedByHSDP = errors.New("method not implemented by HSDP") ErrEmptyResults = errors.New("empty results") ErrOperationFailed = errors.New("operation failed") ErrCouldNoReadResourceAfterCreate = errors.New("could not read resource after create") )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { // HTTP Client used to communicate with IAM API *iam.Client // User agent used when communicating with the HSDP Blob Repository API UserAgent string Subscribers *SubscribersService Subscriptions *SubscriptionService // contains filtered or unexported fields }
A Client manages communication with HSDP Data Broker APIs
func (*Client) Do ¶
Do performs a http request. If v implements the io.Writer interface, the raw response body will be written to v, without attempting to first decode it.
func (*Client) GetBaseURL ¶
GetBaseURL returns the base URL as configured
func (*Client) GetEndpointURL ¶
GetEndpointURL returns the Discovery Endpoint URL as configured
func (*Client) NewRequest ¶
func (*Client) SetBaseURL ¶
SetBaseURL sets the base URL for API requests
type GetSQSSubscriberOptions ¶
type OptionFunc ¶
OptionFunc is the function signature function for options
type Response ¶
Response is a HSDP DBS API response. This wraps the standard http.Response returned from HSDP DBS and provides convenient access to things like errors
func (*Response) StatusCode ¶
type SQSBundle ¶
type SQSBundle struct { Type string `json:"type,omitempty"` Entry []SQSSubscriber `json:"entry,omitempty"` }
type SQSSubscriber ¶
type SQSSubscriber struct { ID string `json:"id"` Meta *Meta `json:"meta"` Name string `json:"name" validate:"required"` Description string `json:"description" validate:"required"` Status string `json:"status" validate:"required" enum:"Creating|Deleting|Active|Updating|InError"` ErrorMessage string `json:"errorMessage,omitempty"` ResourceType string `json:"resourceType" validate:"required" enum:"SQSSubscriber"` QueueName string `json:"queueName" validate:"required"` QueueType string `json:"queueType" validate:"required" enum:"Standard|FIFO"` DeliveryDelaySeconds int `json:"deliveryDelaySeconds" validate:"required"` MessageRetentionPeriod int `json:"messageRetentionPeriod" validate:"required"` ReceiveMessageWaitTimeSeconds int `json:"receiveMessageWaitTimeSeconds" validate:"required"` ServerSideEncryption bool `json:"serverSideEncryption" validate:"required"` }
type SQSSubscriberConfig ¶
type SQSSubscriberConfig struct { ResourceType string `json:"resourceType" validate:"required" enum:"SQSSubscriberConfig"` NameInfix string `json:"nameInfix" validate:"required"` Description string `json:"description" validate:"required"` QueueType string `json:"queueType,omitempty" enum:"Standard|FIFO"` DeliveryDelaySeconds int `json:"deliveryDelaySeconds,omitempty"` MessageRetentionPeriod int `json:"messageRetentionPeriod,omitempty"` ReceiveMessageWaitTimeSeconds int `json:"receiveMessageWaitTimeSeconds,omitempty"` ServerSideEncryption bool `json:"serverSideEncryption,omitempty"` }
type Subscriber ¶
type SubscribersService ¶
type SubscribersService struct { *Client // contains filtered or unexported fields }
func (*SubscribersService) CreateSQS ¶
func (b *SubscribersService) CreateSQS(sqsConfig SQSSubscriberConfig) (*SQSSubscriber, *Response, error)
func (*SubscribersService) DeleteSQS ¶
func (b *SubscribersService) DeleteSQS(subscriber SQSSubscriber) (bool, *Response, error)
func (*SubscribersService) FindSQS ¶
func (b *SubscribersService) FindSQS(opt *GetSQSSubscriberOptions, options ...OptionFunc) (*[]SQSSubscriber, *Response, error)
func (*SubscribersService) GetSQSByID ¶
func (b *SubscribersService) GetSQSByID(id string) (*SQSSubscriber, *Response, error)
type SubscriptionService ¶
type SubscriptionService struct { *Client // contains filtered or unexported fields }
func (*SubscriptionService) CreateTopicSubscription ¶
func (b *SubscriptionService) CreateTopicSubscription(subscriptionConfig TopicSubscriptionConfig) (*TopicSubscription, *Response, error)
func (*SubscriptionService) DeleteTopicSubscription ¶
func (b *SubscriptionService) DeleteTopicSubscription(subscription TopicSubscription) (bool, *Response, error)
func (*SubscriptionService) FindTopicSubscription ¶
func (b *SubscriptionService) FindTopicSubscription(opt *GetTopicSubscriptionOptions, options ...OptionFunc) (*[]TopicSubscription, *Response, error)
func (*SubscriptionService) GetTopicSubscriptionByID ¶
func (b *SubscriptionService) GetTopicSubscriptionByID(id string) (*TopicSubscription, *Response, error)
type TopicSubscription ¶
type TopicSubscription struct { ResourceType string `json:"resourceType" validate:"required" enum:"TopicSubscription"` ID string `json:"id"` Meta *Meta `json:"meta"` Name string `json:"name" validate:"required"` Description string `json:"description" validate:"required"` Subscriber *Subscriber `json:"subscriber" validate:"required"` DeliverDataOnly bool `json:"deliverDataOnly,omitempty"` KinesisStreamPartitionKey string `json:"kinesisStreamPartitionKey,omitempty"` Status string `json:"status" validate:"required" enum:"Creating|Deleting|Active|Updating|InError"` ErrorMessage string `json:"errorMessage,omitempty"` DataType string `json:"dataType" validate:"required"` RuleName string `json:"ruleName" validate:"required"` }
type TopicSubscriptionBundle ¶
type TopicSubscriptionBundle struct { Type string `json:"type,omitempty"` Entry []TopicSubscription `json:"entry,omitempty"` }
type TopicSubscriptionConfig ¶
type TopicSubscriptionConfig struct { ResourceType string `json:"resourceType" validate:"required" enum:"TopicSubscriptionConfig"` NameInfix string `json:"nameInfix" validate:"required"` Description string `json:"description" validate:"required"` SubscriberId string `json:"subscriberId" validate:"required"` DeliverDataOnly bool `json:"deliverDataOnly,omitempty"` KinesisStreamPartitionKey string `json:"kinesisStreamPartitionKey,omitempty"` DataType string `json:"dataType" validate:"required"` }
Click to show internal directories.
Click to hide internal directories.