Documentation
¶
Overview ¶
Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at
http://aws.amazon.com/apache2.0/
or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- func AddScheme(endpoint string) string
- func FormatTime(t time.Time) string
- func GetNumCPU() int
- func Int32PtrToIntPtr(int32ptr *int32) *int
- func Int64PtrToInt32Ptr(int64ptr *int64) *int32
- func MaxNum[T constraints.Integer | constraints.Float](a, b T) T
- func ParseTime(value string) (time.Time, error)
- func SignHTTPRequest(req *http.Request, region, service string, creds *aws.CredentialsCache, ...) error
- func SignHTTPRequestV1(req *http.Request, region, service string, creds *credentialsV1.Credentials, ...) error
- func ToPtrSlice[V any](xs []V) []*V
- func Uint16SliceToStringSlice(slice []uint16) []string
- func ZeroOrNil(obj interface{}) bool
- type Timestamp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddScheme ¶
If the URL doesn't start with "http://" or "https://", prepends "https://" to the URL. Empty strings are returned as-is without modification
func FormatTime ¶
FormatTime returns a string value of the time. https://github.com/aws/aws-sdk-go/blob/main/private/protocol/timestamp.go#L55-L69
func Int32PtrToIntPtr ¶
Int32PtrToIntPtr converts a *int32 to *int.
func Int64PtrToInt32Ptr ¶
Int64PtrToInt32Ptr converts a *int64 to *int32.
func MaxNum ¶
func MaxNum[T constraints.Integer | constraints.Float](a, b T) T
MaxNum returns the maximum value between two numbers.
func ParseTime ¶
ParseTime attempts to parse the time given the format. Returns the time if it was able to be parsed, and fails otherwise. https://github.com/aws/aws-sdk-go/blob/main/private/protocol/timestamp.go#L73-L101
func SignHTTPRequest ¶
func SignHTTPRequest(req *http.Request, region, service string, creds *aws.CredentialsCache, body io.ReadSeeker) error
SignHTTPRequest signs an http.Request struct with authv4 using the given region, service, and credentials.
func SignHTTPRequestV1 ¶
func SignHTTPRequestV1(req *http.Request, region, service string, creds *credentialsV1.Credentials, body io.ReadSeeker) error
SignHTTPRequestV1 signs an http.Request struct with authv4 using the given region, service, and credentials. TODO: Remove this once TCS adds support for AWS SDK v2 Credentials
func ToPtrSlice ¶
func ToPtrSlice[V any](xs []V) []*V
ToPtrSlice converts a slices of values to a slice of pointers to those values.
func Uint16SliceToStringSlice ¶
Uint16SliceToStringSlice converts a slice of type uint16 to a slice of type string. It uses strconv.Itoa on each element
Types ¶
type Timestamp ¶
type alias to workaround serializing time.Time into seconds UTC instead of RFC3339 example (original) timestamp: "2025-05-09T14:47:58.031Z" (customized) timestamp: "1746802078.031"
func (*Timestamp) MarshalJSON ¶
Follow aws-sdk-go (v1) behavior for time.Time serialization into UTC seconds (UnixTimeFormatName) https://github.com/aws/aws-sdk-go/blob/main/private/protocol/timestamp.go#L54-L69
func (*Timestamp) UnmarshalJSON ¶
Follow aws-sdk-go (v1) behavior for time.Time deserialization into UTC seconds (UnixTimeFormatName) https://github.com/aws/aws-sdk-go/blob/main/private/protocol/timestamp.go#L90-L97
Directories
¶
Path | Synopsis |
---|---|
Package cipher provides customized cipher configuration for agent client
|
Package cipher provides customized cipher configuration for agent client |
mocks
Package mock_execwrapper is a generated GoMock package.
|
Package mock_execwrapper is a generated GoMock package. |
Package httpproxy provides support for HTTP proxy determination based on environment variables, as provided by net/http's ProxyFromEnvironment function.
|
Package httpproxy provides support for HTTP proxy determination based on environment variables, as provided by net/http's ProxyFromEnvironment function. |
mocks
Package mock_ioutilwrapper is a generated GoMock package.
|
Package mock_ioutilwrapper is a generated GoMock package. |
mocks
Package mock_netlinkwrapper is a generated GoMock package.
|
Package mock_netlinkwrapper is a generated GoMock package. |
mocks
Package mock_netwrapper is a generated GoMock package.
|
Package mock_netwrapper is a generated GoMock package. |
mocks
Package mock_oswrapper is a generated GoMock package.
|
Package mock_oswrapper is a generated GoMock package. |
mock
Package mock_retry is a generated GoMock package.
|
Package mock_retry is a generated GoMock package. |
Package ttime implements a testable alternative to the Go "time" package.
|
Package ttime implements a testable alternative to the Go "time" package. |
mocks
Package mock_ttime is a generated GoMock package.
|
Package mock_ttime is a generated GoMock package. |