wellness

package
v0.0.0-...-93f8a8c Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2020 License: MIT Imports: 30 Imported by: 0

Documentation

Overview

Package wellness is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var File_wellness_proto protoreflect.FileDescriptor

Functions

func RegisterWellnessServiceHandler

func RegisterWellnessServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterWellnessServiceHandler registers the http handlers for service WellnessService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterWellnessServiceHandlerClient

func RegisterWellnessServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client WellnessServiceClient) error

RegisterWellnessServiceHandlerClient registers the http handlers for service WellnessService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "WellnessServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "WellnessServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "WellnessServiceClient" to call the correct interceptors.

func RegisterWellnessServiceHandlerFromEndpoint

func RegisterWellnessServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterWellnessServiceHandlerFromEndpoint is same as RegisterWellnessServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterWellnessServiceHandlerServer

func RegisterWellnessServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server WellnessServiceServer) error

RegisterWellnessServiceHandlerServer registers the http handlers for service WellnessService to "mux". UnaryRPC :call WellnessServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.

func RegisterWellnessServiceServer

func RegisterWellnessServiceServer(s *grpc.Server, srv WellnessServiceServer)

Types

type GetRoomRequest

type GetRoomRequest struct {
	RoomId int32 `protobuf:"varint,1,opt,name=roomId,proto3" json:"roomId,omitempty"`
	// contains filtered or unexported fields
}

func (*GetRoomRequest) Descriptor deprecated

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

Deprecated: Use GetRoomRequest.ProtoReflect.Descriptor instead.

func (*GetRoomRequest) GetRoomId

func (x *GetRoomRequest) GetRoomId() int32

func (*GetRoomRequest) ProtoMessage

func (*GetRoomRequest) ProtoMessage()

func (*GetRoomRequest) ProtoReflect

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

func (*GetRoomRequest) Reset

func (x *GetRoomRequest) Reset()

func (*GetRoomRequest) String

func (x *GetRoomRequest) String() string

func (*GetRoomRequest) Validate

func (m *GetRoomRequest) Validate() error

Validate checks the field values on GetRoomRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type GetRoomRequestValidationError

type GetRoomRequestValidationError struct {
	// contains filtered or unexported fields
}

GetRoomRequestValidationError is the validation error returned by GetRoomRequest.Validate if the designated constraints aren't met.

func (GetRoomRequestValidationError) Cause

Cause function returns cause value.

func (GetRoomRequestValidationError) Error

Error satisfies the builtin error interface

func (GetRoomRequestValidationError) ErrorName

func (e GetRoomRequestValidationError) ErrorName() string

ErrorName returns error name.

func (GetRoomRequestValidationError) Field

Field function returns field value.

func (GetRoomRequestValidationError) Key

Key function returns key value.

func (GetRoomRequestValidationError) Reason

Reason function returns reason value.

type Lesson

type Lesson struct {
	Id           int32  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Name         string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	DayOfWeek    int32  `protobuf:"varint,3,opt,name=dayOfWeek,proto3" json:"dayOfWeek,omitempty"`
	BeginHours   int32  `protobuf:"varint,4,opt,name=beginHours,proto3" json:"beginHours,omitempty"`
	BeginMinutes int32  `protobuf:"varint,5,opt,name=beginMinutes,proto3" json:"beginMinutes,omitempty"`
	EndHours     int32  `protobuf:"varint,6,opt,name=endHours,proto3" json:"endHours,omitempty"`
	EndMinutes   int32  `protobuf:"varint,7,opt,name=endMinutes,proto3" json:"endMinutes,omitempty"`
	Duration     int32  `protobuf:"varint,8,opt,name=duration,proto3" json:"duration,omitempty"`
	NbPlace      int32  `protobuf:"varint,9,opt,name=NbPlace,proto3" json:"NbPlace,omitempty"`
	// contains filtered or unexported fields
}

func (*Lesson) Descriptor deprecated

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

Deprecated: Use Lesson.ProtoReflect.Descriptor instead.

func (*Lesson) GetBeginHours

