Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 0 additions & 87 deletions sdk/messaging/azeventgrid/time_rfc3339.go

This file was deleted.

51 changes: 51 additions & 0 deletions sdk/messaging/eventgrid/aznamespaces/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Release History

## 0.4.1 (Unreleased)

### Features Added

### Breaking Changes

- This module has been moved from it's previous location in `azeventgrid` to this location (`github.com/Azure/azure-sdk-for-go/sdk/messaging/eventgrid/aznamespaces`).

### Bugs Fixed

### Other Changes

## 0.4.0 (2023-11-27)

### Features Added

- New functionality for Event Grid namespaces:
- Client.PublishCloudEvent can be used to publish a single `messaging.CloudEvent`.
- Client.RenewCloudEventLocks can extend the lock time for a set of events.
- Client.ReleaseCloudEvents (via ReleaseCloudEventsOptions.ReleaseDelayInSeconds) can release an event with a
server-side delay, allowing the message to remain unavailable for a configured period of time.

### Breaking Changes

- FailedLockToken, included in the response for settlement functions, has an `Error` field, which contains the data previously
in `ErrorDescription` and `ErrorCode`.
- Settlement functions (AcknowledgeCloudEvents, ReleaseCloudEvents, RejectCloudEvents) take lock tokens as a parameter.

## 0.3.0 (2023-10-17)

### Breaking Changes

- Client constructors that take a `key string` parameter for a credential now require an `*azcore.KeyCredential` or `*azcore.SASCredential`.

## 0.2.0 (2023-09-12)

### Features Added

- The publisher client for Event Grid topics has been added as a sub-package under `publisher`.

### Other Changes

- Documentation and examples added for Event Grid namespace client.

## 0.1.0 (2023-07-11)

### Features Added

- Initial preview for the Event Grid package for Event Grid Namespaces
21 changes: 21 additions & 0 deletions sdk/messaging/eventgrid/aznamespaces/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) Microsoft Corporation.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Azure Event Grid Client Module for Go
# Azure Event Grid Namespaces Client Module for Go

