eventgrid

package
v12.2.0-beta+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 9, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package eventgrid implements the Azure ARM Eventgrid service API version 2018-01-01.

Azure EventGrid Client

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UserAgent

func UserAgent() string

UserAgent returns the UserAgent string to use when sending http.Requests.

func Version

func Version() string

Version returns the semantic version (see http://semver.org) of the client.

Types

type BaseClient

type BaseClient struct {
	autorest.Client
}

BaseClient is the base client for Eventgrid.

func New

func New() BaseClient

New creates an instance of the BaseClient client.

func NewWithoutDefaults

func NewWithoutDefaults() BaseClient

NewWithoutDefaults creates an instance of the BaseClient client.

func (BaseClient) PublishEvents

func (client BaseClient) PublishEvents(ctx context.Context, topicHostname string, events []Event) (result autorest.Response, err error)

PublishEvents publishes a batch of events to an Azure Event Grid topic.

topicHostname is the host name of the topic, e.g. topic1.westus2-1.eventgrid.azure.net events is an array of events to be published to Event Grid.

func (BaseClient) PublishEventsPreparer

func (client BaseClient) PublishEventsPreparer(ctx context.Context, topicHostname string, events []Event) (*http.Request, error)

PublishEventsPreparer prepares the PublishEvents request.

func (BaseClient) PublishEventsResponder

func (client BaseClient) PublishEventsResponder(resp *http.Response) (result autorest.Response, err error)

PublishEventsResponder handles the response to the PublishEvents request. The method always closes the http.Response Body.

func (BaseClient) PublishEventsSender

func (client BaseClient) PublishEventsSender(req *http.Request) (*http.Response, error)

PublishEventsSender sends the PublishEvents request. The method will close the http.Response Body if it receives an error.

type Event

type Event struct {
	// ID - An unique identifier for the event.
	ID *string `json:"id,omitempty"`
	// Topic - The resource path of the event source.
	Topic *string `json:"topic,omitempty"`
	// Subject - A resource path relative to the topic path.
	Subject *string `json:"subject,omitempty"`
	// Data - Event data specific to the event type.
	Data *map[string]interface{} `json:"data,omitempty"`
	// EventType - The type of the event that occurred.
	EventType *string `json:"eventType,omitempty"`
	// EventTime - The time (in UTC) the event was generated.
	EventTime *date.Time `json:"eventTime,omitempty"`
	// MetadataVersion - The schema version of the event metadata.
	MetadataVersion *string `json:"metadataVersion,omitempty"`
	// DataVersion - The schema version of the data object.
	DataVersion *string `json:"dataVersion,omitempty"`
}

Event properties of an event published to an Event Grid topic.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL