Skip to content

Commit

Permalink
V12.1.0 (#400)
Browse files Browse the repository at this point in the history
* Deserialize additionalInfo in ARM error

* Allow a new authorizer to be created from a configuration file by specifying a resource instead of a base url.

This enables resource like KeyVault and Container Registry to use an authorizer configured from a configuration file.

* [WIP] Using the Context from the timeout if provided (#315)

* Using the timeout from the context if available

- Makes PollingDuration optional

* Renaming the registration start time

* Making PollingDuration not a pointer

* fixing a broken reference

* Add NewAuthorizerFromCli method which uses Azure CLI to obtain a token for the currently logged in user, for  local development scenarios. (#316)

* Adding User assigned identity support for the MSIConfig authorizor (#332)

* Adding ByteSlicePtr (#399)

* v12.1.0

Added to.ByteSlicPtr().
Added blob/queue storage resource ID.
  • Loading branch information
jhendrixMSFT authored May 20, 2019
1 parent da8db3a commit f29a2ec
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 1 deletion.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# CHANGELOG

## v12.1.0

### New Features

- Added `to.ByteSlicePtr()`.
- Added blob/queue storage resource ID to `azure.ResourceIdentifier`.

## v12.0.0

### Breaking Changes
Expand Down
5 changes: 5 additions & 0 deletions autorest/azure/environments.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ type ResourceIdentifier struct {
Datalake string `json:"datalake"`
Batch string `json:"batch"`
OperationalInsights string `json:"operationalInsights"`
Storage string `json:"storage"`
}

// Environment represents a set of endpoints for each of Azure's Clouds.
Expand Down Expand Up @@ -103,6 +104,7 @@ var (
Datalake: "https://datalake.azure.net/",
Batch: "https://batch.core.windows.net/",
OperationalInsights: "https://api.loganalytics.io",
Storage: "https://storage.azure.com/",
},
}

Expand Down Expand Up @@ -135,6 +137,7 @@ var (
Datalake: NotAvailable,
Batch: "https://batch.core.usgovcloudapi.net/",
OperationalInsights: "https://api.loganalytics.us",
Storage: "https://storage.azure.com/",
},
}

Expand Down Expand Up @@ -167,6 +170,7 @@ var (
Datalake: NotAvailable,
Batch: "https://batch.chinacloudapi.cn/",
OperationalInsights: NotAvailable,
Storage: "https://storage.azure.com/",
},
}

Expand Down Expand Up @@ -199,6 +203,7 @@ var (
Datalake: NotAvailable,
Batch: "https://batch.cloudapi.de/",
OperationalInsights: NotAvailable,
Storage: "https://storage.azure.com/",
},
}
)
Expand Down
5 changes: 5 additions & 0 deletions autorest/to/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,3 +145,8 @@ func Float64(i *float64) float64 {
func Float64Ptr(i float64) *float64 {
return &i
}

// ByteSlicePtr returns a pointer to the passed byte slice.
func ByteSlicePtr(b []byte) *[]byte {
return &b
}
8 changes: 8 additions & 0 deletions autorest/to/convert_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,3 +232,11 @@ func TestFloat64Ptr(t *testing.T) {
v, *Float64Ptr(v))
}
}

func TestByteSlicePtr(t *testing.T) {
v := []byte("bytes")
if out := ByteSlicePtr(v); !reflect.DeepEqual(*out, v) {
t.Fatalf("to: ByteSlicePtr failed to return the correct slice -- expected %v, received %v",
v, *out)
}
}
2 changes: 1 addition & 1 deletion autorest/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"runtime"
)

const number = "v12.0.0"
const number = "v12.1.0"

var (
userAgent = fmt.Sprintf("Go/%s (%s-%s) go-autorest/%s",
Expand Down

0 comments on commit f29a2ec

Please sign in to comment.