Versions in this module Expand all Collapse all v0 v0.1.0 May 12, 2021 Changes in this version + const BinaryNotFound + const GenericError + const HelpProcessExecutionTimeout + const NotImplementedError + 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 struct + Command datastore.Command + Policy datastore.Policy + type AddHelpPageResponse struct + HelpPage datastore.HelpPage + Status datastore.AddHelpPageStatus + type AttachRequest struct + CodBinaryPath string + Pid int + Shell string + type AttachResponse struct + type Client struct + func NewClient(configuration Configuration) (client *Client, err error) + func (c *Client) Close() (err error) + func (c *Client) Request(req interface{}, rsp interface{}) (err error) + type CompleteWordsRequest struct + CWord int + Words []string + type CompleteWordsResponse struct + Completions []string + type Configuration struct + func DefaultConfiguration() (cfg Configuration, err error) + 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 struct + Pid int + type DetachResponse struct + type ErrorResponse struct + Code int + Desc string + func (e ErrorResponse) Error() string + type InitScriptRequest struct + Pid int + type InitScriptResponse struct + Script []string + type ListClientsRequest struct + type ListClientsResponse struct + Clients []ShellAndPid + type ListCommandsRequest struct + Selectors []string + type ListCommandsResponse struct + CommandItems []ListCommandsResponseItem + type ListCommandsResponseItem struct + Command *datastore.Command + Id int64 + type ParseCommandLineRequest struct + CommandLine string + Dir string + Env []string + Pid int + type ParseCommandLineResponse struct + Args []string + Env []string + IsHelpCommand bool + PolicyMode datastore.Policy + type PollUpdatesRequest struct + Pid int + type PollUpdatesResponse struct + Script []string + type RemoteError struct + Code int + Message string + func (e RemoteError) Error() string + type RemoveCommandsRequest struct + HelpPageIds []int64 + type RemoveCommandsResponse struct + type Rule struct + Executable string + Policy datastore.Policy + type Server interface + Close func() error + Serve func() error + func NewServer(cfg *Configuration) (server Server, err error) + type ShellAndPid struct + Pid int + Shell string + type UpdateHelpPageRequest struct + Command datastore.Command + Id int64 + type UpdateHelpPageResponse struct + type UserConfiguration struct + Rules []Rule + func LoadUserConfiguration(filename, homeDir string) (userConfiguration UserConfiguration, err error) + func LoadUserConfigurationFromBytes(bytes []byte, homeDir string) (userConfiguration UserConfiguration, err error) + func (cfg *UserConfiguration) GetExecutablePolicy(executablePath string) datastore.Policy