func (x *Lesson) GetBeginHours() int32

func (*Lesson) GetBeginMinutes

func (x *Lesson) GetBeginMinutes() int32

func (*Lesson) GetDayOfWeek

func (x *Lesson) GetDayOfWeek() int32

func (*Lesson) GetDuration

func (x *Lesson) GetDuration() int32

func (*Lesson) GetEndHours

func (x *Lesson) GetEndHours() int32

func (*Lesson) GetEndMinutes

func (x *Lesson) GetEndMinutes() int32

func (*Lesson) GetId

func (x *Lesson) GetId() int32

func (*Lesson) GetName

func (x *Lesson) GetName() string

func (*Lesson) GetNbPlace

func (x *Lesson) GetNbPlace() int32

func (*Lesson) ProtoMessage

func (*Lesson) ProtoMessage()

func (*Lesson) ProtoReflect

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

func (*Lesson) Reset

func (x *Lesson) Reset()

func (*Lesson) String

func (x *Lesson) String() string

func (*Lesson) Validate

func (m *Lesson) Validate() error

Validate checks the field values on Lesson with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type LessonValidationError

type LessonValidationError struct {
	// contains filtered or unexported fields
}

LessonValidationError is the validation error returned by Lesson.Validate if the designated constraints aren't met.

func (LessonValidationError) Cause

func (e LessonValidationError) Cause() error

Cause function returns cause value.

func (LessonValidationError) Error

func (e LessonValidationError) Error() string

Error satisfies the builtin error interface

func (LessonValidationError) ErrorName

func (e LessonValidationError) ErrorName() string

ErrorName returns error name.

func (LessonValidationError) Field

func (e LessonValidationError) Field() string

Field function returns field value.

func (LessonValidationError) Key

func (e LessonValidationError) Key() bool

Key function returns key value.

func (LessonValidationError) Reason

func (e LessonValidationError) Reason() string

Reason function returns reason value.

type LessonsArray

type LessonsArray struct {
	Lessons []*Lesson `protobuf:"bytes,1,rep,name=lessons,proto3" json:"lessons,omitempty"`
	// contains filtered or unexported fields
}

func (*LessonsArray) Descriptor deprecated

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

Deprecated: Use LessonsArray.ProtoReflect.Descriptor instead.

func (*LessonsArray) GetLessons

func (x *LessonsArray) GetLessons() []*Lesson

func (*LessonsArray) ProtoMessage

func (*LessonsArray) ProtoMessage()

func (*LessonsArray) ProtoReflect

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

func (*LessonsArray) Reset

func (x *LessonsArray) Reset()

func (*LessonsArray) String

func (x *LessonsArray) String() string

func (*LessonsArray) Validate

func (m *LessonsArray) Validate() error

Validate checks the field values on LessonsArray with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type LessonsArrayValidationError

type LessonsArrayValidationError struct {
	// contains filtered or unexported fields
}

LessonsArrayValidationError is the validation error returned by LessonsArray.Validate if the designated constraints aren't met.

func (LessonsArrayValidationError) Cause

Cause function returns cause value.

func (LessonsArrayValidationError) Error

Error satisfies the builtin error interface

func (LessonsArrayValidationError) ErrorName

func (e LessonsArrayValidationError) ErrorName() string

ErrorName returns error name.

func (LessonsArrayValidationError) Field

Field function returns field value.

func (LessonsArrayValidationError) Key

Key function returns key value.

func (LessonsArrayValidationError) Reason

Reason function returns reason value.

type ListLessonsRequest

type ListLessonsRequest struct {
	DayOfWeek    *wrappers.Int32Value  `protobuf:"bytes,1,opt,name=dayOfWeek,proto3" json:"dayOfWeek,omitempty"`
	BeginHours   *wrappers.Int32Value  `protobuf:"bytes,2,opt,name=beginHours,proto3" json:"beginHours,omitempty"`
	BeginMinutes *wrappers.Int32Value  `protobuf:"bytes,3,opt,name=beginMinutes,proto3" json:"beginMinutes,omitempty"`
	TypeSearch   *wrappers.StringValue `protobuf:"bytes,4,opt,name=typeSearch,proto3" json:"typeSearch,omitempty"`
	// contains filtered or unexported fields
}

