proto

package
v0.0.0-...-efdb782 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2018 License: MIT Imports: 14 Imported by: 0

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

Constants

This section is empty.

Variables

View Source
var PainLevel_name = map[int32]string{
	0: "NO_PAIN",
	1: "SIGNIFICANT",
	2: "SEVERE",
}
View Source
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) Descriptor() ([]byte, []int)

func (*Event) GetPainLevel

func (m *Event) GetPainLevel() PainLevel

func (*Event) GetTimestamp

func (m *Event) GetTimestamp() *google_protobuf1.Timestamp

func (*Event) ProtoMessage

func (*Event) ProtoMessage()

func (*Event) Reset

func (m *Event) Reset()

func (*Event) String

func (m *Event) String() string

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 (*GetEventsRequest) GetStart

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 PainLevel

type PainLevel int32
const (
	PainLevel_NO_PAIN     PainLevel = 0
	PainLevel_SIGNIFICANT PainLevel = 1
	PainLevel_SEVERE      PainLevel = 2
)

func (PainLevel) EnumDescriptor

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

func (PainLevel) String

func (x PainLevel) String() string

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

Jump to

Keyboard shortcuts

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