protobuf

package
v0.0.0-...-3d09e97 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	HealthCheckResponse_ServingStatus_name = map[int32]string{
		0: "UNKNOWN",
		1: "SERVING",
		2: "NOT_SERVING",
		3: "SERVICE_UNKNOWN",
	}
	HealthCheckResponse_ServingStatus_value = map[string]int32{
		"UNKNOWN":         0,
		"SERVING":         1,
		"NOT_SERVING":     2,
		"SERVICE_UNKNOWN": 3,
	}
)

Enum value maps for HealthCheckResponse_ServingStatus.

View Source
var (
	SendWebhookRequest_HttpMethod_name = map[int32]string{
		0: "GET",
		1: "POST",
	}
	SendWebhookRequest_HttpMethod_value = map[string]int32{
		"GET":  0,
		"POST": 1,
	}
)

Enum value maps for SendWebhookRequest_HttpMethod.

View Source
var (
	SendWebhookRequest_RetryStrategy_name = map[int32]string{
		0: "BACKOFF",
		1: "LINEAR",
	}
	SendWebhookRequest_RetryStrategy_value = map[string]int32{
		"BACKOFF": 0,
		"LINEAR":  1,
	}
)

Enum value maps for SendWebhookRequest_RetryStrategy.

View Source
var File_webhook_proto protoreflect.FileDescriptor
View Source
var WebhookService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "protobuf.WebhookService",
	HandlerType: (*WebhookServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Check",
			Handler:    _WebhookService_Check_Handler,
		},
		{
			MethodName: "ListWebhooks",
			Handler:    _WebhookService_ListWebhooks_Handler,
		},
		{
			MethodName: "GetWebhook",
			Handler:    _WebhookService_GetWebhook_Handler,
		},
		{
			MethodName: "SendWebhook",
			Handler:    _WebhookService_SendWebhook_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Watch",
			Handler:       _WebhookService_Watch_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "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 GetWebhookRequest

type GetWebhookRequest struct {

	// @gotags: validate:"required"
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" validate:"required"`
	// contains filtered or unexported fields
}

func (*GetWebhookRequest) Descriptor deprecated

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

Deprecated: Use GetWebhookRequest.ProtoReflect.Descriptor instead.

func (*GetWebhookRequest) GetId

func (x *GetWebhookRequest) GetId() string

func (*GetWebhookRequest) ProtoMessage

func (*GetWebhookRequest) ProtoMessage()

func (*GetWebhookRequest) ProtoReflect

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

func (*GetWebhookRequest) Reset

func (x *GetWebhookRequest) Reset()

func (*GetWebhookRequest) String

func (x *GetWebhookRequest) String() string

type GetWebhookResponse

type GetWebhookResponse struct {
	Webhook *Webhook `protobuf:"bytes,1,opt,name=webhook,proto3" json:"webhook,omitempty"`
	// contains filtered or unexported fields
}

func (*GetWebhookResponse) Descriptor deprecated

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

Deprecated: Use GetWebhookResponse.ProtoReflect.Descriptor instead.

func (*GetWebhookResponse) GetWebhook

func (x *GetWebhookResponse) GetWebhook() *Webhook

func (*GetWebhookResponse) ProtoMessage

func (*GetWebhookResponse) ProtoMessage()

func (*GetWebhookResponse) ProtoReflect

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

func (*GetWebhookResponse) Reset

func (x *GetWebhookResponse) Reset()

func (*GetWebhookResponse) String

func (x *GetWebhookResponse) String() string

type HealthCheckRequest

type HealthCheckRequest struct {
	Service string `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"`
	// contains filtered or unexported fields
}

func (*HealthCheckRequest) Descriptor deprecated

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

Deprecated: Use HealthCheckRequest.ProtoReflect.Descriptor instead.

func (*HealthCheckRequest) GetService

func (x *HealthCheckRequest) GetService() string

func (*HealthCheckRequest) ProtoMessage

func (*HealthCheckRequest) ProtoMessage()

func (*HealthCheckRequest) ProtoReflect

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

func (*HealthCheckRequest) Reset

func (x *HealthCheckRequest) Reset()

func (*HealthCheckRequest) String

func (x *HealthCheckRequest) String() string

type HealthCheckResponse

type HealthCheckResponse struct {
	Status HealthCheckResponse_ServingStatus `protobuf:"varint,1,opt,name=status,proto3,enum=protobuf.HealthCheckResponse_ServingStatus" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*HealthCheckResponse) Descriptor deprecated

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

Deprecated: Use HealthCheckResponse.ProtoReflect.Descriptor instead.

func (*HealthCheckResponse) GetStatus

func (*HealthCheckResponse) ProtoMessage

func (*HealthCheckResponse) ProtoMessage()

func (*HealthCheckResponse) ProtoReflect

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

func (*HealthCheckResponse) Reset

func (x *HealthCheckResponse) Reset()

func (*HealthCheckResponse) String

func (x *HealthCheckResponse) String() string

type HealthCheckResponse_ServingStatus

type HealthCheckResponse_ServingStatus int32
const (
	HealthCheckResponse_UNKNOWN         HealthCheckResponse_ServingStatus = 0
	HealthCheckResponse_SERVING         HealthCheckResponse_ServingStatus = 1
	HealthCheckResponse_NOT_SERVING     HealthCheckResponse_ServingStatus = 2
	HealthCheckResponse_SERVICE_UNKNOWN HealthCheckResponse_ServingStatus = 3 // Used only by the Watch method.
)

func (HealthCheckResponse_ServingStatus) Descriptor

func (HealthCheckResponse_ServingStatus) Enum

func (HealthCheckResponse_ServingStatus) EnumDescriptor deprecated

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

Deprecated: Use HealthCheckResponse_ServingStatus.Descriptor instead.

func (HealthCheckResponse_ServingStatus) Number

func (HealthCheckResponse_ServingStatus) String

func (HealthCheckResponse_ServingStatus) Type

type ListWebhooksRequest

type ListWebhooksRequest struct {

	// @gotags: validate:"omitempty,required"
	PageToken string `protobuf:"bytes,1,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty" validate:"omitempty,required"`
	// @gotags: validate:"omitempty,max=100"
	PageSize uint32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty" validate:"omitempty,max=100"`
	// contains filtered or unexported fields
}

func (*ListWebhooksRequest) Descriptor deprecated

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

Deprecated: Use ListWebhooksRequest.ProtoReflect.Descriptor instead.

func (*ListWebhooksRequest) GetPageSize

func (x *ListWebhooksRequest) GetPageSize() uint32

func (*ListWebhooksRequest) GetPageToken

func (x *ListWebhooksRequest) GetPageToken() string

func (*ListWebhooksRequest) ProtoMessage

func (*ListWebhooksRequest) ProtoMessage()

func (*ListWebhooksRequest) ProtoReflect

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

func (*ListWebhooksRequest) Reset

func (x *ListWebhooksRequest) Reset()

func (*ListWebhooksRequest) String

func (x *ListWebhooksRequest) String() string

type ListWebhooksResponse

type ListWebhooksResponse struct {
	Webhooks      []*Webhook `protobuf:"bytes,1,rep,name=webhooks,proto3" json:"webhooks,omitempty"`
	NextPageToken string     `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
	// contains filtered or unexported fields
}

func (*ListWebhooksResponse) Descriptor deprecated

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

Deprecated: Use ListWebhooksResponse.ProtoReflect.Descriptor instead.

func (*ListWebhooksResponse) GetNextPageToken

func (x *ListWebhooksResponse) GetNextPageToken() string

func (*ListWebhooksResponse) GetWebhooks

func (x *ListWebhooksResponse) GetWebhooks() []*Webhook

func (*ListWebhooksResponse) ProtoMessage

func (*ListWebhooksResponse) ProtoMessage()

func (*ListWebhooksResponse) ProtoReflect

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

func (*ListWebhooksResponse) Reset

func (x *ListWebhooksResponse) Reset()

func (*ListWebhooksResponse) String

func (x *ListWebhooksResponse) String() string

type SendWebhookRequest

type SendWebhookRequest struct {
	Method SendWebhookRequest_HttpMethod `protobuf:"varint,1,opt,name=method,proto3,enum=protobuf.SendWebhookRequest_HttpMethod" json:"method,omitempty"`
	// @gotags: validate:"required,url,max=1000"
	Url     string            `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty" validate:"required,url,max=1000"`
	Headers map[string]string `` /* 155-byte string literal not displayed */
	// @gotags: validate:"max=2048"
	Body string `protobuf:"bytes,4,opt,name=body,proto3" json:"body,omitempty" validate:"max=2048"`
	// @gotags: validate:"omitempty,lte=10"
	Retry         uint32                           `protobuf:"varint,5,opt,name=retry,proto3" json:"retry,omitempty" validate:"omitempty,lte=10"`
	RetryStrategy SendWebhookRequest_RetryStrategy `` /* 148-byte string literal not displayed */
	// @gotags: validate:"omitempty,lte=10000"
	Timeout uint32 `protobuf:"varint,7,opt,name=timeout,proto3" json:"timeout,omitempty" validate:"omitempty,lte=10000"`
	// @gotags: validate:"lte=3"
	Concurrent uint32 `protobuf:"varint,8,opt,name=concurrent,proto3" json:"concurrent,omitempty" validate:"lte=3"`
	// contains filtered or unexported fields
}

func (*SendWebhookRequest) Descriptor deprecated

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

Deprecated: Use SendWebhookRequest.ProtoReflect.Descriptor instead.

func (*SendWebhookRequest) GetBody

func (x *SendWebhookRequest) GetBody() string

func (*SendWebhookRequest) GetConcurrent

func (x *SendWebhookRequest) GetConcurrent() uint32

func (*SendWebhookRequest) GetHeaders

func (x *SendWebhookRequest) GetHeaders() map[string]string

func (*SendWebhookRequest) GetMethod

func (*SendWebhookRequest) GetRetry

func (x *SendWebhookRequest) GetRetry() uint32

func (*SendWebhookRequest) GetRetryStrategy

func (*SendWebhookRequest) GetTimeout

func (x *SendWebhookRequest) GetTimeout() uint32

func (*SendWebhookRequest) GetUrl

func (x *SendWebhookRequest) GetUrl() string

func (*SendWebhookRequest) ProtoMessage

func (*SendWebhookRequest) ProtoMessage()

func (*SendWebhookRequest) ProtoReflect

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

func (*SendWebhookRequest) Reset

func (x *SendWebhookRequest) Reset()

func (*SendWebhookRequest) String

func (x *SendWebhookRequest) String() string

type SendWebhookRequest_HttpMethod

type SendWebhookRequest_HttpMethod int32
const (
	SendWebhookRequest_GET  SendWebhookRequest_HttpMethod = 0
	SendWebhookRequest_POST SendWebhookRequest_HttpMethod = 1
)

func (SendWebhookRequest_HttpMethod) Descriptor

func (SendWebhookRequest_HttpMethod) Enum

func (SendWebhookRequest_HttpMethod) EnumDescriptor deprecated

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

Deprecated: Use SendWebhookRequest_HttpMethod.Descriptor instead.

func (SendWebhookRequest_HttpMethod) Number

func (SendWebhookRequest_HttpMethod) String

func (SendWebhookRequest_HttpMethod) Type

type SendWebhookRequest_RetryStrategy

type SendWebhookRequest_RetryStrategy int32
const (
	SendWebhookRequest_BACKOFF SendWebhookRequest_RetryStrategy = 0
	SendWebhookRequest_LINEAR  SendWebhookRequest_RetryStrategy = 1
)

func (SendWebhookRequest_RetryStrategy) Descriptor

func (SendWebhookRequest_RetryStrategy) Enum

func (SendWebhookRequest_RetryStrategy) EnumDescriptor deprecated

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

Deprecated: Use SendWebhookRequest_RetryStrategy.Descriptor instead.

func (SendWebhookRequest_RetryStrategy) Number

func (SendWebhookRequest_RetryStrategy) String

func (SendWebhookRequest_RetryStrategy) Type

type SendWebhookResponse

type SendWebhookResponse struct {
	Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"`
	// contains filtered or unexported fields
}

func (*SendWebhookResponse) Descriptor deprecated

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

Deprecated: Use SendWebhookResponse.ProtoReflect.Descriptor instead.

func (*SendWebhookResponse) GetQuery

func (x *SendWebhookResponse) GetQuery() string

func (*SendWebhookResponse) ProtoMessage

func (*SendWebhookResponse) ProtoMessage()

func (*SendWebhookResponse) ProtoReflect

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

func (*SendWebhookResponse) Reset

func (x *SendWebhookResponse) Reset()

func (*SendWebhookResponse) String

func (x *SendWebhookResponse) String() string

type UnimplementedWebhookServiceServer

type UnimplementedWebhookServiceServer struct {
}

UnimplementedWebhookServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedWebhookServiceServer) Check

