Documentation ¶
Index ¶
- Variables
- func CacheExpires(r *http.Response) time.Time
- type APIClient
- type APIKey
- type APIResponse
- type BasicAuth
- type Configuration
- type NotificationsApiService
- func (a *NotificationsApiService) CreateSubscription(ctx context.Context, localVarOptionals map[string]interface{}) (Subscription, *http.Response, error)
- func (a *NotificationsApiService) DeleteSubscription(ctx context.Context, id string) (*http.Response, error)
- func (a *NotificationsApiService) GetSubscription(ctx context.Context, id string) (Subscription, *http.Response, error)
- func (a *NotificationsApiService) ListSubscriptions(ctx context.Context, localVarOptionals map[string]interface{}) ([]Subscription, *http.Response, error)
- func (a *NotificationsApiService) ModifySubscription(ctx context.Context, id string, localVarOptionals map[string]interface{}) (Subscription, *http.Response, error)
- type Params
- type Subscription
- type Topic
- type UpdateData
- type UpdateTopic
Constants ¶
This section is empty.
Variables ¶
var ( // ContextOAuth2 takes a oauth2.TokenSource as authentication for the request. ContextOAuth2 = contextKey("token") // ContextBasicAuth takes BasicAuth as authentication for the request. ContextBasicAuth = contextKey("basic") // ContextAccessToken takes a string oauth2 access token as authentication for the request. ContextAccessToken = contextKey("accesstoken") // ContextAPIKey takes an APIKey as authentication for the request ContextAPIKey = contextKey("apikey") )
Functions ¶
Types ¶
type APIClient ¶
type APIClient struct { // API Services NotificationsApi *NotificationsApiService // contains filtered or unexported fields }
APIClient manages communication with the Notifications API API v2.1.0 In most cases there should be only one, shared, APIClient.
func NewAPIClient ¶
func NewAPIClient(cfg *Configuration) *APIClient
NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.
func (*APIClient) ChangeBasePath ¶
Change base path to allow switching to mocks
type APIKey ¶
APIKey provides API key based authentication to a request passed via context using ContextAPIKey
type APIResponse ¶
type APIResponse struct { *http.Response `json:"-"` Message string `json:"message,omitempty"` // Operation is the name of the swagger operation. Operation string `json:"operation,omitempty"` // RequestURL is the request URL. This value is always available, even if the // embedded *http.Response is nil. RequestURL string `json:"url,omitempty"` // Method is the HTTP method used for the request. This value is always // available, even if the embedded *http.Response is nil. Method string `json:"method,omitempty"` // Payload holds the contents of the response body (which may be nil or empty). // This is provided here as the raw response.Body() reader will have already // been drained. Payload []byte `json:"-"` }
func NewAPIResponse ¶
func NewAPIResponse(r *http.Response) *APIResponse
func NewAPIResponseWithError ¶
func NewAPIResponseWithError(errorMessage string) *APIResponse
type BasicAuth ¶
type BasicAuth struct { UserName string `json:"userName,omitempty"` Password string `json:"password,omitempty"` }
BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth
type Configuration ¶
type Configuration struct { BasePath string `json:"basePath,omitempty"` Host string `json:"host,omitempty"` Scheme string `json:"scheme,omitempty"` DefaultHeader map[string]string `json:"defaultHeader,omitempty"` UserAgent string `json:"userAgent,omitempty"` HTTPClient *http.Client }
func NewConfiguration ¶
func NewConfiguration() *Configuration
func (*Configuration) AddDefaultHeader ¶
func (c *Configuration) AddDefaultHeader(key string, value string)
type NotificationsApiService ¶
type NotificationsApiService service
func (*NotificationsApiService) CreateSubscription ¶
func (a *NotificationsApiService) CreateSubscription(ctx context.Context, localVarOptionals map[string]interface{}) (Subscription, *http.Response, error)
NotificationsApiService Create a new subscription
* @param ctx context.Context for authentication, logging, tracing, etc. @param optional (nil or map[string]interface{}) with one or more of:
@param "subscription" (Subscription)
@return Subscription
func (*NotificationsApiService) DeleteSubscription ¶
func (a *NotificationsApiService) DeleteSubscription(ctx context.Context, id string) (*http.Response, error)
NotificationsApiService * @param ctx context.Context for authentication, logging, tracing, etc. @param id @return
func (*NotificationsApiService) GetSubscription ¶
func (a *NotificationsApiService) GetSubscription(ctx context.Context, id string) (Subscription, *http.Response, error)
NotificationsApiService * @param ctx context.Context for authentication, logging, tracing, etc. @param id @return Subscription
func (*NotificationsApiService) ListSubscriptions ¶
func (a *NotificationsApiService) ListSubscriptions(ctx context.Context, localVarOptionals map[string]interface{}) ([]Subscription, *http.Response, error)
NotificationsApiService * @param ctx context.Context for authentication, logging, tracing, etc. @param optional (nil or map[string]interface{}) with one or more of:
@param "serviceType" (string) Service type (qc, tts, flip) @param "type_" (string) Subscription type (email, webhook, sns, aeg, pubsub)
@return []Subscription
func (*NotificationsApiService) ModifySubscription ¶
func (a *NotificationsApiService) ModifySubscription(ctx context.Context, id string, localVarOptionals map[string]interface{}) (Subscription, *http.Response, error)
NotificationsApiService Modify subscription * @param ctx context.Context for authentication, logging, tracing, etc. @param id @param optional (nil or map[string]interface{}) with one or more of:
@param "updateData" (UpdateData)
@return Subscription
type Params ¶
type Params struct { // (for email subscription type); E-mail addresses Addresses []string `json:"addresses,omitempty"` // (for webhook subscription type); Webhook URL Url string `json:"url,omitempty"` // (for webhook subscription type); HTTP method; default: POST (GET, POST) Method string `json:"method,omitempty"` // (for webhook subscription type); Number of retries before forgetting the notification; default: 0 Retries int32 `json:"retries,omitempty"` // (for webhook subscription type); default: application/json (application/json, application/x-www-form-urlencoded) ContentType string `json:"content_type,omitempty"` // (for sns subscription type) identifier of an AWS SNS Topic that events will be posted to. TopicArn string `json:"topic_arn,omitempty"` // (for sns subscription type) identifier of an AWS IAM Role that will be used for authorization. RoleArn string `json:"role_arn,omitempty"` // (for aeg subscription type) address of an Azure Event Grid Topic that events will be posted to. TopicEndpoint string `json:"topic_endpoint,omitempty"` // (for aeg subscription type) secret access key that authorizes Telestream Cloud to write to an Azure Event Grid Topic. AccessKey string `json:"access_key,omitempty"` // (for pubsub subscription type) id of a Google Cloud project that hosts the topic. ProjectId string `json:"project_id,omitempty"` // (for pubsub subscription type) name of a Google Cloud Pub/Sub topic to which notifications will be published. TopicName string `json:"topic_name,omitempty"` }
type Subscription ¶
type Topic ¶
type Topic struct { // [read-only] Account identifier connected to subscription notification Account string `json:"account,omitempty"` // Name of service (qc, flip, tts) Service string `json:"service"` // Name of the event; Quality Control (media-passed, media-error, media-warning, media-rejected, media-canceled, job-created, job-progress), Flip (video-created, video-encoded, encoding-complete, encoding-progress), Transcription (job-created, job-completed, job-error, job-progress) Event string `json:"event"` // (for tts, qc service); Project ID Project string `json:"project,omitempty"` // (for flip service); Factory ID Factory string `json:"factory,omitempty"` }
type UpdateData ¶
type UpdateData struct { Topic *UpdateTopic `json:"topic,omitempty"` Params *Params `json:"params,omitempty"` }
type UpdateTopic ¶
type UpdateTopic struct { // Name of the event; Quality Control (media-passed, media-error, media-warning, media-rejected, media-canceled, job-created, job-progress), Flip (video-created, video-encoded, encoding-complete, encoding-progress), Transcription (job-created, job-completed, job-error, job-progress) Event string `json:"event,omitempty"` }