Documentation ¶
Index ¶
- Variables
- func RegisterPluginServer(s grpc.ServiceRegistrar, srv PluginServer)
- type ALERT_TYPE
- type CollectorVerifyInfo
- func (*CollectorVerifyInfo) Descriptor() ([]byte, []int)deprecated
- func (x *CollectorVerifyInfo) GetOptions() *structpb.Struct
- func (*CollectorVerifyInfo) ProtoMessage()
- func (x *CollectorVerifyInfo) ProtoReflect() protoreflect.Message
- func (x *CollectorVerifyInfo) Reset()
- func (x *CollectorVerifyInfo) String() string
- type ExecuteRequest
- func (*ExecuteRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ExecuteRequest) GetExecuteInfo() *structpb.Struct
- func (x *ExecuteRequest) GetOptions() *structpb.Struct
- func (*ExecuteRequest) ProtoMessage()
- func (x *ExecuteRequest) ProtoReflect() protoreflect.Message
- func (x *ExecuteRequest) Reset()
- func (x *ExecuteRequest) String() string
- type ExecuteResponse
- func (*ExecuteResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ExecuteResponse) GetAlertType() []ALERT_TYPEdeprecated
- func (x *ExecuteResponse) GetMessage() string
- func (x *ExecuteResponse) GetResourceType() string
- func (x *ExecuteResponse) GetSeverity() SEVERITY
- func (x *ExecuteResponse) GetState() STATE
- func (*ExecuteResponse) ProtoMessage()
- func (x *ExecuteResponse) ProtoReflect() protoreflect.Message
- func (x *ExecuteResponse) Reset()
- func (x *ExecuteResponse) String() string
- type PluginClient
- type PluginServer
- type SEVERITY
- type STATE
- type UnimplementedPluginServer
- type UnsafePluginServer
- type VerifyInfo
Constants ¶
This section is empty.
Variables ¶
var ( ALERT_TYPE_name = map[int32]string{ 0: "DISCORD", 1: "PAGER_DUTY", } ALERT_TYPE_value = map[string]int32{ "DISCORD": 0, "PAGER_DUTY": 1, } )
Enum value maps for ALERT_TYPE.
var ( STATE_name = map[int32]string{ 0: "NONE", 1: "PENDING", 2: "IN_PROGRESS", 3: "SUCCESS", 4: "FAILURE", 5: "TIMEOUT", } STATE_value = map[string]int32{ "NONE": 0, "PENDING": 1, "IN_PROGRESS": 2, "SUCCESS": 3, "FAILURE": 4, "TIMEOUT": 5, } )
Enum value maps for STATE.
var ( SEVERITY_name = map[int32]string{ 0: "UNKNOWN", 1: "WARNING", 2: "ERROR", 3: "CRITICAL", 4: "INFO", } SEVERITY_value = map[string]int32{ "UNKNOWN": 0, "WARNING": 1, "ERROR": 2, "CRITICAL": 3, "INFO": 4, } )
Enum value maps for SEVERITY.
var File_proto_vatz_plugin_v1_plugin_proto protoreflect.FileDescriptor
var Plugin_ServiceDesc = grpc.ServiceDesc{ ServiceName: "vatz.plugin.Plugin", HandlerType: (*PluginServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "verify", Handler: _Plugin_Verify_Handler, }, { MethodName: "execute", Handler: _Plugin_Execute_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/vatz/plugin/v1/plugin.proto", }
Plugin_ServiceDesc is the grpc.ServiceDesc for Plugin service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterPluginServer ¶
func RegisterPluginServer(s grpc.ServiceRegistrar, srv PluginServer)
Types ¶
type ALERT_TYPE ¶
type ALERT_TYPE int32
const ( ALERT_TYPE_DISCORD ALERT_TYPE = 0 ALERT_TYPE_PAGER_DUTY ALERT_TYPE = 1 )
func (ALERT_TYPE) Descriptor ¶
func (ALERT_TYPE) Descriptor() protoreflect.EnumDescriptor
func (ALERT_TYPE) Enum ¶
func (x ALERT_TYPE) Enum() *ALERT_TYPE
func (ALERT_TYPE) EnumDescriptor
deprecated
func (ALERT_TYPE) EnumDescriptor() ([]byte, []int)
Deprecated: Use ALERT_TYPE.Descriptor instead.
func (ALERT_TYPE) Number ¶
func (x ALERT_TYPE) Number() protoreflect.EnumNumber
func (ALERT_TYPE) String ¶
func (x ALERT_TYPE) String() string
func (ALERT_TYPE) Type ¶
func (ALERT_TYPE) Type() protoreflect.EnumType
type CollectorVerifyInfo ¶
type CollectorVerifyInfo struct { Options *structpb.Struct `protobuf:"bytes,1,opt,name=options,proto3" json:"options,omitempty"` // contains filtered or unexported fields }
func (*CollectorVerifyInfo) Descriptor
deprecated
func (*CollectorVerifyInfo) Descriptor() ([]byte, []int)
Deprecated: Use CollectorVerifyInfo.ProtoReflect.Descriptor instead.
func (*CollectorVerifyInfo) GetOptions ¶
func (x *CollectorVerifyInfo) GetOptions() *structpb.Struct
func (*CollectorVerifyInfo) ProtoMessage ¶
func (*CollectorVerifyInfo) ProtoMessage()
func (*CollectorVerifyInfo) ProtoReflect ¶
func (x *CollectorVerifyInfo) ProtoReflect() protoreflect.Message
func (*CollectorVerifyInfo) Reset ¶
func (x *CollectorVerifyInfo) Reset()
func (*CollectorVerifyInfo) String ¶
func (x *CollectorVerifyInfo) String() string
type ExecuteRequest ¶
type ExecuteRequest struct { //is_required: True ExecuteInfo *structpb.Struct `protobuf:"bytes,1,opt,name=execute_info,json=executeInfo,proto3" json:"execute_info,omitempty"` //is_required: True Options *structpb.Struct `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"` // contains filtered or unexported fields }
func (*ExecuteRequest) Descriptor
deprecated
func (*ExecuteRequest) Descriptor() ([]byte, []int)
Deprecated: Use ExecuteRequest.ProtoReflect.Descriptor instead.
func (*ExecuteRequest) GetExecuteInfo ¶
func (x *ExecuteRequest) GetExecuteInfo() *structpb.Struct
func (*ExecuteRequest) GetOptions ¶
func (x *ExecuteRequest) GetOptions() *structpb.Struct
func (*ExecuteRequest) ProtoMessage ¶
func (*ExecuteRequest) ProtoMessage()
func (*ExecuteRequest) ProtoReflect ¶
func (x *ExecuteRequest) ProtoReflect() protoreflect.Message
func (*ExecuteRequest) Reset ¶
func (x *ExecuteRequest) Reset()
func (*ExecuteRequest) String ¶
func (x *ExecuteRequest) String() string
type ExecuteResponse ¶
type ExecuteResponse struct { State STATE `protobuf:"varint,1,opt,name=state,proto3,enum=vatz.plugin.STATE" json:"state,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // Deprecated: Do not use. AlertType []ALERT_TYPE `protobuf:"varint,3,rep,packed,name=alert_type,json=alertType,proto3,enum=vatz.plugin.ALERT_TYPE" json:"alert_type,omitempty"` Severity SEVERITY `protobuf:"varint,4,opt,name=severity,proto3,enum=vatz.plugin.SEVERITY" json:"severity,omitempty"` ResourceType string `protobuf:"bytes,5,opt,name=resource_type,json=resourceType,proto3" json:"resource_type,omitempty"` // contains filtered or unexported fields }
func (*ExecuteResponse) Descriptor
deprecated
func (*ExecuteResponse) Descriptor() ([]byte, []int)
Deprecated: Use ExecuteResponse.ProtoReflect.Descriptor instead.
func (*ExecuteResponse) GetAlertType
deprecated
func (x *ExecuteResponse) GetAlertType() []ALERT_TYPE
Deprecated: Do not use.
func (*ExecuteResponse) GetMessage ¶
func (x *ExecuteResponse) GetMessage() string
func (*ExecuteResponse) GetResourceType ¶
func (x *ExecuteResponse) GetResourceType() string
func (*ExecuteResponse) GetSeverity ¶
func (x *ExecuteResponse) GetSeverity() SEVERITY
func (*ExecuteResponse) GetState ¶
func (x *ExecuteResponse) GetState() STATE
func (*ExecuteResponse) ProtoMessage ¶
func (*ExecuteResponse) ProtoMessage()
func (*ExecuteResponse) ProtoReflect ¶
func (x *ExecuteResponse) ProtoReflect() protoreflect.Message
func (*ExecuteResponse) Reset ¶
func (x *ExecuteResponse) Reset()
func (*ExecuteResponse) String ¶
func (x *ExecuteResponse) String() string
type PluginClient ¶
type PluginClient interface { Verify(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*VerifyInfo, error) Execute(ctx context.Context, in *ExecuteRequest, opts ...grpc.CallOption) (*ExecuteResponse, error) }
PluginClient is the client API for Plugin 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 NewPluginClient ¶
func NewPluginClient(cc grpc.ClientConnInterface) PluginClient
type PluginServer ¶
type PluginServer interface { Verify(context.Context, *emptypb.Empty) (*VerifyInfo, error) Execute(context.Context, *ExecuteRequest) (*ExecuteResponse, error) // contains filtered or unexported methods }
PluginServer is the server API for Plugin service. All implementations must embed UnimplementedPluginServer for forward compatibility
type SEVERITY ¶
type SEVERITY int32
func (SEVERITY) Descriptor ¶
func (SEVERITY) Descriptor() protoreflect.EnumDescriptor
func (SEVERITY) EnumDescriptor
deprecated
func (SEVERITY) Number ¶
func (x SEVERITY) Number() protoreflect.EnumNumber
func (SEVERITY) Type ¶
func (SEVERITY) Type() protoreflect.EnumType
type STATE ¶
type STATE int32
func (STATE) Descriptor ¶
func (STATE) Descriptor() protoreflect.EnumDescriptor
func (STATE) EnumDescriptor
deprecated
func (STATE) Number ¶
func (x STATE) Number() protoreflect.EnumNumber
func (STATE) Type ¶
func (STATE) Type() protoreflect.EnumType
type UnimplementedPluginServer ¶
type UnimplementedPluginServer struct { }
UnimplementedPluginServer must be embedded to have forward compatible implementations.
func (UnimplementedPluginServer) Execute ¶
func (UnimplementedPluginServer) Execute(context.Context, *ExecuteRequest) (*ExecuteResponse, error)
func (UnimplementedPluginServer) Verify ¶
func (UnimplementedPluginServer) Verify(context.Context, *emptypb.Empty) (*VerifyInfo, error)
type UnsafePluginServer ¶
type UnsafePluginServer interface {
// contains filtered or unexported methods
}
UnsafePluginServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PluginServer will result in compilation errors.
type VerifyInfo ¶
type VerifyInfo struct { VerifyMsg string `protobuf:"bytes,1,opt,name=verify_msg,json=verifyMsg,proto3" json:"verify_msg,omitempty"` // contains filtered or unexported fields }
func (*VerifyInfo) Descriptor
deprecated
func (*VerifyInfo) Descriptor() ([]byte, []int)
Deprecated: Use VerifyInfo.ProtoReflect.Descriptor instead.
func (*VerifyInfo) GetVerifyMsg ¶
func (x *VerifyInfo) GetVerifyMsg() string
func (*VerifyInfo) ProtoMessage ¶
func (*VerifyInfo) ProtoMessage()
func (*VerifyInfo) ProtoReflect ¶
func (x *VerifyInfo) ProtoReflect() protoreflect.Message
func (*VerifyInfo) Reset ¶
func (x *VerifyInfo) Reset()
func (*VerifyInfo) String ¶
func (x *VerifyInfo) String() string