-
Notifications
You must be signed in to change notification settings - Fork 0
/
media_types.go
39 lines (34 loc) · 1.05 KB
/
media_types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Code generated by goagen v1.3.1, DO NOT EDIT.
//
// API "cellar": Application Media Types
//
// Command:
// $ goagen
// --design=github.com/nikhil-thomas/technik-dojo/goa-exp/goa-exp-1/design
// --out=$(GOPATH)/src/github.com/nikhil-thomas/technik-dojo/goa-exp/goa-exp-1
// --version=v1.3.1
package app
import (
"github.com/goadesign/goa"
)
// A bottle of wine (default view)
//
// Identifier: application/vnd.goa.example.bottle+json; view=default
type GoaExampleBottle struct {
// API href for making requests on the bottle
Href string `form:"href" json:"href" yaml:"href" xml:"href"`
// Unique bottle ID
ID int `form:"id" json:"id" yaml:"id" xml:"id"`
// Name of wine
Name string `form:"name" json:"name" yaml:"name" xml:"name"`
}
// Validate validates the GoaExampleBottle media type instance.
func (mt *GoaExampleBottle) Validate() (err error) {
if mt.Href == "" {
err = goa.MergeErrors(err, goa.MissingAttributeError(`response`, "href"))
}
if mt.Name == "" {
err = goa.MergeErrors(err, goa.MissingAttributeError(`response`, "name"))
}
return
}