pb

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PollResult_ResultType_name = map[int32]string{
		0: "UNAVAILABLE",
		1: "CHANGED",
		2: "DEADLINE",
		3: "AVAILABLE",
	}
	PollResult_ResultType_value = map[string]int32{
		"UNAVAILABLE": 0,
		"CHANGED":     1,
		"DEADLINE":    2,
		"AVAILABLE":   3,
	}
)

Enum value maps for PollResult_ResultType.

View Source
var File_proto_event_handler_proto protoreflect.FileDescriptor

Functions

func RegisterEventHandlerServer

func RegisterEventHandlerServer(s grpc.ServiceRegistrar, srv EventHandlerServer)

Types

type EventHandlerClient

type EventHandlerClient interface {
	UpdateAvailability(ctx context.Context, in *PollResult, opts ...grpc.CallOption) (*EventHandlerResponse, error)
}

EventHandlerClient is the client API for EventHandler 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 EventHandlerResponse

type EventHandlerResponse struct {
	Code int32  `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	Resp string `protobuf:"bytes,2,opt,name=resp,proto3" json:"resp,omitempty"`
	// contains filtered or unexported fields
}

func (*EventHandlerResponse) Descriptor deprecated

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

Deprecated: Use EventHandlerResponse.ProtoReflect.Descriptor instead.

func (*EventHandlerResponse) GetCode

func (x *EventHandlerResponse) GetCode() int32

func (*EventHandlerResponse) GetResp

func (x *EventHandlerResponse) GetResp() string

func (*EventHandlerResponse) ProtoMessage

func (*EventHandlerResponse) ProtoMessage()

func (*EventHandlerResponse) ProtoReflect

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

func (*EventHandlerResponse) Reset

func (x *EventHandlerResponse) Reset()

func (*EventHandlerResponse) String

func (x *EventHandlerResponse) String() string

type EventHandlerServer

type EventHandlerServer interface {
	UpdateAvailability(context.Context, *PollResult) (*EventHandlerResponse, error)
	// contains filtered or unexported methods
}

EventHandlerServer is the server API for EventHandler service. All implementations must embed UnimplementedEventHandlerServer for forward compatibility

type HTTPData

type HTTPData struct {
	UserAgentUsed string `protobuf:"bytes,1,opt,name=UserAgentUsed,proto3" json:"UserAgentUsed,omitempty"`
	StatusCode    int32  `protobuf:"varint,2,opt,name=StatusCode,proto3" json:"StatusCode,omitempty"`
	Status        string `protobuf:"bytes,3,opt,name=Status,proto3" json:"Status,omitempty"`
	// contains filtered or unexported fields
}

func (*HTTPData) Descriptor deprecated

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

Deprecated: Use HTTPData.ProtoReflect.Descriptor instead.

func (*HTTPData) GetStatus

func (x *HTTPData) GetStatus() string

func (*HTTPData) GetStatusCode

func (x *HTTPData) GetStatusCode() int32

func (*HTTPData) GetUserAgentUsed

func (x *HTTPData) GetUserAgentUsed() string

func (*HTTPData) ProtoMessage

func (*HTTPData) ProtoMessage()

func (*HTTPData) ProtoReflect

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

func (*HTTPData) Reset

func (x *HTTPData) Reset()

func (*HTTPData) String

func (x *HTTPData) String() string

type Page

type Page struct {
	Id        string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Product   string `protobuf:"bytes,2,opt,name=product,proto3" json:"product,omitempty"`
	PolledUrl string `protobuf:"bytes,3,opt,name=polled_url,json=polledUrl,proto3" json:"polled_url,omitempty"`
	NotifyUrl string `protobuf:"bytes,4,opt,name=notify_url,json=notifyUrl,proto3" json:"notify_url,omitempty"`
	// contains filtered or unexported fields
}

func (*Page) Descriptor deprecated

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

Deprecated: Use Page.ProtoReflect.Descriptor instead.

func (*Page) GetId

func (x *Page) GetId() string

func (*Page) GetNotifyUrl

func (x *Page) GetNotifyUrl() string

func (*Page) GetPolledUrl

func (x *Page) GetPolledUrl() string

func (*Page) GetProduct

func (x *Page) GetProduct() string

func (*Page) ProtoMessage

func (*Page) ProtoMessage()

func (*Page) ProtoReflect

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

func (*Page) Reset

func (x *Page) Reset()

func (*Page) String

func (x *Page) String() string

type PollResult

type PollResult struct {
	Page       *Page                 `protobuf:"bytes,1,opt,name=page,proto3" json:"page,omitempty"`
	HttpData   *HTTPData             `protobuf:"bytes,2,opt,name=http_data,json=httpData,proto3" json:"http_data,omitempty"`
	ResultType PollResult_ResultType `protobuf:"varint,3,opt,name=result_type,json=resultType,proto3,enum=pb.PollResult_ResultType" json:"result_type,omitempty"`
	Message    string                `protobuf:"bytes,4,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*PollResult) Descriptor deprecated

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

Deprecated: Use PollResult.ProtoReflect.Descriptor instead.

func (*PollResult) GetHttpData

func (x *PollResult) GetHttpData() *HTTPData

func (*PollResult) GetMessage

func (x *PollResult) GetMessage() string

func (*PollResult) GetPage

func (x *PollResult) GetPage() *Page

func (*PollResult) GetResultType

func (x *PollResult) GetResultType() PollResult_ResultType

func (*PollResult) ProtoMessage

func (*PollResult) ProtoMessage()

func (*PollResult) ProtoReflect

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

func (*PollResult) Reset

func (x *PollResult) Reset()

func (*PollResult) String

func (x *PollResult) String() string

type PollResult_ResultType

type PollResult_ResultType int32
const (
	PollResult_UNAVAILABLE PollResult_ResultType = 0
	PollResult_CHANGED     PollResult_ResultType = 1
	PollResult_DEADLINE    PollResult_ResultType = 2
	PollResult_AVAILABLE   PollResult_ResultType = 3
)

func (PollResult_ResultType) Descriptor

func (PollResult_ResultType) Enum

func (PollResult_ResultType) EnumDescriptor deprecated

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

Deprecated: Use PollResult_ResultType.Descriptor instead.

func (PollResult_ResultType) Number

func (PollResult_ResultType) String

func (x PollResult_ResultType) String() string

func (PollResult_ResultType) Type

type UnimplementedEventHandlerServer

type UnimplementedEventHandlerServer struct {
}

UnimplementedEventHandlerServer must be embedded to have forward compatible implementations.

func (UnimplementedEventHandlerServer) UpdateAvailability

type UnsafeEventHandlerServer

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

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

Jump to

Keyboard shortcuts

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