Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Definition ¶
type Definition struct { Services []Service `json:"services"` PackageName string `json:"packageName"` PackageComment string `json:"packageComment"` }
Definition is the definition of one or more services. In templates, it is usually accessed via the `def` variable.
Package name is <%= def.PackageName %>
func (Definition) Source ¶
func (d Definition) Source() string
Source gets the Remoto source for this definition.
func (Definition) String ¶
func (d Definition) String() string
func (Definition) Structure ¶
func (d Definition) Structure(name string) *Structure
Structure gets a Structure by name.
func (Definition) Valid ¶
func (d Definition) Valid() error
Valid gets whether this Definition is valid or not.
type Field ¶
type Field struct { Name string `json:"name"` Comment string `json:"comment"` Type Type `json:"type"` }
Field describes a structure field.
func (Field) IsExported ¶
IsExported gets whether the field is exported or not.
type Method ¶
type Method struct { Name string `json:"name"` Comment string `json:"comment"` RequestStructure Structure `json:"requestStructure"` ResponseStructure Structure `json:"responseStructure"` }
Method is a single method.
type Service ¶
type Service struct { Name string `json:"name"` Comment string `json:"comment"` Methods []Method `json:"methods"` Structures []Structure `json:"structures"` }
Service describes a logically grouped set of endpoints.
func (*Service) EnsureStructure ¶
EnsureStructure adds the Structure to the service if it isn't already there.
type Structure ¶
type Structure struct { Name string `json:"name"` Comment string `json:"comment"` Fields []Field `json:"fields"` IsImported bool `json:"isImported"` IsRequestObject bool `json:"isRequestObject"` IsResponseObject bool `json:"isResponseObject"` }
Structure describes a data structure.
func (Structure) FieldsOfType ¶
FieldsOfType gets all Field objects that have a specific type.
Click to show internal directories.
Click to hide internal directories.