Documentation ¶
Index ¶
- Constants
- func FetchAsyncOperation(ctx context.Context, client autorest.Sender, as *v1alpha3.AsyncOperation) error
- func GetAuthInfo(ctx context.Context, c client.Client, mg resource.Managed) (content map[string]string, authorizer autorest.Authorizer, err error)
- func Int64ToInt(i *int64) int
- func IsNotFound(err error) bool
- func LateInitializeBoolPtrFromPtr(in, from *bool) *bool
- func LateInitializeInt32PtrFromInt32Ptr(in *int32, from *int32) *int32
- func LateInitializeIntPtrFromInt32Ptr(in *int, from *int32) *int
- func LateInitializeStringMap(in map[string]string, from map[string]*string) map[string]string
- func LateInitializeStringPtrFromPtr(in, from *string) *string
- func LateInitializeStringPtrFromVal(in *string, from string) *string
- func LateInitializeStringValArrFromArrPtr(in []string, from *[]string) []string
- func ToBool(b *bool) bool
- func ToBoolPtr(b bool, o ...FieldOption) *bool
- func ToInt(i *int32) int
- func ToInt32(i *int) *int32
- func ToInt32Ptr(i int, o ...FieldOption) *int32
- func ToInt32PtrFromIntPtr(i *int, o ...FieldOption) *int32
- func ToInt64(i *int) *int64
- func ToString(s *string) string
- func ToStringArray(m *[]string) []string
- func ToStringArrayPtr(m []string) *[]string
- func ToStringMap(m map[string]*string) map[string]string
- func ToStringPtr(s string, o ...FieldOption) *string
- func ToStringPtrMap(m map[string]string) map[string]*string
- func UseProvider(ctx context.Context, c client.Client, mg resource.Managed) (content map[string]string, authorizer autorest.Authorizer, err error)
- func UseProviderConfig(ctx context.Context, c client.Client, mg resource.Managed) (content map[string]string, authorizer autorest.Authorizer, err error)
- func ValidateClient(client *Client) error
- type Client
- type Credentials
- type FieldOption
Constants ¶
const ( // UserAgent is the user agent addition that identifies the Crossplane Azure client UserAgent = "crossplane-azure-client" // AsyncOperationStatusInProgress is the status value for AsyncOperation type // that indicates the operation is still ongoing. AsyncOperationStatusInProgress = "InProgress" )
const ( CredentialsKeyClientID = "clientId" CredentialsKeyClientSecret = "clientSecret" CredentialsKeyTenantID = "tenantId" CredentialsKeySubscriptionID = "subscriptionId" CredentialsKeyActiveDirectoryEndpointURL = "activeDirectoryEndpointUrl" CredentialsKeyResourceManagerEndpointURL = "resourceManagerEndpointUrl" CredentialsKeyActiveDirectoryGraphResourceID = "activeDirectoryGraphResourceId" CredentialsKeySQLManagementEndpointURL = "sqlManagementEndpointUrl" CredentialsKeyGalleryEndpointURL = "galleryEndpointUrl" CredentialsManagementEndpointURL = "managementEndpointUrl" )
Credentials Secret content is a json whose keys are below.
Variables ¶
This section is empty.
Functions ¶
func FetchAsyncOperation ¶
func FetchAsyncOperation(ctx context.Context, client autorest.Sender, as *v1alpha3.AsyncOperation) error
FetchAsyncOperation updates the given operation object with the most up-to-date status retrieved from Azure API.
func GetAuthInfo ¶
func GetAuthInfo(ctx context.Context, c client.Client, mg resource.Managed) (content map[string]string, authorizer autorest.Authorizer, err error)
GetAuthInfo figures out how to connect to Azure API and returns the necessary information to be used for controllers to construct their specific clients.
func Int64ToInt ¶
Int64ToInt converts the supplied pointer to int64 to an int, returning zero if the pointer is nil,
func IsNotFound ¶
IsNotFound returns a value indicating whether the given error represents that the resource was not found.
func LateInitializeBoolPtrFromPtr ¶
LateInitializeBoolPtrFromPtr late-inits *bool
func LateInitializeInt32PtrFromInt32Ptr ¶
LateInitializeInt32PtrFromInt32Ptr late-inits *int32
func LateInitializeIntPtrFromInt32Ptr ¶
LateInitializeIntPtrFromInt32Ptr late-inits *int
func LateInitializeStringMap ¶
LateInitializeStringMap late-inits map[string]string
func LateInitializeStringPtrFromPtr ¶
LateInitializeStringPtrFromPtr late-inits *string
func LateInitializeStringPtrFromVal ¶
LateInitializeStringPtrFromVal late-inits *string using string
func LateInitializeStringValArrFromArrPtr ¶
LateInitializeStringValArrFromArrPtr late-inits []string
func ToBool ¶
ToBool converts the supplied pointer to bool to a bool, returning the false if the pointer is nil.
func ToBoolPtr ¶
func ToBoolPtr(b bool, o ...FieldOption) *bool
ToBoolPtr converts the supplied bool for use with the Azure Go SDK.
func ToInt ¶
ToInt converts the supplied pointer to int32 to an int, returning zero if the pointer is nil,
func ToInt32 ¶
ToInt32 converts the supplied *int to *int32, while returning nil if the supplied reference is nil.
func ToInt32Ptr ¶
func ToInt32Ptr(i int, o ...FieldOption) *int32
ToInt32Ptr converts the supplied int for use with the Azure Go SDK.
func ToInt32PtrFromIntPtr ¶
func ToInt32PtrFromIntPtr(i *int, o ...FieldOption) *int32
ToInt32PtrFromIntPtr converts the supplied int pointer for use with the Azure Go SDK.
func ToInt64 ¶
ToInt64 converts the supplied *int to *int64, while returning nil if the supplied reference is nil.
func ToString ¶
ToString converts the supplied pointer to string to a string, returning the empty string if the pointer is nil.
func ToStringArray ¶
ToStringArray converts *[]string to []string which is expected by Azure API.
func ToStringArrayPtr ¶
ToStringArrayPtr converts []string to *[]string which is expected by Azure API.
func ToStringMap ¶
ToStringMap converts the supplied map from the Azure Go SDK to internal representation.
func ToStringPtr ¶
func ToStringPtr(s string, o ...FieldOption) *string
ToStringPtr converts the supplied string for use with the Azure Go SDK.
func ToStringPtrMap ¶
ToStringPtrMap converts the supplied map for use with the Azure Go SDK.
func UseProvider ¶
func UseProvider(ctx context.Context, c client.Client, mg resource.Managed) (content map[string]string, authorizer autorest.Authorizer, err error)
UseProvider to return the necessary information to construct an Azure client. Deprecated: Use UseProviderConfig
func UseProviderConfig ¶
func UseProviderConfig(ctx context.Context, c client.Client, mg resource.Managed) (content map[string]string, authorizer autorest.Authorizer, err error)
UseProviderConfig to return the necessary information to construct an Azure client.
func ValidateClient ¶
ValidateClient verifies if the given client is valid by testing if it can make an Azure service API call TODO: is there a better way to validate the Azure client?
Types ¶
type Client ¶
type Client struct { autorest.Authorizer Credentials }
Client struct that represents the information needed to connect to the Azure services as a client
type Credentials ¶
type Credentials struct { ClientID string `json:"clientId"` ClientSecret string `json:"clientSecret"` TenantID string `json:"tenantId"` SubscriptionID string `json:"subscriptionId"` ActiveDirectoryEndpointURL string `json:"activeDirectoryEndpointUrl"` ResourceManagerEndpointURL string `json:"resourceManagerEndpointUrl"` ActiveDirectoryGraphResourceID string `json:"activeDirectoryGraphResourceId"` }
Credentials represents the contents of a JSON encoded Azure credentials file. It is a subset of the internal type used by the Azure auth library. https://github.com/Azure/go-autorest/blob/be17756/autorest/azure/auth/auth.go#L226
type FieldOption ¶
type FieldOption int
A FieldOption determines how common Go types are translated to the types required by the Azure Go SDK.
const ( // FieldRequired causes zero values to be converted to a pointer to the zero // value, rather than a nil pointer. Azure Go SDK types use pointer fields, // with a nil pointer indicating an unset field. Our ToPtr functions return // a nil pointer for a zero values, unless FieldRequired is set. FieldRequired FieldOption = iota )
Field options.