hst: merge miscellaneous files
All checks were successful
Test / Hpkg (push) Successful in 4m7s
Test / Sandbox (race detector) (push) Successful in 4m21s
Test / Hakurei (race detector) (push) Successful in 5m5s
Test / Flake checks (push) Successful in 1m24s
Test / Create distribution (push) Successful in 33s
Test / Sandbox (push) Successful in 2m9s
Test / Hakurei (push) Successful in 3m10s
All checks were successful
Test / Hpkg (push) Successful in 4m7s
Test / Sandbox (race detector) (push) Successful in 4m21s
Test / Hakurei (race detector) (push) Successful in 5m5s
Test / Flake checks (push) Successful in 1m24s
Test / Create distribution (push) Successful in 33s
Test / Sandbox (push) Successful in 2m9s
Test / Hakurei (push) Successful in 3m10s
These structs were going to be bigger at some point. They turned out not to be. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
parent
305c600cf5
commit
f9edec7e41
@ -1,4 +1,3 @@
|
||||
// Package hst exports shared types for invoking hakurei.
|
||||
package hst
|
||||
|
||||
import (
|
||||
|
@ -1,3 +1,4 @@
|
||||
// Package hst exports stable shared types for interacting with hakurei.
|
||||
package hst
|
||||
|
||||
import (
|
||||
@ -7,6 +8,23 @@ import (
|
||||
"hakurei.app/system/dbus"
|
||||
)
|
||||
|
||||
// Paths contains environment-dependent paths used by hakurei.
|
||||
type Paths struct {
|
||||
// temporary directory returned by [os.TempDir] (usually `/tmp`)
|
||||
TempDir *container.Absolute `json:"temp_dir"`
|
||||
// path to shared directory (usually `/tmp/hakurei.%d`)
|
||||
SharePath *container.Absolute `json:"share_path"`
|
||||
// XDG_RUNTIME_DIR value (usually `/run/user/%d`)
|
||||
RuntimePath *container.Absolute `json:"runtime_path"`
|
||||
// application runtime directory (usually `/run/user/%d/hakurei`)
|
||||
RunDirPath *container.Absolute `json:"run_dir_path"`
|
||||
}
|
||||
|
||||
type Info struct {
|
||||
User int `json:"user"`
|
||||
Paths
|
||||
}
|
||||
|
||||
// Template returns a fully populated instance of Config.
|
||||
func Template() *Config {
|
||||
return &Config{
|
@ -1,6 +0,0 @@
|
||||
package hst
|
||||
|
||||
type Info struct {
|
||||
User int `json:"user"`
|
||||
Paths
|
||||
}
|
15
hst/paths.go
15
hst/paths.go
@ -1,15 +0,0 @@
|
||||
package hst
|
||||
|
||||
import "hakurei.app/container"
|
||||
|
||||
// Paths contains environment-dependent paths used by hakurei.
|
||||
type Paths struct {
|
||||
// temporary directory returned by [os.TempDir] (usually `/tmp`)
|
||||
TempDir *container.Absolute `json:"temp_dir"`
|
||||
// path to shared directory (usually `/tmp/hakurei.%d`)
|
||||
SharePath *container.Absolute `json:"share_path"`
|
||||
// XDG_RUNTIME_DIR value (usually `/run/user/%d`)
|
||||
RuntimePath *container.Absolute `json:"runtime_path"`
|
||||
// application runtime directory (usually `/run/user/%d/hakurei`)
|
||||
RunDirPath *container.Absolute `json:"run_dir_path"`
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user