client

package
v0.0.0-...-5614660 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetClientWithCookie

func GetClientWithCookie(userID string, cookies ...*http.Cookie) (*http.Client, error)

func NewCategoryClient

func NewCategoryClient() *categoryClient

func NewTaskClient

func NewTaskClient() *taskClient

func NewUserClient

func NewUserClient() *userClient

Types

type CategoryClient

type CategoryClient interface {
	GetCategories(userID string) ([]entity.CategoryData, error)
	AddCategories(title string, userID string) (respCode int, err error)
	DeleteCategory(id, userID string) (respCode int, err error)
}

type TaskClient

type TaskClient interface {
	CreateTask(title, description, category, userID string) (respCode int, err error)
	GetTaskById(id, userID string) (entity.Task, error)
	UpdateTask(id, title, description, userID string) (respCode int, err error)
	UpdateCategoryTask(id, catId, userID string) (respCode int, err error)
	DeleteTask(id, userID string) (respCode int, err error)
}

type UserClient

type UserClient interface {
	Login(email, password string) (userId int, respCode int, err error)
	Register(fullname, email, password string) (userId int, respCode int, err error)

	GetUserById(userID string) (entity.User, error)
	DeleteUser(userId string) (respCode int, err error)
}

Jump to

Keyboard shortcuts

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