Documentation ¶
Index ¶
- Constants
- func Bool(v bool, o ...FieldOption) *bool
- func BoolValue(v *bool) bool
- func CIDRBlocksEqual(cidr1, cidr2 string) bool
- func CompactAndEscapeJSON(s string) (string, error)
- func CreateJSONPatch(source, destination interface{}) ([]byte, error)
- func CredentialsIDSecret(data []byte, profile string) (aws.Credentials, error)
- func DiffEC2Tags(local []ec2type.Tag, remote []ec2type.Tag) (add []ec2type.Tag, remove []ec2type.Tag)
- func DiffLabels(local, remote map[string]string) (addOrModify map[string]string, remove []string)
- func DiffTags(local, remote map[string]string) (add map[string]string, remove []string)
- func DiffTagsMapPtr(spec map[string]*string, current map[string]*string) (map[string]*string, []*string)
- func GetAssumeRoleARN(pcs *v1beta1.ProviderConfigSpec) (*string, error)
- func GetAssumeRoleWithWebIdentityARN(pcs *v1beta1.ProviderConfigSpec) (*string, error)
- func GetConfig(ctx context.Context, c client.Client, mg resource.Managed, region string) (*aws.Config, error)
- func GetConfigV1(ctx context.Context, c client.Client, mg resource.Managed, region string) (*session.Session, error)
- func GetSessionV1(cfg *awsv1.Config) (*session.Session, error)
- func Int32(v int, o ...FieldOption) *int32
- func Int32Address(i *int) *int32
- func Int64(v int, o ...FieldOption) *int64
- func Int64Address(i *int) *int64
- func Int64Value(v *int64) int64
- func IntAddress(i *int64) *int
- func IntFrom32Address(i *int32) *int
- func IsPolicyUpToDate(local, remote *string) bool
- func LateInitializeBoolPtr(in *bool, from *bool) *bool
- func LateInitializeInt32(in int32, from int32) int32
- func LateInitializeInt32Ptr(in *int32, from *int32) *int32
- func LateInitializeInt64(in int64, from int64) int64
- func LateInitializeInt64Ptr(in *int64, from *int64) *int64
- func LateInitializeInt64PtrSlice(in []*int64, from []*int64) []*int64
- func LateInitializeIntFrom32Ptr(in *int, from *int32) *int
- func LateInitializeIntFromInt32Ptr(in *int, from *int32) *int
- func LateInitializeIntPtr(in *int, from *int64) *int
- func LateInitializeString(in string, from *string) string
- func LateInitializeStringPtr(in *string, from *string) *string
- func LateInitializeStringPtrSlice(in []*string, from []*string) []*string
- func LateInitializeTimePtr(in *metav1.Time, from *time.Time) *metav1.Time
- func SetAssumeRoleOptions(pc *v1beta1.ProviderConfig) func(*stscreds.AssumeRoleOptions)
- func SetResolver(pc *v1beta1.ProviderConfig, cfg *aws.Config) *aws.Config
- func SetResolverV1(pc *v1beta1.ProviderConfig, cfg *awsv1.Config) *awsv1.Config
- func SetWebIdentityRoleOptions(pc *v1beta1.ProviderConfig) func(*stscreds.WebIdentityRoleOptions)
- func String(v string, o ...FieldOption) *string
- func StringPtrSliceToValue(slice []*string) []string
- func StringSliceToPtr(slice []string) []*string
- func StringValue(v *string) string
- func UsePodServiceAccount(ctx context.Context, _ []byte, _, region string) (*aws.Config, error)
- func UsePodServiceAccountAssumeRole(ctx context.Context, _ []byte, _, region string, pc *v1beta1.ProviderConfig) (*aws.Config, error)
- func UsePodServiceAccountAssumeRoleWithWebIdentity(ctx context.Context, _ []byte, _, region string, pc *v1beta1.ProviderConfig) (*aws.Config, error)
- func UsePodServiceAccountV1(ctx context.Context, _ []byte, pc *v1beta1.ProviderConfig, _, region string) (*awsv1.Config, error)
- func UsePodServiceAccountV1AssumeRole(ctx context.Context, _ []byte, pc *v1beta1.ProviderConfig, _, region string) (*awsv1.Config, error)
- func UsePodServiceAccountV1AssumeRoleWithWebIdentity(ctx context.Context, _ []byte, pc *v1beta1.ProviderConfig, _, region string) (*awsv1.Config, error)
- func UseProvider(ctx context.Context, c client.Client, mg resource.Managed, region string) (*aws.Config, error)
- func UseProviderConfig(ctx context.Context, c client.Client, mg resource.Managed, region string) (*aws.Config, error)
- func UseProviderSecret(ctx context.Context, data []byte, profile, region string) (*aws.Config, error)
- func UseProviderSecretAssumeRole(ctx context.Context, data []byte, profile, region string, ...) (*aws.Config, error)
- func UseProviderSecretV1(_ context.Context, data []byte, pc *v1beta1.ProviderConfig, ...) (*awsv1.Config, error)
- func UseProviderSecretV1AssumeRole(ctx context.Context, data []byte, pc *v1beta1.ProviderConfig, ...) (*awsv1.Config, error)
- func Wrap(err error, msg string) error
- type AuthMethod
- type FieldOption
Constants ¶
const ( URLConfigTypeStatic = "Static" URLConfigTypeDynamic = "Dynamic" )
Endpoint URL configuration types.
const DefaultSection = ini.DefaultSection
DefaultSection for INI files.
const GlobalRegion = "aws-global"
GlobalRegion is the region name used for AWS services that do not have a notion of region.
Variables ¶
This section is empty.
Functions ¶
func Bool ¶
func Bool(v bool, o ...FieldOption) *bool
Bool converts the supplied bool for use with the AWS Go SDK.
func CIDRBlocksEqual ¶
CIDRBlocksEqual returns whether or not two CIDR blocks are equal: - Both CIDR blocks parse to an IP address and network - The string representation of the IP addresses are equal - The string representation of the networks are equal
func CompactAndEscapeJSON ¶
CompactAndEscapeJSON removes space characters and URL-encodes the JSON string.
func CreateJSONPatch ¶
CreateJSONPatch creates a diff JSON object that can be applied to any other JSON object.
func CredentialsIDSecret ¶
func CredentialsIDSecret(data []byte, profile string) (aws.Credentials, error)
CredentialsIDSecret retrieves AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY from the data which contains aws credentials under given profile Example: [default] aws_access_key_id = <YOUR_ACCESS_KEY_ID> aws_secret_access_key = <YOUR_SECRET_ACCESS_KEY>
func DiffEC2Tags ¶
func DiffEC2Tags(local []ec2type.Tag, remote []ec2type.Tag) (add []ec2type.Tag, remove []ec2type.Tag)
DiffEC2Tags returns []ec2type.Tag that should be added or removed.
func DiffLabels ¶
DiffLabels returns labels that should be added, modified, or removed.
func DiffTagsMapPtr ¶
func DiffTagsMapPtr(spec map[string]*string, current map[string]*string) (map[string]*string, []*string)
DiffTagsMapPtr returns which AWS Tags exist in the resource tags and which are outdated and should be removed
func GetAssumeRoleARN ¶
func GetAssumeRoleARN(pcs *v1beta1.ProviderConfigSpec) (*string, error)
GetAssumeRoleARN gets the AssumeRoleArn from a ProviderConfigSpec
func GetAssumeRoleWithWebIdentityARN ¶
func GetAssumeRoleWithWebIdentityARN(pcs *v1beta1.ProviderConfigSpec) (*string, error)
GetAssumeRoleWithWebIdentityARN gets the RoleArn from a ProviderConfigSpec
func GetConfig ¶
func GetConfig(ctx context.Context, c client.Client, mg resource.Managed, region string) (*aws.Config, error)
GetConfig constructs an *aws.Config that can be used to authenticate to AWS API by the AWS clients.
func GetConfigV1 ¶
func GetConfigV1(ctx context.Context, c client.Client, mg resource.Managed, region string) (*session.Session, error)
GetConfigV1 constructs an *awsv1.Config that can be used to authenticate to AWS API by the AWSv1 clients.
func GetSessionV1 ¶
GetSessionV1 constructs an AWS V1 client session, with common configuration like the user agent handler
func Int32 ¶
func Int32(v int, o ...FieldOption) *int32
Int32 converts the supplied int for use with the AWS Go SDK.
func Int32Address ¶
Int32Address returns the given *int in the form of *int32.
func Int64 ¶
func Int64(v int, o ...FieldOption) *int64
Int64 converts the supplied int for use with the AWS Go SDK.
func Int64Address ¶
Int64Address returns the given *int in the form of *int64.
func Int64Value ¶
Int64Value converts the supplied int64 pointer to a int64, returning 0 if the pointer is nil.
func IntAddress ¶
IntAddress converts the supplied int64 pointer to an int pointer, returning nil if the pointer is nil.
func IntFrom32Address ¶
IntFrom32Address converts the supplied int32 pointer to an int pointer, returning nil if the pointer is nil.
func IsPolicyUpToDate ¶
IsPolicyUpToDate Marshall policies to json for a compare to get around string ordering
func LateInitializeBoolPtr ¶
LateInitializeBoolPtr returns in if it's non-nil, otherwise returns from which is the backup for the cases in is nil.
func LateInitializeInt32 ¶
LateInitializeInt32 returns in if it's non-zero, otherwise returns from which is the backup for the cases in is zero.
func LateInitializeInt32Ptr ¶
LateInitializeInt32Ptr returns in if it's non-nil, otherwise returns from which is the backup for the cases in is nil.
func LateInitializeInt64 ¶
LateInitializeInt64 returns in if it's non-zero, otherwise returns from which is the backup for the cases in is zero.
func LateInitializeInt64Ptr ¶
LateInitializeInt64Ptr returns in if it's non-nil, otherwise returns from which is the backup for the cases in is nil.
func LateInitializeInt64PtrSlice ¶
LateInitializeInt64PtrSlice returns in if it's non-nil or from is zero length, otherwise it returns from.
func LateInitializeIntFrom32Ptr ¶
LateInitializeIntFrom32Ptr returns in if it's non-nil, otherwise returns from which is the backup for the cases in is nil. This function considered that nil and 0 values are same. However, for a *int32, nil and 0 values must be different because if the external AWS resource has a field with 0 value, during late initialization setting this value in CR must be allowed. Please see the LateInitializeIntFromInt32Ptr func. Deprecated: Please use LateInitializeIntFromInt32Ptr instead.
func LateInitializeIntFromInt32Ptr ¶
LateInitializeIntFromInt32Ptr returns in if it's non-nil, otherwise returns from which is the backup for the cases in is nil.
func LateInitializeIntPtr ¶
LateInitializeIntPtr returns in if it's non-nil, otherwise returns from which is the backup for the cases in is nil.
func LateInitializeString ¶
LateInitializeString returns `from` if `in` is empty and `from` is non-nil, in other cases it returns `in`.
func LateInitializeStringPtr ¶
LateInitializeStringPtr returns in if it's non-nil, otherwise returns from which is the backup for the cases in is nil.
func LateInitializeStringPtrSlice ¶
LateInitializeStringPtrSlice returns in if it's non-nil or from is zero length, otherwise it returns from.
func LateInitializeTimePtr ¶
LateInitializeTimePtr returns in if it's non-nil, otherwise returns from which is the backup for the cases in is nil.
func SetAssumeRoleOptions ¶
func SetAssumeRoleOptions(pc *v1beta1.ProviderConfig) func(*stscreds.AssumeRoleOptions)
SetAssumeRoleOptions sets options when Assuming an IAM Role
func SetResolver ¶
SetResolver parses annotations from the managed resource and returns a configuration accordingly.
func SetResolverV1 ¶
SetResolverV1 parses annotations from the managed resource and returns a V1 configuration accordingly.
func SetWebIdentityRoleOptions ¶
func SetWebIdentityRoleOptions(pc *v1beta1.ProviderConfig) func(*stscreds.WebIdentityRoleOptions)
SetWebIdentityRoleOptions sets options when exchanging a WebIdentity Token for a Role
func String ¶
func String(v string, o ...FieldOption) *string
String converts the supplied string for use with the AWS Go SDK.
func StringPtrSliceToValue ¶
StringPtrSliceToValue converts the supplied string pointer array to an array of strings.
func StringSliceToPtr ¶
StringSliceToPtr converts the supplied string array to an array of string pointers.
func StringValue ¶
StringValue converts the supplied string pointer to a string, returning the empty string if the pointer is nil. TODO(muvaf): is this really meaningful? why not implement it?
func UsePodServiceAccount ¶
UsePodServiceAccount assumes an IAM role configured via a ServiceAccount. https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts.html
func UsePodServiceAccountAssumeRole ¶
func UsePodServiceAccountAssumeRole(ctx context.Context, _ []byte, _, region string, pc *v1beta1.ProviderConfig) (*aws.Config, error)
UsePodServiceAccountAssumeRole assumes an IAM role configured via a ServiceAccount assume Cross account IAM roles https://aws.amazon.com/blogs/containers/cross-account-iam-roles-for-kubernetes-service-accounts/
func UsePodServiceAccountAssumeRoleWithWebIdentity ¶
func UsePodServiceAccountAssumeRoleWithWebIdentity(ctx context.Context, _ []byte, _, region string, pc *v1beta1.ProviderConfig) (*aws.Config, error)
UsePodServiceAccountAssumeRoleWithWebIdentity assumes an IAM role configured via a ServiceAccount assume Cross account IAM roles https://aws.amazon.com/blogs/containers/cross-account-iam-roles-for-kubernetes-service-accounts/
func UsePodServiceAccountV1 ¶
func UsePodServiceAccountV1(ctx context.Context, _ []byte, pc *v1beta1.ProviderConfig, _, region string) (*awsv1.Config, error)
UsePodServiceAccountV1 assumes an IAM role configured via a ServiceAccount. https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts.html
func UsePodServiceAccountV1AssumeRole ¶
func UsePodServiceAccountV1AssumeRole(ctx context.Context, _ []byte, pc *v1beta1.ProviderConfig, _, region string) (*awsv1.Config, error)
UsePodServiceAccountV1AssumeRole assumes an IAM role configured via a ServiceAccount and assume Cross account IAM role https://aws.amazon.com/blogs/containers/cross-account-iam-roles-for-kubernetes-service-accounts/
func UsePodServiceAccountV1AssumeRoleWithWebIdentity ¶
func UsePodServiceAccountV1AssumeRoleWithWebIdentity(ctx context.Context, _ []byte, pc *v1beta1.ProviderConfig, _, region string) (*awsv1.Config, error)
UsePodServiceAccountV1AssumeRoleWithWebIdentity assumes an IAM role configured via a ServiceAccount and assume Cross account IAM role https://aws.amazon.com/blogs/containers/cross-account-iam-roles-for-kubernetes-service-accounts/
func UseProvider ¶
func UseProvider(ctx context.Context, c client.Client, mg resource.Managed, region string) (*aws.Config, error)
UseProvider to produce a config that can be used to authenticate to AWS. Deprecated: Use UseProviderConfig.
func UseProviderConfig ¶
func UseProviderConfig(ctx context.Context, c client.Client, mg resource.Managed, region string) (*aws.Config, error)
UseProviderConfig to produce a config that can be used to authenticate to AWS.
func UseProviderSecret ¶
func UseProviderSecret(ctx context.Context, data []byte, profile, region string) (*aws.Config, error)
UseProviderSecret - AWS configuration which can be used to issue requests against AWS API
func UseProviderSecretAssumeRole ¶
func UseProviderSecretAssumeRole(ctx context.Context, data []byte, profile, region string, pc *v1beta1.ProviderConfig) (*aws.Config, error)
UseProviderSecretAssumeRole - AWS configuration which can be used to issue requests against AWS API assume Cross account IAM roles
func UseProviderSecretV1 ¶
func UseProviderSecretV1(_ context.Context, data []byte, pc *v1beta1.ProviderConfig, profile, region string) (*awsv1.Config, error)
UseProviderSecretV1 retrieves AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY from the data which contains aws credentials under given profile and produces a *awsv1.Config Example: [default] aws_access_key_id = <YOUR_ACCESS_KEY_ID> aws_secret_access_key = <YOUR_SECRET_ACCESS_KEY>
func UseProviderSecretV1AssumeRole ¶
func UseProviderSecretV1AssumeRole(ctx context.Context, data []byte, pc *v1beta1.ProviderConfig, profile, region string) (*awsv1.Config, error)
UseProviderSecretV1AssumeRole - AWS v1 configuration which can be used to issue requests against AWS API assume Cross account IAM roles
Types ¶
type AuthMethod ¶
AuthMethod is a method of authenticating to the AWS API
type FieldOption ¶
type FieldOption int
A FieldOption determines how common Go types are translated to the types required by the AWS Go SDK.
const ( // FieldRequired causes zero values to be converted to a pointer to the zero // value, rather than a nil pointer. AWS 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.
Directories ¶
Path | Synopsis |
---|---|
dax
|
|
docdb
|
|
fake/eksiface
Package eksiface is a generated GoMock package.
|
Package eksiface is a generated GoMock package. |
elasticloadbalancing
|
|
mock
|
|
cognitoidentityprovider
Package cognitoidentityprovider is a generated GoMock package.
|
Package cognitoidentityprovider is a generated GoMock package. |
kube
Package kube is a generated GoMock package.
|
Package kube is a generated GoMock package. |