func (*ListLessonsRequest) Descriptor deprecated

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

Deprecated: Use ListLessonsRequest.ProtoReflect.Descriptor instead.

func (*ListLessonsRequest) GetBeginHours

func (x *ListLessonsRequest) GetBeginHours() *wrappers.Int32Value

func (*ListLessonsRequest) GetBeginMinutes

func (x *ListLessonsRequest) GetBeginMinutes() *wrappers.Int32Value

func (*ListLessonsRequest) GetDayOfWeek

func (x *ListLessonsRequest) GetDayOfWeek() *wrappers.Int32Value

func (*ListLessonsRequest) GetTypeSearch

func (x *ListLessonsRequest) GetTypeSearch() *wrappers.StringValue

func (*ListLessonsRequest) ProtoMessage

func (*ListLessonsRequest) ProtoMessage()

func (*ListLessonsRequest) ProtoReflect

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

func (*ListLessonsRequest) Reset

func (x *ListLessonsRequest) Reset()

func (*ListLessonsRequest) String

func (x *ListLessonsRequest) String() string

func (*ListLessonsRequest) Validate

func (m *ListLessonsRequest) Validate() error

Validate checks the field values on ListLessonsRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type ListLessonsRequestValidationError

type ListLessonsRequestValidationError struct {
	// contains filtered or unexported fields
}

ListLessonsRequestValidationError is the validation error returned by ListLessonsRequest.Validate if the designated constraints aren't met.

func (ListLessonsRequestValidationError) Cause

Cause function returns cause value.

func (ListLessonsRequestValidationError) Error

Error satisfies the builtin error interface

func (ListLessonsRequestValidationError) ErrorName

ErrorName returns error name.

func (ListLessonsRequestValidationError) Field

Field function returns field value.

func (ListLessonsRequestValidationError) Key

Key function returns key value.

func (ListLessonsRequestValidationError) Reason

Reason function returns reason value.

type ListRoomsRequest

type ListRoomsRequest struct {
	// contains filtered or unexported fields
}

func (*ListRoomsRequest) Descriptor deprecated

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

Deprecated: Use ListRoomsRequest.ProtoReflect.Descriptor instead.

func (*ListRoomsRequest) ProtoMessage

func (*ListRoomsRequest) ProtoMessage()

func (*ListRoomsRequest) ProtoReflect

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

func (*ListRoomsRequest) Reset

func (x *ListRoomsRequest) Reset()

func (*ListRoomsRequest) String

func (x *ListRoomsRequest) String() string

func (*ListRoomsRequest) Validate

func (m *ListRoomsRequest) Validate() error

Validate checks the field values on ListRoomsRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type ListRoomsRequestValidationError

type ListRoomsRequestValidationError struct {
	// contains filtered or unexported fields
}

ListRoomsRequestValidationError is the validation error returned by ListRoomsRequest.Validate if the designated constraints aren't met.

func (ListRoomsRequestValidationError) Cause

Cause function returns cause value.

func (ListRoomsRequestValidationError) Error

Error satisfies the builtin error interface

func (ListRoomsRequestValidationError) ErrorName

ErrorName returns error name.

func (ListRoomsRequestValidationError) Field

Field function returns field value.

func (ListRoomsRequestValidationError) Key

Key function returns key value.

func (ListRoomsRequestValidationError) Reason

Reason function returns reason value.

type Room

type Room struct {
	Id   int32  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*Room) Descriptor deprecated

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

Deprecated: Use Room.ProtoReflect.Descriptor instead.

func (*Room) GetId

func (x *Room) GetId() int32

func (*Room) GetName

func (x *Room) GetName() string

func (*Room) ProtoMessage

func (*Room) ProtoMessage()

func (*Room) ProtoReflect

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

func (*Room) Reset

func (x *Room) Reset()

func (*Room) String

func (x *Room) String() string

func (*Room) Validate

func (m *Room) Validate() error

