Documentation
¶
Index ¶
- Constants
- func CastRequestPayload(payload interface{}, req interface{})
- func GetErrorCode(err error) int
- func MarshalRequest(req interface{}) (bytes []byte)
- func MarshalResponse(rsp interface{}, e error, warns []util.Warning) (bytes []byte)
- func UnmarshalRequest(data []byte) (name string, payload interface{}, err error)
- func UnmarshalResponseToVar(data []byte, rsp interface{}) (err error, warns []util.Warning)
- type AddHelpPageRequest
- type AddHelpPageResponse
- type AttachRequest
- type AttachResponse
- type Client
- type CompleteWordsRequest
- type CompleteWordsResponse
- type Configuration
- func (cfg *Configuration) GetCompletionConfigDir() string
- func (cfg *Configuration) GetCompletionDbDir() string
- func (cfg *Configuration) GetCompletionsSqliteDb() string
- func (cfg *Configuration) GetHomeDir() string
- func (cfg *Configuration) GetKnownCommandsFile() string
- func (cfg *Configuration) GetLearnBlacklistFile() string
- func (cfg *Configuration) GetLockFile() string
- func (cfg *Configuration) GetLogDir() string
- func (cfg *Configuration) GetPidFile() string
- func (cfg *Configuration) GetRunDir() string
- func (cfg *Configuration) GetSocketFile() string
- func (cfg *Configuration) GetUserConfiguration() string
- type DetachRequest
- type DetachResponse
- type ErrorResponse
- type InitScriptRequest
- type InitScriptResponse
- type ListClientsRequest
- type ListClientsResponse
- type ListCommandsRequest
- type ListCommandsResponse
- type ListCommandsResponseItem
- type ParseCommandLineRequest
- type ParseCommandLineResponse
- type PollUpdatesRequest
- type PollUpdatesResponse
- type RemoteError
- type RemoveCommandsRequest
- type RemoveCommandsResponse
- type Rule
- type Server
- type ShellAndPid
- type UpdateHelpPageRequest
- type UpdateHelpPageResponse
- type UserConfiguration
Constants ¶
View Source
const ( GenericError = 1 NotImplementedError = 2 BinaryNotFound = 3 )
View Source
const (
HelpProcessExecutionTimeout = 1 * time.Second
)
Variables ¶
This section is empty.
Functions ¶
func CastRequestPayload ¶
func CastRequestPayload(payload interface{}, req interface{})
func GetErrorCode ¶
func MarshalRequest ¶
func MarshalRequest(req interface{}) (bytes []byte)
func MarshalResponse ¶
func UnmarshalRequest ¶
Types ¶
type AddHelpPageRequest ¶
type AddHelpPageResponse ¶
type AddHelpPageResponse struct { HelpPage datastore.HelpPage Status datastore.AddHelpPageStatus }
type AttachRequest ¶
type AttachResponse ¶
type AttachResponse struct { }
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(configuration Configuration) (client *Client, err error)
type CompleteWordsRequest ¶
type CompleteWordsResponse ¶
type CompleteWordsResponse struct {
Completions []string
}
type Configuration ¶
type Configuration struct {
// contains filtered or unexported fields
}
func DefaultConfiguration ¶
func DefaultConfiguration() (cfg Configuration, err error)
func (*Configuration) GetCompletionConfigDir ¶
func (cfg *Configuration) GetCompletionConfigDir() string
func (*Configuration) GetCompletionDbDir ¶
func (cfg *Configuration) GetCompletionDbDir() string
func (*Configuration) GetCompletionsSqliteDb ¶
func (cfg *Configuration) GetCompletionsSqliteDb() string
func (*Configuration) GetHomeDir ¶
func (cfg *Configuration) GetHomeDir() string
func (*Configuration) GetKnownCommandsFile ¶
func (cfg *Configuration) GetKnownCommandsFile() string
func (*Configuration) GetLearnBlacklistFile ¶
func (cfg *Configuration) GetLearnBlacklistFile() string
func (*Configuration) GetLockFile ¶
func (cfg *Configuration) GetLockFile() string
func (*Configuration) GetLogDir ¶
func (cfg *Configuration) GetLogDir() string
func (*Configuration) GetPidFile ¶
func (cfg *Configuration) GetPidFile() string
func (*Configuration) GetRunDir ¶
func (cfg *Configuration) GetRunDir() string
func (*Configuration) GetSocketFile ¶
func (cfg *Configuration) GetSocketFile() string
func (*Configuration) GetUserConfiguration ¶
func (cfg *Configuration) GetUserConfiguration() string
type DetachRequest ¶
type DetachRequest struct {
Pid int
}
type DetachResponse ¶
type DetachResponse struct { }
type ErrorResponse ¶
func (ErrorResponse) Error ¶
func (e ErrorResponse) Error() string
type InitScriptRequest ¶
type InitScriptRequest struct {
Pid int
}
type InitScriptResponse ¶
type InitScriptResponse struct {
Script []string
}
type ListClientsRequest ¶
type ListClientsRequest struct { }
type ListClientsResponse ¶
type ListClientsResponse struct {
Clients []ShellAndPid
}
type ListCommandsRequest ¶
type ListCommandsRequest struct {
Selectors []string
}
type ListCommandsResponse ¶
type ListCommandsResponse struct {
CommandItems []ListCommandsResponseItem
}
type ParseCommandLineRequest ¶
type PollUpdatesRequest ¶
type PollUpdatesRequest struct {
Pid int
}
type PollUpdatesResponse ¶
type PollUpdatesResponse struct {
Script []string
}
type RemoteError ¶
func (RemoteError) Error ¶
func (e RemoteError) Error() string
type RemoveCommandsRequest ¶
type RemoveCommandsRequest struct {
HelpPageIds []int64
}
type RemoveCommandsResponse ¶
type RemoveCommandsResponse struct { }
type ShellAndPid ¶
type UpdateHelpPageRequest ¶
type UpdateHelpPageResponse ¶
type UpdateHelpPageResponse struct { }
type UserConfiguration ¶
type UserConfiguration struct {
Rules []Rule `toml:"rule"`
}
func LoadUserConfiguration ¶
func LoadUserConfiguration(filename, homeDir string) (userConfiguration UserConfiguration, err error)
func LoadUserConfigurationFromBytes ¶
func LoadUserConfigurationFromBytes(bytes []byte, homeDir string) (userConfiguration UserConfiguration, err error)
func (*UserConfiguration) GetExecutablePolicy ¶
func (cfg *UserConfiguration) GetExecutablePolicy(executablePath string) datastore.Policy
Click to show internal directories.
Click to hide internal directories.