Documentation ¶
Index ¶
- Constants
- Variables
- func GetAliasesDir() string
- func GetConfigDir() string
- func GetConfigs() map[string]*ClientConfig
- func GetExtensionsDir() string
- func GetInstalledAliasManifests() []string
- func GetInstalledExtensionManifests() []string
- func GetRootAppDir() string
- func SaveConfig(config *ClientConfig) error
- func SaveSettings(settings *ClientSettings) error
- func Setup(force bool, echo bool)
- type ArmoryConfig
- type ClientConfig
- type ClientSettings
Constants ¶
View Source
const (
AliasesDirName = "aliases"
)
View Source
const (
// ConfigDirName - Directory name containing config files
ConfigDirName = "configs"
)
View Source
const (
// ExtensionsDirName - Directory storing the client side extensions
ExtensionsDirName = "extensions"
)
View Source
const (
// SliverClientDirName - Directory storing all of the client configs/logs
SliverClientDirName = ".sliver-client"
)
Variables ¶
View Source
var ( // DefaultArmoryPublicKey - The default public key for the armory DefaultArmoryPublicKey string // DefaultArmoryRepoURL - The default repo url for the armory DefaultArmoryRepoURL string )
Functions ¶
func GetAliasesDir ¶ added in v1.5.0
func GetAliasesDir() string
GetAliasesDir - Returns the path to the config dir
func GetConfigs ¶
func GetConfigs() map[string]*ClientConfig
GetConfigs - Returns a list of available configs
func GetExtensionsDir ¶ added in v1.5.0
func GetExtensionsDir() string
GetExtensionsDir - Get the Sliver extension directory: ~/.sliver-client/extensions
func GetInstalledAliasManifests ¶ added in v1.5.0
func GetInstalledAliasManifests() []string
GetInstalledAliasManifests - Returns a list of installed alias manifests
func GetInstalledExtensionManifests ¶ added in v1.5.0
func GetInstalledExtensionManifests() []string
GetInstalledExtensionManifests - Returns a list of installed extension manifests
func GetRootAppDir ¶
func GetRootAppDir() string
GetRootAppDir - Get the Sliver app dir ~/.sliver-client/
func SaveSettings ¶ added in v1.5.0
func SaveSettings(settings *ClientSettings) error
SaveSettings - Save the current settings to disk
Types ¶
type ArmoryConfig ¶ added in v1.5.0
type ArmoryConfig struct { PublicKey string `json:"public_key"` RepoURL string `json:"repo_url"` Authorization string `json:"authorization"` AuthorizationCmd string `json:"authorization_cmd"` }
ArmoryConfig - The armory config file
func GetArmoriesConfig ¶ added in v1.5.0
func GetArmoriesConfig() []*ArmoryConfig
GetArmoriesConfig - The parsed armory config file
type ClientConfig ¶
type ClientConfig struct { Operator string `json:"operator"` // This value is actually ignored for the most part (cert CN is used instead) LHost string `json:"lhost"` LPort int `json:"lport"` Token string `json:"token"` CACertificate string `json:"ca_certificate"` PrivateKey string `json:"private_key"` Certificate string `json:"certificate"` }
ClientConfig - Client JSON config
func ReadConfig ¶
func ReadConfig(confFilePath string) (*ClientConfig, error)
ReadConfig - Load config into struct
type ClientSettings ¶ added in v1.5.0
type ClientSettings struct { TableStyle string `json:"tables"` AutoAdult bool `json:"autoadult"` BeaconAutoResults bool `json:"beacon_autoresults"` SmallTermWidth int `json:"small_term_width"` AlwaysOverflow bool `json:"always_overflow"` VimMode bool `json:"vim_mode"` }
ClientSettings - Client JSON config
func LoadSettings ¶ added in v1.5.0
func LoadSettings() (*ClientSettings, error)
LoadSettings - Load the client settings from disk
Click to show internal directories.
Click to hide internal directories.