history

package
v0.0.27 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2024 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	History_GetHistory_FullMethodName  = "/api.server.alarm.history.History/GetHistory"
	History_ListHistory_FullMethodName = "/api.server.alarm.history.History/ListHistory"
)
View Source
const OperationHistoryGetHistory = "/api.server.alarm.history.History/GetHistory"
View Source
const OperationHistoryListHistory = "/api.server.alarm.history.History/ListHistory"

Variables

View Source
var File_server_alarm_history_history_proto protoreflect.FileDescriptor
View Source
var History_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "api.server.alarm.history.History",
	HandlerType: (*HistoryServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetHistory",
			Handler:    _History_GetHistory_Handler,
		},
		{
			MethodName: "ListHistory",
			Handler:    _History_ListHistory_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "server/alarm/history/history.proto",
}

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

Functions

func RegisterHistoryHTTPServer

func RegisterHistoryHTTPServer(s *http.Server, srv HistoryHTTPServer)

func RegisterHistoryServer

func RegisterHistoryServer(s grpc.ServiceRegistrar, srv HistoryServer)

Types

type GetHistoryReply

type GetHistoryReply struct {

	// 报警历史详情
	AlarmHistory *api.AlarmHistoryV1 `protobuf:"bytes,1,opt,name=alarmHistory,proto3" json:"alarmHistory,omitempty"`
	// contains filtered or unexported fields
}

获取报警历史详情响应参数

func (*GetHistoryReply) Descriptor deprecated

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

Deprecated: Use GetHistoryReply.ProtoReflect.Descriptor instead.

func (*GetHistoryReply) GetAlarmHistory

func (x *GetHistoryReply) GetAlarmHistory() *api.AlarmHistoryV1

func (*GetHistoryReply) ProtoMessage

func (*GetHistoryReply) ProtoMessage()

func (*GetHistoryReply) ProtoReflect

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

func (*GetHistoryReply) Reset

func (x *GetHistoryReply) Reset()

func (*GetHistoryReply) String

func (x *GetHistoryReply) String() string

func (*GetHistoryReply) Validate

func (m *GetHistoryReply) Validate() error

Validate checks the field values on GetHistoryReply 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 (*GetHistoryReply) ValidateAll

func (m *GetHistoryReply) ValidateAll() error

ValidateAll checks the field values on GetHistoryReply 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 GetHistoryReplyMultiError, or nil if none found.

type GetHistoryReplyMultiError

type GetHistoryReplyMultiError []error

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

func (GetHistoryReplyMultiError) AllErrors

func (m GetHistoryReplyMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GetHistoryReplyMultiError) Error

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

type GetHistoryReplyValidationError

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

GetHistoryReplyValidationError is the validation error returned by GetHistoryReply.Validate if the designated constraints aren't met.

func (GetHistoryReplyValidationError) Cause

Cause function returns cause value.

func (GetHistoryReplyValidationError) Error

Error satisfies the builtin error interface

func (GetHistoryReplyValidationError) ErrorName

func (e GetHistoryReplyValidationError) ErrorName() string

ErrorName returns error name.

func (GetHistoryReplyValidationError) Field

Field function returns field value.

func (GetHistoryReplyValidationError) Key

Key function returns key value.

func (GetHistoryReplyValidationError) Reason

Reason function returns reason value.

type GetHistoryRequest

