forked from security/hakurei
internal/app: remove seal interface
This further cleans up the package for the restructure. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
22
internal/app/export_test.go
Normal file
22
internal/app/export_test.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package app
|
||||
|
||||
import (
|
||||
"hakurei.app/container"
|
||||
"hakurei.app/internal/app/state"
|
||||
"hakurei.app/internal/sys"
|
||||
"hakurei.app/system"
|
||||
)
|
||||
|
||||
func NewWithID(id state.ID, os sys.State) *App {
|
||||
a := new(App)
|
||||
a.id = newID(&id)
|
||||
a.sys = os
|
||||
return a
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user