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 ¶
func (gs *GreetingService) Add(c context.Context, r *GreetingAddReq) error
Add adds a greeting.
func (*GreetingService) List ¶
func (gs *GreetingService) List(c context.Context, r *GreetingsListReq) (*GreetingsList, error)
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.
Click to show internal directories.
Click to hide internal directories.