type GetHistoryRequest struct {

	// 报警历史ID, 0 < id
	Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

获取报警历史详情请求参数

func (*GetHistoryRequest) Descriptor deprecated

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

Deprecated: Use GetHistoryRequest.ProtoReflect.Descriptor instead.

func (*GetHistoryRequest) GetId

func (x *GetHistoryRequest) GetId() uint32

func (*GetHistoryRequest) ProtoMessage

func (*GetHistoryRequest) ProtoMessage()

func (*GetHistoryRequest) ProtoReflect

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

func (*GetHistoryRequest) Reset

func (x *GetHistoryRequest) Reset()

func (*GetHistoryRequest) String

func (x *GetHistoryRequest) String() string

func (*GetHistoryRequest) Validate

func (m *GetHistoryRequest) Validate() error

Validate checks the field values on GetHistoryRequest 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 (*GetHistoryRequest) ValidateAll

func (m *GetHistoryRequest) ValidateAll() error

ValidateAll checks the field values on GetHistoryRequest 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 GetHistoryRequestMultiError, or nil if none found.

type GetHistoryRequestMultiError

type GetHistoryRequestMultiError []error

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

func (GetHistoryRequestMultiError) AllErrors

func (m GetHistoryRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GetHistoryRequestMultiError) Error

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

type GetHistoryRequestValidationError

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

GetHistoryRequestValidationError is the validation error returned by GetHistoryRequest.Validate if the designated constraints aren't met.

func (GetHistoryRequestValidationError) Cause

Cause function returns cause value.

func (GetHistoryRequestValidationError) Error

Error satisfies the builtin error interface

func (GetHistoryRequestValidationError) ErrorName

ErrorName returns error name.

func (GetHistoryRequestValidationError) Field

Field function returns field value.

func (GetHistoryRequestValidationError) Key

Key function returns key value.

func (GetHistoryRequestValidationError) Reason

Reason function returns reason value.

type HistoryClient

type HistoryClient interface {
	// 获取报警历史详情
	GetHistory(ctx context.Context, in *GetHistoryRequest, opts ...grpc.CallOption) (*GetHistoryReply, error)
	// 获取报警历史列表
	ListHistory(ctx context.Context, in *ListHistoryRequest, opts ...grpc.CallOption) (*ListHistoryReply, error)
}

HistoryClient is the client API for History 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 NewHistoryClient

func NewHistoryClient(cc grpc.ClientConnInterface) HistoryClient

type HistoryHTTPClient

type HistoryHTTPClient interface {
	GetHistory(ctx context.Context, req *GetHistoryRequest, opts ...http.CallOption) (rsp *GetHistoryReply, err error)
	ListHistory(ctx context.Context, req *ListHistoryRequest, opts ...http.CallOption) (rsp *ListHistoryReply, err error)
}

func NewHistoryHTTPClient

func NewHistoryHTTPClient(client *http.Client) HistoryHTTPClient

type HistoryHTTPClientImpl

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

func (*HistoryHTTPClientImpl) GetHistory

func (*HistoryHTTPClientImpl) ListHistory

type HistoryHTTPServer

type HistoryHTTPServer interface {
	// GetHistory 获取报警历史详情
	GetHistory(context.Context, *GetHistoryRequest) (*GetHistoryReply, error)
	// ListHistory 获取报警历史列表
	ListHistory(context.Context, *ListHistoryRequest) (*ListHistoryReply, error)
}

type HistoryServer

type HistoryServer interface {
	// 获取报警历史详情
	GetHistory(context.Context, *GetHistoryRequest) (*GetHistoryReply, error)
	// 获取报警历史列表
	ListHistory(context.Context, *ListHistoryRequest) (*ListHistoryReply, error)
	// contains filtered or unexported methods
}

HistoryServer is the server API for History service. All implementations must embed UnimplementedHistoryServer for forward compatibility

type ListHistoryReply

type ListHistoryReply struct {

	// 分页参数
	Page *api.PageReply `protobuf:"bytes,1,opt,name=page,proto3" json:"page,omitempty"`
	// 报警历史列表
	List []*api.AlarmHistoryV1 `protobuf:"bytes,2,rep,name=list,proto3" json:"list,omitempty"`
	// contains filtered or unexported fields
}

获取报警历史列表响应参数

func (*ListHistoryReply) Descriptor deprecated

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

Deprecated: Use ListHistoryReply.ProtoReflect.Descriptor instead.

func (*ListHistoryReply) GetList

func (x *ListHistoryReply) GetList() []*api.AlarmHistoryV1

func (*ListHistoryReply) GetPage

func (x *ListHistoryReply) GetPage() *api.PageReply

func (*ListHistoryReply) ProtoMessage

func (*ListHistoryReply) ProtoMessage()

func (*ListHistoryReply) ProtoReflect

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

func (*ListHistoryReply) Reset

func (x *ListHistoryReply) Reset()

func (*ListHistoryReply) String

func (x *ListHistoryReply) String() string

func (*ListHistoryReply) Validate

func (m *ListHistoryReply) Validate() error

Validate checks the field values on ListHistoryReply 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 (*ListHistoryReply) ValidateAll

func (m *ListHistoryReply) ValidateAll() error

ValidateAll checks the field values on ListHistoryReply 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 ListHistoryReplyMultiError, or nil if none found.

type ListHistoryReplyMultiError

type ListHistoryReplyMultiError []error

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

func (ListHistoryReplyMultiError) AllErrors

func (m ListHistoryReplyMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ListHistoryReplyMultiError) Error

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

type ListHistoryReplyValidationError

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

ListHistoryReplyValidationError is the validation error returned by ListHistoryReply.Validate if the designated constraints aren't met.

func (ListHistoryReplyValidationError) Cause

Cause function returns cause value.

func (ListHistoryReplyValidationError) Error

Error satisfies the builtin error interface

func (ListHistoryReplyValidationError) ErrorName

ErrorName returns error name.

func (ListHistoryReplyValidationError) Field

Field function returns field value.

func (ListHistoryReplyValidationError) Key

Key function returns key value.

func (ListHistoryReplyValidationError) Reason

Reason function returns reason value.

type ListHistoryRequest

type ListHistoryRequest struct {

	// 分页参数
	Page *api.PageRequest `protobuf:"bytes,1,opt,name=page,proto3" json:"page,omitempty"`
	// 关键字
	Keyword string `protobuf:"bytes,2,opt,name=keyword,proto3" json:"keyword,omitempty"`
	// 报警状态, 对应PromDictV1 id
	Status api.Status `protobuf:"varint,3,opt,name=status,proto3,enum=api.Status" json:"status,omitempty"`
	// 报警页面, 对应AlarmPageV1 id
	AlarmPages []uint32 `protobuf:"varint,4,rep,packed,name=alarmPages,proto3" json:"alarmPages,omitempty"`
	// 开始时间, unix时间戳
	FiringStartAt int64 `protobuf:"varint,5,opt,name=firingStartAt,proto3" json:"firingStartAt,omitempty"`
	// 结束时间, unix时间戳
	FiringEndAt int64 `protobuf:"varint,6,opt,name=firingEndAt,proto3" json:"firingEndAt,omitempty"`
	// 报警等级
	AlarmLevelIds []uint32 `protobuf:"varint,7,rep,packed,name=alarmLevelIds,proto3" json:"alarmLevelIds,omitempty"`
	// 告警策略
	StrategyIds []uint32 `protobuf:"varint,8,rep,packed,name=strategyIds,proto3" json:"strategyIds,omitempty"`
	// 恢复开始时间
	ResolvedStartAt int64 `protobuf:"varint,9,opt,name=resolvedStartAt,proto3" json:"resolvedStartAt,omitempty"`
	// 恢复结束时间
	ResolvedEndAt int64 `protobuf:"varint,10,opt,name=resolvedEndAt,proto3" json:"resolvedEndAt,omitempty"`
	// 持续时间
	Duration int64 `protobuf:"varint,11,opt,name=duration,proto3" json:"duration,omitempty"`
	// contains filtered or unexported fields
}

获取报警历史列表请求参数

func (*ListHistoryRequest) Descriptor deprecated

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

Deprecated: Use ListHistoryRequest.ProtoReflect.Descriptor instead.

func (*ListHistoryRequest) GetAlarmLevelIds

func (x *ListHistoryRequest) GetAlarmLevelIds() []uint32

func (*ListHistoryRequest) GetAlarmPages

func (x *ListHistoryRequest) GetAlarmPages() []uint32

func (*ListHistoryRequest) GetDuration

func (x *ListHistoryRequest) GetDuration() int64

func (*ListHistoryRequest) GetFiringEndAt

func (x *ListHistoryRequest) GetFiringEndAt() int64

func (*ListHistoryRequest) GetFiringStartAt

func (x *ListHistoryRequest) GetFiringStartAt() int64

func (*ListHistoryRequest) GetKeyword

func (x *ListHistoryRequest) GetKeyword() string

func (*ListHistoryRequest) GetPage

func (x *ListHistoryRequest) GetPage() *api.PageRequest

func (*ListHistoryRequest) GetResolvedEndAt

func (x *ListHistoryRequest) GetResolvedEndAt() int64

func (*ListHistoryRequest) GetResolvedStartAt

func (x *ListHistoryRequest) GetResolvedStartAt() int64

func (*ListHistoryRequest) GetStatus

func (x *ListHistoryRequest) GetStatus() api.Status

func (*ListHistoryRequest) GetStrategyIds

func (x *ListHistoryRequest) GetStrategyIds() []uint32

func (*ListHistoryRequest) ProtoMessage

func (*ListHistoryRequest) ProtoMessage()

func (*ListHistoryRequest) ProtoReflect

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

func (*ListHistoryRequest) Reset

func (x *ListHistoryRequest) Reset()

func (*ListHistoryRequest) String

func (x *ListHistoryRequest) String() string

func (*ListHistoryRequest) Validate

func (m *ListHistoryRequest) Validate() error

Validate checks the field values on ListHistoryRequest 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 (*ListHistoryRequest) ValidateAll

func (m *ListHistoryRequest) ValidateAll() error

ValidateAll checks the field values on ListHistoryRequest 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 ListHistoryRequestMultiError, or nil if none found.

type ListHistoryRequestMultiError

type ListHistoryRequestMultiError []error

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

func (ListHistoryRequestMultiError) AllErrors

func (m ListHistoryRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ListHistoryRequestMultiError) Error

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

type ListHistoryRequestValidationError

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

ListHistoryRequestValidationError is the validation error returned by ListHistoryRequest.Validate if the designated constraints aren't met.

func (ListHistoryRequestValidationError) Cause

Cause function returns cause value.

func (ListHistoryRequestValidationError) Error

Error satisfies the builtin error interface

func (ListHistoryRequestValidationError) ErrorName

ErrorName returns error name.

func (ListHistoryRequestValidationError) Field

Field function returns field value.

func (ListHistoryRequestValidationError) Key

Key function returns key value.

func (ListHistoryRequestValidationError) Reason

Reason function returns reason value.

type UnimplementedHistoryServer

type UnimplementedHistoryServer struct {
}

UnimplementedHistoryServer must be embedded to have forward compatible implementations.

func (UnimplementedHistoryServer) GetHistory

func (UnimplementedHistoryServer) ListHistory

type UnsafeHistoryServer

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

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

Jump to

Keyboard shortcuts

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