Documentation
¶
Index ¶
- Constants
- func DecodeString(s, enc string) string
- func EncodingByName(name string) encoding.Encoding
- func NeedsTranscoding(p *Profile) bool
- func NewDecodingWriter(w io.Writer, enc string) io.Writer
- func RenderProfileCompact(p *Profile) string
- func RenderProfilePretty(p *Profile) string
- type Cache
- type CacheOption
- type OS
- type Profile
- type Shell
Constants ¶
View Source
const CachePathEnv = "SSHQ_PROFILE_CACHE"
View Source
const DefaultTTL = 24 * time.Hour
Variables ¶
This section is empty.
Functions ¶
func DecodeString ¶
DecodeString decodes a buffered string from the given encoding to UTF-8. Used for buffered command output where a streaming DecodingWriter is not available; on decode failure it returns the original string unchanged.
func EncodingByName ¶
func NeedsTranscoding ¶
func RenderProfileCompact ¶
func RenderProfilePretty ¶
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
func (*Cache) Invalidate ¶
type CacheOption ¶
type CacheOption func(*cacheOptions)
func WithCacheInfo ¶
func WithCacheInfo(info func(string)) CacheOption
func WithCachePath ¶
func WithCachePath(path string) CacheOption
type Profile ¶
type Profile struct {
OS OS `json:"os"`
Shell Shell `json:"shell"`
Encoding string `json:"encoding,omitempty"`
HomeDir string `json:"home_dir,omitempty"`
TempDir string `json:"temp_dir,omitempty"`
PowerShellPath string `json:"powershell_path,omitempty"`
PwshPath string `json:"pwsh_path,omitempty"`
DetectedAt int64 `json:"detected_at"`
}
func GetProfile ¶
func (*Profile) InterpreterCmd ¶
func (*Profile) NeedsStdinInjection ¶
Click to show internal directories.
Click to hide internal directories.