This repository has been archived by the owner on Jul 6, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ff1802b
commit a38411b
Showing
18 changed files
with
238 additions
and
119 deletions.
There are no files selected for viewing
This file contains 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,24 @@ | ||
package schemas | ||
|
||
import "github.com/Azure/open-service-broker-azure/pkg/service" | ||
|
||
const ( | ||
// EnabledParamString defines "enabled" value | ||
EnabledParamString = "enabled" | ||
// DisabledParamString defines "enabled" value | ||
DisabledParamString = "disabled" | ||
) | ||
|
||
// EnabledDisabledValues returns "enabled" and "disabled" EnumValues | ||
func EnabledDisabledValues() []service.EnumValue { | ||
return []service.EnumValue{ | ||
{ | ||
Value: EnabledParamString, | ||
Title: "Enabled", | ||
}, | ||
{ | ||
Value: DisabledParamString, | ||
Title: "Disabled", | ||
}, | ||
} | ||
} |
This file contains 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
This file contains 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,20 @@ | ||
package schemas | ||
|
||
import "github.com/Azure/open-service-broker-azure/pkg/service" | ||
|
||
// LocalRedundancy provides an EnumValue slice with "local" value. | ||
func LocalRedundancy() []service.EnumValue { | ||
return []service.EnumValue{{ | ||
Value: "local", | ||
Title: "Local", | ||
}} | ||
} | ||
|
||
// LocalAndGeoRedundancy provides an EnumValue slice with | ||
// "local" and "geo" value. | ||
func LocalAndGeoRedundancy() []service.EnumValue { | ||
return []service.EnumValue{ | ||
{Value: "local", Title: "Local"}, | ||
{Value: "geo", Title: "Geo"}, | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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,15 @@ | ||
package cosmosdb | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/stretchr/testify/assert" | ||
) | ||
|
||
func TestValidateReadLocations(t *testing.T) { | ||
assert.NotNil(t, validateReadLocations("", []string{"ukwest", "no-existing"})) | ||
assert.NotNil(t, validateReadLocations("", []string{"ukwest", "ukwest"})) | ||
|
||
assert.Nil(t, validateReadLocations("", []string{"ukwest", "eastasia"})) | ||
assert.Nil(t, validateReadLocations("", []string{})) | ||
} |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.