1 // Package aws provides the core SDK's utilities and shared types. Use this package's
2 // utilities to simplify setting and reading API operations parameters.
4 // Value and Pointer Conversion Utilities
6 // This package includes a helper conversion utility for each scalar type the SDK's
7 // API use. These utilities make getting a pointer of the scalar, and dereferencing
10 // Each conversion utility comes in two forms. Value to Pointer and Pointer to Value.
11 // The Pointer to value will safely dereference the pointer and return its value.
12 // If the pointer was nil, the scalar's zero value will be returned.
14 // The value to pointer functions will be named after the scalar type. So get a
15 // *string from a string value use the "String" function. This makes it easy to
16 // to get pointer of a literal string value, because getting the address of a
17 // literal requires assigning the value to a variable first.
21 // // Without the SDK's conversion functions
25 // // With the SDK's conversion functions
26 // strPtr = aws.String("my string")
28 // // Convert *string to string value
29 // str = aws.StringValue(strPtr)
31 // In addition to scalars the aws package also includes conversion utilities for
32 // map and slice for commonly types used in API parameters. The map and slice
33 // conversion functions use similar naming pattern as the scalar conversion
36 // var strPtrs []*string
37 // var strs []string = []string{"Go", "Gophers", "Go"}
39 // // Convert []string to []*string
40 // strPtrs = aws.StringSlice(strs)
42 // // Convert []*string to []string
43 // strs = aws.StringValueSlice(strPtrs)
45 // SDK Default HTTP Client
47 // The SDK will use the http.DefaultClient if a HTTP client is not provided to
48 // the SDK's Session, or service client constructor. This means that if the
49 // http.DefaultClient is modified by other components of your application the
50 // modifications will be picked up by the SDK as well.
52 // In some cases this might be intended, but it is a better practice to create
53 // a custom HTTP Client to share explicitly through your application. You can
54 // configure the SDK to use the custom HTTP Client by setting the HTTPClient
55 // value of the SDK's Config type when creating a Session or service client.