# Functions
AddCA adds a ca cert to the given tls config.
AddClientCA adds a client cert to the given tls config.
BackgroundContext returns a context that is specifically not a child of the provided parent context wrt any cancellation or deadline of the parent, so that it contains all values only.
No description provided by the author
No description provided by the author
FnRequestID returns the passed value if that is not empty otherwise it generates a new unique ID.
GenerateLinearHistogramBuckets generates number of buckets specified by count in the range specified by min and max.
GenerateLogScaleHistogramBuckets generates number of buckets specified by count on the log scale such that the value specified by max is in the last bucket.
GenerateLogScaleHistogramBucketsWithRange generates histogram buckets on the log scale between the specified min and max range, such that the min value is in the first bucket and the max in the last.
GetEnv looks up a key under its name in env or name+_FILE to read the value from a file.
GetEnvDuration looks up a key under its name in env or name+_FILE to read the value from a file.
GetEnvInt looks up a key under its name in env or name+_FILE to read the value from a file.
IsDate returns true when the string is a valid date.
IsDateTime returns true when the string is a valid date-time.
No description provided by the author
Logger returns the structured logger.
LoggerWithFields returns a child context of the provided parent that contains a logger with additional fields from the parent's logger, it returns the new child logger, as well.
No description provided by the author
No description provided by the author
MaskPassword returns a stringified URL without its password visible.
No description provided by the author
No description provided by the author
No description provided by the author
NewClamWriter creates a clamp writer that will limit the number of bytes written to to an underlying stream This allows up to max bytes to be written to the underlying stream , writes that exceed this will return overflowErr
Setting a max of 0 sets no limit
If a write spans the last remaining bytes available the number of bytes up-to the limit will be written and the overflow error will be returned.
NewDateTime is a representation of zero value for DateTime type.
No description provided by the author
No description provided by the author
No description provided by the author
NewTimer starts a new Timer with the given duration.
NewTLSSimple creates a new tls config with the given cert and key file paths.
No description provided by the author
ParseDateTime parses a string that represents an ISO8601 time or a unix epoch.
RequestIDFromContext extract the request id from the context.
No description provided by the author
No description provided by the author
No description provided by the author
StripHopHeaders removes transport related headers.
WithLogger stores the logger.
WithRequestID stores a request ID into the context.
# Constants
DateTimePattern pattern to match for the date-time format from http://tools.ietf.org/html/rfc3339#section-5.6.
RequestIDContextKey is the name of the key used to store the request ID into the context.
No description provided by the author
RFC3339FullDate represents a full-date as specified by RFC3339 See: http://goo.gl/xXOvVd.
RFC3339Micro represents a ISO8601 format to micro instead of to nano.
RFC3339Millis represents a ISO8601 format to millis instead of to nanos.
# Variables
MarshalFormat sets the time resolution format used for marshaling time (set to milliseconds).
# Structs
No description provided by the author
NoopReadWriteCloser implements io.ReadWriteCloser, discarding all bytes, Read always returns EOF.
Timer is exactly the same semantics as time.Timer, except for Reset, which fixes a deficiency from the stdlib that would have resulted in our case as a desirable behavior change to fix.
No description provided by the author
# Interfaces
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Type aliases
DateTime is a time but it serializes to ISO8601 format with millis It knows how to read 3 different variations of a RFC3339 date time.