hook

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Hook_V1_FullMethodName = "/api.alarm.hook.Hook/V1"
	Hook_V2_FullMethodName = "/api.alarm.hook.Hook/V2"
)
View Source
const OperationHookV1 = "/api.alarm.hook.Hook/V1"
View Source
const OperationHookV2 = "/api.alarm.hook.Hook/V2"

Variables

View Source
var File_alarm_hook_hook_proto protoreflect.FileDescriptor
View Source
var Hook_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "api.alarm.hook.Hook",
	HandlerType: (*HookServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "V1",
			Handler:    _Hook_V1_Handler,
		},
		{
			MethodName: "V2",
			Handler:    _Hook_V2_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "alarm/hook/hook.proto",
}

Hook_ServiceDesc is the grpc.ServiceDesc for Hook service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterHookHTTPServer

func RegisterHookHTTPServer(s *http.Server, srv HookHTTPServer)

func RegisterHookServer

func RegisterHookServer(s grpc.ServiceRegistrar, srv HookServer)

Types

type AlertV1

type AlertV1 struct {

	// 告警状态, firing, resolved
	Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	// 标签
	Labels map[string]string `` /* 153-byte string literal not displayed */
	// 注解
	Annotations map[string]string `` /* 163-byte string literal not displayed */
	// 开始时间
	StartsAt string `protobuf:"bytes,4,opt,name=startsAt,proto3" json:"startsAt,omitempty"`
	// 结束时间, 空表示未结束
	EndsAt string `protobuf:"bytes,5,opt,name=endsAt,proto3" json:"endsAt,omitempty"`
	// 告警生成链接
	GeneratorURL string `protobuf:"bytes,6,opt,name=generatorURL,proto3" json:"generatorURL,omitempty"`
	// 指纹
	Fingerprint string `protobuf:"bytes,7,opt,name=fingerprint,proto3" json:"fingerprint,omitempty"`
	// contains filtered or unexported fields
}

告警明细

func (*AlertV1) Descriptor deprecated

func (*AlertV1) Descriptor() ([]byte, []int)

Deprecated: Use AlertV1.ProtoReflect.Descriptor instead.

func (*AlertV1) GetAnnotations

func (x *AlertV1) GetAnnotations() map[string]string

func (*AlertV1) GetEndsAt

func (x *AlertV1) GetEndsAt() string

func (*AlertV1) GetFingerprint

func (x *AlertV1) GetFingerprint() string

func (*AlertV1) GetGeneratorURL

func (x *AlertV1) GetGeneratorURL() string

func (*AlertV1) GetLabels

func (x *AlertV1) GetLabels() map[string]string

func (*AlertV1) GetStartsAt

func (x *AlertV1) GetStartsAt() string

func (*AlertV1) GetStatus

func (x *AlertV1) GetStatus() string

func (*AlertV1) ProtoMessage

func (*AlertV1) ProtoMessage()

func (*AlertV1) ProtoReflect

func (x *AlertV1) ProtoReflect() protoreflect.Message

func (*AlertV1) Reset

func (x *AlertV1) Reset()

func (*AlertV1) String

func (x *AlertV1) String() string

func (*AlertV1) Validate

func (m *AlertV1) Validate() error

Validate checks the field values on AlertV1 with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*AlertV1) ValidateAll

func (m *AlertV1) ValidateAll() error

ValidateAll checks the field values on AlertV1 with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in AlertV1MultiError, or nil if none found.

type AlertV1MultiError

type AlertV1MultiError []error

AlertV1MultiError is an error wrapping multiple validation errors returned by AlertV1.ValidateAll() if the designated constraints aren't met.

func (AlertV1MultiError) AllErrors

