forked from security/hakurei
internal/app: unexport outcome, remove app struct
The App struct no longer does anything, and the outcome struct is entirely opaque. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -4,18 +4,13 @@ import (
|
||||
"context"
|
||||
|
||||
"hakurei.app/container"
|
||||
"hakurei.app/hst"
|
||||
"hakurei.app/internal/app/state"
|
||||
"hakurei.app/internal/sys"
|
||||
"hakurei.app/system"
|
||||
)
|
||||
|
||||
func NewWithID(ctx context.Context, id state.ID, os sys.State) *App {
|
||||
return &App{id: newID(&id), sys: os, ctx: ctx}
|
||||
}
|
||||
|
||||
func AppIParams(a *App, seal *Outcome) (*system.I, *container.Params) {
|
||||
if a.outcome != seal || a.id != seal.id {
|
||||
panic("broken app/outcome link")
|
||||
}
|
||||
return seal.sys, seal.container
|
||||
func FinaliseIParams(ctx context.Context, k sys.State, config *hst.Config, id *state.ID) (*system.I, *container.Params, error) {
|
||||
seal := outcome{id: &stringPair[state.ID]{*id, id.String()}}
|
||||
return seal.sys, seal.container, seal.finalise(ctx, k, config)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user