Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterMiddlewarePluginServer(s grpc.ServiceRegistrar, srv MiddlewarePluginServer)
- type ConfigureResponse
- func (*ConfigureResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ConfigureResponse) GetErrorMessage() string
- func (x *ConfigureResponse) GetSuccess() bool
- func (*ConfigureResponse) ProtoMessage()
- func (x *ConfigureResponse) ProtoReflect() protoreflect.Message
- func (x *ConfigureResponse) Reset()
- func (x *ConfigureResponse) String() string
- type Empty
- type HealthCheckResponse
- func (*HealthCheckResponse) Descriptor() ([]byte, []int)deprecated
- func (x *HealthCheckResponse) GetHealthy() bool
- func (x *HealthCheckResponse) GetMessage() string
- func (*HealthCheckResponse) ProtoMessage()
- func (x *HealthCheckResponse) ProtoReflect() protoreflect.Message
- func (x *HealthCheckResponse) Reset()
- func (x *HealthCheckResponse) String() string
- type HttpRequest
- func (*HttpRequest) Descriptor() ([]byte, []int)deprecated
- func (x *HttpRequest) GetBody() []byte
- func (x *HttpRequest) GetClientIp() string
- func (x *HttpRequest) GetHeaders() map[string]string
- func (x *HttpRequest) GetMethod() string
- func (x *HttpRequest) GetOriginalUrl() string
- func (x *HttpRequest) GetPath() string
- func (x *HttpRequest) GetQueryParams() map[string]string
- func (*HttpRequest) ProtoMessage()
- func (x *HttpRequest) ProtoReflect() protoreflect.Message
- func (x *HttpRequest) Reset()
- func (x *HttpRequest) String() string
- type HttpResponse
- func (*HttpResponse) Descriptor() ([]byte, []int)deprecated
- func (x *HttpResponse) GetAction() string
- func (x *HttpResponse) GetBody() []byte
- func (x *HttpResponse) GetHeaders() map[string]string
- func (x *HttpResponse) GetStatusCode() int32
- func (*HttpResponse) ProtoMessage()
- func (x *HttpResponse) ProtoReflect() protoreflect.Message
- func (x *HttpResponse) Reset()
- func (x *HttpResponse) String() string
- type MiddlewarePluginClient
- type MiddlewarePluginServer
- type PluginConfig
- type UnimplementedMiddlewarePluginServer
- func (UnimplementedMiddlewarePluginServer) Configure(context.Context, *PluginConfig) (*ConfigureResponse, error)
- func (UnimplementedMiddlewarePluginServer) HandleRequest(context.Context, *HttpRequest) (*HttpResponse, error)
- func (UnimplementedMiddlewarePluginServer) HealthCheck(context.Context, *Empty) (*HealthCheckResponse, error)
- type UnsafeMiddlewarePluginServer
Constants ¶
const ( MiddlewarePlugin_HandleRequest_FullMethodName = "/zolly.plugin.MiddlewarePlugin/HandleRequest" MiddlewarePlugin_Configure_FullMethodName = "/zolly.plugin.MiddlewarePlugin/Configure" MiddlewarePlugin_HealthCheck_FullMethodName = "/zolly.plugin.MiddlewarePlugin/HealthCheck" )
Variables ¶
var File_plugin_proto_middleware_proto protoreflect.FileDescriptor
var MiddlewarePlugin_ServiceDesc = grpc.ServiceDesc{ ServiceName: "zolly.plugin.MiddlewarePlugin", HandlerType: (*MiddlewarePluginServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "HandleRequest", Handler: _MiddlewarePlugin_HandleRequest_Handler, }, { MethodName: "Configure", Handler: _MiddlewarePlugin_Configure_Handler, }, { MethodName: "HealthCheck", Handler: _MiddlewarePlugin_HealthCheck_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "plugin/proto/middleware.proto", }
MiddlewarePlugin_ServiceDesc is the grpc.ServiceDesc for MiddlewarePlugin service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterMiddlewarePluginServer ¶
func RegisterMiddlewarePluginServer(s grpc.ServiceRegistrar, srv MiddlewarePluginServer)
Types ¶
type ConfigureResponse ¶
type ConfigureResponse struct {
Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
ErrorMessage string `protobuf:"bytes,2,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
// contains filtered or unexported fields
}
func (*ConfigureResponse) Descriptor
deprecated
func (*ConfigureResponse) Descriptor() ([]byte, []int)
Deprecated: Use ConfigureResponse.ProtoReflect.Descriptor instead.
func (*ConfigureResponse) GetErrorMessage ¶
func (x *ConfigureResponse) GetErrorMessage() string
func (*ConfigureResponse) GetSuccess ¶
func (x *ConfigureResponse) GetSuccess() bool
func (*ConfigureResponse) ProtoMessage ¶
func (*ConfigureResponse) ProtoMessage()
func (*ConfigureResponse) ProtoReflect ¶
func (x *ConfigureResponse) ProtoReflect() protoreflect.Message
func (*ConfigureResponse) Reset ¶
func (x *ConfigureResponse) Reset()
func (*ConfigureResponse) String ¶
func (x *ConfigureResponse) String() string
type Empty ¶
type Empty struct {
// contains filtered or unexported fields
}
func (*Empty) Descriptor
deprecated
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶
func (x *Empty) ProtoReflect() protoreflect.Message
type HealthCheckResponse ¶
type HealthCheckResponse struct {
Healthy bool `protobuf:"varint,1,opt,name=healthy,proto3" json:"healthy,omitempty"`
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
// contains filtered or unexported fields
}
func (*HealthCheckResponse) Descriptor
deprecated
func (*HealthCheckResponse) Descriptor() ([]byte, []int)
Deprecated: Use HealthCheckResponse.ProtoReflect.Descriptor instead.
func (*HealthCheckResponse) GetHealthy ¶
func (x *HealthCheckResponse) GetHealthy() bool
func (*HealthCheckResponse) GetMessage ¶
func (x *HealthCheckResponse) GetMessage() string
func (*HealthCheckResponse) ProtoMessage ¶
func (*HealthCheckResponse) ProtoMessage()
func (*HealthCheckResponse) ProtoReflect ¶
func (x *HealthCheckResponse) ProtoReflect() protoreflect.Message
func (*HealthCheckResponse) Reset ¶
func (x *HealthCheckResponse) Reset()
func (*HealthCheckResponse) String ¶
func (x *HealthCheckResponse) String() string
type HttpRequest ¶
type HttpRequest struct {
Method string `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"`
Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
OriginalUrl string `protobuf:"bytes,3,opt,name=original_url,json=originalUrl,proto3" json:"original_url,omitempty"`
Headers map[string]string `` /* 141-byte string literal not displayed */
Body []byte `protobuf:"bytes,5,opt,name=body,proto3" json:"body,omitempty"`
QueryParams map[string]string `` /* 168-byte string literal not displayed */
ClientIp string `protobuf:"bytes,7,opt,name=client_ip,json=clientIp,proto3" json:"client_ip,omitempty"`
// contains filtered or unexported fields
}
func (*HttpRequest) Descriptor
deprecated
func (*HttpRequest) Descriptor() ([]byte, []int)
Deprecated: Use HttpRequest.ProtoReflect.Descriptor instead.
func (*HttpRequest) GetBody ¶
func (x *HttpRequest) GetBody() []byte
func (*HttpRequest) GetClientIp ¶
func (x *HttpRequest) GetClientIp() string
func (*HttpRequest) GetHeaders ¶
func (x *HttpRequest) GetHeaders() map[string]string
func (*HttpRequest) GetMethod ¶
func (x *HttpRequest) GetMethod() string
func (*HttpRequest) GetOriginalUrl ¶
func (x *HttpRequest) GetOriginalUrl() string
func (*HttpRequest) GetPath ¶
func (x *HttpRequest) GetPath() string
func (*HttpRequest) GetQueryParams ¶
func (x *HttpRequest) GetQueryParams() map[string]string
func (*HttpRequest) ProtoMessage ¶
func (*HttpRequest) ProtoMessage()
func (*HttpRequest) ProtoReflect ¶
func (x *HttpRequest) ProtoReflect() protoreflect.Message
func (*HttpRequest) Reset ¶
func (x *HttpRequest) Reset()
func (*HttpRequest) String ¶
func (x *HttpRequest) String() string
type HttpResponse ¶
type HttpResponse struct {
Action string `protobuf:"bytes,1,opt,name=action,proto3" json:"action,omitempty"`
StatusCode int32 `protobuf:"varint,2,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"`
Headers map[string]string `` /* 141-byte string literal not displayed */
Body []byte `protobuf:"bytes,4,opt,name=body,proto3" json:"body,omitempty"`
// contains filtered or unexported fields
}
func (*HttpResponse) Descriptor
deprecated
func (*HttpResponse) Descriptor() ([]byte, []int)
Deprecated: Use HttpResponse.ProtoReflect.Descriptor instead.
func (*HttpResponse) GetAction ¶
func (x *HttpResponse) GetAction() string
func (*HttpResponse) GetBody ¶
func (x *HttpResponse) GetBody() []byte
func (*HttpResponse) GetHeaders ¶
func (x *HttpResponse) GetHeaders() map[string]string
func (*HttpResponse) GetStatusCode ¶
func (x *HttpResponse) GetStatusCode() int32
func (*HttpResponse) ProtoMessage ¶
func (*HttpResponse) ProtoMessage()
func (*HttpResponse) ProtoReflect ¶
func (x *HttpResponse) ProtoReflect() protoreflect.Message
func (*HttpResponse) Reset ¶
func (x *HttpResponse) Reset()
func (*HttpResponse) String ¶
func (x *HttpResponse) String() string
type MiddlewarePluginClient ¶
type MiddlewarePluginClient interface {
HandleRequest(ctx context.Context, in *HttpRequest, opts ...grpc.CallOption) (*HttpResponse, error)
Configure(ctx context.Context, in *PluginConfig, opts ...grpc.CallOption) (*ConfigureResponse, error)
HealthCheck(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*HealthCheckResponse, error)
}
MiddlewarePluginClient is the client API for MiddlewarePlugin service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewMiddlewarePluginClient ¶
func NewMiddlewarePluginClient(cc grpc.ClientConnInterface) MiddlewarePluginClient
type MiddlewarePluginServer ¶
type MiddlewarePluginServer interface {
HandleRequest(context.Context, *HttpRequest) (*HttpResponse, error)
Configure(context.Context, *PluginConfig) (*ConfigureResponse, error)
HealthCheck(context.Context, *Empty) (*HealthCheckResponse, error)
// contains filtered or unexported methods
}
MiddlewarePluginServer is the server API for MiddlewarePlugin service. All implementations must embed UnimplementedMiddlewarePluginServer for forward compatibility.
type PluginConfig ¶
type PluginConfig struct {
Settings map[string]string `` /* 143-byte string literal not displayed */
// contains filtered or unexported fields
}
func (*PluginConfig) Descriptor
deprecated
func (*PluginConfig) Descriptor() ([]byte, []int)
Deprecated: Use PluginConfig.ProtoReflect.Descriptor instead.
func (*PluginConfig) GetSettings ¶
func (x *PluginConfig) GetSettings() map[string]string
func (*PluginConfig) ProtoMessage ¶
func (*PluginConfig) ProtoMessage()
func (*PluginConfig) ProtoReflect ¶
func (x *PluginConfig) ProtoReflect() protoreflect.Message
func (*PluginConfig) Reset ¶
func (x *PluginConfig) Reset()
func (*PluginConfig) String ¶
func (x *PluginConfig) String() string
type UnimplementedMiddlewarePluginServer ¶
type UnimplementedMiddlewarePluginServer struct{}
UnimplementedMiddlewarePluginServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedMiddlewarePluginServer) Configure ¶
func (UnimplementedMiddlewarePluginServer) Configure(context.Context, *PluginConfig) (*ConfigureResponse, error)
func (UnimplementedMiddlewarePluginServer) HandleRequest ¶
func (UnimplementedMiddlewarePluginServer) HandleRequest(context.Context, *HttpRequest) (*HttpResponse, error)
func (UnimplementedMiddlewarePluginServer) HealthCheck ¶
func (UnimplementedMiddlewarePluginServer) HealthCheck(context.Context, *Empty) (*HealthCheckResponse, error)
type UnsafeMiddlewarePluginServer ¶
type UnsafeMiddlewarePluginServer interface {
// contains filtered or unexported methods
}
UnsafeMiddlewarePluginServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to MiddlewarePluginServer will result in compilation errors.