func (m AlertV1MultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (AlertV1MultiError) Error

func (m AlertV1MultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type AlertV1ValidationError

type AlertV1ValidationError struct {
	// contains filtered or unexported fields
}

AlertV1ValidationError is the validation error returned by AlertV1.Validate if the designated constraints aren't met.

func (AlertV1ValidationError) Cause

func (e AlertV1ValidationError) Cause() error

Cause function returns cause value.

func (AlertV1ValidationError) Error

func (e AlertV1ValidationError) Error() string

Error satisfies the builtin error interface

func (AlertV1ValidationError) ErrorName

func (e AlertV1ValidationError) ErrorName() string

ErrorName returns error name.

func (AlertV1ValidationError) Field

func (e AlertV1ValidationError) Field() string

Field function returns field value.

func (AlertV1ValidationError) Key

func (e AlertV1ValidationError) Key() bool

Key function returns key value.

func (AlertV1ValidationError) Reason

func (e AlertV1ValidationError) Reason() string

Reason function returns reason value.

type AlertV2 added in v0.0.16

type AlertV2 struct {

	// 告警状态, firing, resolved
	Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	// 标签
	Labels map[string]string `` /* 153-byte string literal not displayed */
	// 注解
	Annotations map[string]string `` /* 163-byte string literal not displayed */
	// 开始时间
	StartsAt string `protobuf:"bytes,4,opt,name=startsAt,proto3" json:"startsAt,omitempty"`
	// 结束时间, 空表示未结束
	EndsAt string `protobuf:"bytes,5,opt,name=endsAt,proto3" json:"endsAt,omitempty"`
	// 告警生成链接
	GeneratorURL string `protobuf:"bytes,6,opt,name=generatorURL,proto3" json:"generatorURL,omitempty"`
	// 指纹
	Fingerprint string `protobuf:"bytes,7,opt,name=fingerprint,proto3" json:"fingerprint,omitempty"`
	// contains filtered or unexported fields
}

告警明细

func (*AlertV2) Descriptor deprecated added in v0.0.16

func (*AlertV2) Descriptor() ([]byte, []int)

Deprecated: Use AlertV2.ProtoReflect.Descriptor instead.

func (*AlertV2) GetAnnotations added in v0.0.16

func (x *AlertV2) GetAnnotations() map[string]string

func (*AlertV2) GetEndsAt added in v0.0.16

func (x *AlertV2) GetEndsAt() string

func (*AlertV2) GetFingerprint added in v0.0.16

func (x *AlertV2) GetFingerprint() string

func (*AlertV2) GetGeneratorURL added in v0.0.16

func (x *AlertV2) GetGeneratorURL() string

func (*AlertV2) GetLabels added in v0.0.16

func (x *AlertV2) GetLabels() map[string]string

func (*AlertV2) GetStartsAt added in v0.0.16

func (x *AlertV2) GetStartsAt() string

func (*AlertV2) GetStatus added in v0.0.16

func (x *AlertV2) GetStatus() string

func (*AlertV2) ProtoMessage added in v0.0.16

func (*AlertV2) ProtoMessage()

func (*AlertV2) ProtoReflect added in v0.0.16

func (x *AlertV2) ProtoReflect() protoreflect.Message

func (*AlertV2) Reset added in v0.0.16

func (x *AlertV2) Reset()

func (*AlertV2) String added in v0.0.16

func (x *AlertV2) String() string

func (*AlertV2) Validate added in v0.0.16

func (m *AlertV2) Validate() error

Validate checks the field values on AlertV2 with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*AlertV2) ValidateAll added in v0.0.16

func (m *AlertV2) ValidateAll() error

ValidateAll checks the field values on AlertV2 with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in AlertV2MultiError, or nil if none found.

type AlertV2MultiError added in v0.0.16

type AlertV2MultiError []error

AlertV2MultiError is an error wrapping multiple validation errors returned by AlertV2.ValidateAll() if the designated constraints aren't met.

func (AlertV2MultiError) AllErrors added in v0.0.16

func (m AlertV2MultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (AlertV2MultiError) Error added in v0.0.16

func (m AlertV2MultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type AlertV2ValidationError added in v0.0.16

type AlertV2ValidationError struct {
	// contains filtered or unexported fields
}

AlertV2ValidationError is the validation error returned by AlertV2.Validate if the designated constraints aren't met.

func (AlertV2ValidationError) Cause added in v0.0.16

func (e AlertV2ValidationError) Cause() error

Cause function returns cause value.

func (AlertV2ValidationError) Error added in v0.0.16

func (e AlertV2ValidationError) Error() string

Error satisfies the builtin error interface

func (AlertV2ValidationError) ErrorName added in v0.0.16

func (e AlertV2ValidationError) ErrorName() string

ErrorName returns error name.

func (AlertV2ValidationError) Field added in v0.0.16

func (e AlertV2ValidationError) Field() string

Field function returns field value.

func (AlertV2ValidationError) Key added in v0.0.16

func (e AlertV2ValidationError) Key() bool

Key function returns key value.

func (AlertV2ValidationError) Reason added in v0.0.16

func (e AlertV2ValidationError) Reason() string

Reason function returns reason value.

type HookClient

type HookClient interface {
	// 接收prometheus报警hook请求
	V1(ctx context.Context, in *HookV1Request, opts ...grpc.CallOption) (*HookV1Reply, error)
	// 接收prometheus报警hook请求
	V2(ctx context.Context, in *HookV2Request, opts ...grpc.CallOption) (*HookV2Reply, error)
}

HookClient is the client API for Hook 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 NewHookClient

func NewHookClient(cc grpc.ClientConnInterface) HookClient

type HookHTTPClient

type HookHTTPClient interface {
	V1(ctx context.Context, req *HookV1Request, opts ...http.CallOption) (rsp *HookV1Reply, err error)
	V2(ctx context.Context, req *HookV2Request, opts ...http.CallOption) (rsp *HookV2Reply, err error)
}

func NewHookHTTPClient

func NewHookHTTPClient(client *http.Client) HookHTTPClient

type HookHTTPClientImpl

type HookHTTPClientImpl struct {
	// contains filtered or unexported fields
}

func (*HookHTTPClientImpl) V1

func (*HookHTTPClientImpl) V2 added in v0.0.16

type HookHTTPServer

type HookHTTPServer interface {
	// V1 接收prometheus报警hook请求
	V1(context.Context, *HookV1Request) (*HookV1Reply, error)
	// V2 接收prometheus报警hook请求
	V2(context.Context, *HookV2Request) (*HookV2Reply, error)
}

type HookServer

type HookServer interface {
	// 接收prometheus报警hook请求
	V1(context.Context, *HookV1Request) (*HookV1Reply, error)
	// 接收prometheus报警hook请求
	V2(context.Context, *HookV2Request) (*HookV2Reply, error)
	// contains filtered or unexported methods
}

HookServer is the server API for Hook service. All implementations must embed UnimplementedHookServer for forward compatibility

type HookV1Reply

type HookV1Reply struct {

	// 响应消息
	Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
	// 响应码
	Code int32 `protobuf:"varint,2,opt,name=code,proto3" json:"code,omitempty"`
	// contains filtered or unexported fields
}

接收prometheus报警hook请求返回

func (*HookV1Reply) Descriptor deprecated

func (*HookV1Reply) Descriptor() ([]byte, []int)

Deprecated: Use HookV1Reply.ProtoReflect.Descriptor instead.

func (*HookV1Reply) GetCode

func (x *HookV1Reply) GetCode() int32

func (*HookV1Reply) GetMsg

func (x *HookV1Reply) GetMsg() string

func (*HookV1Reply) ProtoMessage

func (*HookV1Reply) ProtoMessage()

func (*HookV1Reply) ProtoReflect

func (x *HookV1Reply) ProtoReflect() protoreflect.Message

func (*HookV1Reply) Reset

func (x *HookV1Reply) Reset()

func (*HookV1Reply) String

func (x *HookV1Reply) String() string

func (*HookV1Reply) Validate

func (m *HookV1Reply) Validate() error

Validate checks the field values on HookV1Reply with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*HookV1Reply) ValidateAll

func (m *HookV1Reply) ValidateAll() error

ValidateAll checks the field values on HookV1Reply with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in HookV1ReplyMultiError, or nil if none found.

type HookV1ReplyMultiError

type HookV1ReplyMultiError []error

HookV1ReplyMultiError is an error wrapping multiple validation errors returned by HookV1Reply.ValidateAll() if the designated constraints aren't met.

func (HookV1ReplyMultiError) AllErrors

func (m HookV1ReplyMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (HookV1ReplyMultiError) Error

func (m HookV1ReplyMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type HookV1ReplyValidationError

type HookV1ReplyValidationError struct {
	// contains filtered or unexported fields
}

HookV1ReplyValidationError is the validation error returned by HookV1Reply.Validate if the designated constraints aren't met.

func (HookV1ReplyValidationError) Cause

Cause function returns cause value.

func (HookV1ReplyValidationError) Error

Error satisfies the builtin error interface

func (HookV1ReplyValidationError) ErrorName

func (e HookV1ReplyValidationError) ErrorName() string

ErrorName returns error name.

func (HookV1ReplyValidationError) Field

Field function returns field value.

func (HookV1ReplyValidationError) Key

Key function returns key value.

func (HookV1ReplyValidationError) Reason

Reason function returns reason value.

type HookV1Request

type HookV1Request struct {

	// 接收者
	Receiver string `protobuf:"bytes,1,opt,name=receiver,proto3" json:"receiver,omitempty"`
	// 报警状态, firing, resolved
	Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`
	// 告警列表
	Alerts []*AlertV1 `protobuf:"bytes,3,rep,name=alerts,proto3" json:"alerts,omitempty"`
	// 告警组标签
	GroupLabels map[string]string `` /* 163-byte string literal not displayed */
	// 公共标签
	CommonLabels map[string]string `` /* 165-byte string literal not displayed */
	// 公共注解
	CommonAnnotations map[string]string `` /* 175-byte string literal not displayed */
	// 外部链接
	ExternalURL string `protobuf:"bytes,7,opt,name=externalURL,proto3" json:"externalURL,omitempty"`
	// 版本
	Version string `protobuf:"bytes,8,opt,name=version,proto3" json:"version,omitempty"`
	// 告警组key
	GroupKey string `protobuf:"bytes,9,opt,name=groupKey,proto3" json:"groupKey,omitempty"`
	// 截断告警数
	TruncatedAlerts int32 `protobuf:"varint,10,opt,name=truncatedAlerts,proto3" json:"truncatedAlerts,omitempty"`
	// contains filtered or unexported fields
}

prometheus webhook 报警数据

func (*HookV1Request) Descriptor deprecated

func (*HookV1Request) Descriptor() ([]byte, []int)

Deprecated: Use HookV1Request.ProtoReflect.Descriptor instead.

func (*HookV1Request) GetAlerts

func (x *HookV1Request) GetAlerts() []*AlertV1

func (*HookV1Request) GetCommonAnnotations

func (x *HookV1Request) GetCommonAnnotations() map[string]string

func (*HookV1Request) GetCommonLabels

func (x *HookV1Request) GetCommonLabels() map[string]string

func (*HookV1Request) GetExternalURL

func (x *HookV1Request) GetExternalURL() string

func (*HookV1Request) GetGroupKey

func (x *HookV1Request) GetGroupKey() string

func (*HookV1Request) GetGroupLabels

func (x *HookV1Request) GetGroupLabels() map[string]string

func (*HookV1Request) GetReceiver

func (x *HookV1Request) GetReceiver() string

func (*HookV1Request) GetStatus

func (x *HookV1Request) GetStatus() string

func (*HookV1Request) GetTruncatedAlerts

func (x *HookV1Request) GetTruncatedAlerts() int32

func (*HookV1Request) GetVersion

func (x *HookV1Request) GetVersion() string

func (*HookV1Request) ProtoMessage

func (*HookV1Request) ProtoMessage()

func (*HookV1Request) ProtoReflect

func (x *HookV1Request) ProtoReflect() protoreflect.Message

func (*HookV1Request) Reset

func (x *HookV1Request) Reset()

func (*HookV1Request) String

func (x *HookV1Request) String() string

func (*HookV1Request) Validate

func (m *HookV1Request) Validate() error

Validate checks the field values on HookV1Request with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*HookV1Request) ValidateAll

func (m *HookV1Request) ValidateAll() error

ValidateAll checks the field values on HookV1Request with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in HookV1RequestMultiError, or nil if none found.

type HookV1RequestMultiError

type HookV1RequestMultiError []error

HookV1RequestMultiError is an error wrapping multiple validation errors returned by HookV1Request.ValidateAll() if the designated constraints aren't met.

func (HookV1RequestMultiError) AllErrors

func (m HookV1RequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (HookV1RequestMultiError) Error

func (m HookV1RequestMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type HookV1RequestValidationError

type HookV1RequestValidationError struct {
	// contains filtered or unexported fields
}

HookV1RequestValidationError is the validation error returned by HookV1Request.Validate if the designated constraints aren't met.

func (HookV1RequestValidationError) Cause

Cause function returns cause value.

func (HookV1RequestValidationError) Error

Error satisfies the builtin error interface

func (HookV1RequestValidationError) ErrorName

func (e HookV1RequestValidationError) ErrorName() string

ErrorName returns error name.

func (HookV1RequestValidationError) Field

Field function returns field value.

func (HookV1RequestValidationError) Key

Key function returns key value.

func (HookV1RequestValidationError) Reason

Reason function returns reason value.

type HookV2Reply added in v0.0.16

type HookV2Reply struct {

	// 响应消息
	Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
	// 响应码
	Code int32 `protobuf:"varint,2,opt,name=code,proto3" json:"code,omitempty"`
	// contains filtered or unexported fields
}

接收prometheus报警hook请求返回

func (*HookV2Reply) Descriptor deprecated added in v0.0.16

func (*HookV2Reply) Descriptor() ([]byte, []int)

Deprecated: Use HookV2Reply.ProtoReflect.Descriptor instead.

func (*HookV2Reply) GetCode added in v0.0.16

func (x *HookV2Reply) GetCode() int32

func (*HookV2Reply) GetMsg added in v0.0.16

func (x *HookV2Reply) GetMsg() string

func (*HookV2Reply) ProtoMessage added in v0.0.16

func (*HookV2Reply) ProtoMessage()

func (*HookV2Reply) ProtoReflect added in v0.0.16

func (x *HookV2Reply) ProtoReflect() protoreflect.Message

func (*HookV2Reply) Reset added in v0.0.16

func (x *HookV2Reply) Reset()

func (*HookV2Reply) String added in v0.0.16

func (x *HookV2Reply) String() string

func (*HookV2Reply) Validate added in v0.0.16

func (m *HookV2Reply) Validate() error

Validate checks the field values on HookV2Reply with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*HookV2Reply) ValidateAll added in v0.0.16

func (m *HookV2Reply) ValidateAll() error

ValidateAll checks the field values on HookV2Reply with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in HookV2ReplyMultiError, or nil if none found.

type HookV2ReplyMultiError added in v0.0.16

type HookV2ReplyMultiError []error

HookV2ReplyMultiError is an error wrapping multiple validation errors returned by HookV2Reply.ValidateAll() if the designated constraints aren't met.

func (HookV2ReplyMultiError) AllErrors added in v0.0.16

func (m HookV2ReplyMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (HookV2ReplyMultiError) Error added in v0.0.16

func (m HookV2ReplyMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type HookV2ReplyValidationError added in v0.0.16

type HookV2ReplyValidationError struct {
	// contains filtered or unexported fields
}

HookV2ReplyValidationError is the validation error returned by HookV2Reply.Validate if the designated constraints aren't met.

func (HookV2ReplyValidationError) Cause added in v0.0.16

Cause function returns cause value.

func (HookV2ReplyValidationError) Error added in v0.0.16

Error satisfies the builtin error interface

func (HookV2ReplyValidationError) ErrorName added in v0.0.16

func (e HookV2ReplyValidationError) ErrorName() string

ErrorName returns error name.

func (HookV2ReplyValidationError) Field added in v0.0.16

Field function returns field value.

func (HookV2ReplyValidationError) Key added in v0.0.16

Key function returns key value.

func (HookV2ReplyValidationError) Reason added in v0.0.16

Reason function returns reason value.

type HookV2Request added in v0.0.16

type HookV2Request struct {

	// 接收者
	Receiver string `protobuf:"bytes,1,opt,name=receiver,proto3" json:"receiver,omitempty"`
	// 报警状态, firing, resolved
	Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`
	// 告警列表
	Alerts []*AlertV2 `protobuf:"bytes,3,rep,name=alerts,proto3" json:"alerts,omitempty"`
	// 告警组标签
	GroupLabels map[string]string `` /* 163-byte string literal not displayed */
	// 公共标签
	CommonLabels map[string]string `` /* 165-byte string literal not displayed */
	// 公共注解
	CommonAnnotations map[string]string `` /* 175-byte string literal not displayed */
	// 外部链接
	ExternalURL string `protobuf:"bytes,7,opt,name=externalURL,proto3" json:"externalURL,omitempty"`
	// 版本
	Version string `protobuf:"bytes,8,opt,name=version,proto3" json:"version,omitempty"`
	// 告警组key
	GroupKey string `protobuf:"bytes,9,opt,name=groupKey,proto3" json:"groupKey,omitempty"`
	// 截断告警数
	TruncatedAlerts int32 `protobuf:"varint,10,opt,name=truncatedAlerts,proto3" json:"truncatedAlerts,omitempty"`
	// contains filtered or unexported fields
}

prometheus webhook 报警数据

func (*HookV2Request) Descriptor deprecated added in v0.0.16

func (*HookV2Request) Descriptor() ([]byte, []int)

Deprecated: Use HookV2Request.ProtoReflect.Descriptor instead.

func (*HookV2Request) GetAlerts added in v0.0.16

func (x *HookV2Request) GetAlerts() []*AlertV2

func (*HookV2Request) GetCommonAnnotations added in v0.0.16

func (x *HookV2Request) GetCommonAnnotations() map[string]string

func (*HookV2Request) GetCommonLabels added in v0.0.16

func (x *HookV2Request) GetCommonLabels() map[string]string

func (*HookV2Request) GetExternalURL added in v0.0.16

func (x *HookV2Request) GetExternalURL() string

func (*HookV2Request) GetGroupKey added in v0.0.16

func (x *HookV2Request) GetGroupKey() string

func (*HookV2Request) GetGroupLabels added in v0.0.16

func (x *HookV2Request) GetGroupLabels() map[string]string

func (*HookV2Request) GetReceiver added in v0.0.16

func (x *HookV2Request) GetReceiver() string

func (*HookV2Request) GetStatus added in v0.0.16

func (x *HookV2Request) GetStatus() string

func (*HookV2Request) GetTruncatedAlerts added in v0.0.16

func (x *HookV2Request) GetTruncatedAlerts() int32

func (*HookV2Request) GetVersion added in v0.0.16

func (x *HookV2Request) GetVersion() string

func (*HookV2Request) ProtoMessage added in v0.0.16

func (*HookV2Request) ProtoMessage()

func (*HookV2Request) ProtoReflect added in v0.0.16

func (x *HookV2Request) ProtoReflect() protoreflect.Message

func (*HookV2Request) Reset added in v0.0.16

func (x *HookV2Request) Reset()

func (*HookV2Request) String added in v0.0.16

func (x *HookV2Request) String() string

func (*HookV2Request) Validate added in v0.0.16

func (m *HookV2Request) Validate() error

Validate checks the field values on HookV2Request with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*HookV2Request) ValidateAll added in v0.0.16

func (m *HookV2Request) ValidateAll() error

ValidateAll checks the field values on HookV2Request with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in HookV2RequestMultiError, or nil if none found.

type HookV2RequestMultiError added in v0.0.16

type HookV2RequestMultiError []error

HookV2RequestMultiError is an error wrapping multiple validation errors returned by HookV2Request.ValidateAll() if the designated constraints aren't met.

func (HookV2RequestMultiError) AllErrors added in v0.0.16

func (m HookV2RequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (HookV2RequestMultiError) Error added in v0.0.16

func (m HookV2RequestMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type HookV2RequestValidationError added in v0.0.16

type HookV2RequestValidationError struct {
	// contains filtered or unexported fields
}

HookV2RequestValidationError is the validation error returned by HookV2Request.Validate if the designated constraints aren't met.

func (HookV2RequestValidationError) Cause added in v0.0.16

Cause function returns cause value.

func (HookV2RequestValidationError) Error added in v0.0.16

Error satisfies the builtin error interface

func (HookV2RequestValidationError) ErrorName added in v0.0.16

func (e HookV2RequestValidationError) ErrorName() string

ErrorName returns error name.

func (HookV2RequestValidationError) Field added in v0.0.16

Field function returns field value.

func (HookV2RequestValidationError) Key added in v0.0.16

Key function returns key value.

func (HookV2RequestValidationError) Reason added in v0.0.16

Reason function returns reason value.

type UnimplementedHookServer

type UnimplementedHookServer struct {
}

UnimplementedHookServer must be embedded to have forward compatible implementations.

func (UnimplementedHookServer) V1

func (UnimplementedHookServer) V2 added in v0.0.16

type UnsafeHookServer

type UnsafeHookServer interface {
	// contains filtered or unexported methods
}

UnsafeHookServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to HookServer will result in compilation errors.

Jump to

Keyboard shortcuts

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