Documentation ¶
Overview ¶
Package proto is a generated protocol buffer package.
It is generated from these files:
api.proto
It has these top-level messages:
PainUpdate GetEventsRequest Event
Package proto is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterMonitorHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterMonitorHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterMonitorServer(s *grpc.Server, srv MonitorServer)
- func RegisterPainTrackerHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterPainTrackerHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterPainTrackerServer(s *grpc.Server, srv PainTrackerServer)
- type Event
- type GetEventsRequest
- func (*GetEventsRequest) Descriptor() ([]byte, []int)
- func (m *GetEventsRequest) GetEnd() *google_protobuf1.Timestamp
- func (m *GetEventsRequest) GetStart() *google_protobuf1.Timestamp
- func (*GetEventsRequest) ProtoMessage()
- func (m *GetEventsRequest) Reset()
- func (m *GetEventsRequest) String() string
- type MonitorClient
- type MonitorServer
- type Monitor_GetEventsClient
- type Monitor_GetEventsServer
- type PainLevel
- type PainTrackerClient
- type PainTrackerServer
- type PainUpdate
Constants ¶
This section is empty.
Variables ¶
var PainLevel_name = map[int32]string{
0: "NO_PAIN",
1: "SIGNIFICANT",
2: "SEVERE",
}
var PainLevel_value = map[string]int32{
"NO_PAIN": 0,
"SIGNIFICANT": 1,
"SEVERE": 2,
}
Functions ¶
func RegisterMonitorHandler ¶
func RegisterMonitorHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterMonitorHandler registers the http handlers for service Monitor to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterMonitorHandlerFromEndpoint ¶
func RegisterMonitorHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterMonitorHandlerFromEndpoint is same as RegisterMonitorHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterMonitorServer ¶
func RegisterMonitorServer(s *grpc.Server, srv MonitorServer)
func RegisterPainTrackerHandler ¶
func RegisterPainTrackerHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterPainTrackerHandler registers the http handlers for service PainTracker to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterPainTrackerHandlerFromEndpoint ¶
func RegisterPainTrackerHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterPainTrackerHandlerFromEndpoint is same as RegisterPainTrackerHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterPainTrackerServer ¶
func RegisterPainTrackerServer(s *grpc.Server, srv PainTrackerServer)
Types ¶
type Event ¶
type Event struct { Timestamp *google_protobuf1.Timestamp `protobuf:"bytes,1,opt,name=timestamp" json:"timestamp,omitempty"` PainLevel PainLevel `protobuf:"varint,2,opt,name=pain_level,json=painLevel,enum=PainLevel" json:"pain_level,omitempty"` }
func (*Event) Descriptor ¶
func (*Event) GetPainLevel ¶
func (*Event) GetTimestamp ¶
func (m *Event) GetTimestamp() *google_protobuf1.Timestamp
func (*Event) ProtoMessage ¶
func (*Event) ProtoMessage()
type GetEventsRequest ¶
type GetEventsRequest struct { Start *google_protobuf1.Timestamp `protobuf:"bytes,1,opt,name=start" json:"start,omitempty"` End *google_protobuf1.Timestamp `protobuf:"bytes,2,opt,name=end" json:"end,omitempty"` }
func (*GetEventsRequest) Descriptor ¶
func (*GetEventsRequest) Descriptor() ([]byte, []int)
func (*GetEventsRequest) GetEnd ¶
func (m *GetEventsRequest) GetEnd() *google_protobuf1.Timestamp
func (*GetEventsRequest) GetStart ¶
func (m *GetEventsRequest) GetStart() *google_protobuf1.Timestamp
func (*GetEventsRequest) ProtoMessage ¶
func (*GetEventsRequest) ProtoMessage()
func (*GetEventsRequest) Reset ¶
func (m *GetEventsRequest) Reset()
func (*GetEventsRequest) String ¶
func (m *GetEventsRequest) String() string
type MonitorClient ¶
type MonitorClient interface {
GetEvents(ctx context.Context, in *GetEventsRequest, opts ...grpc.CallOption) (Monitor_GetEventsClient, error)
}
func NewMonitorClient ¶
func NewMonitorClient(cc *grpc.ClientConn) MonitorClient
type MonitorServer ¶
type MonitorServer interface {
GetEvents(*GetEventsRequest, Monitor_GetEventsServer) error
}
type Monitor_GetEventsClient ¶
type Monitor_GetEventsClient interface { Recv() (*Event, error) grpc.ClientStream }
type Monitor_GetEventsServer ¶
type Monitor_GetEventsServer interface { Send(*Event) error grpc.ServerStream }
type PainTrackerClient ¶
type PainTrackerClient interface {
SetPainLevel(ctx context.Context, in *PainUpdate, opts ...grpc.CallOption) (*google_protobuf.Empty, error)
}
func NewPainTrackerClient ¶
func NewPainTrackerClient(cc *grpc.ClientConn) PainTrackerClient
type PainTrackerServer ¶
type PainTrackerServer interface {
SetPainLevel(context.Context, *PainUpdate) (*google_protobuf.Empty, error)
}
type PainUpdate ¶
type PainUpdate struct { PainLevel PainLevel `protobuf:"varint,1,opt,name=pain_level,json=painLevel,enum=PainLevel" json:"pain_level,omitempty"` Passphrase string `protobuf:"bytes,2,opt,name=passphrase" json:"passphrase,omitempty"` }
func (*PainUpdate) Descriptor ¶
func (*PainUpdate) Descriptor() ([]byte, []int)
func (*PainUpdate) GetPainLevel ¶
func (m *PainUpdate) GetPainLevel() PainLevel
func (*PainUpdate) GetPassphrase ¶
func (m *PainUpdate) GetPassphrase() string
func (*PainUpdate) ProtoMessage ¶
func (*PainUpdate) ProtoMessage()
func (*PainUpdate) Reset ¶
func (m *PainUpdate) Reset()
func (*PainUpdate) String ¶
func (m *PainUpdate) String() string