Documentation ¶
Overview ¶
copied from github.com/Azure/open-service-broker-azure/
Index ¶
- func ContainsString(slice []string, s string) bool
- func FillWithRandom(s string, maxLen int) string
- func FindBadChars(stack string) error
- func FromBase64EncodedString(input string) string
- func GenerateRandomPassword(n int) (string, error)
- func GenerateRandomUsername(n int) string
- func Hash256(i interface{}) string
- func IsDeploymentComplete(status string) bool
- func IsSQLAll(privilege string) bool
- func LabelsToTags(in map[string]string) map[string]*string
- func MakeResourceID(subscriptionID string, resourceGroupName string, provider string, ...) string
- func NewPassword() string
- func RandomString(length int) string
- func RemoveNonAlphaNumeric(s string) string
- func RemoveString(slice []string, s string) (result []string)
- func ReplaceAny(s string, chars []string) string
- func Retry(timeout time.Duration, sleep time.Duration, fn func() error) error
- type AADIdentity
- type AADIdentityFinder
- type SQLRoleDelta
- type Seeded
- type StopErr
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainsString ¶
func FillWithRandom ¶
PadRightWithRandom pads a string up to a maxLen with random characters
func FindBadChars ¶
FindBadChars find the bad chars in a postgresql user
func FromBase64EncodedString ¶
FromBase64EncodedString can be used to decode a base64 encoded string into another string in the return.
func GenerateRandomPassword ¶
GenerateRandomPassword - helper function to generate random password for sql server
func GenerateRandomUsername ¶
GenerateRandomUsername - helper function to generate random username for sql server
func IsDeploymentComplete ¶
IsDeploymentComplete will dtermine if the deployment is complete
func LabelsToTags ¶
LabelsToTags converts labels from a kube resource to the data structure expected by Azure for tags this function will translate characters that are not allows by Azure to "."s
func MakeResourceID ¶
func MakeResourceID(subscriptionID string, resourceGroupName string, provider string, resourceType string, resourceName string, subResourceType string, subResourceName string) string
MakeResourceID can be used to construct a resource ID using the input segments Sample 1: /subscriptions/88fd8cb2-8248-499e-9a2d-4929a4b0133c/resourceGroups/resourcegroup-azure-operators/providers/Microsoft.Network/publicIPAddresses/azurepublicipaddress-sample-3 Sample 2: /subscriptions/88fd8cb2-8248-499e-9a2d-4929a4b0133c/resourceGroups/resourcegroup-azure-operators/providers/Microsoft.Network/virtualNetworks/vnet-sample-hpf-1/subnets/test2
func NewPassword ¶
func NewPassword() string
NewPassword generates a strong, random password stolen from osba-azure
func RandomString ¶
func RemoveNonAlphaNumeric ¶
RemoveNonAlphaNumeric removes all runes that are not letters or digits
func RemoveString ¶
func ReplaceAny ¶
ReplaceAny replaces any instance of the strings passes in the chars slice replacing a backslash is problematic so it will require 4 eg []string{"\\\\"}
Types ¶
type AADIdentity ¶
type AADIdentityFinder ¶
type AADIdentityFinder struct {
// contains filtered or unexported fields
}
func NewAADIdentityFinder ¶
func NewAADIdentityFinder(client client.Reader, namespace string) *AADIdentityFinder
func (*AADIdentityFinder) FindIdentity ¶
func (a *AADIdentityFinder) FindIdentity(ctx context.Context) (*AADIdentity, error)
type SQLRoleDelta ¶
func DiffCurrentAndExpectedSQLRoles ¶
func DiffCurrentAndExpectedSQLRoles(currentRoles map[string]struct{}, expectedRoles map[string]struct{}) SQLRoleDelta