Documentation
¶
Index ¶
- Constants
- type Bucket
- type Field
- type Filter
- type HTTPDefaults
- type IDDefaults
- type IR
- type List
- type Logging
- type Manifest
- type Methods
- type Options
- type OrderingPolicy
- type Outputs
- type Resource
- type Result
- type SchemaInfo
- type ServerField
- type SoftDelete
- type Sort
- type TabularMethods
- type TabularPart
- type TabularQueries
- type TemplateEntry
- type Transaction
Constants ¶
View Source
const IRVersion = 1
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bucket ¶
type Bucket struct {
ID string
Schema string
DomainDir string
RepoDir string
ServiceDir string
TransportDir string
DomainPkg string
RepoPkg string
ServicePkg string
TransportPkg string
DomainImport string
RepoImport string
ServiceImport string
TransportImport string
Resources []*Resource
}
Bucket describes a schema bucket used in layout.mode=by_schema.
type HTTPDefaults ¶
type IDDefaults ¶
type IR ¶
type IR struct {
IRVersion int
SpecVersion int
Workdir string
ModulePath string
Output Outputs
Logging Logging
ID IDDefaults
HTTP HTTPDefaults
Schema SchemaInfo
Buckets []*Bucket
Resources []*Resource
}
type Manifest ¶
type Manifest struct {
Version int `yaml:"version"`
RequiresIRVersion int `yaml:"requires_ir_version"`
Templates []*TemplateEntry `yaml:"templates"`
}
func ParseManifest ¶
type OrderingPolicy ¶
type Outputs ¶
type Outputs struct {
GeneratedRoot string
RepoRoot string
RepoCodecRoot string
RepoCursorRoot string
DomainRoot string
ServiceRoot string
TransportRoot string
HTTPRoot string
DocsRoot string
GeneratedImport string
RepoImport string
RepoCodecImport string
RepoCursorImport string
DomainImport string
ServiceImport string
TransportImport string
HTTPImport string
DocsImport string
}
type Resource ¶
type Resource struct {
Name string
Dir string
Schema string
Table string
Route string
Kind string
GoName string
Package string
// SQLCModelType is the sqlc-generated model struct name for this table.
// For Postgres, sqlc prefixes the table name with schema (e.g. "customers.person" -> "CustomersPerson").
SQLCModelType string
Prefix string
Sym string
BucketID string
DomainDir string
RepoDir string
ServiceDir string
TransDir string
DomainFile string
RepoFile string
ServiceFile string
DTOFile string
HandlersFile string
RepoInterfaceName string
RepoCtorName string
RepoImplName string
ServiceInterfaceName string
ServiceCtorName string
ServiceImplName string
HandlerTypeName string
HandlerCtorName string
DomainPkg string
RepoPkg string
ServicePkg string
TransPkg string
DomainImport string
RepoImport string
ServiceImport string
TransportImport string
SQLCImport string
HTTPImport string
IDMode string
PK Field
// VersionField is the aggregate concurrency token (e.g. "version" BIGINT).
// When set, generated transports/services can require If-Match and enforce optimistic concurrency.
VersionField *Field
Fields []Field
CreateFields []Field
PatchFields []Field
ResponseFields []Field
// ServerCreateFields lists fields that are set by the server on create (from policy server_fields.create.set).
// These fields belong to domain CreateInput and repository Create params, but are excluded from transport CreateRequest.
ServerCreateFields []ServerField
Methods Methods
List *List
Tabular []TabularPart
HasTabular bool
HasTabularReplaceAll bool
// OptimisticLockRequired indicates that mutations must require If-Match (mandatory optimistic concurrency).
OptimisticLockRequired bool
SoftDelete *SoftDelete
Transaction *Transaction
// Authorization seams (per resource, to avoid collisions in shared packages).
AuthorizerInterfaceName string
AllowAllAuthorizerName string
ServiceOptionName string
WithAuthorizerFuncName string
}
type SchemaInfo ¶
type SchemaInfo struct {
Hash string
}
type ServerField ¶
type SoftDelete ¶
type TabularMethods ¶
type TabularPart ¶
type TabularPart struct {
Name string
QualifiedName string
Dir string
Table string
Route string
// SQLCModelType is the sqlc-generated model struct name for this table (schema-prefixed).
SQLCModelType string
FKField string
FKGoName string
IDField string
IDGoName string
IDDomainType string
IDMode string
UniqueFields []string
UniqueFieldsInfo []Field
PatchKeys []Field
Methods TabularMethods
Ordering *OrderingPolicy
List *List
Fields []Field
CreateFields []Field
PatchFields []Field
ResponseFields []Field
ReplaceKey *Field
Queries TabularQueries
}
type TabularQueries ¶
type TemplateEntry ¶
type Transaction ¶
type Transaction struct {
RequiredFor []string
}
Click to show internal directories.
Click to hide internal directories.