Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoResults = fmt.Errorf("no results returned")
ErrNoResults is a generic error of sql.ErrNoRows
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service interface { CreateTodo(todo *Todo) error GetTodos() ([]Todo, error) GetTodo(id int64) (Todo, error) UpdateTodo(todo Todo) error DeleteTodo(id int64) error Close() error }
Service provides methods for interacting with a store
func NewPostgres ¶
NewPostgres returns a new postgresql store from the given postgres-specific data source name.
Click to show internal directories.
Click to hide internal directories.