wkhook

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

README

protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative ./pkg/wkhook/webhook.proto

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	EventStatus_name = map[int32]string{
		0: "Error",
		1: "Success",
	}
	EventStatus_value = map[string]int32{
		"Error":   0,
		"Success": 1,
	}
)

Enum value maps for EventStatus.

View Source
var File_pkg_wkhook_webhook_proto protoreflect.FileDescriptor
View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use EventReq.ProtoReflect.Descriptor instead.

func (*EventReq) GetData

func (x *EventReq) GetData() []byte

func (*EventReq) GetEvent

func (x *EventReq) GetEvent() string

func (*EventReq) ProtoMessage

func (*EventReq) ProtoMessage()

func (*EventReq) ProtoReflect

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

func (*EventReq) Reset

func (x *EventReq) Reset()

func (*EventReq) String

func (x *EventReq) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use EventResp.ProtoReflect.Descriptor instead.

func (*EventResp) GetData

func (x *EventResp) GetData() []byte

func (*EventResp) GetStatus

func (x *EventResp) GetStatus() EventStatus

func (*EventResp) ProtoMessage

func (*EventResp) ProtoMessage()

func (*EventResp) ProtoReflect

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

func (*EventResp) Reset

func (x *EventResp) Reset()

func (*EventResp) String

func (x *EventResp) String() string

type EventStatus

type EventStatus int32
const (
	EventStatus_Error   EventStatus = 0
	EventStatus_Success EventStatus = 1
)

func (EventStatus) Descriptor

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

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.

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

Jump to

Keyboard shortcuts

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