Documentation ¶
Index ¶
- type DatabaseContext
- func (db DatabaseContext) GetAttendeeInfo(id int) ([]byte, error)
- func (db DatabaseContext) GetBlacklistEntry(email string) bool
- func (db DatabaseContext) GetEmail(id int) string
- func (db DatabaseContext) GetImageUploadURL(id int) (string, error)
- func (db DatabaseContext) GetVerificationToken(id int) (string, error)
- func (db DatabaseContext) StoreAttendeeInfo(id int, info []byte) bool
- func (db DatabaseContext) StoreEmail(id int, address string) bool
- func (db DatabaseContext) StoreVerificationToken(id int, token string) bool
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 -