cloudendpoint

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2016 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Task

type Task struct {
	Key         *datastore.Key `json:"id" datastore:"-"`
	Name        string         `json:"name" endpoints:"req"`
	Description string         `json:"description" datastore:",noindex" endpoints:"req"`
	CreatedOn   time.Time      `json:"createdon,omitempty"`
}

Task is a datastore entity

type TaskService

type TaskService struct {
}

Struct is used to add API method

func (*TaskService) Add

func (ts *TaskService) Add(c context.Context, t *Task) error

Add inserts a new Task into Datastore

func (*TaskService) List

func (ts *TaskService) List(c context.Context) (*Tasks, error)

List returns a list of all the existing tasks.

type Tasks

type Tasks struct {
	Tasks []Task `json:"tasks"`
}

Tasks is a response type of TaskService.List method

Jump to

Keyboard shortcuts

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