Documentation ¶
Index ¶
- Constants
- type AppSpec
- type DomainSpec
- type EntityAdapterItem
- type EntityAdapters
- type EntityRel
- type EntityRelLoading
- type EntitySchema
- type EntitySchemaItem
- type EntitySchemaReserved
- type EntitySchemaReservedId
- type EntitySpec
- type OptionalItem
- type RootApp
- type RootEntity
- type RootUseCase
- type StackSpec
- type UseCaseActionSpec
- type UseCaseDomainSpec
- type UseCaseInput
- type UseCaseParam
- type UseCaseSpec
- type ValidateItem
- type ValidateItemList
- type ValidateItemRange
- type ValidateItemRegex
Constants ¶
View Source
const ( Version = "version" Kind = "kind" Entity = "entity" Name = "name" Plural = "plural" Description = "description" Docs = "docs" Schema = "schema" Reserved = "reserved" Type = "type" Fields = "fields" Unique = "unique" Encrypted = "encrypted" Validate = "validate" Regex = "regex" Pattern = "pattern" Go = "go" Java = "java" Value = "value" Enum = "enum" Range = "range" Min = "min" Max = "max" Adapters = "adapters" Map = "map" Rel = "$rel" Input = "input" HTTP = "http" ResourceName = "resourceName" Output = "output" Memory = "memory" MongoDB = "mongodb" Redis = "redis" SQL = "sql" RedisMongoDB = "redis+mongodb" RedisSQL = "redis+sql" TTL = "ttl" Collection = "collection" Table = "table" HasMany = "hasMany" HasOne = "hasOne" BelongsTo = "belongsTo" Nested = "nested" MaxItems = "maxItems" )
View Source
const ( // Integer data type mapped to: Go=int64, Java=java.lang.Long Integer = "integer" // Float data type mapped to: Go=float64, Java=java.lang.Float Float = "float" // Boolean data type mapped to: Go=bool, Java=java.lang.Boolean Boolean = "boolean" // String data type mapped to: Go=string, Java=java.lang.String String = "string" // Date data type mapped to: Go=int64, Java=java.lang.Long // date representation as UTC milliseconds Date = "date" // UUID data type mapped to: Go=string, Java=java.lang.String UUID = "uuid" // ULID data type mapped to: Go=string, Java=java.lang.String ULID = "ulid" )
Entity field types
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppSpec ¶
type AppSpec struct { Name string `yaml:"name"` Description string `yaml:"description"` Stack StackSpec `yaml:"stack"` Domain DomainSpec `yaml:"domain"` }
type DomainSpec ¶
type EntityAdapterItem ¶
type EntityAdapters ¶
type EntityAdapters struct { Input []EntityAdapterItem `yaml:"input"` Output []EntityAdapterItem `yaml:"output"` }
type EntityRel ¶
type EntityRel struct { Name string `yaml:"name"` Type string `yaml:"type"` // Type is reserved for future implementations ($rel, $urn) Ref string `yaml:"ref"` Cardinality string `yaml:"cardinality"` Load *EntityRelLoading `yaml:"load"` }
type EntityRelLoading ¶
type EntitySchema ¶
type EntitySchema struct { Reserved EntitySchemaReserved `yaml:"reserved"` Fields []EntitySchemaItem `yaml:"fields"` }
type EntitySchemaItem ¶
type EntitySchemaItem struct { Name string `yaml:"name"` Type string `yaml:"type"` Description string `yaml:"description"` Doc string `yaml:"doc"` Encrypted bool `yaml:"encrypted"` ReadOnly bool `yaml:"readonly"` Optional *OptionalItem `yaml:"optional,omitempty"` Validate *ValidateItem `yaml:"validate,omitempty"` }
type EntitySchemaReserved ¶
type EntitySchemaReserved struct {
Id EntitySchemaReservedId `yaml:"id"`
}
type EntitySchemaReservedId ¶
type EntitySchemaReservedId struct {
Type string `yaml:"type"`
}
type EntitySpec ¶
type EntitySpec struct { Name string `yaml:"name"` Plural string `yaml:"plural"` Description string `yaml:"description"` Doc string `yaml:"doc"` Schema EntitySchema `yaml:"schema"` Relationships []EntityRel `yaml:"relationships"` Adapters EntityAdapters `yaml:"adapters"` }
type OptionalItem ¶
type OptionalItem struct {
Default interface{} `yaml:"default"`
}
type RootEntity ¶
type RootEntity struct { vx.DocHeader `yaml:",inline"` Entity EntitySpec `yaml:"spec"` }
type RootUseCase ¶
type RootUseCase struct { vx.DocHeader `yaml:",inline"` UseCase UseCaseSpec `yaml:"spec"` }
type UseCaseActionSpec ¶
type UseCaseActionSpec struct { Method string `yaml:"method"` Params []UseCaseParam `yaml:"params"` Input []UseCaseInput `yaml:"input"` }
type UseCaseDomainSpec ¶
type UseCaseDomainSpec struct {
Entities []string `yaml:"entities"`
}
type UseCaseInput ¶
type UseCaseParam ¶
type UseCaseSpec ¶
type UseCaseSpec struct { Name string `yaml:"name"` Description string `yaml:"description"` Doc string `yaml:"doc"` Domain UseCaseDomainSpec `yaml:"domain"` Actions []UseCaseActionSpec `yaml:"actions"` }
type ValidateItem ¶
type ValidateItem struct { List *ValidateItemList `yaml:"list,omitempty"` Range *ValidateItemRange `yaml:"range,omitempty"` Regex *ValidateItemRegex `yaml:"regex,omitempty"` Value interface{} `yaml:"value,omitempty"` }
type ValidateItemList ¶
type ValidateItemList struct {
Values []interface{} `yaml:"values"`
}
type ValidateItemRange ¶
type ValidateItemRange struct { Min interface{} `yaml:"min"` Max interface{} `yaml:"max"` }
type ValidateItemRegex ¶
Click to show internal directories.
Click to hide internal directories.