rpc

package
v0.0.0-...-95e8c34 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 14, 2022 License: GPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartRpcServer

func StartRpcServer(debugPort, serverPort, steamPath, dataDir, pluginsDir, authToken string, plugins *plugins.Plugins)

StartRpcServer starts the HTTP server that serves the RPC plugin API.

Types

type AutostartService

type AutostartService struct {
	// contains filtered or unexported fields
}

func NewAutostartService

func NewAutostartService(dataDir string) *AutostartService

func (*AutostartService) DisableService

func (service *AutostartService) DisableService(r *http.Request, req *DisableServiceArgs, res *DisableServiceReply) error

func (*AutostartService) HostHasSystemd

func (service *AutostartService) HostHasSystemd(r *http.Request, req *HostHasSystemdArgs, res *HostHasSystemdReply) error

func (*AutostartService) InstallService

func (service *AutostartService) InstallService(r *http.Request, req *InstallServiceArgs, res *InstallServiceReply) error

func (*AutostartService) ServiceInstalled

func (service *AutostartService) ServiceInstalled(r *http.Request, req *ServiceInstalledArgs, res *ServiceInstalledReply) error

type CmdInfo

type CmdInfo struct {
	// contains filtered or unexported fields
}

type Content

type Content struct {
	Name  string `json:"name"`
	IsDir bool   `json:"isDir"`
}

type DisableServiceArgs

type DisableServiceArgs struct{}

type DisableServiceReply

type DisableServiceReply struct{}

type ExecService

type ExecService struct {
	Commands map[pid]*CmdInfo
}

func NewExecService

func NewExecService() *ExecService

func (*ExecService) Run

func (service *ExecService) Run(r *http.Request, req *RunArgs, res *RunReply) error

func (*ExecService) Start

func (service *ExecService) Start(r *http.Request, req *StartArgs, res *StartReply) error

func (*ExecService) Stop

func (service *ExecService) Stop(r *http.Request, req *StopArgs, res *StopReply) error

type FSService

type FSService struct {
	// contains filtered or unexported fields
}

func NewFSService

func NewFSService(pluginsDir string) *FSService

func (*FSService) GetPluginsPath

func (service *FSService) GetPluginsPath(r *http.Request, req *GetPluginsPathArgs, res *GetPluginsPathReply) error

func (*FSService) ListDir

func (service *FSService) ListDir(r *http.Request, req *ListDirArgs, res *ListDirReply) error

func (*FSService) MkDir

func (service *FSService) MkDir(r *http.Request, req *MakeDirArgs, res *MakeDirReply) error

func (*FSService) ReadFile

func (service *FSService) ReadFile(r *http.Request, req *ReadFileArgs, res *ReadFileReply) error

func (*FSService) RemoveFile

func (service *FSService) RemoveFile(r *http.Request, req *RemoveFileArgs, res *RemoveFileReply) error

func (*FSService) Untar

func (service *FSService) Untar(r *http.Request, req *UntarArgs, res *UntarReply) error

type GetArgs

type GetArgs struct {
	Bucket string `json:"bucket"`
	Key    string `json:"key"`
}

type GetPluginsPathArgs

type GetPluginsPathArgs struct{}

type GetPluginsPathReply

type GetPluginsPathReply struct {
	Path string `json:"path"`
}

type GetReply

type GetReply struct {
	Found bool   `json:"found"`
	Value string `json:"value"`
}

type HostHasSystemdArgs

type HostHasSystemdArgs struct{}

type HostHasSystemdReply

type HostHasSystemdReply struct {
	HasSystemd bool `json:"hasSystemd"`
}

type IPCService

type IPCService struct {
	// contains filtered or unexported fields
}

func NewIPCService

func NewIPCService(hub *ws.Hub) *IPCService

func (*IPCService) Send

func (service *IPCService) Send(r *http.Request, req *SendArgs, res *SendReply) error

type InstallServiceArgs

type InstallServiceArgs struct{}

type InstallServiceReply

type InstallServiceReply struct{}

type ListArgs

type ListArgs struct{}

type ListDirArgs

type ListDirArgs struct {
	Path string `json:"path"`
}

