Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetResponse ¶
type GetResponse struct {
Items []Item `json:"items"`
}
type Item ¶
type Item struct { ID int64 `json:"id"` Title string `json:"title"` UpdatedAt time.Time `json:"updated_at"` }
func NewItem ¶
func NewItem(item repository.Item) Item
func NewItems ¶
func NewItems(items []repository.Item) []Item
type PostParams ¶
type PostParams struct {
Title string `json:"title"`
}
func (PostParams) Validate ¶
func (p PostParams) Validate() error
type PostResponse ¶
type PostResponse struct {
Item Item `json:"item"`
}
func CreateItem ¶
func CreateItem(ctx context.Context, pool *pgxpool.Pool, p PostParams) (*PostResponse, error)
Click to show internal directories.
Click to hide internal directories.