Versions in this module Expand all Collapse all v1 v1.0.0 Aug 2, 2016 Changes in this version + const Accepted + const Any + const BadGateway + const BadRequest + const Boolean + const Conflict + const Continue + const Created + const DateTime + const ExpectationFailed + const Forbidden + const Found + const GatewayTimeout + const Gone + const HTTPVersionNotSupported + const Integer + const InternalServerError + const LengthRequired + const MethodNotAllowed + const MovedPermanently + const MultipleChoices + const NoContent + const NonAuthoritativeInfo + const NotAcceptable + const NotFound + const NotImplemented + const NotModified + const Number + const OK + const PartialContent + const PaymentRequired + const PreconditionFailed + const ProxyAuthRequired + const RequestEntityTooLarge + const RequestTimeout + const RequestURITooLong + const RequestedRangeNotSatisfiable + const ResetContent + const SeeOther + const ServiceUnavailable + const String + const SwitchingProtocols + const Teapot + const TemporaryRedirect + const UUID + const Unauthorized + const UnprocessableEntity + const UnsupportedMediaType + const UseProxy + var DefaultDecoders []*EncodingDefinition + var DefaultEncoders []*EncodingDefinition + var Design *APIDefinition + var ErrorMedia = &MediaTypeDefinition + var ErrorMediaIdentifier = "application/vnd.goa.error" + var GeneratedMediaTypes MediaTypeRoot + var GobContentTypes = []string + var JSONContentTypes = []string + var KnownEncoderFunctions = map[string][2]string + var KnownEncoders = map[string]string + var ProjectedMediaTypes MediaTypeRoot + var WildcardRegex = regexp.MustCompile(`/(?::|\*)([a-zA-Z0-9_]+)`) + var XMLContentTypes = []string + func CanonicalIdentifier(identifier string) string + func ExtractWildcards(path string) []string + func HasKnownEncoder(mimeType string) bool + func UserTypes(dt DataType) map[string]*UserTypeDefinition + type APIDefinition struct + BasePath string + Consumes []*EncodingDefinition + Contact *ContactDefinition + DSLFunc func() + DefaultResponseTemplates map[string]*ResponseTemplateDefinition + DefaultResponses map[string]*ResponseDefinition + Description string + Docs *DocsDefinition + Host string + License *LicenseDefinition + MediaTypes map[string]*MediaTypeDefinition + Metadata dslengine.MetadataDefinition + Name string + NoExamples bool + Origins map[string]*CORSDefinition + Params *AttributeDefinition + Produces []*EncodingDefinition + Resources map[string]*ResourceDefinition + ResponseTemplates map[string]*ResponseTemplateDefinition + Responses map[string]*ResponseDefinition + Schemes []string + Security *SecurityDefinition + SecuritySchemes []*SecuritySchemeDefinition + TermsOfService string + Title string + Traits map[string]*dslengine.TraitDefinition + Types map[string]*UserTypeDefinition + Version string + func NewAPIDefinition() *APIDefinition + func (a *APIDefinition) Context() string + func (a *APIDefinition) DSL() func() + func (a *APIDefinition) DSLName() string + func (a *APIDefinition) DependsOn() []dslengine.Root + func (a *APIDefinition) Finalize() + func (a *APIDefinition) IterateMediaTypes(it MediaTypeIterator) error + func (a *APIDefinition) IterateResources(it ResourceIterator) error + func (a *APIDefinition) IterateResponses(it ResponseIterator) error + func (a *APIDefinition) IterateSets(iterator dslengine.SetIterator) + func (a *APIDefinition) IterateUserTypes(it UserTypeIterator) error + func (a *APIDefinition) MediaTypeWithIdentifier(id string) *MediaTypeDefinition + func (a *APIDefinition) RandomGenerator() *RandomGenerator + func (a *APIDefinition) Reset() + func (a *APIDefinition) Validate() error + type ActionDefinition struct + Description string + Docs *DocsDefinition + Headers *AttributeDefinition + Metadata dslengine.MetadataDefinition + Name string + Params *AttributeDefinition + Parent *ResourceDefinition + Payload *UserTypeDefinition + PayloadOptional bool + QueryParams *AttributeDefinition + Responses map[string]*ResponseDefinition + Routes []*RouteDefinition + Schemes []string + Security *SecurityDefinition + func (a *ActionDefinition) AllParams() *AttributeDefinition + func (a *ActionDefinition) CanonicalScheme() string + func (a *ActionDefinition) Context() string + func (a *ActionDefinition) EffectiveSchemes() []string + func (a *ActionDefinition) Finalize() + func (a *ActionDefinition) HasAbsoluteRoutes() bool + func (a *ActionDefinition) IterateHeaders(it HeaderIterator) error + func (a *ActionDefinition) IterateResponses(it ResponseIterator) error + func (a *ActionDefinition) PathParams() *AttributeDefinition + func (a *ActionDefinition) UserTypes() map[string]*UserTypeDefinition + func (a *ActionDefinition) Validate() *dslengine.ValidationErrors + func (a *ActionDefinition) ValidateParams() *dslengine.ValidationErrors + func (a *ActionDefinition) WebSocket() bool + type ActionIterator func(a *ActionDefinition) error + type Array struct + ElemType *AttributeDefinition + func (a *Array) CanHaveDefault() bool + func (a *Array) GenerateExample(r *RandomGenerator, seen []string) interface{} + func (a *Array) HasAttributes() bool + func (a *Array) IsArray() bool + func (a *Array) IsCompatible(val interface{}) bool + func (a *Array) IsHash() bool + func (a *Array) IsObject() bool + func (a *Array) IsPrimitive() bool + func (a *Array) Kind() Kind + func (a *Array) MakeSlice(s []interface{}) interface{} + func (a *Array) Name() string + func (a *Array) ToArray() *Array + func (a *Array) ToHash() *Hash + func (a *Array) ToObject() Object + type ArrayVal []interface + func (a ArrayVal) ToSlice() []interface{} + type AttributeDefinition struct + DSLFunc func() + DefaultValue interface{} + Description string + Example interface{} + Metadata dslengine.MetadataDefinition + NonZeroAttributes map[string]bool + Reference DataType + Type DataType + Validation *dslengine.ValidationDefinition + View string + func DupAtt(att *AttributeDefinition) *AttributeDefinition + func (a *AttributeDefinition) AddValues(values []interface{}) + func (a *AttributeDefinition) AllNonZero() []string + func (a *AttributeDefinition) AllRequired() (required []string) + func (a *AttributeDefinition) Context() string + func (a *AttributeDefinition) DSL() func() + func (a *AttributeDefinition) Definition() *AttributeDefinition + func (a *AttributeDefinition) GenerateExample(rand *RandomGenerator, seen []string) interface{} + func (a *AttributeDefinition) HasDefaultValue(attName string) bool + func (a *AttributeDefinition) Inherit(parent *AttributeDefinition) + func (a *AttributeDefinition) IsNonZero(attName string) bool + func (a *AttributeDefinition) IsPrimitivePointer(attName string) bool + func (a *AttributeDefinition) IsRequired(attName string) bool + func (a *AttributeDefinition) Merge(other *AttributeDefinition) *AttributeDefinition + func (a *AttributeDefinition) SetDefault(def interface{}) + func (a *AttributeDefinition) SetExample(example interface{}) bool + func (a *AttributeDefinition) Validate(ctx string, parent dslengine.Definition) *dslengine.ValidationErrors + func (a *AttributeDefinition) Walk(walker func(*AttributeDefinition) error) error + type AttributeIterator func(string, *AttributeDefinition) error + type ByFilePath []*FileServerDefinition + func (b ByFilePath) Len() int + func (b ByFilePath) Less(i, j int) bool + func (b ByFilePath) Swap(i, j int) + type CORSDefinition struct + Credentials bool + Exposed []string + Headers []string + MaxAge uint + Methods []string + Origin string + Parent dslengine.Definition + func (cors *CORSDefinition) Context() string + func (cors *CORSDefinition) Validate() *dslengine.ValidationErrors + type ContactDefinition struct + Email string + Name string + URL string + func (c *ContactDefinition) Context() string + type ContainerDefinition interface + Attribute func() *AttributeDefinition + type DataStructure interface + Definition func() *AttributeDefinition + Walk func(func(*AttributeDefinition) error) error + type DataType interface + CanHaveDefault func() bool + GenerateExample func(r *RandomGenerator, seen []string) interface{} + HasAttributes func() bool + IsArray func() bool + IsCompatible func(val interface{}) bool + IsHash func() bool + IsObject func() bool + IsPrimitive func() bool + Kind func() Kind + Name func() string + ToArray func() *Array + ToHash func() *Hash + ToObject func() Object + func Dup(d DataType) DataType + type DocsDefinition struct + Description string + URL string + func (d *DocsDefinition) Context() string + type EncodingDefinition struct + Encoder bool + Function string + MIMETypes []string + PackagePath string + func (enc *EncodingDefinition) Context() string + func (enc *EncodingDefinition) Validate() *dslengine.ValidationErrors + type FileServerDefinition struct + Description string + Docs *DocsDefinition + FilePath string + Metadata dslengine.MetadataDefinition + Parent *ResourceDefinition + RequestPath string + Security *SecurityDefinition + func (f *FileServerDefinition) Context() string + func (f *FileServerDefinition) Finalize() + func (f *FileServerDefinition) IsDir() bool + func (f *FileServerDefinition) Validate() *dslengine.ValidationErrors + type FileServerIterator func(f *FileServerDefinition) error + type Hash struct + ElemType *AttributeDefinition + KeyType *AttributeDefinition + func (h *Hash) CanHaveDefault() bool + func (h *Hash) GenerateExample(r *RandomGenerator, seen []string) interface{} + func (h *Hash) HasAttributes() bool + func (h *Hash) IsArray() bool + func (h *Hash) IsCompatible(val interface{}) bool + func (h *Hash) IsHash() bool + func (h *Hash) IsObject() bool + func (h *Hash) IsPrimitive() bool + func (h *Hash) Kind() Kind + func (h *Hash) MakeMap(m map[interface{}]interface{}) interface{} + func (h *Hash) Name() string + func (h *Hash) ToArray() *Array + func (h *Hash) ToHash() *Hash + func (h *Hash) ToObject() Object + type HashVal map[interface{}]interface + func (h HashVal) ToMap() map[interface{}]interface{} + type HeaderIterator func(name string, isRequired bool, h *AttributeDefinition) error + type Kind uint + const AnyKind + const ArrayKind + const BooleanKind + const DateTimeKind + const HashKind + const IntegerKind + const MediaTypeKind + const NumberKind + const ObjectKind + const StringKind + const UUIDKind + const UserTypeKind + type LicenseDefinition struct + Name string + URL string + func (l *LicenseDefinition) Context() string + type LinkDefinition struct + Name string + Parent *MediaTypeDefinition + URITemplate string + View string + func (l *LinkDefinition) Attribute() *AttributeDefinition + func (l *LinkDefinition) Context() string + func (l *LinkDefinition) MediaType() *MediaTypeDefinition + func (l *LinkDefinition) Validate() *dslengine.ValidationErrors + type MediaTypeDefinition struct + ContentType string + Identifier string + Links map[string]*LinkDefinition + Resource *ResourceDefinition + Views map[string]*ViewDefinition + func NewMediaTypeDefinition(name, identifier string, dsl func()) *MediaTypeDefinition + func (m *MediaTypeDefinition) ComputeViews() map[string]*ViewDefinition + func (m *MediaTypeDefinition) DefaultView() string + func (m *MediaTypeDefinition) Finalize() + func (m *MediaTypeDefinition) IsError() bool + func (m *MediaTypeDefinition) IterateViews(it ViewIterator) error + func (m *MediaTypeDefinition) Kind() Kind + func (m *MediaTypeDefinition) Project(view string) (p *MediaTypeDefinition, links *UserTypeDefinition, err error) + func (m *MediaTypeDefinition) Validate() *dslengine.ValidationErrors + type MediaTypeIterator func(m *MediaTypeDefinition) error + type MediaTypeRoot map[string]*MediaTypeDefinition + func (r MediaTypeRoot) DSLName() string + func (r MediaTypeRoot) DependsOn() []dslengine.Root + func (r MediaTypeRoot) IterateSets(iterator dslengine.SetIterator) + func (r MediaTypeRoot) Reset() + type Object map[string]*AttributeDefinition + func (o Object) CanHaveDefault() bool + func (o Object) GenerateExample(r *RandomGenerator, seen []string) interface{} + func (o Object) HasAttributes() bool + func (o Object) IsArray() bool + func (o Object) IsCompatible(val interface{}) bool + func (o Object) IsHash() bool + func (o Object) IsObject() bool + func (o Object) IsPrimitive() bool + func (o Object) IterateAttributes(it AttributeIterator) error + func (o Object) Kind() Kind + func (o Object) Merge(other Object) + func (o Object) Name() string + func (o Object) ToArray() *Array + func (o Object) ToHash() *Hash + func (o Object) ToObject() Object + type Primitive Kind + func (p Primitive) CanHaveDefault() (ok bool) + func (p Primitive) GenerateExample(r *RandomGenerator, seen []string) interface{} + func (p Primitive) HasAttributes() bool + func (p Primitive) IsArray() bool + func (p Primitive) IsCompatible(val interface{}) bool + func (p Primitive) IsHash() bool + func (p Primitive) IsObject() bool + func (p Primitive) IsPrimitive() bool + func (p Primitive) Kind() Kind + func (p Primitive) Name() string + func (p Primitive) ToArray() *Array + func (p Primitive) ToHash() *Hash + func (p Primitive) ToObject() Object + type RandomGenerator struct + Seed string + func NewRandomGenerator(seed string) *RandomGenerator + func (r *RandomGenerator) Bool() bool + func (r *RandomGenerator) DateTime() time.Time + func (r *RandomGenerator) Float64() float64 + func (r *RandomGenerator) Int() int + func (r *RandomGenerator) String() string + func (r *RandomGenerator) UUID() uuid.UUID + type ResourceDefinition struct + Actions map[string]*ActionDefinition + BasePath string + CanonicalActionName string + DSLFunc func() + DefaultViewName string + Description string + FileServers []*FileServerDefinition + Headers *AttributeDefinition + MediaType string + Metadata dslengine.MetadataDefinition + Name string + Origins map[string]*CORSDefinition + Params *AttributeDefinition + ParentName string + Responses map[string]*ResponseDefinition + Schemes []string + Security *SecurityDefinition + func NewResourceDefinition(name string, dsl func()) *ResourceDefinition + func (r *ResourceDefinition) AllOrigins() []*CORSDefinition + func (r *ResourceDefinition) CanonicalAction() *ActionDefinition + func (r *ResourceDefinition) Context() string + func (r *ResourceDefinition) DSL() func() + func (r *ResourceDefinition) Finalize() + func (r *ResourceDefinition) FullPath() string + func (r *ResourceDefinition) IterateActions(it ActionIterator) error + func (r *ResourceDefinition) IterateFileServers(it FileServerIterator) error + func (r *ResourceDefinition) IterateHeaders(it HeaderIterator) error + func (r *ResourceDefinition) Parent() *ResourceDefinition + func (r *ResourceDefinition) PreflightPaths() []string + func (r *ResourceDefinition) URITemplate() string + func (r *ResourceDefinition) UserTypes() map[string]*UserTypeDefinition + func (r *ResourceDefinition) Validate() *dslengine.ValidationErrors + type ResourceIterator func(r *ResourceDefinition) error + type ResponseDefinition struct + Description string + Headers *AttributeDefinition + MediaType string + Metadata dslengine.MetadataDefinition + Name string + Parent dslengine.Definition + Standard bool + Status int + Type DataType + ViewName string + func (r *ResponseDefinition) Context() string + func (r *ResponseDefinition) Dup() *ResponseDefinition + func (r *ResponseDefinition) Finalize() + func (r *ResponseDefinition) Merge(other *ResponseDefinition) + func (r *ResponseDefinition) Validate() *dslengine.ValidationErrors + type ResponseIterator func(r *ResponseDefinition) error + type ResponseTemplateDefinition struct + Name string + Template func(params ...string) *ResponseDefinition + func (r *ResponseTemplateDefinition) Context() string + type RouteDefinition struct + Parent *ActionDefinition + Path string + Verb string + func (r *RouteDefinition) Context() string + func (r *RouteDefinition) FullPath() string + func (r *RouteDefinition) IsAbsolute() bool + func (r *RouteDefinition) Params() []string + func (r *RouteDefinition) Validate() *dslengine.ValidationErrors + type SecurityDefinition struct + Scheme *SecuritySchemeDefinition + Scopes []string + func (s *SecurityDefinition) Context() string + type SecuritySchemeDefinition struct + AuthorizationURL string + DSLFunc func() + Description string + Flow string + In string + Kind SecuritySchemeKind + Name string + SchemeName string + Scopes map[string]string + TokenURL string + Type string + func (s *SecuritySchemeDefinition) Context() string + func (s *SecuritySchemeDefinition) DSL() func() + func (s *SecuritySchemeDefinition) Finalize() + func (s *SecuritySchemeDefinition) Validate() error + type SecuritySchemeKind int + const APIKeySecurityKind + const BasicAuthSecurityKind + const JWTSecurityKind + const NoSecurityKind + const OAuth2SecurityKind + type UserTypeDefinition struct + TypeName string + func NewUserTypeDefinition(name string, dsl func()) *UserTypeDefinition + func (t *UserTypeDefinition) Context() string + func (t *UserTypeDefinition) DSL() func() + func (u *UserTypeDefinition) CanHaveDefault() bool + func (u *UserTypeDefinition) Finalize() + func (u *UserTypeDefinition) HasAttributes() bool + func (u *UserTypeDefinition) IsArray() bool + func (u *UserTypeDefinition) IsCompatible(val interface{}) bool + func (u *UserTypeDefinition) IsHash() bool + func (u *UserTypeDefinition) IsObject() bool + func (u *UserTypeDefinition) IsPrimitive() bool + func (u *UserTypeDefinition) Kind() Kind + func (u *UserTypeDefinition) Name() string + func (u *UserTypeDefinition) ToArray() *Array + func (u *UserTypeDefinition) ToHash() *Hash + func (u *UserTypeDefinition) ToObject() Object + func (u *UserTypeDefinition) Validate(ctx string, parent dslengine.Definition) *dslengine.ValidationErrors + func (u *UserTypeDefinition) Walk(walker func(*AttributeDefinition) error) error + type UserTypeIterator func(m *UserTypeDefinition) error + type ViewDefinition struct + Name string + Parent *MediaTypeDefinition + func (v *ViewDefinition) Context() string + func (v *ViewDefinition) Validate() *dslengine.ValidationErrors + type ViewIterator func(*ViewDefinition) error