lib

package
v0.0.0-...-23acba9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 31, 2021 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AWSSessions

func AWSSessions() (*session.Session, error)

func DynamoDBGetItem

func DynamoDBGetItem(dynamodbsvc *dynamodb.DynamoDB, tableName string, key interface{}) (map[string]*dynamodb.AttributeValue, error)

func DynamoDBPutItem

func DynamoDBPutItem(dynamodbsvc *dynamodb.DynamoDB, tableName string, item interface{}, conditionExpression string) string

func FromISO8061

func FromISO8061(str string) (time.Time, error)

func GetBodyBinaryFromHttpResp

func GetBodyBinaryFromHttpResp(resp *http.Response) ([]byte, error)

func JSONStringify

func JSONStringify(obj interface{}) (string, error)

func MinutesAgo

func MinutesAgo(minutes int) time.Time

func NewDiscordClient

func NewDiscordClient(token string) (*discordgo.Session, error)

func NewDynamoClient

func NewDynamoClient() *dynamodb.DynamoDB

func NewTranslateClient

func NewTranslateClient() *translate.Translate

func NewTwitterClient

func NewTwitterClient(token string) *http.Client

func ToISO8061

func ToISO8061(date time.Time) string

func TranslateText

func TranslateText(translatesvc *translate.Translate, text string, sourceLanguageCode string, targetLanguageCode string) (string, error)

func UnmarshalStreamImage

func UnmarshalStreamImage(attribute map[string]events.DynamoDBAttributeValue, out interface{}) error

UnmarshalStreamImage converts events.DynamoDBAttributeValue to struct from: https://stackoverflow.com/questions/49129534/unmarshal-mapstringdynamodbattributevalue-into-a-struct

Types

type Param

type Param struct {
	Name           string
	WithDecryption bool
	// contains filtered or unexported fields
}

func (*Param) GetValue

func (p *Param) GetValue() (string, error)

type SSM

type SSM struct {
	// contains filtered or unexported fields
}

SSM is a SSM API client.

func NewSSMClient

func NewSSMClient() *SSM

func (*SSM) Param

func (s *SSM) Param(name string, decryption bool) *Param

Param creates the struct for querying the param store

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL