Documentation ¶
Index ¶
- Variables
- type AuthenticationType
- type Client
- type ClientImpl
- func (client *ClientImpl) CreateSubscription(ctx context.Context, args CreateSubscriptionArgs) (*Subscription, error)
- func (client *ClientImpl) CreateSubscriptionsQuery(ctx context.Context, args CreateSubscriptionsQueryArgs) (*SubscriptionsQuery, error)
- func (client *ClientImpl) CreateTestNotification(ctx context.Context, args CreateTestNotificationArgs) (*Notification, error)
- func (client *ClientImpl) DeleteSubscription(ctx context.Context, args DeleteSubscriptionArgs) error
- func (client *ClientImpl) GetConsumer(ctx context.Context, args GetConsumerArgs) (*Consumer, error)
- func (client *ClientImpl) GetConsumerAction(ctx context.Context, args GetConsumerActionArgs) (*ConsumerAction, error)
- func (client *ClientImpl) GetEventType(ctx context.Context, args GetEventTypeArgs) (*EventTypeDescriptor, error)
- func (client *ClientImpl) GetNotification(ctx context.Context, args GetNotificationArgs) (*Notification, error)
- func (client *ClientImpl) GetNotifications(ctx context.Context, args GetNotificationsArgs) (*[]Notification, error)
- func (client *ClientImpl) GetPublisher(ctx context.Context, args GetPublisherArgs) (*Publisher, error)
- func (client *ClientImpl) GetSubscription(ctx context.Context, args GetSubscriptionArgs) (*Subscription, error)
- func (client *ClientImpl) GetSubscriptionDiagnostics(ctx context.Context, args GetSubscriptionDiagnosticsArgs) (*notification.SubscriptionDiagnostics, error)
- func (client *ClientImpl) ListConsumerActions(ctx context.Context, args ListConsumerActionsArgs) (*[]ConsumerAction, error)
- func (client *ClientImpl) ListConsumers(ctx context.Context, args ListConsumersArgs) (*[]Consumer, error)
- func (client *ClientImpl) ListEventTypes(ctx context.Context, args ListEventTypesArgs) (*[]EventTypeDescriptor, error)
- func (client *ClientImpl) ListPublishers(ctx context.Context, args ListPublishersArgs) (*[]Publisher, error)
- func (client *ClientImpl) ListSubscriptions(ctx context.Context, args ListSubscriptionsArgs) (*[]Subscription, error)
- func (client *ClientImpl) QueryInputValues(ctx context.Context, args QueryInputValuesArgs) (*forminput.InputValuesQuery, error)
- func (client *ClientImpl) QueryNotifications(ctx context.Context, args QueryNotificationsArgs) (*NotificationsQuery, error)
- func (client *ClientImpl) QueryPublishers(ctx context.Context, args QueryPublishersArgs) (*PublishersQuery, error)
- func (client *ClientImpl) ReplaceSubscription(ctx context.Context, args ReplaceSubscriptionArgs) (*Subscription, error)
- func (client *ClientImpl) UpdateSubscriptionDiagnostics(ctx context.Context, args UpdateSubscriptionDiagnosticsArgs) (*notification.SubscriptionDiagnostics, error)
- type Consumer
- type ConsumerAction
- type CreateSubscriptionArgs
- type CreateSubscriptionsQueryArgs
- type CreateTestNotificationArgs
- type DeleteSubscriptionArgs
- type Event
- type EventTypeDescriptor
- type ExternalConfigurationDescriptor
- type FormattedEventMessage
- type GetConsumerActionArgs
- type GetConsumerArgs
- type GetEventTypeArgs
- type GetNotificationArgs
- type GetNotificationsArgs
- type GetPublisherArgs
- type GetSubscriptionArgs
- type GetSubscriptionDiagnosticsArgs
- type ListConsumerActionsArgs
- type ListConsumersArgs
- type ListEventTypesArgs
- type ListPublishersArgs
- type ListSubscriptionsArgs
- type Notification
- type NotificationDetails
- type NotificationResult
- type NotificationResultsSummaryDetail
- type NotificationStatus
- type NotificationSummary
- type NotificationsQuery
- type Publisher
- type PublisherEvent
- type PublishersQuery
- type QueryInputValuesArgs
- type QueryNotificationsArgs
- type QueryPublishersArgs
- type ReplaceSubscriptionArgs
- type ResourceContainer
- type SessionToken
- type Subscription
- type SubscriptionInputScope
- type SubscriptionInputValuesQuery
- type SubscriptionStatus
- type SubscriptionsQuery
- type UpdateSubscriptionDiagnosticsArgs
- type VersionedResource
Constants ¶
This section is empty.
Variables ¶
var AuthenticationTypeValues = authenticationTypeValuesType{
None: "none",
OAuth: "oAuth",
External: "external",
}
var NotificationResultValues = notificationResultValuesType{
Pending: "pending",
Succeeded: "succeeded",
Failed: "failed",
Filtered: "filtered",
}
var NotificationStatusValues = notificationStatusValuesType{
Queued: "queued",
Processing: "processing",
RequestInProgress: "requestInProgress",
Completed: "completed",
}
var SubscriptionInputScopeValues = subscriptionInputScopeValuesType{ Publisher: "publisher", Consumer: "consumer", }
var SubscriptionStatusValues = subscriptionStatusValuesType{
Enabled: "enabled",
OnProbation: "onProbation",
DisabledByUser: "disabledByUser",
DisabledBySystem: "disabledBySystem",
DisabledByInactiveIdentity: "disabledByInactiveIdentity",
}
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { // [Preview API] Create a subscription. CreateSubscription(context.Context, CreateSubscriptionArgs) (*Subscription, error) // [Preview API] Query for service hook subscriptions. CreateSubscriptionsQuery(context.Context, CreateSubscriptionsQueryArgs) (*SubscriptionsQuery, error) // [Preview API] Sends a test notification. This is useful for verifying the configuration of an updated or new service hooks subscription. CreateTestNotification(context.Context, CreateTestNotificationArgs) (*Notification, error) // [Preview API] Delete a specific service hooks subscription. DeleteSubscription(context.Context, DeleteSubscriptionArgs) error // [Preview API] Get a specific consumer service. Optionally filter out consumer actions that do not support any event types for the specified publisher. GetConsumer(context.Context, GetConsumerArgs) (*Consumer, error) // [Preview API] Get details about a specific consumer action. GetConsumerAction(context.Context, GetConsumerActionArgs) (*ConsumerAction, error) // [Preview API] Get a specific event type. GetEventType(context.Context, GetEventTypeArgs) (*EventTypeDescriptor, error) // [Preview API] Get a specific notification for a subscription. GetNotification(context.Context, GetNotificationArgs) (*Notification, error) // [Preview API] Get a list of notifications for a specific subscription. A notification includes details about the event, the request to and the response from the consumer service. GetNotifications(context.Context, GetNotificationsArgs) (*[]Notification, error) // [Preview API] Get a specific service hooks publisher. GetPublisher(context.Context, GetPublisherArgs) (*Publisher, error) // [Preview API] Get a specific service hooks subscription. GetSubscription(context.Context, GetSubscriptionArgs) (*Subscription, error) // [Preview API] GetSubscriptionDiagnostics(context.Context, GetSubscriptionDiagnosticsArgs) (*notification.SubscriptionDiagnostics, error) // [Preview API] Get a list of consumer actions for a specific consumer. ListConsumerActions(context.Context, ListConsumerActionsArgs) (*[]ConsumerAction, error) // [Preview API] Get a list of available service hook consumer services. Optionally filter by consumers that support at least one event type from the specific publisher. ListConsumers(context.Context, ListConsumersArgs) (*[]Consumer, error) // [Preview API] Get the event types for a specific publisher. ListEventTypes(context.Context, ListEventTypesArgs) (*[]EventTypeDescriptor, error) // [Preview API] Get a list of publishers. ListPublishers(context.Context, ListPublishersArgs) (*[]Publisher, error) // [Preview API] Get a list of subscriptions. ListSubscriptions(context.Context, ListSubscriptionsArgs) (*[]Subscription, error) // [Preview API] QueryInputValues(context.Context, QueryInputValuesArgs) (*forminput.InputValuesQuery, error) // [Preview API] Query for notifications. A notification includes details about the event, the request to and the response from the consumer service. QueryNotifications(context.Context, QueryNotificationsArgs) (*NotificationsQuery, error) // [Preview API] Query for service hook publishers. QueryPublishers(context.Context, QueryPublishersArgs) (*PublishersQuery, error) // [Preview API] Update a subscription. <param name="subscriptionId">ID for a subscription that you wish to update.</param> ReplaceSubscription(context.Context, ReplaceSubscriptionArgs) (*Subscription, error) // [Preview API] UpdateSubscriptionDiagnostics(context.Context, UpdateSubscriptionDiagnosticsArgs) (*notification.SubscriptionDiagnostics, error) }
type ClientImpl ¶
type ClientImpl struct {
Client azuredevops.Client
}
func (*ClientImpl) CreateSubscription ¶
func (client *ClientImpl) CreateSubscription(ctx context.Context, args CreateSubscriptionArgs) (*Subscription, error)
[Preview API] Create a subscription.
func (*ClientImpl) CreateSubscriptionsQuery ¶
func (client *ClientImpl) CreateSubscriptionsQuery(ctx context.Context, args CreateSubscriptionsQueryArgs) (*SubscriptionsQuery, error)
[Preview API] Query for service hook subscriptions.
func (*ClientImpl) CreateTestNotification ¶
func (client *ClientImpl) CreateTestNotification(ctx context.Context, args CreateTestNotificationArgs) (*Notification, error)
[Preview API] Sends a test notification. This is useful for verifying the configuration of an updated or new service hooks subscription.
func (*ClientImpl) DeleteSubscription ¶
func (client *ClientImpl) DeleteSubscription(ctx context.Context, args DeleteSubscriptionArgs) error
[Preview API] Delete a specific service hooks subscription.
func (*ClientImpl) GetConsumer ¶
func (client *ClientImpl) GetConsumer(ctx context.Context, args GetConsumerArgs) (*Consumer, error)
[Preview API] Get a specific consumer service. Optionally filter out consumer actions that do not support any event types for the specified publisher.
func (*ClientImpl) GetConsumerAction ¶
func (client *ClientImpl) GetConsumerAction(ctx context.Context, args GetConsumerActionArgs) (*ConsumerAction, error)
[Preview API] Get details about a specific consumer action.
func (*ClientImpl) GetEventType ¶
func (client *ClientImpl) GetEventType(ctx context.Context, args GetEventTypeArgs) (*EventTypeDescriptor, error)
[Preview API] Get a specific event type.
func (*ClientImpl) GetNotification ¶
func (client *ClientImpl) GetNotification(ctx context.Context, args GetNotificationArgs) (*Notification, error)
[Preview API] Get a specific notification for a subscription.
func (*ClientImpl) GetNotifications ¶
func (client *ClientImpl) GetNotifications(ctx context.Context, args GetNotificationsArgs) (*[]Notification, error)
[Preview API] Get a list of notifications for a specific subscription. A notification includes details about the event, the request to and the response from the consumer service.
func (*ClientImpl) GetPublisher ¶
func (client *ClientImpl) GetPublisher(ctx context.Context, args GetPublisherArgs) (*Publisher, error)
[Preview API] Get a specific service hooks publisher.
func (*ClientImpl) GetSubscription ¶
func (client *ClientImpl) GetSubscription(ctx context.Context, args GetSubscriptionArgs) (*Subscription, error)
[Preview API] Get a specific service hooks subscription.
func (*ClientImpl) GetSubscriptionDiagnostics ¶
func (client *ClientImpl) GetSubscriptionDiagnostics(ctx context.Context, args GetSubscriptionDiagnosticsArgs) (*notification.SubscriptionDiagnostics, error)
[Preview API]
func (*ClientImpl) ListConsumerActions ¶
func (client *ClientImpl) ListConsumerActions(ctx context.Context, args ListConsumerActionsArgs) (*[]ConsumerAction, error)
[Preview API] Get a list of consumer actions for a specific consumer.
func (*ClientImpl) ListConsumers ¶
func (client *ClientImpl) ListConsumers(ctx context.Context, args ListConsumersArgs) (*[]Consumer, error)
[Preview API] Get a list of available service hook consumer services. Optionally filter by consumers that support at least one event type from the specific publisher.
func (*ClientImpl) ListEventTypes ¶
func (client *ClientImpl) ListEventTypes(ctx context.Context, args ListEventTypesArgs) (*[]EventTypeDescriptor, error)
[Preview API] Get the event types for a specific publisher.
func (*ClientImpl) ListPublishers ¶
func (client *ClientImpl) ListPublishers(ctx context.Context, args ListPublishersArgs) (*[]Publisher, error)
[Preview API] Get a list of publishers.
func (*ClientImpl) ListSubscriptions ¶
func (client *ClientImpl) ListSubscriptions(ctx context.Context, args ListSubscriptionsArgs) (*[]Subscription, error)
[Preview API] Get a list of subscriptions.
func (*ClientImpl) QueryInputValues ¶
func (client *ClientImpl) QueryInputValues(ctx context.Context, args QueryInputValuesArgs) (*forminput.InputValuesQuery, error)
[Preview API]
func (*ClientImpl) QueryNotifications ¶
func (client *ClientImpl) QueryNotifications(ctx context.Context, args QueryNotificationsArgs) (*NotificationsQuery, error)
[Preview API] Query for notifications. A notification includes details about the event, the request to and the response from the consumer service.
func (*ClientImpl) QueryPublishers ¶
func (client *ClientImpl) QueryPublishers(ctx context.Context, args QueryPublishersArgs) (*PublishersQuery, error)
[Preview API] Query for service hook publishers.
func (*ClientImpl) ReplaceSubscription ¶
func (client *ClientImpl) ReplaceSubscription(ctx context.Context, args ReplaceSubscriptionArgs) (*Subscription, error)
[Preview API] Update a subscription. <param name="subscriptionId">ID for a subscription that you wish to update.</param>
func (*ClientImpl) UpdateSubscriptionDiagnostics ¶
func (client *ClientImpl) UpdateSubscriptionDiagnostics(ctx context.Context, args UpdateSubscriptionDiagnosticsArgs) (*notification.SubscriptionDiagnostics, error)
[Preview API]
type Consumer ¶
type Consumer struct { // Reference Links Links interface{} `json:"_links,omitempty"` // Gets this consumer's actions. Actions *[]ConsumerAction `json:"actions,omitempty"` // Gets or sets this consumer's authentication type. AuthenticationType *AuthenticationType `json:"authenticationType,omitempty"` // Gets or sets this consumer's localized description. Description *string `json:"description,omitempty"` // Non-null only if subscriptions for this consumer are configured externally. ExternalConfiguration *ExternalConfigurationDescriptor `json:"externalConfiguration,omitempty"` // Gets or sets this consumer's identifier. Id *string `json:"id,omitempty"` // Gets or sets this consumer's image URL, if any. ImageUrl *string `json:"imageUrl,omitempty"` // Gets or sets this consumer's information URL, if any. InformationUrl *string `json:"informationUrl,omitempty"` // Gets or sets this consumer's input descriptors. InputDescriptors *[]forminput.InputDescriptor `json:"inputDescriptors,omitempty"` // Gets or sets this consumer's localized name. Name *string `json:"name,omitempty"` // The url for this resource Url *string `json:"url,omitempty"` }
Defines the data contract of a consumer.
type ConsumerAction ¶
type ConsumerAction struct { // Reference Links Links interface{} `json:"_links,omitempty"` // Gets or sets the flag indicating if resource version can be overridden when creating or editing a subscription. AllowResourceVersionOverride *bool `json:"allowResourceVersionOverride,omitempty"` // Gets or sets the identifier of the consumer to which this action belongs. ConsumerId *string `json:"consumerId,omitempty"` // Gets or sets this action's localized description. Description *string `json:"description,omitempty"` // Gets or sets this action's identifier. Id *string `json:"id,omitempty"` // Gets or sets this action's input descriptors. InputDescriptors *[]forminput.InputDescriptor `json:"inputDescriptors,omitempty"` // Gets or sets this action's localized name. Name *string `json:"name,omitempty"` // Gets or sets this action's supported event identifiers. SupportedEventTypes *[]string `json:"supportedEventTypes,omitempty"` // Gets or sets this action's supported resource versions. SupportedResourceVersions *map[string][]string `json:"supportedResourceVersions,omitempty"` // The url for this resource Url *string `json:"url,omitempty"` }
Defines the data contract of a consumer action.
type CreateSubscriptionArgs ¶
type CreateSubscriptionArgs struct { // (required) Subscription to be created. Subscription *Subscription }
Arguments for the CreateSubscription function
type CreateSubscriptionsQueryArgs ¶
type CreateSubscriptionsQueryArgs struct { // (required) Query *SubscriptionsQuery }
Arguments for the CreateSubscriptionsQuery function
type CreateTestNotificationArgs ¶
type CreateTestNotificationArgs struct { // (required) TestNotification *Notification // (optional) Only allow testing with real data in existing subscriptions. UseRealData *bool }
Arguments for the CreateTestNotification function
type DeleteSubscriptionArgs ¶
type DeleteSubscriptionArgs struct { // (required) ID for a subscription. SubscriptionId *uuid.UUID }
Arguments for the DeleteSubscription function
type Event ¶
type Event struct { // Gets or sets the UTC-based date and time that this event was created. CreatedDate *azuredevops.Time `json:"createdDate,omitempty"` // Gets or sets the detailed message associated with this event. DetailedMessage *FormattedEventMessage `json:"detailedMessage,omitempty"` // Gets or sets the type of this event. EventType *string `json:"eventType,omitempty"` // Gets or sets the unique identifier of this event. Id *uuid.UUID `json:"id,omitempty"` // Gets or sets the (brief) message associated with this event. Message *FormattedEventMessage `json:"message,omitempty"` // Gets or sets the identifier of the publisher that raised this event. PublisherId *string `json:"publisherId,omitempty"` // Gets or sets the data associated with this event. Resource interface{} `json:"resource,omitempty"` // Gets or sets the resource containers. ResourceContainers *map[string]ResourceContainer `json:"resourceContainers,omitempty"` // Gets or sets the version of the data associated with this event. ResourceVersion *string `json:"resourceVersion,omitempty"` // Gets or sets the Session Token that can be used in further interactions SessionToken *SessionToken `json:"sessionToken,omitempty"` }
Encapsulates the properties of an event.
type EventTypeDescriptor ¶
type EventTypeDescriptor struct { // A localized description of the event type Description *string `json:"description,omitempty"` // A unique id for the event type Id *string `json:"id,omitempty"` // Event-specific inputs InputDescriptors *[]forminput.InputDescriptor `json:"inputDescriptors,omitempty"` // A localized friendly name for the event type Name *string `json:"name,omitempty"` // A unique id for the publisher of this event type PublisherId *string `json:"publisherId,omitempty"` // Supported versions for the event's resource payloads. SupportedResourceVersions *[]string `json:"supportedResourceVersions,omitempty"` // The url for this resource Url *string `json:"url,omitempty"` }
Describes a type of event
type ExternalConfigurationDescriptor ¶
type ExternalConfigurationDescriptor struct { // Url of the site to create this type of subscription. CreateSubscriptionUrl *string `json:"createSubscriptionUrl,omitempty"` // The name of an input property that contains the URL to edit a subscription. EditSubscriptionPropertyName *string `json:"editSubscriptionPropertyName,omitempty"` // True if the external configuration applies only to hosted. HostedOnly *bool `json:"hostedOnly,omitempty"` }
Describes how to configure a subscription that is managed externally.
type FormattedEventMessage ¶
type FormattedEventMessage struct { // Gets or sets the html format of the message Html *string `json:"html,omitempty"` // Gets or sets the markdown format of the message Markdown *string `json:"markdown,omitempty"` // Gets or sets the raw text of the message Text *string `json:"text,omitempty"` }
Provides different formats of an event message
type GetConsumerActionArgs ¶
type GetConsumerActionArgs struct { // (required) ID for a consumer. ConsumerId *string // (required) ID for a consumerActionId. ConsumerActionId *string // (optional) PublisherId *string }
Arguments for the GetConsumerAction function
type GetConsumerArgs ¶
type GetConsumerArgs struct { // (required) ID for a consumer. ConsumerId *string // (optional) PublisherId *string }
Arguments for the GetConsumer function
type GetEventTypeArgs ¶
type GetEventTypeArgs struct { // (required) ID for a publisher. PublisherId *string // (required) EventTypeId *string }
Arguments for the GetEventType function
type GetNotificationArgs ¶
type GetNotificationArgs struct { // (required) ID for a subscription. SubscriptionId *uuid.UUID // (required) NotificationId *int }
Arguments for the GetNotification function
type GetNotificationsArgs ¶
type GetNotificationsArgs struct { // (required) ID for a subscription. SubscriptionId *uuid.UUID // (optional) Maximum number of notifications to return. Default is **100**. MaxResults *int // (optional) Get only notifications with this status. Status *NotificationStatus // (optional) Get only notifications with this result type. Result *NotificationResult }
Arguments for the GetNotifications function
type GetPublisherArgs ¶
type GetPublisherArgs struct { // (required) ID for a publisher. PublisherId *string }
Arguments for the GetPublisher function
type GetSubscriptionArgs ¶
Arguments for the GetSubscription function
type GetSubscriptionDiagnosticsArgs ¶
type GetSubscriptionDiagnosticsArgs struct { // (required) SubscriptionId *string }
Arguments for the GetSubscriptionDiagnostics function
type ListConsumerActionsArgs ¶
type ListConsumerActionsArgs struct { // (required) ID for a consumer. ConsumerId *string // (optional) PublisherId *string }
Arguments for the ListConsumerActions function
type ListConsumersArgs ¶
type ListConsumersArgs struct { // (optional) PublisherId *string }
Arguments for the ListConsumers function
type ListEventTypesArgs ¶
type ListEventTypesArgs struct { // (required) ID for a publisher. PublisherId *string }
Arguments for the ListEventTypes function
type ListPublishersArgs ¶
type ListPublishersArgs struct { }
Arguments for the ListPublishers function
type ListSubscriptionsArgs ¶
type ListSubscriptionsArgs struct { // (optional) ID for a subscription. PublisherId *string // (optional) The event type to filter on (if any). EventType *string // (optional) ID for a consumer. ConsumerId *string // (optional) ID for a consumerActionId. ConsumerActionId *string }
Arguments for the ListSubscriptions function
type Notification ¶
type Notification struct { // Gets or sets date and time that this result was created. CreatedDate *azuredevops.Time `json:"createdDate,omitempty"` // Details about this notification (if available) Details *NotificationDetails `json:"details,omitempty"` // The event id associated with this notification EventId *uuid.UUID `json:"eventId,omitempty"` // The notification id Id *int `json:"id,omitempty"` // Gets or sets date and time that this result was last modified. ModifiedDate *azuredevops.Time `json:"modifiedDate,omitempty"` // Result of the notification Result *NotificationResult `json:"result,omitempty"` // Status of the notification Status *NotificationStatus `json:"status,omitempty"` // The subscriber Id associated with this notification. This is the last identity who touched in the subscription. In case of test notifications it can be the tester if the subscription is not created yet. SubscriberId *uuid.UUID `json:"subscriberId,omitempty"` // The subscription id associated with this notification SubscriptionId *uuid.UUID `json:"subscriptionId,omitempty"` }
Defines the data contract of the result of processing an event for a subscription.
type NotificationDetails ¶
type NotificationDetails struct { // Gets or sets the time that this notification was completed (response received from the consumer) CompletedDate *azuredevops.Time `json:"completedDate,omitempty"` // Gets or sets this notification detail's consumer action identifier. ConsumerActionId *string `json:"consumerActionId,omitempty"` // Gets or sets this notification detail's consumer identifier. ConsumerId *string `json:"consumerId,omitempty"` // Gets or sets this notification detail's consumer inputs. ConsumerInputs *map[string]string `json:"consumerInputs,omitempty"` // Gets or sets the time that this notification was dequeued for processing DequeuedDate *azuredevops.Time `json:"dequeuedDate,omitempty"` // Gets or sets this notification detail's error detail. ErrorDetail *string `json:"errorDetail,omitempty"` // Gets or sets this notification detail's error message. ErrorMessage *string `json:"errorMessage,omitempty"` // Gets or sets this notification detail's event content. Event *Event `json:"event,omitempty"` // Gets or sets this notification detail's event type. EventType *string `json:"eventType,omitempty"` // Gets or sets the time that this notification was finished processing (just before the request is sent to the consumer) ProcessedDate *azuredevops.Time `json:"processedDate,omitempty"` // Gets or sets this notification detail's publisher identifier. PublisherId *string `json:"publisherId,omitempty"` // Gets or sets this notification detail's publisher inputs. PublisherInputs *map[string]string `json:"publisherInputs,omitempty"` // Gets or sets the time that this notification was queued (created) QueuedDate *azuredevops.Time `json:"queuedDate,omitempty"` // Gets or sets this notification detail's request. Request *string `json:"request,omitempty"` // Number of requests attempted to be sent to the consumer RequestAttempts *int `json:"requestAttempts,omitempty"` // Duration of the request to the consumer in seconds RequestDuration *float64 `json:"requestDuration,omitempty"` // Gets or sets this notification detail's response. Response *string `json:"response,omitempty"` }
Defines the data contract of notification details.
type NotificationResult ¶
type NotificationResult string
Enumerates possible result types of a notification.
type NotificationResultsSummaryDetail ¶
type NotificationResultsSummaryDetail struct { // Count of notification sent out with a matching result. NotificationCount *int `json:"notificationCount,omitempty"` // Result of the notification Result *NotificationResult `json:"result,omitempty"` }
Summary of a particular result and count.
type NotificationStatus ¶
type NotificationStatus string
Enumerates possible status' of a notification.
type NotificationSummary ¶
type NotificationSummary struct { // The notification results for this particular subscription. Results *[]NotificationResultsSummaryDetail `json:"results,omitempty"` // The subscription id associated with this notification SubscriptionId *uuid.UUID `json:"subscriptionId,omitempty"` }
Summary of the notifications for a subscription.
type NotificationsQuery ¶
type NotificationsQuery struct { // The subscriptions associated with the notifications returned from the query AssociatedSubscriptions *[]Subscription `json:"associatedSubscriptions,omitempty"` // If true, we will return all notification history for the query provided; otherwise, the summary is returned. IncludeDetails *bool `json:"includeDetails,omitempty"` // Optional maximum date at which the notification was created MaxCreatedDate *azuredevops.Time `json:"maxCreatedDate,omitempty"` // Optional maximum number of overall results to include MaxResults *int `json:"maxResults,omitempty"` // Optional maximum number of results for each subscription. Only takes effect when a list of subscription ids is supplied in the query. MaxResultsPerSubscription *int `json:"maxResultsPerSubscription,omitempty"` // Optional minimum date at which the notification was created MinCreatedDate *azuredevops.Time `json:"minCreatedDate,omitempty"` // Optional publisher id to restrict the results to PublisherId *string `json:"publisherId,omitempty"` // Results from the query Results *[]Notification `json:"results,omitempty"` // Optional notification result type to filter results to ResultType *NotificationResult `json:"resultType,omitempty"` // Optional notification status to filter results to Status *NotificationStatus `json:"status,omitempty"` // Optional list of subscription ids to restrict the results to SubscriptionIds *[]uuid.UUID `json:"subscriptionIds,omitempty"` // Summary of notifications - the count of each result type (success, fail, ..). Summary *[]NotificationSummary `json:"summary,omitempty"` }
Defines a query for service hook notifications.
type Publisher ¶
type Publisher struct { // Reference Links Links interface{} `json:"_links,omitempty"` // Gets this publisher's localized description. Description *string `json:"description,omitempty"` // Gets this publisher's identifier. Id *string `json:"id,omitempty"` // Publisher-specific inputs InputDescriptors *[]forminput.InputDescriptor `json:"inputDescriptors,omitempty"` // Gets this publisher's localized name. Name *string `json:"name,omitempty"` // The service instance type of the first party publisher. ServiceInstanceType *string `json:"serviceInstanceType,omitempty"` // Gets this publisher's supported event types. SupportedEvents *[]EventTypeDescriptor `json:"supportedEvents,omitempty"` // The url for this resource Url *string `json:"url,omitempty"` }
Defines the data contract of an event publisher.
type PublisherEvent ¶
type PublisherEvent struct { // Add key/value pairs which will be stored with a published notification in the SH service DB. This key/value pairs are for diagnostic purposes only and will have not effect on the delivery of a notification. Diagnostics *map[string]string `json:"diagnostics,omitempty"` // The event being published Event *Event `json:"event,omitempty"` // Gets or sets flag for filtered events IsFilteredEvent *bool `json:"isFilteredEvent,omitempty"` // Additional data that needs to be sent as part of notification to complement the Resource data in the Event NotificationData *map[string]string `json:"notificationData,omitempty"` // Gets or sets the array of older supported resource versions. OtherResourceVersions *[]VersionedResource `json:"otherResourceVersions,omitempty"` // Optional publisher-input filters which restricts the set of subscriptions which are triggered by the event PublisherInputFilters *[]forminput.InputFilter `json:"publisherInputFilters,omitempty"` // Gets or sets matched hooks subscription which caused this event. Subscription *Subscription `json:"subscription,omitempty"` }
Wrapper around an event which is being published
type PublishersQuery ¶
type PublishersQuery struct { // Optional list of publisher ids to restrict the results to PublisherIds *[]string `json:"publisherIds,omitempty"` // Filter for publisher inputs PublisherInputs *map[string]string `json:"publisherInputs,omitempty"` // Results from the query Results *[]Publisher `json:"results,omitempty"` }
Defines a query for service hook publishers.
type QueryInputValuesArgs ¶
type QueryInputValuesArgs struct { // (required) InputValuesQuery *forminput.InputValuesQuery // (required) PublisherId *string }
Arguments for the QueryInputValues function
type QueryNotificationsArgs ¶
type QueryNotificationsArgs struct { // (required) Query *NotificationsQuery }
Arguments for the QueryNotifications function
type QueryPublishersArgs ¶
type QueryPublishersArgs struct { // (required) Query *PublishersQuery }
Arguments for the QueryPublishers function
type ReplaceSubscriptionArgs ¶
type ReplaceSubscriptionArgs struct { // (required) Subscription *Subscription // (optional) SubscriptionId *uuid.UUID }
Arguments for the ReplaceSubscription function
type ResourceContainer ¶
type ResourceContainer struct { // Gets or sets the container's base URL, i.e. the URL of the host (collection, application, or deployment) containing the container resource. BaseUrl *string `json:"baseUrl,omitempty"` // Gets or sets the container's specific Id. Id *uuid.UUID `json:"id,omitempty"` // Gets or sets the container's name. Name *string `json:"name,omitempty"` // Gets or sets the container's REST API URL. Url *string `json:"url,omitempty"` }
The base class for all resource containers, i.e. Account, Collection, Project
type SessionToken ¶
type SessionToken struct { // The error message in case of error Error *string `json:"error,omitempty"` // The access token Token *string `json:"token,omitempty"` // The expiration date in UTC ValidTo *azuredevops.Time `json:"validTo,omitempty"` }
Represents a session token to be attached in Events for Consumer actions that need it.
type Subscription ¶
type Subscription struct { // Reference Links Links interface{} `json:"_links,omitempty"` ActionDescription *string `json:"actionDescription,omitempty"` ConsumerActionId *string `json:"consumerActionId,omitempty"` ConsumerId *string `json:"consumerId,omitempty"` // Consumer input values ConsumerInputs *map[string]string `json:"consumerInputs,omitempty"` CreatedBy *webapi.IdentityRef `json:"createdBy,omitempty"` CreatedDate *azuredevops.Time `json:"createdDate,omitempty"` EventDescription *string `json:"eventDescription,omitempty"` EventType *string `json:"eventType,omitempty"` Id *uuid.UUID `json:"id,omitempty"` LastProbationRetryDate *azuredevops.Time `json:"lastProbationRetryDate,omitempty"` ModifiedBy *webapi.IdentityRef `json:"modifiedBy,omitempty"` ModifiedDate *azuredevops.Time `json:"modifiedDate,omitempty"` ProbationRetries *byte `json:"probationRetries,omitempty"` PublisherId *string `json:"publisherId,omitempty"` // Publisher input values PublisherInputs *map[string]string `json:"publisherInputs,omitempty"` ResourceVersion *string `json:"resourceVersion,omitempty"` Status *SubscriptionStatus `json:"status,omitempty"` Subscriber *webapi.IdentityRef `json:"subscriber,omitempty"` Url *string `json:"url,omitempty"` }
Encapsulates an event subscription.
type SubscriptionInputScope ¶
type SubscriptionInputScope string
The scope to which a subscription input applies
type SubscriptionInputValuesQuery ¶
type SubscriptionInputValuesQuery struct { // The input values to return on input, and the result from the consumer on output. InputValues *[]forminput.InputValues `json:"inputValues,omitempty"` // The scope at which the properties to query belong Scope *SubscriptionInputScope `json:"scope,omitempty"` // Subscription containing information about the publisher/consumer and the current input values Subscription *Subscription `json:"subscription,omitempty"` }
Query for obtaining information about the possible/allowed values for one or more subscription inputs
type SubscriptionStatus ¶
type SubscriptionStatus string
Enumerates possible states of a subscription.
type SubscriptionsQuery ¶
type SubscriptionsQuery struct { // Optional consumer action id to restrict the results to (null for any) ConsumerActionId *string `json:"consumerActionId,omitempty"` // Optional consumer id to restrict the results to (null for any) ConsumerId *string `json:"consumerId,omitempty"` // Filter for subscription consumer inputs ConsumerInputFilters *[]forminput.InputFilter `json:"consumerInputFilters,omitempty"` // Optional event type id to restrict the results to (null for any) EventType *string `json:"eventType,omitempty"` // Optional publisher id to restrict the results to (null for any) PublisherId *string `json:"publisherId,omitempty"` // Filter for subscription publisher inputs PublisherInputFilters *[]forminput.InputFilter `json:"publisherInputFilters,omitempty"` // Results from the query Results *[]Subscription `json:"results,omitempty"` // Optional subscriber filter. SubscriberId *uuid.UUID `json:"subscriberId,omitempty"` }
Defines a query for service hook subscriptions.
type UpdateSubscriptionDiagnosticsArgs ¶
type UpdateSubscriptionDiagnosticsArgs struct { // (required) UpdateParameters *notification.UpdateSubscripitonDiagnosticsParameters // (required) SubscriptionId *string }
Arguments for the UpdateSubscriptionDiagnostics function
type VersionedResource ¶
type VersionedResource struct { // Gets or sets the reference to the compatible version. CompatibleWith *string `json:"compatibleWith,omitempty"` // Gets or sets the resource data. Resource interface{} `json:"resource,omitempty"` // Gets or sets the version of the resource data. ResourceVersion *string `json:"resourceVersion,omitempty"` }
Encapsulates the resource version and its data or reference to the compatible version. Only one of the two last fields should be not null.