type ListDirReply

type ListDirReply struct {
	Contents []Content `json:"contents"`
}

type ListReply

type ListReply struct {
	Plugins plugins.PluginMap `json:"plugins"`
}

type MakeDirArgs

type MakeDirArgs struct {
	Path    string `json:"path"`
	Parents bool   `json:"parents"`
}

type MakeDirReply

type MakeDirReply struct{}

type PluginsService

type PluginsService struct {
	// contains filtered or unexported fields
}

func NewPluginsService

func NewPluginsService(plugins *plugins.Plugins) *PluginsService

func (*PluginsService) List

func (service *PluginsService) List(r *http.Request, req *ListArgs, res *ListReply) error

func (*PluginsService) Rebuild

func (service *PluginsService) Rebuild(r *http.Request, req *RebuildArgs, res *RebuildReply) error

func (*PluginsService) Reload

func (service *PluginsService) Reload(r *http.Request, req *ReloadArgs, res *ReloadReply) error

func (*PluginsService) Remove

func (service *PluginsService) Remove(r *http.Request, req *RemoveArgs, res *RemoveReply) error

func (*PluginsService) SetEnabled

func (service *PluginsService) SetEnabled(r *http.Request, req *SetEnabledArgs, res *SetEnabledReply) error

type ReadFileArgs

type ReadFileArgs struct {
	Path string `json:"path"`
}

type ReadFileReply

type ReadFileReply struct {
	Data string `json:"data"`
}

type RebuildArgs

type RebuildArgs struct {
	Id string `json:"id"`
}

type RebuildReply

type RebuildReply struct{}

type ReloadArgs

type ReloadArgs struct{}

type ReloadReply

type ReloadReply struct{}

type RemoveArgs

type RemoveArgs struct {
	Id string `json:"id"`
}

type RemoveFileArgs

type RemoveFileArgs struct {
	Path string `json:"path"`
}

type RemoveFileReply

type RemoveFileReply struct {
}

type RemoveReply

type RemoveReply struct{}

type RunArgs

type RunArgs struct {
	Command string   `json:"command"`
	Args    []string `json:"args"`
}

type RunReply

type RunReply struct {
	ExitCode int    `json:"exitCode"`
	Stdout   string `json:"stdout"`
	Stderr   string `json:"stderr"`
}

type SendArgs

type SendArgs struct {
	Message string `json:"message"`
}

type SendReply

type SendReply struct{}

type ServiceInstalledArgs

type ServiceInstalledArgs struct{}

type ServiceInstalledReply

type ServiceInstalledReply struct {
	ServiceInstalled bool `json:"serviceInstalled"`
}

type SetArgs

type SetArgs struct {
	Bucket string `json:"bucket"`
	Key    string `json:"key"`
	Value  string `json:"value"`
}

type SetEnabledArgs

type SetEnabledArgs struct {
	Id      string `json:"id"`
	Enabled bool   `json:"enabled"`
}

type SetEnabledReply

type SetEnabledReply struct{}

type SetReply

type SetReply struct{}

type StartArgs

type StartArgs struct {
	Command string   `json:"command"`
	Args    []string `json:"args"`
}

type StartReply

type StartReply struct {
	Pid int `json:"pid"`
}

type StopArgs

type StopArgs struct {
	Pid  int  `json:"pid"`
	Kill bool `json:"kill"`
}

type StopReply

type StopReply struct {
	ExitCode int    `json:"exitCode"`
	Stdout   string `json:"stdout"`
	Stderr   string `json:"stderr"`
}

type StoreService

type StoreService struct {
	// contains filtered or unexported fields
}

func NewStoreService

func NewStoreService(dataDir string) *StoreService

func (*StoreService) Get

func (service *StoreService) Get(r *http.Request, req *GetArgs, res *GetReply) error

func (*StoreService) Set

func (service *StoreService) Set(r *http.Request, req *SetArgs, res *SetReply) error

type UntarArgs

type UntarArgs struct {
	TarPath  string `json:"tarPath"`
	DestPath string `json:"destPath"`
}

type UntarReply

type UntarReply struct{}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL