Documentation ¶
Index ¶
- Variables
- type User
- type UsersRepository
- func (ur *UsersRepository) Create(user *User) (*User, error)
- func (ur *UsersRepository) DeleteByEmail(email string) (*User, error)
- func (ur *UsersRepository) GetAll() ([]User, error)
- func (ur *UsersRepository) GetByEmail(email string) (*User, error)
- func (ur *UsersRepository) Update(user *User) (*User, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrorFailedToUnmarshalRecord = "failed to unmarshal record" ErrorFailedToFetchRecord = "failed to fetch record" ErrorInvalidUserData = "invalid user data" ErrorInvalidEmail = "invalid email" ErrorCouldNotMarshalItem = "could not marshal item" ErrorCouldNotDeleteItem = "could not delete item" ErrorCouldNotDynamoPutItem = "could not dynamo put item" ErrorUserAlreadyExists = "user.User already exists" ErrorUserDoesNotExist = "user.User does not exist" )
Functions ¶
This section is empty.
Types ¶
type UsersRepository ¶
type UsersRepository struct {
// contains filtered or unexported fields
}
func NewUsersRepository ¶
func NewUsersRepository(session *session.Session) *UsersRepository
func (*UsersRepository) DeleteByEmail ¶
func (ur *UsersRepository) DeleteByEmail(email string) (*User, error)
func (*UsersRepository) GetAll ¶
func (ur *UsersRepository) GetAll() ([]User, error)
func (*UsersRepository) GetByEmail ¶
func (ur *UsersRepository) GetByEmail(email string) (*User, error)
Click to show internal directories.
Click to hide internal directories.