[Azure Event Grid](https://learn.microsoft.com/azure/event-grid/overview) is a highly scalable, fully managed Pub Sub message distribution service that offers flexible message consumption patterns. For more information about Event Grid see: [link](https://learn.microsoft.com/azure/event-grid/overview).

This client module allows you to publish events and receive events using the [Pull delivery](https://learn.microsoft.com/azure/event-grid/pull-delivery-overview) API.

> NOTE: This client does not work with Event Grid topics. Use the [publisher.Client][godoc_publisher_client] in the `publisher` sub-package instead.
> NOTE: This client does not work with Event Grid Basic. Use the [publisher.Client][godoc_publisher_client] in the `publisher` sub-package instead.

Key links:
- [Source code][source]
Expand All @@ -16,10 +16,10 @@ Key links:

### Install the package

Install the Azure Event Grid client module for Go with `go get`:
Install the Azure Event Grid Namespaces client module for Go with `go get`:

```bash
go get github.com/Azure/azure-sdk-for-go/sdk/messaging/azeventgrid
go get github.com/Azure/azure-sdk-for-go/sdk/messaging/eventgrid/aznamespaces
```

### Prerequisites
Expand All @@ -43,7 +43,7 @@ Namespaces also offer access using MQTT, although that is not covered in this pa

# Examples

Examples for various scenarios can be found on [pkg.go.dev](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/messaging/azeventgrid#pkg-examples) or in the example*_test.go files in our GitHub repo for [azeventgrid](https://github.com/Azure/azure-sdk-for-go/blob/main/sdk/messaging/azeventgrid).
Examples for various scenarios can be found on [pkg.go.dev][godoc_examples] or in the example*_test.go files in our GitHub repo for [aznamespaces][source].

# Troubleshooting

Expand Down Expand Up @@ -112,20 +112,17 @@ Azure SDK for Go is licensed under the [MIT](https://github.com/Azure/azure-sdk-
[azure_sub]: https://azure.microsoft.com/free/
[cloud_shell]: https://docs.microsoft.com/azure/cloud-shell/overview
[cloud_shell_bash]: https://shell.azure.com/bash
[source]: https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/messaging/azeventgrid
[godoc]: https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/messaging/azeventgrid
[godoc_client]: https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/messaging/azeventgrid/#Client
[godoc_client_publish]: https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/messaging/azeventgrid#Client.PublishCloudEvents
[godoc_client_receive]: https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/messaging/azeventgrid#Client.ReceiveCloudEvents
[godoc_examples]: https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/messaging/azeventgrid#pkg-examples
[godoc_example_newclient]: https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/messaging/azeventgrid#example-NewClientWithSharedKeyCredential
[source]: https://aka.ms/azsdk/go/namespaces/src
[godoc]: https://aka.ms/azsdk/go/namespaces/pkg
[godoc_client]: https://aka.ms/azsdk/go/namespaces/pkg/#Client
[godoc_client_publish]: https://aka.ms/azsdk/go/namespaces/pkg#Client.PublishCloudEvents
[godoc_client_receive]: https://aka.ms/azsdk/go/namespaces/pkg#Client.ReceiveCloudEvents
[godoc_examples]: https://aka.ms/azsdk/go/namespaces/pkg#pkg-examples
[godoc_example_newclient]: https://aka.ms/azsdk/go/namespaces/pkg#example-NewClientWithSharedKeyCredential
[godoc_publisher_client]: https://aka.ms/azsdk/go/eventgrid/pkg/#Client
[ms_pulldelivery]: https://learn.microsoft.com/azure/event-grid/concepts-pull-delivery
[ms_namespace]: https://learn.microsoft.com/azure/event-grid/concepts-pull-delivery#namespaces
[ms_topic]: https://learn.microsoft.com/azure/event-grid/concepts-pull-delivery#namespace-topics
[ms_subscription]: https://learn.microsoft.com/azure/event-grid/concepts-pull-delivery#event-subscriptions
[ms_create_namespace]: https://learn.microsoft.com/azure/event-grid/create-view-manage-namespaces
[ms_create_topic]: https://learn.microsoft.com/azure/event-grid/create-view-manage-namespace-topics

<!-- Temporary until we get it in main -->
[godoc_publisher_client]: https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/messaging/azeventgrid/#Client
<!-- [godoc_publisher_client]: https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/messaging/azeventgrid/publisher#Client -->
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ go: true
input-file:
- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/2264262e0c7575a794cc395609d2342c7e598149/specification/eventgrid/data-plane/Microsoft.EventGrid/preview/2023-10-01-preview/EventGrid.json
license-header: MICROSOFT_MIT_NO_VERSION
module: github.com/Azure/azure-sdk-for-go/sdk/messaging/azeventgrid
module: github.com/Azure/azure-sdk-for-go/sdk/messaging/eventgrid/aznamespaces
openapi-type: "data-plane"
output-folder: ../azeventgrid
output-folder: ../aznamespaces
override-client-name: Client
security: "AADToken"
use: "@autorest/[email protected].52"
use: "@autorest/[email protected].63"
version: "^3.0.0"
slice-elements-byval: true
remove-non-reference-schema: true
Expand Down Expand Up @@ -82,7 +82,7 @@ Trim out the 'Interface any' for types that are empty.

```yaml
directive:
- from: response_types.go
- from: responses.go
where: $
transform: $.replace(/\s+\/\/ Anything\s+Interface any/sg, "$1");
```
Expand Down Expand Up @@ -113,7 +113,7 @@ directive:
- from:
- client.go
- models.go
- response_types.go
- responses.go
- options.go
where: $
transform: |
Expand All @@ -131,7 +131,7 @@ directive:
- from:
- client.go
- models.go
- response_types.go
- responses.go
- options.go
where: $
transform: return $.replace(/Client(\w+)((?:Options|Response))/g, "$1$2");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
//go:generate autorest ./autorest.md
//go:generate goimports -w .

package azeventgrid
package aznamespaces
36 changes: 36 additions & 0 deletions sdk/messaging/eventgrid/aznamespaces/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file.
trigger:
branches:
include:
- main
- feature/*
- hotfix/*
- release/*
paths:
include:
- sdk/messaging/eventgrid/aznamespaces
- eng/

pr:
branches:
include:
- main
- feature/*
- hotfix/*
- release/*
paths:
include:
- sdk/messaging/eventgrid/aznamespaces

stages:
- template: /eng/pipelines/templates/jobs/archetype-sdk-client.yml
parameters:
ServiceDirectory: "messaging/eventgrid/aznamespaces"
RunLiveTests: true
UsePipelineProxy: false
Location: westus2
EnvVars:
AZURE_CLIENT_ID: $(AZNAMESPACES_CLIENT_ID)
AZURE_TENANT_ID: $(AZNAMESPACES_TENANT_ID)
AZURE_CLIENT_SECRET: $(AZNAMESPACES_CLIENT_SECRET)
AZURE_SUBSCRIPTION_ID: $(AZNAMESPACES_SUBSCRIPTION_ID)

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

package azeventgrid
package aznamespaces

import (
"context"

"github.com/Azure/azure-sdk-for-go/sdk/azcore"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
"github.com/Azure/azure-sdk-for-go/sdk/messaging/azeventgrid/internal"
"github.com/Azure/azure-sdk-for-go/sdk/messaging/eventgrid/aznamespaces/internal"
)

// ClientOptions contains optional settings for [Client]
Expand Down
Loading