func (UnimplementedWebhookServiceServer) GetWebhook

func (UnimplementedWebhookServiceServer) ListWebhooks

func (UnimplementedWebhookServiceServer) SendWebhook

func (UnimplementedWebhookServiceServer) Watch

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 Webhook

type Webhook struct {
	Id        string                 `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Method    string                 `protobuf:"bytes,2,opt,name=method,proto3" json:"method,omitempty"`
	Body      string                 `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"`
	Retries   uint32                 `protobuf:"varint,4,opt,name=retries,proto3" json:"retries,omitempty"`
	CreatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

func (*Webhook) Descriptor deprecated

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

Deprecated: Use Webhook.ProtoReflect.Descriptor instead.

func (*Webhook) GetBody

func (x *Webhook) GetBody() string

func (*Webhook) GetCreatedAt

func (x *Webhook) GetCreatedAt() *timestamppb.Timestamp

func (*Webhook) GetId

func (x *Webhook) GetId() string

func (*Webhook) GetMethod

func (x *Webhook) GetMethod() string

func (*Webhook) GetRetries

func (x *Webhook) GetRetries() uint32

func (*Webhook) GetUpdatedAt

func (x *Webhook) GetUpdatedAt() *timestamppb.Timestamp

func (*Webhook) ProtoMessage

func (*Webhook) ProtoMessage()

func (*Webhook) ProtoReflect

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

func (*Webhook) Reset

func (x *Webhook) Reset()

func (*Webhook) String

func (x *Webhook) String() string

type WebhookServiceClient

type WebhookServiceClient interface {
	Check(ctx context.Context, in *HealthCheckRequest, opts ...grpc.CallOption) (*HealthCheckResponse, error)
	Watch(ctx context.Context, in *HealthCheckRequest, opts ...grpc.CallOption) (WebhookService_WatchClient, error)
	ListWebhooks(ctx context.Context, in *ListWebhooksRequest, opts ...grpc.CallOption) (*ListWebhooksResponse, error)
	GetWebhook(ctx context.Context, in *GetWebhookRequest, opts ...grpc.CallOption) (*GetWebhookResponse, error)
	SendWebhook(ctx context.Context, in *SendWebhookRequest, opts ...grpc.CallOption) (*SendWebhookResponse, 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 {
	Check(context.Context, *HealthCheckRequest) (*HealthCheckResponse, error)
	Watch(*HealthCheckRequest, WebhookService_WatchServer) error
	ListWebhooks(context.Context, *ListWebhooksRequest) (*ListWebhooksResponse, error)
	GetWebhook(context.Context, *GetWebhookRequest) (*GetWebhookResponse, error)
	SendWebhook(context.Context, *SendWebhookRequest) (*SendWebhookResponse, error)
	// contains filtered or unexported methods
}

WebhookServiceServer is the server API for WebhookService service. All implementations must embed UnimplementedWebhookServiceServer for forward compatibility

type WebhookService_WatchClient

type WebhookService_WatchClient interface {
	Recv() (*HealthCheckResponse, error)
	grpc.ClientStream
}

type WebhookService_WatchServer

type WebhookService_WatchServer interface {
	Send(*HealthCheckResponse) error
	grpc.ServerStream
}

Jump to

Keyboard shortcuts

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