Documentation
¶
Overview ¶
Package home resolves and manages the per-user gskill home directory (default ~/.gskill, relocatable only via GSKILL_HOME). The home holds the global content-addressed store plus its cache, staging area, locks, advisory project registry, GC pins, quarantine, and user config — all under one root so atomic renames never cross filesystems.
Index ¶
Constants ¶
const EnvHome = "GSKILL_HOME"
EnvHome is the environment variable that relocates the entire gskill home. It is the only relocation mechanism; there is no config-file equivalent.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Finding ¶
type Finding struct {
// Path is the offending file or directory.
Path string
// Problem describes what is unsafe (e.g. world-writable).
Problem string
// Remedy is the suggested fix the user can run.
Remedy string
}
Finding is one unsafe-permission observation under the home.
type Home ¶
type Home struct {
// contains filtered or unexported fields
}
Home is a resolved gskill home root with accessors for its fixed layout. Store, tmp, and locks all live under one root so staged content can be promoted with an atomic same-filesystem rename.
func (*Home) CheckPathSafety ¶
CheckPathSafety fails when path (a store object or other trusted location) is group/world-writable or owned by another user. Activation uses it to refuse unsafe objects fail-closed (FR-033).
func (*Home) CheckPerms ¶
CheckPerms audits the home tree for dangerous permissions: group- or world-writable directories/files and entries owned by another user. It reports findings rather than failing, so callers decide whether to warn or refuse (FR-033).
func (*Home) ConfigFile ¶
ConfigFile returns the user-level config file path inside the home.
func (*Home) Ensure ¶
Ensure creates the home layout with owner-only permissions. It is idempotent and never loosens permissions on existing directories.