Documentation
¶
Index ¶
Constants ¶
View Source
const CurrentVersion = "v1"
Variables ¶
This section is empty.
Functions ¶
func ResolvePath ¶
ResolvePath computes the config path from explicit path, env, or home default.
func ValidateTarget ¶
func ValidateTarget(mode TargetMode, value string) error
Types ¶
type AuthProfile ¶
type AuthProfile struct {
Token string `json:"token,omitempty"`
}
AuthProfile holds token data for one privilege profile.
type AuthProfiles ¶
type AuthProfiles struct {
Scan AuthProfile `json:"scan"`
Fix AuthProfile `json:"fix"`
}
AuthProfiles stores split privileges for scan and fix paths.
type Config ¶
type Config struct {
Version string `json:"version"`
Auth AuthProfiles `json:"auth"`
DefaultTarget Target `json:"default_target"`
}
Config is the persisted wrkr init configuration.
type Target ¶
type Target struct {
Mode TargetMode `json:"mode"`
Value string `json:"value"`
}
Target identifies a scan source target.
type TargetMode ¶
type TargetMode string
TargetMode identifies the default scan target source.
const ( TargetRepo TargetMode = "repo" TargetOrg TargetMode = "org" TargetPath TargetMode = "path" )
Click to show internal directories.
Click to hide internal directories.