pkg

package
v0.0.0-...-714e0fc Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2019 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Code

func Code(secret string) string

Code .

func GetSessionToken

func GetSessionToken(region string, seconds int64) (*sts.Credentials, error)

GetSessionToken .

func Render

func Render(w http.ResponseWriter, status int, data string)

Render JSON.

func RenderAccessKeys

func RenderAccessKeys(w http.ResponseWriter, status int, accessKeyID string,
	secretAccessKey string, sessionToken string)

RenderAccessKeys JSON.

func SendEmail

func SendEmail(region, from, to, subject, message string) error

SendEmail .

func SendMessage

func SendMessage(region, phone, message string) error

SendMessage .

func UUID

func UUID() (string, error)

UUID generates a UUID for use as an ID.

Types

type DynamoDB

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

DynamoDB implementation.

func NewDynamoDB

func NewDynamoDB(region string, tableVerify string) *DynamoDB

NewDynamoDB returns a new instance of DynamoDB.

func (*DynamoDB) CreateVerifyTable

func (db *DynamoDB) CreateVerifyTable() (err error)

CreateVerifyTable creates the verify table.

func (*DynamoDB) DeleteVerify

func (db *DynamoDB) DeleteVerify(id string) (err error)

DeleteVerify deletes old IDs.

func (*DynamoDB) SetVerify

func (db *DynamoDB) SetVerify(id string, isVerified bool) (err error)

SetVerify will set the verify in the database.

func (*DynamoDB) Verified

func (db *DynamoDB) Verified(id string) (bool, bool)

Verified returns true if verified, true if found.

Jump to

Keyboard shortcuts

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