service

package
v0.0.0-...-96c97c1 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateUser

func CreateUser(tx model.Queryer, u *model.TodoUser) (*model.TodoUser, error)

CreateUser create user

func GetUserByAccessToken

func GetUserByAccessToken(tx model.Queryer, token string) (*model.TodoUser, bool, error)

GetUserByAccessToken get user by access token

func GetUserByID

func GetUserByID(tx model.Queryer, userID string) (*model.TodoUser, error)

GetUserByID get user by id

func GetUserTodoByID

func GetUserTodoByID(
	ctx context.Context, db model.Queryer, userID, todoID string) (*model.Todo, bool, error)

GetUserTodoByID get user todo by ID

func Healthcheck

func Healthcheck(tx model.Queryer) (string, error)

Healthcheck health check

func UpdateUser

func UpdateUser(tx model.Queryer, u *model.TodoUser) error

UpdateUser update user

Types

type Todo

type Todo struct {
	*model.Todo
	EstimatedTime int
}

Todo todo

func GetTodosByUserID

func GetTodosByUserID(
	ctx context.Context, db model.Queryer, c *estc.Client, userID string, completed bool) ([]Todo, error)

GetTodosByUserID get todos by user id

func GetUserEstimatedTodoByID

func GetUserEstimatedTodoByID(
	ctx context.Context, db model.Queryer, c *estc.Client, userID, todoID string) (*Todo, bool, error)

GetUserEstimatedTodoByID get todo by id

Jump to

Keyboard shortcuts

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