dynamodb

package
v0.0.0-...-881522d Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	AWSSession     *session.Session
	UsersTableName string
}

type DB

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

DB represents a configurable DynamoDB instance. Note: it is important that fields in the table match the JSON representation of the fields from the schema.

func New

func New(cfg Config) *DB

func (DB) CreateUser

func (d DB) CreateUser(user *db.User) error

func (DB) GetUserByEmail

func (d DB) GetUserByEmail(email string) (db.User, error)

func (DB) GetUserByID

func (d DB) GetUserByID(id string) (db.User, error)

func (DB) UpdateUserPhotoURL

func (d DB) UpdateUserPhotoURL(userID, photoURL string) error

Jump to

Keyboard shortcuts

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