Skip to content
This repository has been archived by the owner on Feb 12, 2025. It is now read-only.

V12.1.0 #400

Merged
merged 11 commits into from
May 20, 2019
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/",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so these are the same in all env ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

},
}

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