v1

package
v0.0.0-...-f5c5fc0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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.

View Source
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.

View Source
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.

View Source
var File_proto_vatz_plugin_v1_plugin_proto protoreflect.FileDescriptor
View Source
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

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"`
	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

func (x *ExecuteResponse) GetAlertType() []ALERT_TYPE

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
const (
	SEVERITY_UNKNOWN  SEVERITY = 0
	SEVERITY_WARNING  SEVERITY = 1
	SEVERITY_ERROR    SEVERITY = 2
	SEVERITY_CRITICAL SEVERITY = 3
	SEVERITY_INFO     SEVERITY = 4
)

func (SEVERITY) Descriptor

func (SEVERITY) Descriptor() protoreflect.EnumDescriptor

func (SEVERITY) Enum

func (x SEVERITY) Enum() *SEVERITY

func (SEVERITY) EnumDescriptor deprecated

func (SEVERITY) EnumDescriptor() ([]byte, []int)

Deprecated: Use SEVERITY.Descriptor instead.

func (SEVERITY) Number

func (x SEVERITY) Number() protoreflect.EnumNumber

func (SEVERITY) String

func (x SEVERITY) String() string

func (SEVERITY) Type

type STATE

type STATE int32
const (
	STATE_NONE        STATE = 0
	STATE_PENDING     STATE = 1
	STATE_IN_PROGRESS STATE = 2
	STATE_SUCCESS     STATE = 3
	STATE_FAILURE     STATE = 4
	STATE_TIMEOUT     STATE = 5
)

func (STATE) Descriptor

func (STATE) Descriptor() protoreflect.EnumDescriptor

func (STATE) Enum

func (x STATE) Enum() *STATE

func (STATE) EnumDescriptor deprecated

func (STATE) EnumDescriptor() ([]byte, []int)

Deprecated: Use STATE.Descriptor instead.

func (STATE) Number

func (x STATE) Number() protoreflect.EnumNumber

func (STATE) String

func (x STATE) String() string

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) Verify

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

Jump to

Keyboard shortcuts

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