models

package
v0.0.0-...-4fa03f3 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DatabaseContext

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

DatabaseContext carries context needed to interact with the database.

func NewDatabaseContext

func NewDatabaseContext(localstack bool, contentBucket string) (DatabaseContext, error)

NewDatabaseContext will establish a session with the backend db.

`DatabaseContext` effectively acts as a key-value store for a variety of operations

func NewDatabaseContextWithCfg

func NewDatabaseContextWithCfg(cfg client.ConfigProvider, localstack bool,
	bucket string) (context DatabaseContext, err error)

NewDatabaseContextWithCfg constructs a new DatabaseContext, using the given AWS session handle.

func (DatabaseContext) GetAttendeeInfo

func (db DatabaseContext) GetAttendeeInfo(id int) ([]byte, error)

GetAttendeeInfo -

func (DatabaseContext) GetBlacklistEntry

func (db DatabaseContext) GetBlacklistEntry(email string) bool

GetBlacklistEntry checks if a particular email is blacklisted

func (DatabaseContext) GetEmail

func (db DatabaseContext) GetEmail(id int) string

GetEmail gets the associated email for that id, expect empty string since few attendees set a new email manually

func (DatabaseContext) GetImageUploadURL

func (db DatabaseContext) GetImageUploadURL(id int) (string, error)

GetImageUploadURL get a URL that an image can be uploaded to

func (DatabaseContext) GetVerificationToken

func (db DatabaseContext) GetVerificationToken(id int) (string, error)

GetVerificationToken -

func (DatabaseContext) StoreAttendeeInfo

func (db DatabaseContext) StoreAttendeeInfo(id int, info []byte) bool

StoreAttendeeInfo -

func (DatabaseContext) StoreEmail

func (db DatabaseContext) StoreEmail(id int, address string) bool

StoreEmail sets the email address for that id

func (DatabaseContext) StoreVerificationToken

func (db DatabaseContext) StoreVerificationToken(id int, token string) bool

StoreVerificationToken -

Jump to

Keyboard shortcuts

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