Package-Level Type Names (total 8, all are exported)
/* sort exporteds by: | */
AllowList is a generic Rule for whitelisting
RuleRule
IsValid for AllowList checks if the value is within the AllowList
AllowList : Rule
AllowList : github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4.Rule
DenyList is a generic Rule for blacklisting
RuleRule
IsValid for AllowList checks if the value is within the AllowList
DenyList : Rule
DenyList : github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4.Rule
InclusiveRules rules allow for rules to depend on one another
IsValid will return true if all rules are true
InclusiveRules : Rule
InclusiveRules : github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4.Rule
var AllowedQueryHoisting
MapRule generic Rule for maps
IsValid for the map Rule satisfies whether it exists in the map
MapRule : Rule
MapRule : github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4.Rule
Patterns is a list of strings to match against
IsValid for Patterns checks each pattern and returns if a match has
been found
Patterns : Rule
Patterns : github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4.Rule
Rule interface allows for more flexible rules and just simply
checks whether or not a value adheres to that Rule
( Rule) IsValid(value string) boolAllowListDenyListInclusiveRulesMapRulePatternsRules
github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4.AllowList
github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4.ExcludeList
github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4.InclusiveRules
github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4.MapRule
github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4.Patterns
github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4.Rule(interface)
github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4.Rules
Rule : github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4.Rule
func github.com/aws/aws-sdk-go-v2/internal/v4a.buildQuery(r Rule, header http.Header) (url.Values, http.Header)
Rules houses a set of Rule needed for validation of a
string value
IsValid will iterate through all rules and see if any rules
apply to the value and supports nested rules
Rules : Rule
Rules : github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4.Rule
var IgnoredHeaders
var RequiredSignedHeaders
SigningTime provides a wrapper around a time.Time which provides cached values for SigV4 signing.
Timetime.TimeshortTimeFormatstringTime.extint64
loc specifies the Location that should be used to
determine the minute, hour, month, day, and year
that correspond to this Time.
The nil location means UTC.
All UTC times are represented with loc==nil, never loc==&utcLoc.
wall and ext encode the wall time seconds, wall time nanoseconds,
and optional monotonic clock reading in nanoseconds.
From high to low bit position, wall encodes a 1-bit flag (hasMonotonic),
a 33-bit seconds field, and a 30-bit wall time nanoseconds field.
The nanoseconds field is in the range [0, 999999999].
If the hasMonotonic bit is 0, then the 33-bit field must be zero
and the full signed 64-bit wall seconds since Jan 1 year 1 is stored in ext.
If the hasMonotonic bit is 1, then the 33-bit field holds a 33-bit
unsigned wall seconds since Jan 1 year 1885, and ext holds a
signed 64-bit monotonic clock reading, nanoseconds since process start.
timeFormatstring
Add returns the time t+d.
AddDate returns the time corresponding to adding the
given number of years, months, and days to t.
For example, AddDate(-1, 2, 3) applied to January 1, 2011
returns March 4, 2010.
AddDate normalizes its result in the same way that Date does,
so, for example, adding one month to October 31 yields
December 1, the normalized form for November 31.
After reports whether the time instant t is after u.
AppendFormat is like Format but appends the textual
representation to b and returns the extended buffer.
Before reports whether the time instant t is before u.
Clock returns the hour, minute, and second within the day specified by t.
Date returns the year, month, and day in which t occurs.
Day returns the day of the month specified by t.
Equal reports whether t and u represent the same time instant.
Two times can be equal even if they are in different locations.
For example, 6:00 +0200 and 4:00 UTC are Equal.
See the documentation on the Time type for the pitfalls of using == with
Time values; most code should use Equal instead.
Format returns a textual representation of the time value formatted according
to the layout defined by the argument. See the documentation for the
constant called Layout to see how to represent the layout format.
The executable example for Time.Format demonstrates the working
of the layout string in detail and is a good reference.
GoString implements fmt.GoStringer and formats t to be printed in Go source
code.
GobDecode implements the gob.GobDecoder interface.
GobEncode implements the gob.GobEncoder interface.
Hour returns the hour within the day specified by t, in the range [0, 23].
ISOWeek returns the ISO 8601 year and week number in which t occurs.
Week ranges from 1 to 53. Jan 01 to Jan 03 of year n might belong to
week 52 or 53 of year n-1, and Dec 29 to Dec 31 might belong to week 1
of year n+1.
In returns a copy of t representing the same time instant, but
with the copy's location information set to loc for display
purposes.
In panics if loc is nil.
IsDST reports whether the time in the configured location is in Daylight Savings Time.
IsZero reports whether t represents the zero time instant,
January 1, year 1, 00:00:00 UTC.
Local returns t with the location set to local time.
Location returns the time zone information associated with t.
MarshalBinary implements the encoding.BinaryMarshaler interface.
MarshalJSON implements the json.Marshaler interface.
The time is a quoted string in RFC 3339 format, with sub-second precision added if present.
MarshalText implements the encoding.TextMarshaler interface.
The time is formatted in RFC 3339 format, with sub-second precision added if present.
Minute returns the minute offset within the hour specified by t, in the range [0, 59].
Month returns the month of the year specified by t.
Nanosecond returns the nanosecond offset within the second specified by t,
in the range [0, 999999999].
Round returns the result of rounding t to the nearest multiple of d (since the zero time).
The rounding behavior for halfway values is to round up.
If d <= 0, Round returns t stripped of any monotonic clock reading but otherwise unchanged.
Round operates on the time as an absolute duration since the
zero time; it does not operate on the presentation form of the
time. Thus, Round(Hour) may return a time with a non-zero
minute, depending on the time's Location.
Second returns the second offset within the minute specified by t, in the range [0, 59].
ShortTimeFormat provides a time formatted of 20060102.
String returns the time formatted using the format string
"2006-01-02 15:04:05.999999999 -0700 MST"
If the time has a monotonic clock reading, the returned string
includes a final field "m=±<value>", where value is the monotonic
clock reading formatted as a decimal number of seconds.
The returned string is meant for debugging; for a stable serialized
representation, use t.MarshalText, t.MarshalBinary, or t.Format
with an explicit format string.
Sub returns the duration t-u. If the result exceeds the maximum (or minimum)
value that can be stored in a Duration, the maximum (or minimum) duration
will be returned.
To compute t-d for a duration d, use t.Add(-d).
TimeFormat provides a time formatted in the X-Amz-Date format.
Truncate returns the result of rounding t down to a multiple of d (since the zero time).
If d <= 0, Truncate returns t stripped of any monotonic clock reading but otherwise unchanged.
Truncate operates on the time as an absolute duration since the
zero time; it does not operate on the presentation form of the
time. Thus, Truncate(Hour) may return a time with a non-zero
minute, depending on the time's Location.
UTC returns t with the location set to UTC.
Unix returns t as a Unix time, the number of seconds elapsed
since January 1, 1970 UTC. The result does not depend on the
location associated with t.
Unix-like operating systems often record time as a 32-bit
count of seconds, but since the method here returns a 64-bit
value it is valid for billions of years into the past or future.
UnixMicro returns t as a Unix time, the number of microseconds elapsed since
January 1, 1970 UTC. The result is undefined if the Unix time in
microseconds cannot be represented by an int64 (a date before year -290307 or
after year 294246). The result does not depend on the location associated
with t.
UnixMilli returns t as a Unix time, the number of milliseconds elapsed since
January 1, 1970 UTC. The result is undefined if the Unix time in
milliseconds cannot be represented by an int64 (a date more than 292 million
years before or after 1970). The result does not depend on the
location associated with t.
UnixNano returns t as a Unix time, the number of nanoseconds elapsed
since January 1, 1970 UTC. The result is undefined if the Unix time
in nanoseconds cannot be represented by an int64 (a date before the year
1678 or after 2262). Note that this means the result of calling UnixNano
on the zero Time is undefined. The result does not depend on the
location associated with t.
UnmarshalBinary implements the encoding.BinaryUnmarshaler interface.
UnmarshalJSON implements the json.Unmarshaler interface.
The time is expected to be a quoted string in RFC 3339 format.
UnmarshalText implements the encoding.TextUnmarshaler interface.
The time is expected to be in RFC 3339 format.
Weekday returns the day of the week specified by t.
Year returns the year in which t occurs.
YearDay returns the day of the year specified by t, in the range [1,365] for non-leap years,
and [1,366] in leap years.
Zone computes the time zone in effect at time t, returning the abbreviated
name of the zone (such as "CET") and its offset in seconds east of UTC.
abs returns the time t as an absolute time, adjusted by the zone offset.
It is called when computing a presentation property like Month or Hour.
addSec adds d seconds to the time.
date computes the year, day of year, and when full=true,
the month and day in which t occurs.
(*SigningTime) format(target *string, format string) string
locabs is a combination of the Zone and abs methods,
extracting both return values from a single zone lookup.
mono returns t's monotonic clock reading.
It returns 0 for a missing reading.
This function is used only for testing,
so it's OK that technically 0 is a valid
monotonic clock reading as well.
nsec returns the time's nanoseconds.
sec returns the time's seconds since Jan 1 year 1.
setLoc sets the location associated with the time.
setMono sets the monotonic clock reading in t.
If t cannot hold a monotonic clock reading,
because its wall time is too large,
setMono is a no-op.
stripMono strips the monotonic clock reading in t.
unixSec returns the time's seconds since Jan 1 1970 (Unix time).
SigningTime : encoding.BinaryMarshaler
*SigningTime : encoding.BinaryUnmarshaler
SigningTime : encoding.TextMarshaler
*SigningTime : encoding.TextUnmarshaler
SigningTime : encoding/json.Marshaler
*SigningTime : encoding/json.Unmarshaler
SigningTime : expvar.Var
SigningTime : fmt.GoStringer
SigningTime : fmt.Stringer
SigningTime : github.com/aws/smithy-go/middleware.stringer
SigningTime : github.com/go-pg/zerochecker.isZeroer
SigningTime : github.com/vmihailenco/msgpack/v5.isZeroer
SigningTime : context.stringer
*SigningTime : crypto/hmac.marshalable
SigningTime : runtime.stringer
func NewSigningTime(t time.Time) SigningTime
Package-Level Functions (total 9, in which 5 are exported)
GetURIPath returns the escaped URI component from the provided URL
HMACSHA256 computes a HMAC-SHA256 of data given the provided key.
NewSigningTime creates a new SigningTime given a time.Time
SanitizeHostForHeader removes default port from host and updates request.Host
StripExcessSpaces will rewrite the passed in slice's string values to not
contain muliple side-by-side spaces.
Returns host from request
Returns true if the specified URI is using the standard port
(i.e. port 80 for HTTP URIs or 443 for HTTPS URIs)
Port returns the port part of u.Host, without the leading colon.
If u.Host doesn't contain a port, Port returns an empty string.
Copied from the Go 1.8 standard library (net/url)
Hostname returns u.Host, without any port number.
If Host is an IPv6 literal with a port number, Hostname returns the
IPv6 literal without the square brackets. IPv6 literals may include
a zone identifier.
Copied from the Go 1.8 standard library (net/url)
Package-Level Variables (total 3, all are exported)
AllowedQueryHoisting is a whitelist for Build query headers. The boolean value
represents whether or not it is a pattern.
IgnoredHeaders is a list of headers that are ignored during signing
RequiredSignedHeaders is a whitelist for Build canonical headers.
Package-Level Constants (total 12, in which 11 are exported)
AmzAlgorithmKey indicates the signing algorithm
AmzCredentialKey is the access key ID and credential scope
AmzDateKey is the UTC timestamp for the request in the format YYYYMMDD'T'HHMMSS'Z'
AmzSecurityTokenKey indicates the security token to be used with temporary credentials
AmzSignatureKey is the query parameter to store the SigV4 signature
AmzSignedHeadersKey is the set of headers signed for the request
ContentSHAKey is the SHA256 of request body
EmptyStringSHA256 is the hex encoded sha256 value of an empty string
ShortTimeFormat is the shorten time format used in the credential scope
TimeFormat is the time format to be used in the X-Amz-Date header or query parameter
UnsignedPayload indicates that the request payload body is unsigned