helloworld

package
v0.0.0-...-ffa566b Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Greeting

type Greeting struct {
	Key     *datastore.Key `json:"id" datastore:"-"`
	Author  string         `json:"author"`
	Content string         `json:"content" datastore:",noindex"`
	Date    time.Time      `json:"date"`
}

Greeting is a datastore entity that represents a single greeting. It also serves as (a part of) a response of GreetingService.

type GreetingAddReq

type GreetingAddReq struct {
	Author  string `json:"author"`
	Content string `json:"content" endpoints:"req"`
}

GretingAddReq is the request type for GreetingService.Add.

type GreetingService

type GreetingService struct{}

GreetingService offers operations to add and list greetings.

func (*GreetingService) Add

Add adds a greeting.

func (*GreetingService) List

List responds with a list of all greetings ordered by Date field. Most recent greets come first.

type GreetingsList

type GreetingsList struct {
	Items []*Greeting `json:"items"`
}

GreetingsList is the response type for GreetingService.List.

type GreetingsListReq

type GreetingsListReq struct {
	Limit int `json:"limit" endpoints:"d=10"`
}

GreetingListReq is the request type for GreetingService.List.

Jump to

Keyboard shortcuts

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