Versions in this module Expand all Collapse all v1 v1.11.1 Jul 29, 2026 Changes in this version + const CardinalityMany + const CardinalityOne + const DefinitionFetchTimeout + const DirectionToSource + const DirectionToTarget + const HeaderPluginID + const MappingManyToMany + const MappingOneToMany + const MappingOneToOne + const MetaDescription + const MetaRuntime + const PlacementResourceDetailActions + const RelationTypeBelong + const RelationTypeDefault + const RelationTypeGroup + const RelationTypeRun + const RuntimeModeBuiltin + const RuntimeModeExternalService + const WellKnownPath + func CenterBindingUID(pluginUID string, modelUID string) string + func DecodeResource[T any](resource ResolvedResource) (T, error) + func DefinitionHandler(provider Provider) http.Handler + func DefinitionURL(upstream string) (string, error) + func InputMany[T any](actionCtx ActionContext, name string) ([]T, error) + func InputOne[T any](actionCtx ActionContext, name string) (T, error) + func InputRootOne[T any](actionCtx ActionContext) (T, error) + func MountWellKnown(mux interface{ ... }, provider Provider) + func MustRegisterBuiltin(builtin Builtin) + func MutateBindingGraphPath(graph *BindingGraph, path string, ...) bool + func NormalizeModelUID(modelUID string) (string, error) + func RegisterBuiltin(builtin Builtin) error + func Relation(sourceModelUID, relationTypeUID, targetModelUID string) *relationItem + func RootInputName(actionCtx ActionContext) (string, error) + func ValidRelationType(relationType string) bool + func ValidateResolveRequest(req ResolveRequest) error + func ValidateResourceID(resourceID int64) error + type ActionContext struct + Action ActionSpec + Binding Binding + Inputs map[string]ResolvedInput + Params map[string]any + Plugin Plugin + ResourceID int64 + type ActionOption func(*ActionSpec) + func ActionRuntime(value ActionRuntimeSpec) ActionOption + func Icon(value string) ActionOption + func Meta(key string, value any) ActionOption + func Permission(value string) ActionOption + func Placement(value string) ActionOption + func UseBinding(uid string) ActionOption + type ActionRuntimeSpec struct + Layout string + Props map[string]any + Sidebar *RuntimeSidebarSpec + Title string + type ActionSpec struct + Action string + BindingUID string + Icon string + Meta map[string]any + Name string + Permission string + Placement string + Runtime *ActionRuntimeSpec + type Attr interface + Build func() Attribute + type Attribute struct + Builtin bool + Display bool + Index int64 + Name string + Option any + Required bool + Secure bool + Type string + UID string + func Field(uid string, name string, fieldType string, opts ...AttributeOption) Attribute + type AttributeBuilder struct + func List(uid string, name string, option any, opts ...AttributeOption) *AttributeBuilder + func Multiline(uid string, name string, opts ...AttributeOption) *AttributeBuilder + func String(uid string, name string, opts ...AttributeOption) *AttributeBuilder + func (b *AttributeBuilder) Build() Attribute + func (b *AttributeBuilder) Builtin(builtin bool) *AttributeBuilder + func (b *AttributeBuilder) Display() *AttributeBuilder + func (b *AttributeBuilder) Index(index int64) *AttributeBuilder + func (b *AttributeBuilder) Options(option any) *AttributeBuilder + func (b *AttributeBuilder) Required() *AttributeBuilder + func (b *AttributeBuilder) Secure() *AttributeBuilder + type AttributeGroup struct + Fields []Attribute + Index int64 + Name string + type AttributeOption func(*Attribute) + func AttributeBuiltin(builtin bool) AttributeOption + type Binding struct + Ctime int64 + Enabled bool + Graph *BindingGraph + ID int64 + ModelUID string + PluginID string + UID string + Utime int64 + func PrepareBinding(binding Binding) (Binding, error) + func PrepareBindings(pluginID string, bindings []Binding) ([]Binding, error) + func (b Binding) Validate() error + type BindingFactory func(pluginUID string) (Binding, error) + func CenterNamed[T any](name string, modelUID string, opts ...BindingOption) BindingFactory + func Center[T any](modelUID string, opts ...BindingOption) BindingFactory + type BindingGraph struct + Edges []BindingGraphEdge + EntryNodeID string + Nodes []BindingGraphNode + func BuildCenterGraph[T any](name string, modelUID string) (*BindingGraph, error) + func GraphFromBindingSpecs(modelUID string, specs []ResourceSpec) (*BindingGraph, error) + type BindingGraphEdge struct + Direction string + From string + RelationType string + To string + type BindingGraphNode struct + Cardinality string + FieldMappings []FieldMapping + Filters []Filter + ID string + ModelUID string + Name string + Required bool + func GraphEntryNode(graph *BindingGraph) (BindingGraphNode, bool) + type BindingOption func(*Binding) + func At(path string, opts ...SpecOption) BindingOption + func BindingEnabled(value bool) BindingOption + func Node(path string, fn func(node *BindingGraphNode, edge *BindingGraphEdge)) BindingOption + func Spec(path string, fn func(*ResourceSpec)) BindingOption + type Builtin interface + Definition func() Definition + SchemaForBindings func(bindings []Binding) (Schema, error) + func Builtins() []Builtin + func FindBuiltin(pluginID string) (Builtin, bool) + func StaticBuiltin(def Definition) Builtin + type Configurator struct + func Configure(specs []ResourceSpec) *Configurator + func (c *Configurator) Build() []ResourceSpec + func (c *Configurator) ForPath(path string, fn func(spec *ResourceSpec)) *Configurator + type ContextResolver interface + ResolveActionContext func(ctx context.Context, req ResolveRequest) (ActionContext, error) + type Definition struct + Bindings []Binding + Plugin Plugin + Schema Schema + func FetchDefinition(ctx context.Context, upstream string) (Definition, error) + func (d Definition) Save(ctx context.Context, store Store) error + type FieldMapping struct + Input string + Required bool + ResourceField string + type Filter struct + Field string + Operator string + Value any + type ModelBuilder struct + func Model(uid string, name string, opts ...ModelOption) *ModelBuilder + func (b *ModelBuilder) AttrGroup(name string, index int64, attrs ...Attr) *ModelBuilder + func (b *ModelBuilder) Build() ModelSpec + type ModelGroupSpec struct + Name string + type ModelOption func(*ModelSpec) + func ModelBuiltin(builtin bool) ModelOption + func ModelGroupName(groupName string) ModelOption + func ModelIcon(icon string) ModelOption + type ModelRelation struct + Mapping string + RelationTypeUID string + SourceModelUID string + TargetModelUID string + type ModelSpec struct + AttributeGroups []AttributeGroup + Builtin bool + GroupName string + Icon string + Name string + UID string + type Option func(*Plugin) + func BuiltinRuntime() Option + func Description(value string) Option + func ExternalServiceRuntime(upstream string, opts ...RuntimeOption) Option + func Runtime(spec RuntimeSpec) Option + func Type(value string) Option + func Version(value string) Option + type Plugin struct + Actions []ActionSpec + Ctime int64 + ID int64 + Meta map[string]any + Name string + Type string + UID string + Utime int64 + Version string + func (p *Plugin) SetRuntime(spec RuntimeSpec) + func (p Plugin) FindAction(name string) (ActionSpec, bool) + func (p Plugin) ResourceActions() []ResourceAction + func (p Plugin) Runtime() (RuntimeSpec, bool) + func (p Plugin) Validate() error + type Provider interface + Definition func() (Definition, error) + type ProviderFunc func() (Definition, error) + func (fn ProviderFunc) Definition() (Definition, error) + type Registry struct + func NewRegistry(uid string, name string, opts ...Option) *Registry + func (r *Registry) Action(action string, name string, opts ...ActionOption) *Registry + func (r *Registry) Bind(factory BindingFactory) *Registry + func (r *Registry) Definition() (Definition, error) + func (r *Registry) MustDefinition() Definition + func (r *Registry) Setup(items ...SetupItem) *Registry + type RelationType struct + Name string + SourceDescribe string + TargetDescribe string + UID string + func BasicRelationTypes() []RelationType + type ResolveRequest struct + Action string + Params map[string]any + PluginID string + ResourceID int64 + type ResolveResult struct + Action string + ActionName string + BindingUID string + Inputs map[string]ResolvedInput + Meta map[string]any + ModelUID string + Params map[string]any + Permission string + PluginID string + PluginName string + PluginVersion string + ResourceID int64 + Runtime *ActionRuntimeSpec + type ResolvedInput struct + Cardinality string + Name string + Resources []ResolvedResource + type ResolvedResource struct + Children map[string]ResolvedInput + Fields map[string]any + ModelUID string + ResourceID int64 + type ResourceAction struct + Action string + BindingUID string + Icon string + Meta map[string]any + Name string + Permission string + Placement string + PluginID string + Runtime *ActionRuntimeSpec + type ResourceActions struct + Actions []ResourceAction + ResourceID int64 + type ResourceSpec struct + Cardinality string + Children []ResourceSpec + Direction string + Fields map[string]string + Filters []Filter + ModelUID string + Name string + RelationType string + Required bool + RequiredFields []string + func BuildCenterSpec[T any](name string, modelUID string) (ResourceSpec, error) + func BuildSpecs[T any]() ([]ResourceSpec, error) + func CompileBindingGraph(graph *BindingGraph) ([]ResourceSpec, error) + type RuntimeOption func(*RuntimeSpec) + func RuntimeHealthPath(path string) RuntimeOption + type RuntimeSidebarResourceSpec struct + Limit int + ModelUID string + SearchFields []string + SubtitleField string + TitleField string + type RuntimeSidebarSpec struct + Collapsible *bool + EmptyText string + Enabled *bool + Mode string + Resource *RuntimeSidebarResourceSpec + SearchPlaceholder string + Title string + type RuntimeSpec struct + HealthPath string + Mode string + Upstream string + type Schema struct + ModelGroups []ModelGroupSpec + ModelRelations []ModelRelation + Models []ModelSpec + RelationTypes []RelationType + type SchemaBuilder struct + func (b *SchemaBuilder) Build() Schema + func (b *SchemaBuilder) Model(model ModelSpec) *SchemaBuilder + func (b *SchemaBuilder) ModelGroup(name string) *SchemaBuilder + func (b *SchemaBuilder) ModelGroups(groups ...ModelGroupSpec) *SchemaBuilder + func (b *SchemaBuilder) Models(models ...ModelSpec) *SchemaBuilder + func (b *SchemaBuilder) Relation(sourceModelUID, relationTypeUID, targetModelUID, mapping string) *SchemaBuilder + func (b *SchemaBuilder) RelationType(relationType RelationType) *SchemaBuilder + func (b *SchemaBuilder) RelationTypes(relationTypes ...RelationType) *SchemaBuilder + func (b *SchemaBuilder) Setup(items ...SetupItem) *SchemaBuilder + type SetupItem interface + func ModelGroup(name string) SetupItem + func RelationTypes(relationTypes ...RelationType) SetupItem + type SpecOption func(*BindingGraphNode, *BindingGraphEdge) + func In(relationType string) SpecOption + func Out(relationType string) SpecOption + func Required(value bool) SpecOption + func Where(field string, operator string, value any) SpecOption + type Store interface + UpsertBinding func(ctx context.Context, b Binding) error + UpsertPlugin func(ctx context.Context, p Plugin) error