client

package
v0.0.0-...-019b488 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2019 License: Unlicense Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ToDo

type ToDo struct {
	//ID of todo
	ID string
	//Title of todo
	Title string
	//Description of todo
	Description string
	//State of todo
	State string
	//Tags of todo
	Tags []string
	//Reminder of todo
	Reminder int64
}

ToDo a todo

type ToDoManager

type ToDoManager struct {
	Client pb.ToDoServiceClient
}

ToDoManager manages your todo

func NewToDoManager

func NewToDoManager(cc *grpc.ClientConn) *ToDoManager

NewToDoManager create a manager of todos

func (*ToDoManager) Create

func (m *ToDoManager) Create(cxt context.Context, toDo ToDo) (string, error)

Create create a toDo

func (*ToDoManager) Delete

func (m *ToDoManager) Delete(cxt context.Context, id string) (bool, error)

Delete a todo

func (*ToDoManager) Read

func (m *ToDoManager) Read(cxt context.Context, id string) (*ToDo, error)

Search todos

func (*ToDoManager) Search

func (m *ToDoManager) Search(cxt context.Context, pattern string, tags []string, states []string) ([]ToDo, error)

Search todos

func (*ToDoManager) Update

func (m *ToDoManager) Update(cxt context.Context, toDo ToDo) (bool, error)

Update update a todo

Jump to

Keyboard shortcuts

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