Documentation
¶
Overview ¶
Package appwire assembles applications (#2411, #2412) from the platform's stores: the service the manage_application tool and the portal routes share, over the application store, the script and asset stores, the webhook sources and the live application database toolkit, and the bundler that exports and imports them.
Index ¶
- func Bundler(svc *appsvc.Service, d Deps) *appbundle.Bundler
- func Kit(reg *registry.Registry) func() appschema.Kit
- func Live(reg *registry.Registry) *postgreskit.Toolkit
- func Register(server *mcp.Server, d Deps) *appsvc.Service
- func Service(d Deps) *appsvc.Service
- type Assets
- type Deps
- type Versions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Live ¶ added in v1.153.2
func Live(reg *registry.Registry) *postgreskit.Toolkit
Live is the application database toolkit in the live registry, nil when none is registered.
Types ¶
type Assets ¶
type Assets interface {
appsvc.Assets
Insert(ctx context.Context, asset portaldomain.Asset) error
List(ctx context.Context, filter portaldomain.AssetFilter) ([]portaldomain.Asset, int, error)
}
Assets is the portal asset store as applications use it.
type Deps ¶
type Deps struct {
DB *sql.DB
Assets Assets
AssetVersions Versions
Toolkits *registry.Registry
// What a bundle is written to and read from, and where an imported
// asset's content goes.
Blobs interface {
GetObject(ctx context.Context, bucket, key string) ([]byte, string, error)
PutObject(ctx context.Context, bucket, key string, data []byte, contentType string) error
}
Bucket, Prefix string
Lander interface {
LandResource(ctx context.Context, dest toolkit.ResourceDestination, content io.Reader, contentType string) (*toolkit.ResourceLanding, error)
}
Reader interface {
Source(ctx context.Context, ref string, claims resource.Claims, limit int64) (string, error)
}
Claims func(ctx context.Context) resource.Claims
// Handlers sets an imported script's handlers, as manage_script's
// handler_set does (#2441).
Handlers *scripthandler.Service
// SaveGate is the gate a script's source save crosses, which an import
// puts each script through (#2476); nil refuses importing a script.
SaveGate appbundle.SaveGate
// Recordings is the store the gate reads recordings from, which an
// export writes a script's test recordings out of and an import stores
// them in (#2476).
Recordings scriptrec.Store
// Sealer keeps an application's run-role password sealed (#2539); nil
// adds no schema.
Sealer appsvc.Sealer
// Reach lists the application database connections an actor may hold a
// schema on; nil adds no schema.
Reach func(ctx context.Context, actor application.Actor) ([]string, error)
// Sites reads a site part and points its environment at a release; nil
// is a deployment with no sites. Every service built from Deps is given
// it at construction, so the portal's and manage_application's agree
// (#2613).
Sites appsvc.Sites
}
Deps is what applications are assembled from.
type Versions ¶
type Versions interface {
portaldomain.VersionReader
CreateVersion(ctx context.Context, version portaldomain.AssetVersion) (int, error)
}
Versions is the portal version store as applications use it.
Click to show internal directories.
Click to hide internal directories.