Documentation ¶
Index ¶
- func DecodeUTF8(bytes []byte) string
- func GetHTTPClient() *http.Client
- func JoinNonEmpty(delim string, strings ...string) string
- func MakeHTTPRequest(req *http.Request) (*http.Response, []byte, error)
- func MapAsJSON(m map[string]string) []byte
- func PutS3File(s3Client *s3.S3, bucket string, path string, contentType string, ...) (string, error)
- func StringArrayContains(s []string, e string) bool
- func TestS3(s3Client *s3.S3, bucket string) error
- type NullMap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeUTF8 ¶
DecodeUTF8 is equivalent to .decode('utf-8', 'ignore') in Python
func GetHTTPClient ¶
GetHTTPClient returns the shared HTTP client used by all Courier threads
func JoinNonEmpty ¶
JoinNonEmpty takes a vararg of strings and return the join of all the non-empty strings with a delimiter between them
func MakeHTTPRequest ¶
MakeHTTPRequest fires the passed in http request using our shared client, returning the response and any errors
func StringArrayContains ¶
StringArrayContains returns whether a given string array contains the given element
Types ¶
type NullMap ¶
NullMap is a one level deep dictionary that is represented as JSON in the database
func (*NullMap) MarshalJSON ¶
MarshalJSON decodes our dictionary from the passed in bytes
func (*NullMap) UnmarshalJSON ¶
UnmarshalJSON sets our dict from the passed in data
Click to show internal directories.
Click to hide internal directories.