Documentation
¶
Index ¶
- Constants
- func NewPluginManagementServiceHandler(svc PluginManagementServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
- type PluginManagementServiceClient
- type PluginManagementServiceHandler
- type UnimplementedPluginManagementServiceHandler
- func (UnimplementedPluginManagementServiceHandler) DisablePlugin(context.Context, *connect.Request[v1.DisablePluginRequest]) (*connect.Response[v1.DisablePluginResponse], error)
- func (UnimplementedPluginManagementServiceHandler) EnablePlugin(context.Context, *connect.Request[v1.EnablePluginRequest]) (*connect.Response[v1.EnablePluginResponse], error)
- func (UnimplementedPluginManagementServiceHandler) ListPlugins(context.Context, *connect.Request[v1.ListPluginsRequest]) (*connect.Response[v1.ListPluginsResponse], error)
Constants ¶
const ( // PluginManagementServiceListPluginsProcedure is the fully-qualified name of the // PluginManagementService's ListPlugins RPC. PluginManagementServiceListPluginsProcedure = "/plugins.v1.PluginManagementService/ListPlugins" // PluginManagementServiceEnablePluginProcedure is the fully-qualified name of the // PluginManagementService's EnablePlugin RPC. PluginManagementServiceEnablePluginProcedure = "/plugins.v1.PluginManagementService/EnablePlugin" // PluginManagementServiceDisablePluginProcedure is the fully-qualified name of the // PluginManagementService's DisablePlugin RPC. PluginManagementServiceDisablePluginProcedure = "/plugins.v1.PluginManagementService/DisablePlugin" )
These constants are the fully-qualified names of the RPCs defined in this package. They're exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.
Note that these are different from the fully-qualified method names used by google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to reflection-formatted method names, remove the leading slash and convert the remaining slash to a period.
const (
// PluginManagementServiceName is the fully-qualified name of the PluginManagementService service.
PluginManagementServiceName = "plugins.v1.PluginManagementService"
)
Variables ¶
This section is empty.
Functions ¶
func NewPluginManagementServiceHandler ¶
func NewPluginManagementServiceHandler(svc PluginManagementServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
NewPluginManagementServiceHandler builds an HTTP handler from the service implementation. It returns the path on which to mount the handler and the handler itself.
By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf and JSON codecs. They also support gzip compression.
Types ¶
type PluginManagementServiceClient ¶
type PluginManagementServiceClient interface {
// ListPlugins returns all plugins registered with the engine.
ListPlugins(context.Context, *connect.Request[v1.ListPluginsRequest]) (*connect.Response[v1.ListPluginsResponse], error)
// EnablePlugin enables a plugin by name.
EnablePlugin(context.Context, *connect.Request[v1.EnablePluginRequest]) (*connect.Response[v1.EnablePluginResponse], error)
// DisablePlugin disables a plugin by name.
DisablePlugin(context.Context, *connect.Request[v1.DisablePluginRequest]) (*connect.Response[v1.DisablePluginResponse], error)
}
PluginManagementServiceClient is a client for the plugins.v1.PluginManagementService service.
func NewPluginManagementServiceClient ¶
func NewPluginManagementServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) PluginManagementServiceClient
NewPluginManagementServiceClient constructs a client for the plugins.v1.PluginManagementService service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() options.
The URL supplied here should be the base URL for the Connect or gRPC server (for example, http://api.acme.com or https://acme.com/grpc).
type PluginManagementServiceHandler ¶
type PluginManagementServiceHandler interface {
// ListPlugins returns all plugins registered with the engine.
ListPlugins(context.Context, *connect.Request[v1.ListPluginsRequest]) (*connect.Response[v1.ListPluginsResponse], error)
// EnablePlugin enables a plugin by name.
EnablePlugin(context.Context, *connect.Request[v1.EnablePluginRequest]) (*connect.Response[v1.EnablePluginResponse], error)
// DisablePlugin disables a plugin by name.
DisablePlugin(context.Context, *connect.Request[v1.DisablePluginRequest]) (*connect.Response[v1.DisablePluginResponse], error)
}
PluginManagementServiceHandler is an implementation of the plugins.v1.PluginManagementService service.
type UnimplementedPluginManagementServiceHandler ¶
type UnimplementedPluginManagementServiceHandler struct{}
UnimplementedPluginManagementServiceHandler returns CodeUnimplemented from all methods.
func (UnimplementedPluginManagementServiceHandler) DisablePlugin ¶
func (UnimplementedPluginManagementServiceHandler) DisablePlugin(context.Context, *connect.Request[v1.DisablePluginRequest]) (*connect.Response[v1.DisablePluginResponse], error)
func (UnimplementedPluginManagementServiceHandler) EnablePlugin ¶
func (UnimplementedPluginManagementServiceHandler) EnablePlugin(context.Context, *connect.Request[v1.EnablePluginRequest]) (*connect.Response[v1.EnablePluginResponse], error)
func (UnimplementedPluginManagementServiceHandler) ListPlugins ¶
func (UnimplementedPluginManagementServiceHandler) ListPlugins(context.Context, *connect.Request[v1.ListPluginsRequest]) (*connect.Response[v1.ListPluginsResponse], error)