Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RequestOpts golangsdk.RequestOpts = golangsdk.RequestOpts{ MoreHeaders: map[string]string{"Content-Type": "application/json", "X-Language": "en-us"}, }
Functions ¶
This section is empty.
Types ¶
type CreateOps ¶
type CreateOps struct { //Message endpoint Endpoint string `json:"endpoint" required:"true"` //Protocol of the message endpoint Protocol string `json:"protocol" required:"true"` //Description of the subscription Remark string `json:"remark,omitempty"` // Extension config Extension *ExtensionSpec `json:"extension,omitempty"` }
CreateOps is a struct that contains all the parameters.
func (CreateOps) ToSubscriptionCreateMap ¶
type CreateOpsBuilder ¶
CreateOpsBuilder is used for creating subscription parameters. any struct providing the parameters should implement this interface
type CreateResult ¶
type CreateResult struct {
// contains filtered or unexported fields
}
CreateResult contains the response body and error from a Create request.
func Create ¶
func Create(client *golangsdk.ServiceClient, ops CreateOpsBuilder, topicUrn string) (r CreateResult)
Create a subscription with given parameters.
func (CreateResult) Extract ¶
func (r CreateResult) Extract() (*Subscription, error)
Extract will get the subscription object out of the commonResult object.
func (CreateResult) ExtractInto ¶
func (r CreateResult) ExtractInto(v interface{}) error
type DeleteResult ¶
func Delete ¶
func Delete(client *golangsdk.ServiceClient, subscriptionUrn string) (r DeleteResult)
delete a subscription via subscription urn
type ExtensionSpec ¶
type FilterPolicy ¶
type GetResult ¶
type GetResult struct {
// contains filtered or unexported fields
}
func (GetResult) Extract ¶
func (r GetResult) Extract() (*Subscription, error)
Extract will get the subscription object out of the commonResult object.
func (GetResult) ExtractInto ¶
func (r GetResult) ExtractInto(v interface{}) error
type ListResult ¶
func ListFromTopic ¶
func ListFromTopic(client *golangsdk.ServiceClient, topicUrn string) (r ListResult)
list all the subscriptions of a topic
func (ListResult) Extract ¶
func (lr ListResult) Extract() ([]SubscriptionGet, error)
type Subscription ¶
type SubscriptionGet ¶
type SubscriptionGet struct { TopicUrn string `json:"topic_urn"` Protocol string `json:"protocol"` SubscriptionUrn string `json:"subscription_urn"` Owner string `json:"owner"` Endpoint string `json:"endpoint"` Remark string `json:"remark"` Status int `json:"status"` FilterPolicies []FilterPolicy `json:"filter_polices"` }
func ExtractSubscriptions ¶
func ExtractSubscriptions(r pagination.Page) ([]SubscriptionGet, error)
type SubscriptionPage ¶
type SubscriptionPage struct {
pagination.OffsetPageBase
}
func (SubscriptionPage) IsEmpty ¶
func (b SubscriptionPage) IsEmpty() (bool, error)
Click to show internal directories.
Click to hide internal directories.