21 lines
639 B
Go
21 lines
639 B
Go
package app
|
|
|
|
import "github.com/Nwflower/reims-go/internal/plugin"
|
|
|
|
// hostHandlers returns every host-owned RPC a Sidecar may call, each guarded
|
|
// by its own permission check.
|
|
func (a *App) hostHandlers(mgr *plugin.Manager, pluginID string) map[string]plugin.RPCRequestHandler {
|
|
out := map[string]plugin.RPCRequestHandler{}
|
|
for _, set := range []map[string]plugin.RPCRequestHandler{
|
|
a.computerUseHostHandlers(mgr, pluginID),
|
|
a.secretHostHandlers(mgr, pluginID),
|
|
a.downloadHostHandlers(mgr, pluginID),
|
|
a.elevateHostHandlers(mgr, pluginID),
|
|
} {
|
|
for method, handler := range set {
|
|
out[method] = handler
|
|
}
|
|
}
|
|
return out
|
|
}
|