Validate checks the field values on Room with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type RoomValidationError

type RoomValidationError struct {
	// contains filtered or unexported fields
}

RoomValidationError is the validation error returned by Room.Validate if the designated constraints aren't met.

func (RoomValidationError) Cause

func (e RoomValidationError) Cause() error

Cause function returns cause value.

func (RoomValidationError) Error

func (e RoomValidationError) Error() string

Error satisfies the builtin error interface

func (RoomValidationError) ErrorName

func (e RoomValidationError) ErrorName() string

ErrorName returns error name.

func (RoomValidationError) Field

func (e RoomValidationError) Field() string

Field function returns field value.

func (RoomValidationError) Key

func (e RoomValidationError) Key() bool

Key function returns key value.

func (RoomValidationError) Reason

func (e RoomValidationError) Reason() string

Reason function returns reason value.

type RoomsArray

type RoomsArray struct {
	Rooms []*Room `protobuf:"bytes,1,rep,name=rooms,proto3" json:"rooms,omitempty"`
	// contains filtered or unexported fields
}

func (*RoomsArray) Descriptor deprecated

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

Deprecated: Use RoomsArray.ProtoReflect.Descriptor instead.

func (*RoomsArray) GetRooms

func (x *RoomsArray) GetRooms() []*Room

func (*RoomsArray) ProtoMessage

func (*RoomsArray) ProtoMessage()

func (*RoomsArray) ProtoReflect

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

func (*RoomsArray) Reset

func (x *RoomsArray) Reset()

func (*RoomsArray) String

func (x *RoomsArray) String() string

func (*RoomsArray) Validate

func (m *RoomsArray) Validate() error

Validate checks the field values on RoomsArray with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type RoomsArrayValidationError

type RoomsArrayValidationError struct {
	// contains filtered or unexported fields
}

RoomsArrayValidationError is the validation error returned by RoomsArray.Validate if the designated constraints aren't met.

func (RoomsArrayValidationError) Cause

func (e RoomsArrayValidationError) Cause() error

Cause function returns cause value.

func (RoomsArrayValidationError) Error

Error satisfies the builtin error interface

func (RoomsArrayValidationError) ErrorName

func (e RoomsArrayValidationError) ErrorName() string

ErrorName returns error name.

func (RoomsArrayValidationError) Field

Field function returns field value.

func (RoomsArrayValidationError) Key

Key function returns key value.

func (RoomsArrayValidationError) Reason

func (e RoomsArrayValidationError) Reason() string

Reason function returns reason value.

type UnimplementedWellnessServiceServer

type UnimplementedWellnessServiceServer struct {
}

UnimplementedWellnessServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedWellnessServiceServer) GetLessonsOfRoom

func (*UnimplementedWellnessServiceServer) GetRoom

func (*UnimplementedWellnessServiceServer) ListLessons

func (*UnimplementedWellnessServiceServer) ListRooms

type WellnessServiceClient

type WellnessServiceClient interface {
	ListRooms(ctx context.Context, in *ListRoomsRequest, opts ...grpc.CallOption) (*RoomsArray, error)
	GetLessonsOfRoom(ctx context.Context, in *GetRoomRequest, opts ...grpc.CallOption) (*LessonsArray, error)
	GetRoom(ctx context.Context, in *GetRoomRequest, opts ...grpc.CallOption) (*Room, error)
	ListLessons(ctx context.Context, in *ListLessonsRequest, opts ...grpc.CallOption) (*LessonsArray, error)
}

WellnessServiceClient is the client API for WellnessService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

type WellnessServiceServer

type WellnessServiceServer interface {
	ListRooms(context.Context, *ListRoomsRequest) (*RoomsArray, error)
	GetLessonsOfRoom(context.Context, *GetRoomRequest) (*LessonsArray, error)
	GetRoom(context.Context, *GetRoomRequest) (*Room, error)
	ListLessons(context.Context, *ListLessonsRequest) (*LessonsArray, error)
}

WellnessServiceServer is the server API for WellnessService service.

Jump to

Keyboard shortcuts

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