-
Notifications
You must be signed in to change notification settings - Fork 910
[azeventgrid] first client attempt #20940
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 8 commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
33689fd
First rev of everything.
e4fe794
bicepping, single test I have passes! Yay!
1875748
Some autorest transforming
b4af159
Okay, everything works. Things seemed to be cased correctly as well.
88edf76
- Able to remove the `endpoint` having to be passed into each operati…
f483d7a
Implementing a purge as well.
4127bfe
Another Grace suggestion - remove the `Client` prefixf rom all the ty…
3e70a10
go mod tidy
9e659cf
Rename constructor
94e60bb
Remove unneeded autorest clients directive, upgrade to .49 for bug fi…
69a4ca6
Remove `eng` folder - there has to be another way to avoid rebuilding…
08f9f4c
Removed file.
2dd786c
Had some more experiments in play - want to keep the commented out bu…
ff65d96
Remove the nono
c712e8f
Update to the latest and great azcore
d828f8d
Remove the AzureCoreFoundations prefix.
2418b1d
Remove dead code.
9d4331d
Skip live tests when running in plain CI.
9087939
Adding in recordings
2ae07b8
more changes
eb82171
recordings
32f711c
Got tests working
6618f61
recordings
e6d813a
Cleaning up recorded files
fc561cb
okay, looks like that's an ID, not a path
25d9cbe
remove old recordings
09e207e
Some more...
a23e8e7
update assets.json
39f5c66
Fix lint errors
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Release History | ||
|
||
## 0.1.0 (TBD) | ||
|
||
* Event Grid package for Event Grid Namespaces |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
aztemplate | ||
|
||
NOTICES AND INFORMATION | ||
Do Not Translate or Localize | ||
|
||
This software incorporates material from third parties. Microsoft makes certain | ||
open source code available at https://3rdpartysource.microsoft.com, or you may | ||
send a check or money order for US $5.00, including the product name, the open | ||
source component name, and version number, to: | ||
|
||
Source Code Compliance Team | ||
Microsoft Corporation | ||
One Microsoft Way | ||
Redmond, WA 98052 | ||
USA | ||
|
||
Notwithstanding any other terms, you may reverse engineer this software to the | ||
extent required to debug changes to any libraries licensed under the GNU Lesser | ||
General Public License. | ||
|
||
------------------------------------------------------------------------------ | ||
|
||
Azure SDK for Go uses third-party libraries or other resources that may be | ||
distributed under licenses different than the Azure SDK for Go software. | ||
|
||
In the event that we accidentally failed to list a required notice, please | ||
bring it to our attention. Post an issue or email us: | ||
|
||
@microsoft.com | ||
|
||
The attached notices are provided for information only. | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# Azure Template Package client library for Go | ||
|
||
Azure Template Package client library for Go (`aztemplate`) matches necessary patterns that the development team has established to create a unified SDK written in the Go programming language. These libraries follow the Azure SDK Design Guidelines for Go. | ||
|
||
The library allows client libraries to expose common functionality in a consistent fashion. Once you learn how to use these APIs in one client library, you will know how to use them in other client libraries. | ||
|
||
## Getting started | ||
|
||
For a rich example of a well formatted readme, please check [here.](https://github.com/Azure/azure-sdk/blob/main/docs/policies/README-TEMPLATE.md) In addition, this is an [example readme](https://github.com/Azure/azure-sdk/blob/main/docs/policies/README-EXAMPLE.md) that should be emulated. Note that the top-level sections in this template align with that of the [template.](https://github.com/Azure/azure-sdk/blob/main/docs/policies/README-TEMPLATE.md) | ||
|
||
# Key concepts | ||
|
||
Bullet point list of your library's main concepts. | ||
|
||
# Examples | ||
|
||
Examples of some of the key concepts for your library. | ||
|
||
# Troubleshooting | ||
|
||
Running into issues? This section should contain details as to what to do there. | ||
|
||
# Next steps | ||
|
||
More sample code should go here, along with links out to the appropriate example tests. | ||
|
||
## Contributing | ||
For details on contributing to this repository, see the [contributing guide][azure_sdk_for_go_contributing]. | ||
|
||
This project welcomes contributions and suggestions. Most contributions require you to agree to a | ||
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us | ||
the rights to use your contribution. For details, visit https://cla.microsoft.com. | ||
|
||
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide | ||
a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions | ||
provided by the bot. You will only need to do this once across all repos using our CLA. | ||
|
||
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). | ||
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or | ||
contact [[email protected]](mailto:[email protected]) with any additional questions or comments. | ||
|
||
### Additional Helpful Links for Contributors | ||
Many people all over the world have helped make this project better. You'll want to check out: | ||
|
||
* [What are some good first issues for new contributors to the repo?](https://github.com/azure/azure-sdk-for-go/issues?q=is%3Aopen+is%3Aissue+label%3A%22up+for+grabs%22) | ||
* [How to build and test your change][azure_sdk_for_go_contributing_developer_guide] | ||
* [How you can make a change happen!][azure_sdk_for_go_contributing_pull_requests] | ||
* Frequently Asked Questions (FAQ) and Conceptual Topics in the detailed [Azure SDK for Go wiki](https://github.com/azure/azure-sdk-for-go/wiki). | ||
|
||
<!-- ### Community--> | ||
### Reporting security issues and security bugs | ||
|
||
Security issues and bugs should be reported privately, via email, to the Microsoft Security Response Center (MSRC) <[email protected]>. You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Further information, including the MSRC PGP key, can be found in the [Security TechCenter](https://www.microsoft.com/msrc/faqs-report-an-issue). | ||
|
||
### License | ||
|
||
Azure SDK for Go is licensed under the [MIT](https://github.com/Azure/azure-sdk-for-go/blob/main/sdk/template/aztemplate/LICENSE.txt) license. | ||
|
||
<!-- LINKS --> | ||
[azure_sdk_for_go_contributing]: https://github.com/Azure/azure-sdk-for-go/blob/main/CONTRIBUTING.md | ||
[azure_sdk_for_go_contributing_developer_guide]: https://github.com/Azure/azure-sdk-for-go/blob/main/CONTRIBUTING.md#developer-guide | ||
[azure_sdk_for_go_contributing_pull_requests]: https://github.com/Azure/azure-sdk-for-go/blob/main/CONTRIBUTING.md#pull-requests | ||
[azure_cli]: https://docs.microsoft.com/cli/azure | ||
[azure_pattern_circuit_breaker]: https://docs.microsoft.com/azure/architecture/patterns/circuit-breaker | ||
[azure_pattern_retry]: https://docs.microsoft.com/azure/architecture/patterns/retry | ||
[azure_portal]: https://portal.azure.com | ||
[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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
## Go | ||
|
||
``` yaml | ||
title: EventGridClient | ||
description: Azure Event Grid client | ||
generated-metadata: false | ||
clear-output-folder: false | ||
export-clients: true | ||
go: true | ||
input-file: | ||
# This was the commit that everyone used to generate their first official betas. | ||
- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/947c9ce9b20900c6cbc8e95bc083e723d09a9c2c/specification/eventgrid/data-plane/Microsoft.EventGrid/preview/2023-06-01-preview/EventGrid.json | ||
# when we start using the .tsp file directly we can start referring to the compiled output. | ||
# ./tsp-output\@azure-tools\typespec-autorest\2023-06-01-preview\openapi.json | ||
license-header: MICROSOFT_MIT_NO_VERSION | ||
module: github.com/Azure/azure-sdk-for-go/sdk/messaging/azeventgrid | ||
openapi-type: "data-plane" | ||
output-folder: ../azeventgrid | ||
override-client-name: Client | ||
security: "AADToken" | ||
use: "@autorest/[email protected]" | ||
richardpark-msft marked this conversation as resolved.
Show resolved
Hide resolved
|
||
version: "^3.0.0" | ||
directive: | ||
# we have to write a little wrapper code for this so we'll hide the public function | ||
# for now. | ||
- from: client.go | ||
where: $ | ||
transform: return $.replace(/PublishCloudEvents\(/g, "internalPublishCloudEvents("); | ||
# make sure the casing of the properties is what compliant. | ||
- from: swagger-document | ||
where: $.definitions.CloudEvent.properties.specversion | ||
transform: $["x-ms-client-name"] = "SpecVersion" | ||
- from: swagger-document | ||
where: $.definitions.CloudEvent.properties.datacontenttype | ||
transform: $["x-ms-client-name"] = "DataContentType" | ||
- from: swagger-document | ||
where: $.definitions.CloudEvent.properties.dataschema | ||
transform: $["x-ms-client-name"] = "DataSchema" | ||
# make the endpoint a parameter of the client constructor | ||
- from: swagger-document | ||
where: $["x-ms-parameterized-host"] | ||
transform: $.parameters[0]["x-ms-parameter-location"] = "client" | ||
# delete client name prefix from method options and response types | ||
- from: | ||
- client.go | ||
- models.go | ||
- response_types.go | ||
where: $ | ||
transform: return $.replace(/Client(\w+)((?:Options|Response))/g, "$1$2"); | ||
``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
//go:build go1.18 | ||
// +build go1.18 | ||
|
||
//go:generate autorest ./autorest.md | ||
//go:generate gofmt -w . | ||
|
||
package azeventgrid |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# 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/azeventgrid | ||
- eng/ | ||
|
||
pr: | ||
branches: | ||
include: | ||
- main | ||
- feature/* | ||
- hotfix/* | ||
- release/* | ||
paths: | ||
include: | ||
- sdk/messaging/azeventgrid | ||
- eng/ | ||
jhendrixMSFT marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
|
||
stages: | ||
- template: /eng/pipelines/templates/jobs/archetype-sdk-client.yml | ||
parameters: | ||
ServiceDirectory: 'messaging/azeventgrid' |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.