Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotFound = errors.New("psql: resource could not be located")
)
Common errors that you will likely want to account for in your code. Any other errors are wrapped with context vai the github.com/pkg/errors package and returned but are harder to use an if/switch to match.
Functions ¶
This section is empty.
Types ¶
type User ¶
User is an example user model. This typically wouldn't be defined in this package but is done here for simplicity.
type UserStore ¶
type UserStore struct {
// contains filtered or unexported fields
}
UserStore is used to interact with our user store.
func (*UserStore) Create ¶
Create will create a new user in the DB using the provided user and will update the ID of the provided user. If there is an error it will be wrapped and returned.
Click to show internal directories.
Click to hide internal directories.