Documentation ¶
Index ¶
- Variables
- func RegisterWebhookServiceServer(s grpc.ServiceRegistrar, srv WebhookServiceServer)
- type EventReq
- type EventResp
- type EventStatus
- func (EventStatus) Descriptor() protoreflect.EnumDescriptor
- func (x EventStatus) Enum() *EventStatus
- func (EventStatus) EnumDescriptor() ([]byte, []int)deprecated
- func (x EventStatus) Number() protoreflect.EnumNumber
- func (x EventStatus) String() string
- func (EventStatus) Type() protoreflect.EnumType
- type UnimplementedWebhookServiceServer
- type UnsafeWebhookServiceServer
- type WebhookServiceClient
- type WebhookServiceServer
Constants ¶
This section is empty.
Variables ¶
var ( EventStatus_name = map[int32]string{ 0: "Error", 1: "Success", } EventStatus_value = map[string]int32{ "Error": 0, "Success": 1, } )
Enum value maps for EventStatus.
var File_pkg_wkhook_webhook_proto protoreflect.FileDescriptor
var WebhookService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "wkhook.WebhookService", HandlerType: (*WebhookServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SendWebhook", Handler: _WebhookService_SendWebhook_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "pkg/wkhook/webhook.proto", }
WebhookService_ServiceDesc is the grpc.ServiceDesc for WebhookService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterWebhookServiceServer ¶
func RegisterWebhookServiceServer(s grpc.ServiceRegistrar, srv WebhookServiceServer)
Types ¶
type EventReq ¶
type EventReq struct { Event string `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"` Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*EventReq) Descriptor
deprecated
func (*EventReq) ProtoMessage ¶
func (*EventReq) ProtoMessage()
func (*EventReq) ProtoReflect ¶
func (x *EventReq) ProtoReflect() protoreflect.Message
type EventResp ¶
type EventResp struct { Status EventStatus `protobuf:"varint,1,opt,name=status,proto3,enum=wkhook.EventStatus" json:"status,omitempty"` Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*EventResp) Descriptor
deprecated
func (*EventResp) GetStatus ¶
func (x *EventResp) GetStatus() EventStatus
func (*EventResp) ProtoMessage ¶
func (*EventResp) ProtoMessage()
func (*EventResp) ProtoReflect ¶
func (x *EventResp) ProtoReflect() protoreflect.Message
type EventStatus ¶
type EventStatus int32
const ( EventStatus_Error EventStatus = 0 EventStatus_Success EventStatus = 1 )
func (EventStatus) Descriptor ¶
func (EventStatus) Descriptor() protoreflect.EnumDescriptor
func (EventStatus) Enum ¶
func (x EventStatus) Enum() *EventStatus
func (EventStatus) EnumDescriptor
deprecated
func (EventStatus) EnumDescriptor() ([]byte, []int)
Deprecated: Use EventStatus.Descriptor instead.
func (EventStatus) Number ¶
func (x EventStatus) Number() protoreflect.EnumNumber
func (EventStatus) String ¶
func (x EventStatus) String() string
func (EventStatus) Type ¶
func (EventStatus) Type() protoreflect.EnumType
type UnimplementedWebhookServiceServer ¶
type UnimplementedWebhookServiceServer struct { }
UnimplementedWebhookServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedWebhookServiceServer) SendWebhook ¶
type UnsafeWebhookServiceServer ¶
type UnsafeWebhookServiceServer interface {
// contains filtered or unexported methods
}
UnsafeWebhookServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to WebhookServiceServer will result in compilation errors.
type WebhookServiceClient ¶
type WebhookServiceClient interface { // 发送webhook事件 SendWebhook(ctx context.Context, in *EventReq, opts ...grpc.CallOption) (*EventResp, error) }
WebhookServiceClient is the client API for WebhookService 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 NewWebhookServiceClient ¶
func NewWebhookServiceClient(cc grpc.ClientConnInterface) WebhookServiceClient
type WebhookServiceServer ¶
type WebhookServiceServer interface { // 发送webhook事件 SendWebhook(context.Context, *EventReq) (*EventResp, error) // contains filtered or unexported methods }
WebhookServiceServer is the server API for WebhookService service. All implementations must embed UnimplementedWebhookServiceServer for forward compatibility