Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterCalculatorServer(s grpc.ServiceRegistrar, srv CalculatorServer)
- type Activity
- type CalculatorClient
- type CalculatorServer
- type CaloriesDistribution
- func (CaloriesDistribution) Descriptor() protoreflect.EnumDescriptor
- func (x CaloriesDistribution) Enum() *CaloriesDistribution
- func (CaloriesDistribution) EnumDescriptor() ([]byte, []int)deprecated
- func (x CaloriesDistribution) Number() protoreflect.EnumNumber
- func (x CaloriesDistribution) String() string
- func (CaloriesDistribution) Type() protoreflect.EnumType
- type CreateOfflineMacroDistribution
- func (*CreateOfflineMacroDistribution) Descriptor() ([]byte, []int)deprecated
- func (x *CreateOfflineMacroDistribution) GetUserMacro() *OfflineUserMacroDistribution
- func (*CreateOfflineMacroDistribution) ProtoMessage()
- func (x *CreateOfflineMacroDistribution) ProtoReflect() protoreflect.Message
- func (x *CreateOfflineMacroDistribution) Reset()
- func (x *CreateOfflineMacroDistribution) String() string
- type CreateOfflineUserMacroRequest
- func (*CreateOfflineUserMacroRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateOfflineUserMacroRequest) GetUserMacro() *OfflineUserMacroDistribution
- func (*CreateOfflineUserMacroRequest) ProtoMessage()
- func (x *CreateOfflineUserMacroRequest) ProtoReflect() protoreflect.Message
- func (x *CreateOfflineUserMacroRequest) Reset()
- func (x *CreateOfflineUserMacroRequest) String() string
- type CreateOfflineUserMacroResponse
- func (*CreateOfflineUserMacroResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CreateOfflineUserMacroResponse) GetUserMacro() *OfflineUserMacroDistribution
- func (*CreateOfflineUserMacroResponse) ProtoMessage()
- func (x *CreateOfflineUserMacroResponse) ProtoReflect() protoreflect.Message
- func (x *CreateOfflineUserMacroResponse) Reset()
- func (x *CreateOfflineUserMacroResponse) String() string
- type CreateUserMacroRequest
- func (*CreateUserMacroRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateUserMacroRequest) GetIsCurrent() bool
- func (x *CreateUserMacroRequest) GetUserMacro() *UserMacroDistribution
- func (*CreateUserMacroRequest) ProtoMessage()
- func (x *CreateUserMacroRequest) ProtoReflect() protoreflect.Message
- func (x *CreateUserMacroRequest) Reset()
- func (x *CreateUserMacroRequest) String() string
- type CreateUserMacroResponse
- func (*CreateUserMacroResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CreateUserMacroResponse) GetUserMacro() *UserMacroDistribution
- func (*CreateUserMacroResponse) ProtoMessage()
- func (x *CreateUserMacroResponse) ProtoReflect() protoreflect.Message
- func (x *CreateUserMacroResponse) Reset()
- func (x *CreateUserMacroResponse) String() string
- type DeleteUserMacroRequest
- func (*DeleteUserMacroRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteUserMacroRequest) GetMacroId() string
- func (*DeleteUserMacroRequest) ProtoMessage()
- func (x *DeleteUserMacroRequest) ProtoReflect() protoreflect.Message
- func (x *DeleteUserMacroRequest) Reset()
- func (x *DeleteUserMacroRequest) String() string
- type DeleteUserMacroResponse
- type Gender
- type GetAllUserMacrosRequest
- func (*GetAllUserMacrosRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetAllUserMacrosRequest) GetUserId() string
- func (*GetAllUserMacrosRequest) ProtoMessage()
- func (x *GetAllUserMacrosRequest) ProtoReflect() protoreflect.Message
- func (x *GetAllUserMacrosRequest) Reset()
- func (x *GetAllUserMacrosRequest) String() string
- type GetAllUserMacrosResponse
- func (*GetAllUserMacrosResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetAllUserMacrosResponse) GetUserMacros() []*UserMacroDistribution
- func (*GetAllUserMacrosResponse) ProtoMessage()
- func (x *GetAllUserMacrosResponse) ProtoReflect() protoreflect.Message
- func (x *GetAllUserMacrosResponse) Reset()
- func (x *GetAllUserMacrosResponse) String() string
- type GetUserMacroRequest
- func (*GetUserMacroRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetUserMacroRequest) GetPlanId() string
- func (*GetUserMacroRequest) ProtoMessage()
- func (x *GetUserMacroRequest) ProtoReflect() protoreflect.Message
- func (x *GetUserMacroRequest) Reset()
- func (x *GetUserMacroRequest) String() string
- type GetUserMacroResponse
- func (*GetUserMacroResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetUserMacroResponse) GetUserMacro() *UserMacroDistribution
- func (*GetUserMacroResponse) ProtoMessage()
- func (x *GetUserMacroResponse) ProtoReflect() protoreflect.Message
- func (x *GetUserMacroResponse) Reset()
- func (x *GetUserMacroResponse) String() string
- type NilRes
- type Objective
- type OfflineUserMacroDistribution
- func (*OfflineUserMacroDistribution) Descriptor() ([]byte, []int)deprecated
- func (x *OfflineUserMacroDistribution) GetActivity() string
- func (x *OfflineUserMacroDistribution) GetActivityDescription() string
- func (x *OfflineUserMacroDistribution) GetAge() uint32
- func (x *OfflineUserMacroDistribution) GetBmr() uint32
- func (x *OfflineUserMacroDistribution) GetCaloriesDistribution() CaloriesDistribution
- func (x *OfflineUserMacroDistribution) GetCaloriesDistributionDescription() string
- func (x *OfflineUserMacroDistribution) GetCarbs() uint32
- func (x *OfflineUserMacroDistribution) GetCreatedAt() string
- func (x *OfflineUserMacroDistribution) GetFats() uint32
- func (x *OfflineUserMacroDistribution) GetGender() string
- func (x *OfflineUserMacroDistribution) GetGoal() uint32
- func (x *OfflineUserMacroDistribution) GetHeight() uint32
- func (x *OfflineUserMacroDistribution) GetObjective() string
- func (x *OfflineUserMacroDistribution) GetObjectiveDescription() string
- func (x *OfflineUserMacroDistribution) GetProtein() uint32
- func (x *OfflineUserMacroDistribution) GetSystem() string
- func (x *OfflineUserMacroDistribution) GetTdee() uint32
- func (x *OfflineUserMacroDistribution) GetWeight() uint32
- func (*OfflineUserMacroDistribution) ProtoMessage()
- func (x *OfflineUserMacroDistribution) ProtoReflect() protoreflect.Message
- func (x *OfflineUserMacroDistribution) Reset()
- func (x *OfflineUserMacroDistribution) String() string
- type SetActiveUserMacroRequest
- func (*SetActiveUserMacroRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SetActiveUserMacroRequest) GetMacroId() string
- func (x *SetActiveUserMacroRequest) GetUserId() string
- func (*SetActiveUserMacroRequest) ProtoMessage()
- func (x *SetActiveUserMacroRequest) ProtoReflect() protoreflect.Message
- func (x *SetActiveUserMacroRequest) Reset()
- func (x *SetActiveUserMacroRequest) String() string
- type SetActiveUserMacroResponse
- func (*SetActiveUserMacroResponse) Descriptor() ([]byte, []int)deprecated
- func (x *SetActiveUserMacroResponse) GetCurrentMacro() *UserMacroDistribution
- func (*SetActiveUserMacroResponse) ProtoMessage()
- func (x *SetActiveUserMacroResponse) ProtoReflect() protoreflect.Message
- func (x *SetActiveUserMacroResponse) Reset()
- func (x *SetActiveUserMacroResponse) String() string
- type System
- type UnimplementedCalculatorServer
- func (UnimplementedCalculatorServer) CreateOfflineUserMacro(context.Context, *CreateOfflineUserMacroRequest) (*CreateOfflineUserMacroResponse, error)
- func (UnimplementedCalculatorServer) CreateUserMacro(context.Context, *CreateUserMacroRequest) (*CreateUserMacroResponse, error)
- func (UnimplementedCalculatorServer) DeleteUserMacro(context.Context, *DeleteUserMacroRequest) (*DeleteUserMacroResponse, error)
- func (UnimplementedCalculatorServer) GetUserMacros(context.Context, *GetUserMacroRequest) (*GetUserMacroResponse, error)
- func (UnimplementedCalculatorServer) GetUsersMacros(context.Context, *GetAllUserMacrosRequest) (*GetAllUserMacrosResponse, error)
- func (UnimplementedCalculatorServer) SetActiveUserMacro(context.Context, *SetActiveUserMacroRequest) (*SetActiveUserMacroResponse, error)
- type UnsafeCalculatorServer
- type UserMacroDistribution
- func (*UserMacroDistribution) Descriptor() ([]byte, []int)deprecated
- func (x *UserMacroDistribution) GetActivity() Activity
- func (x *UserMacroDistribution) GetActivityDescription() string
- func (x *UserMacroDistribution) GetAge() uint32
- func (x *UserMacroDistribution) GetBmr() uint32
- func (x *UserMacroDistribution) GetCaloriesDistribution() CaloriesDistribution
- func (x *UserMacroDistribution) GetCaloriesDistributionDescription() string
- func (x *UserMacroDistribution) GetCarbs() uint32
- func (x *UserMacroDistribution) GetCreatedAt() *timestamppb.Timestamp
- func (x *UserMacroDistribution) GetFats() uint32
- func (x *UserMacroDistribution) GetGender() Gender
- func (x *UserMacroDistribution) GetGoal() uint32
- func (x *UserMacroDistribution) GetHeight() uint32
- func (x *UserMacroDistribution) GetId() string
- func (x *UserMacroDistribution) GetObjective() Objective
- func (x *UserMacroDistribution) GetObjectiveDescription() string
- func (x *UserMacroDistribution) GetProtein() uint32
- func (x *UserMacroDistribution) GetSystem() System
- func (x *UserMacroDistribution) GetTdee() uint32
- func (x *UserMacroDistribution) GetUserId() string
- func (x *UserMacroDistribution) GetWeight() float64
- func (*UserMacroDistribution) ProtoMessage()
- func (x *UserMacroDistribution) ProtoReflect() protoreflect.Message
- func (x *UserMacroDistribution) Reset()
- func (x *UserMacroDistribution) String() string
Constants ¶
const ( Calculator_CreateUserMacro_FullMethodName = "/fitSphere.calculator.Calculator/CreateUserMacro" Calculator_GetUsersMacros_FullMethodName = "/fitSphere.calculator.Calculator/GetUsersMacros" Calculator_GetUserMacros_FullMethodName = "/fitSphere.calculator.Calculator/GetUserMacros" Calculator_CreateOfflineUserMacro_FullMethodName = "/fitSphere.calculator.Calculator/CreateOfflineUserMacro" Calculator_DeleteUserMacro_FullMethodName = "/fitSphere.calculator.Calculator/DeleteUserMacro" Calculator_SetActiveUserMacro_FullMethodName = "/fitSphere.calculator.Calculator/SetActiveUserMacro" )
Variables ¶
var ( Objective_name = map[int32]string{ 0: "OBJECTIVE_UNSPECIFIED", 1: "MAINTENANCE", 2: "BULKING", 3: "CUTTING", } Objective_value = map[string]int32{ "OBJECTIVE_UNSPECIFIED": 0, "MAINTENANCE": 1, "BULKING": 2, "CUTTING": 3, } )
Enum value maps for Objective.
var ( Activity_name = map[int32]string{ 0: "ACTIVITY_UNSPECIFIED", 1: "SEDENTARY", 2: "LIGHT", 3: "MODERATE", 4: "HEAVY", 5: "EXTRA_HEAVY", } Activity_value = map[string]int32{ "ACTIVITY_UNSPECIFIED": 0, "SEDENTARY": 1, "LIGHT": 2, "MODERATE": 3, "HEAVY": 4, "EXTRA_HEAVY": 5, } )
Enum value maps for Activity.
var ( System_name = map[int32]string{ 0: "SYSTEM_UNSPECIFIED", 1: "METRIC", 2: "IMPERIAL", } System_value = map[string]int32{ "SYSTEM_UNSPECIFIED": 0, "METRIC": 1, "IMPERIAL": 2, } )
Enum value maps for System.
var ( Gender_name = map[int32]string{ 0: "GENDER_UNSPECIFIED", 1: "MALE", 2: "FEMALE", } Gender_value = map[string]int32{ "GENDER_UNSPECIFIED": 0, "MALE": 1, "FEMALE": 2, } )
Enum value maps for Gender.
var ( CaloriesDistribution_name = map[int32]string{ 0: "CD_UNSPECIFIED", 1: "HIGH_CALORIE", 2: "MODERATE_CALORIE", 3: "LOW_CALORIE", } CaloriesDistribution_value = map[string]int32{ "CD_UNSPECIFIED": 0, "HIGH_CALORIE": 1, "MODERATE_CALORIE": 2, "LOW_CALORIE": 3, } )
Enum value maps for CaloriesDistribution.
var Calculator_ServiceDesc = grpc.ServiceDesc{ ServiceName: "fitSphere.calculator.Calculator", HandlerType: (*CalculatorServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateUserMacro", Handler: _Calculator_CreateUserMacro_Handler, }, { MethodName: "GetUsersMacros", Handler: _Calculator_GetUsersMacros_Handler, }, { MethodName: "GetUserMacros", Handler: _Calculator_GetUserMacros_Handler, }, { MethodName: "CreateOfflineUserMacro", Handler: _Calculator_CreateOfflineUserMacro_Handler, }, { MethodName: "DeleteUserMacro", Handler: _Calculator_DeleteUserMacro_Handler, }, { MethodName: "SetActiveUserMacro", Handler: _Calculator_SetActiveUserMacro_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "calculator.proto", }
Calculator_ServiceDesc is the grpc.ServiceDesc for Calculator service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_calculator_proto protoreflect.FileDescriptor
Functions ¶
func RegisterCalculatorServer ¶
func RegisterCalculatorServer(s grpc.ServiceRegistrar, srv CalculatorServer)
Types ¶
type Activity ¶
type Activity int32
Enum for Activity
const ( Activity_ACTIVITY_UNSPECIFIED Activity = 0 // Default value for unspecified activity Activity_SEDENTARY Activity = 1 // "Sedentary" Activity_LIGHT Activity = 2 // "LightActivity" Activity_MODERATE Activity = 3 // "Moderate" Activity_HEAVY Activity = 4 // "Heavy" Activity_EXTRA_HEAVY Activity = 5 // "ExtraHeavy" )
func (Activity) Descriptor ¶
func (Activity) Descriptor() protoreflect.EnumDescriptor
func (Activity) EnumDescriptor
deprecated
func (Activity) Number ¶
func (x Activity) Number() protoreflect.EnumNumber
func (Activity) Type ¶
func (Activity) Type() protoreflect.EnumType
type CalculatorClient ¶
type CalculatorClient interface { CreateUserMacro(ctx context.Context, in *CreateUserMacroRequest, opts ...grpc.CallOption) (*CreateUserMacroResponse, error) GetUsersMacros(ctx context.Context, in *GetAllUserMacrosRequest, opts ...grpc.CallOption) (*GetAllUserMacrosResponse, error) GetUserMacros(ctx context.Context, in *GetUserMacroRequest, opts ...grpc.CallOption) (*GetUserMacroResponse, error) CreateOfflineUserMacro(ctx context.Context, in *CreateOfflineUserMacroRequest, opts ...grpc.CallOption) (*CreateOfflineUserMacroResponse, error) DeleteUserMacro(ctx context.Context, in *DeleteUserMacroRequest, opts ...grpc.CallOption) (*DeleteUserMacroResponse, error) SetActiveUserMacro(ctx context.Context, in *SetActiveUserMacroRequest, opts ...grpc.CallOption) (*SetActiveUserMacroResponse, error) }
CalculatorClient is the client API for Calculator 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.
Service definition for the calculator
func NewCalculatorClient ¶
func NewCalculatorClient(cc grpc.ClientConnInterface) CalculatorClient
type CalculatorServer ¶
type CalculatorServer interface { CreateUserMacro(context.Context, *CreateUserMacroRequest) (*CreateUserMacroResponse, error) GetUsersMacros(context.Context, *GetAllUserMacrosRequest) (*GetAllUserMacrosResponse, error) GetUserMacros(context.Context, *GetUserMacroRequest) (*GetUserMacroResponse, error) CreateOfflineUserMacro(context.Context, *CreateOfflineUserMacroRequest) (*CreateOfflineUserMacroResponse, error) DeleteUserMacro(context.Context, *DeleteUserMacroRequest) (*DeleteUserMacroResponse, error) SetActiveUserMacro(context.Context, *SetActiveUserMacroRequest) (*SetActiveUserMacroResponse, error) // contains filtered or unexported methods }
CalculatorServer is the server API for Calculator service. All implementations must embed UnimplementedCalculatorServer for forward compatibility.
Service definition for the calculator
type CaloriesDistribution ¶
type CaloriesDistribution int32
const ( CaloriesDistribution_CD_UNSPECIFIED CaloriesDistribution = 0 CaloriesDistribution_HIGH_CALORIE CaloriesDistribution = 1 CaloriesDistribution_MODERATE_CALORIE CaloriesDistribution = 2 CaloriesDistribution_LOW_CALORIE CaloriesDistribution = 3 )
func (CaloriesDistribution) Descriptor ¶
func (CaloriesDistribution) Descriptor() protoreflect.EnumDescriptor
func (CaloriesDistribution) Enum ¶
func (x CaloriesDistribution) Enum() *CaloriesDistribution
func (CaloriesDistribution) EnumDescriptor
deprecated
func (CaloriesDistribution) EnumDescriptor() ([]byte, []int)
Deprecated: Use CaloriesDistribution.Descriptor instead.
func (CaloriesDistribution) Number ¶
func (x CaloriesDistribution) Number() protoreflect.EnumNumber
func (CaloriesDistribution) String ¶
func (x CaloriesDistribution) String() string
func (CaloriesDistribution) Type ¶
func (CaloriesDistribution) Type() protoreflect.EnumType
type CreateOfflineMacroDistribution ¶
type CreateOfflineMacroDistribution struct { UserMacro *OfflineUserMacroDistribution `protobuf:"bytes,1,opt,name=user_macro,json=userMacro,proto3" json:"user_macro,omitempty"` // contains filtered or unexported fields }
func (*CreateOfflineMacroDistribution) Descriptor
deprecated
func (*CreateOfflineMacroDistribution) Descriptor() ([]byte, []int)
Deprecated: Use CreateOfflineMacroDistribution.ProtoReflect.Descriptor instead.
func (*CreateOfflineMacroDistribution) GetUserMacro ¶
func (x *CreateOfflineMacroDistribution) GetUserMacro() *OfflineUserMacroDistribution
func (*CreateOfflineMacroDistribution) ProtoMessage ¶
func (*CreateOfflineMacroDistribution) ProtoMessage()
func (*CreateOfflineMacroDistribution) ProtoReflect ¶
func (x *CreateOfflineMacroDistribution) ProtoReflect() protoreflect.Message
func (*CreateOfflineMacroDistribution) Reset ¶
func (x *CreateOfflineMacroDistribution) Reset()
func (*CreateOfflineMacroDistribution) String ¶
func (x *CreateOfflineMacroDistribution) String() string
type CreateOfflineUserMacroRequest ¶
type CreateOfflineUserMacroRequest struct { UserMacro *OfflineUserMacroDistribution `protobuf:"bytes,1,opt,name=user_macro,json=userMacro,proto3" json:"user_macro,omitempty"` // contains filtered or unexported fields }
Offline service
func (*CreateOfflineUserMacroRequest) Descriptor
deprecated
func (*CreateOfflineUserMacroRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateOfflineUserMacroRequest.ProtoReflect.Descriptor instead.
func (*CreateOfflineUserMacroRequest) GetUserMacro ¶
func (x *CreateOfflineUserMacroRequest) GetUserMacro() *OfflineUserMacroDistribution
func (*CreateOfflineUserMacroRequest) ProtoMessage ¶
func (*CreateOfflineUserMacroRequest) ProtoMessage()
func (*CreateOfflineUserMacroRequest) ProtoReflect ¶
func (x *CreateOfflineUserMacroRequest) ProtoReflect() protoreflect.Message
func (*CreateOfflineUserMacroRequest) Reset ¶
func (x *CreateOfflineUserMacroRequest) Reset()
func (*CreateOfflineUserMacroRequest) String ¶
func (x *CreateOfflineUserMacroRequest) String() string
type CreateOfflineUserMacroResponse ¶
type CreateOfflineUserMacroResponse struct { UserMacro *OfflineUserMacroDistribution `protobuf:"bytes,1,opt,name=user_macro,json=userMacro,proto3" json:"user_macro,omitempty"` // contains filtered or unexported fields }
func (*CreateOfflineUserMacroResponse) Descriptor
deprecated
func (*CreateOfflineUserMacroResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateOfflineUserMacroResponse.ProtoReflect.Descriptor instead.
func (*CreateOfflineUserMacroResponse) GetUserMacro ¶
func (x *CreateOfflineUserMacroResponse) GetUserMacro() *OfflineUserMacroDistribution
func (*CreateOfflineUserMacroResponse) ProtoMessage ¶
func (*CreateOfflineUserMacroResponse) ProtoMessage()
func (*CreateOfflineUserMacroResponse) ProtoReflect ¶
func (x *CreateOfflineUserMacroResponse) ProtoReflect() protoreflect.Message
func (*CreateOfflineUserMacroResponse) Reset ¶
func (x *CreateOfflineUserMacroResponse) Reset()
func (*CreateOfflineUserMacroResponse) String ¶
func (x *CreateOfflineUserMacroResponse) String() string
type CreateUserMacroRequest ¶
type CreateUserMacroRequest struct { UserMacro *UserMacroDistribution `protobuf:"bytes,1,opt,name=user_macro,json=userMacro,proto3" json:"user_macro,omitempty"` IsCurrent bool `protobuf:"varint,2,opt,name=is_current,json=isCurrent,proto3" json:"is_current,omitempty"` // contains filtered or unexported fields }
Request and response messages for the Create operation
func (*CreateUserMacroRequest) Descriptor
deprecated
func (*CreateUserMacroRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateUserMacroRequest.ProtoReflect.Descriptor instead.
func (*CreateUserMacroRequest) GetIsCurrent ¶
func (x *CreateUserMacroRequest) GetIsCurrent() bool
func (*CreateUserMacroRequest) GetUserMacro ¶
func (x *CreateUserMacroRequest) GetUserMacro() *UserMacroDistribution
func (*CreateUserMacroRequest) ProtoMessage ¶
func (*CreateUserMacroRequest) ProtoMessage()
func (*CreateUserMacroRequest) ProtoReflect ¶
func (x *CreateUserMacroRequest) ProtoReflect() protoreflect.Message
func (*CreateUserMacroRequest) Reset ¶
func (x *CreateUserMacroRequest) Reset()
func (*CreateUserMacroRequest) String ¶
func (x *CreateUserMacroRequest) String() string
type CreateUserMacroResponse ¶
type CreateUserMacroResponse struct { UserMacro *UserMacroDistribution `protobuf:"bytes,1,opt,name=user_macro,json=userMacro,proto3" json:"user_macro,omitempty"` // contains filtered or unexported fields }
func (*CreateUserMacroResponse) Descriptor
deprecated
func (*CreateUserMacroResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateUserMacroResponse.ProtoReflect.Descriptor instead.
func (*CreateUserMacroResponse) GetUserMacro ¶
func (x *CreateUserMacroResponse) GetUserMacro() *UserMacroDistribution
func (*CreateUserMacroResponse) ProtoMessage ¶
func (*CreateUserMacroResponse) ProtoMessage()
func (*CreateUserMacroResponse) ProtoReflect ¶
func (x *CreateUserMacroResponse) ProtoReflect() protoreflect.Message
func (*CreateUserMacroResponse) Reset ¶
func (x *CreateUserMacroResponse) Reset()
func (*CreateUserMacroResponse) String ¶
func (x *CreateUserMacroResponse) String() string
type DeleteUserMacroRequest ¶
type DeleteUserMacroRequest struct { MacroId string `protobuf:"bytes,1,opt,name=macro_id,json=macroId,proto3" json:"macro_id,omitempty"` // contains filtered or unexported fields }
func (*DeleteUserMacroRequest) Descriptor
deprecated
func (*DeleteUserMacroRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteUserMacroRequest.ProtoReflect.Descriptor instead.
func (*DeleteUserMacroRequest) GetMacroId ¶
func (x *DeleteUserMacroRequest) GetMacroId() string
func (*DeleteUserMacroRequest) ProtoMessage ¶
func (*DeleteUserMacroRequest) ProtoMessage()
func (*DeleteUserMacroRequest) ProtoReflect ¶
func (x *DeleteUserMacroRequest) ProtoReflect() protoreflect.Message
func (*DeleteUserMacroRequest) Reset ¶
func (x *DeleteUserMacroRequest) Reset()
func (*DeleteUserMacroRequest) String ¶
func (x *DeleteUserMacroRequest) String() string
type DeleteUserMacroResponse ¶
type DeleteUserMacroResponse struct {
// contains filtered or unexported fields
}
func (*DeleteUserMacroResponse) Descriptor
deprecated
func (*DeleteUserMacroResponse) Descriptor() ([]byte, []int)
Deprecated: Use DeleteUserMacroResponse.ProtoReflect.Descriptor instead.
func (*DeleteUserMacroResponse) ProtoMessage ¶
func (*DeleteUserMacroResponse) ProtoMessage()
func (*DeleteUserMacroResponse) ProtoReflect ¶
func (x *DeleteUserMacroResponse) ProtoReflect() protoreflect.Message
func (*DeleteUserMacroResponse) Reset ¶
func (x *DeleteUserMacroResponse) Reset()
func (*DeleteUserMacroResponse) String ¶
func (x *DeleteUserMacroResponse) String() string
type Gender ¶
type Gender int32
Enum for Gender
func (Gender) Descriptor ¶
func (Gender) Descriptor() protoreflect.EnumDescriptor
func (Gender) EnumDescriptor
deprecated
func (Gender) Number ¶
func (x Gender) Number() protoreflect.EnumNumber
func (Gender) Type ¶
func (Gender) Type() protoreflect.EnumType
type GetAllUserMacrosRequest ¶
type GetAllUserMacrosRequest struct { UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // contains filtered or unexported fields }
Request and response messages for the GetAll operation
func (*GetAllUserMacrosRequest) Descriptor
deprecated
func (*GetAllUserMacrosRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetAllUserMacrosRequest.ProtoReflect.Descriptor instead.
func (*GetAllUserMacrosRequest) GetUserId ¶
func (x *GetAllUserMacrosRequest) GetUserId() string
func (*GetAllUserMacrosRequest) ProtoMessage ¶
func (*GetAllUserMacrosRequest) ProtoMessage()
func (*GetAllUserMacrosRequest) ProtoReflect ¶
func (x *GetAllUserMacrosRequest) ProtoReflect() protoreflect.Message
func (*GetAllUserMacrosRequest) Reset ¶
func (x *GetAllUserMacrosRequest) Reset()
func (*GetAllUserMacrosRequest) String ¶
func (x *GetAllUserMacrosRequest) String() string
type GetAllUserMacrosResponse ¶
type GetAllUserMacrosResponse struct { UserMacros []*UserMacroDistribution `protobuf:"bytes,1,rep,name=user_macros,json=userMacros,proto3" json:"user_macros,omitempty"` // contains filtered or unexported fields }
func (*GetAllUserMacrosResponse) Descriptor
deprecated
func (*GetAllUserMacrosResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetAllUserMacrosResponse.ProtoReflect.Descriptor instead.
func (*GetAllUserMacrosResponse) GetUserMacros ¶
func (x *GetAllUserMacrosResponse) GetUserMacros() []*UserMacroDistribution
func (*GetAllUserMacrosResponse) ProtoMessage ¶
func (*GetAllUserMacrosResponse) ProtoMessage()
func (*GetAllUserMacrosResponse) ProtoReflect ¶
func (x *GetAllUserMacrosResponse) ProtoReflect() protoreflect.Message
func (*GetAllUserMacrosResponse) Reset ¶
func (x *GetAllUserMacrosResponse) Reset()
func (*GetAllUserMacrosResponse) String ¶
func (x *GetAllUserMacrosResponse) String() string
type GetUserMacroRequest ¶
type GetUserMacroRequest struct { PlanId string `protobuf:"bytes,1,opt,name=plan_id,json=planId,proto3" json:"plan_id,omitempty"` // contains filtered or unexported fields }
Request and response messages for the Get operation
func (*GetUserMacroRequest) Descriptor
deprecated
func (*GetUserMacroRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetUserMacroRequest.ProtoReflect.Descriptor instead.
func (*GetUserMacroRequest) GetPlanId ¶
func (x *GetUserMacroRequest) GetPlanId() string
func (*GetUserMacroRequest) ProtoMessage ¶
func (*GetUserMacroRequest) ProtoMessage()
func (*GetUserMacroRequest) ProtoReflect ¶
func (x *GetUserMacroRequest) ProtoReflect() protoreflect.Message
func (*GetUserMacroRequest) Reset ¶
func (x *GetUserMacroRequest) Reset()
func (*GetUserMacroRequest) String ¶
func (x *GetUserMacroRequest) String() string
type GetUserMacroResponse ¶
type GetUserMacroResponse struct { UserMacro *UserMacroDistribution `protobuf:"bytes,1,opt,name=user_macro,json=userMacro,proto3" json:"user_macro,omitempty"` // contains filtered or unexported fields }
func (*GetUserMacroResponse) Descriptor
deprecated
func (*GetUserMacroResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetUserMacroResponse.ProtoReflect.Descriptor instead.
func (*GetUserMacroResponse) GetUserMacro ¶
func (x *GetUserMacroResponse) GetUserMacro() *UserMacroDistribution
func (*GetUserMacroResponse) ProtoMessage ¶
func (*GetUserMacroResponse) ProtoMessage()
func (*GetUserMacroResponse) ProtoReflect ¶
func (x *GetUserMacroResponse) ProtoReflect() protoreflect.Message
func (*GetUserMacroResponse) Reset ¶
func (x *GetUserMacroResponse) Reset()
func (*GetUserMacroResponse) String ¶
func (x *GetUserMacroResponse) String() string
type NilRes ¶
type NilRes struct {
// contains filtered or unexported fields
}
func (*NilRes) Descriptor
deprecated
func (*NilRes) ProtoMessage ¶
func (*NilRes) ProtoMessage()
func (*NilRes) ProtoReflect ¶
func (x *NilRes) ProtoReflect() protoreflect.Message
type Objective ¶
type Objective int32
Enum for Objective
func (Objective) Descriptor ¶
func (Objective) Descriptor() protoreflect.EnumDescriptor
func (Objective) EnumDescriptor
deprecated
func (Objective) Number ¶
func (x Objective) Number() protoreflect.EnumNumber
func (Objective) Type ¶
func (Objective) Type() protoreflect.EnumType
type OfflineUserMacroDistribution ¶
type OfflineUserMacroDistribution struct { Age uint32 `protobuf:"varint,1,opt,name=age,proto3" json:"age,omitempty"` Height uint32 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` Weight uint32 `protobuf:"varint,3,opt,name=weight,proto3" json:"weight,omitempty"` Gender string `protobuf:"bytes,4,opt,name=gender,proto3" json:"gender,omitempty"` System string `protobuf:"bytes,5,opt,name=system,proto3" json:"system,omitempty"` Activity string `protobuf:"bytes,6,opt,name=activity,proto3" json:"activity,omitempty"` ActivityDescription string `protobuf:"bytes,7,opt,name=activity_description,json=activityDescription,proto3" json:"activity_description,omitempty"` Objective string `protobuf:"bytes,8,opt,name=objective,proto3" json:"objective,omitempty"` ObjectiveDescription string `protobuf:"bytes,9,opt,name=objective_description,json=objectiveDescription,proto3" json:"objective_description,omitempty"` CaloriesDistribution CaloriesDistribution `` /* 170-byte string literal not displayed */ CaloriesDistributionDescription string `` /* 157-byte string literal not displayed */ Protein uint32 `protobuf:"varint,12,opt,name=protein,proto3" json:"protein,omitempty"` Fats uint32 `protobuf:"varint,13,opt,name=fats,proto3" json:"fats,omitempty"` Carbs uint32 `protobuf:"varint,14,opt,name=carbs,proto3" json:"carbs,omitempty"` Bmr uint32 `protobuf:"varint,15,opt,name=bmr,proto3" json:"bmr,omitempty"` Tdee uint32 `protobuf:"varint,16,opt,name=tdee,proto3" json:"tdee,omitempty"` Goal uint32 `protobuf:"varint,17,opt,name=goal,proto3" json:"goal,omitempty"` CreatedAt string `protobuf:"bytes,18,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` // contains filtered or unexported fields }
func (*OfflineUserMacroDistribution) Descriptor
deprecated
func (*OfflineUserMacroDistribution) Descriptor() ([]byte, []int)
Deprecated: Use OfflineUserMacroDistribution.ProtoReflect.Descriptor instead.
func (*OfflineUserMacroDistribution) GetActivity ¶
func (x *OfflineUserMacroDistribution) GetActivity() string
func (*OfflineUserMacroDistribution) GetActivityDescription ¶
func (x *OfflineUserMacroDistribution) GetActivityDescription() string
func (*OfflineUserMacroDistribution) GetAge ¶
func (x *OfflineUserMacroDistribution) GetAge() uint32
func (*OfflineUserMacroDistribution) GetBmr ¶
func (x *OfflineUserMacroDistribution) GetBmr() uint32
func (*OfflineUserMacroDistribution) GetCaloriesDistribution ¶
func (x *OfflineUserMacroDistribution) GetCaloriesDistribution() CaloriesDistribution
func (*OfflineUserMacroDistribution) GetCaloriesDistributionDescription ¶
func (x *OfflineUserMacroDistribution) GetCaloriesDistributionDescription() string
func (*OfflineUserMacroDistribution) GetCarbs ¶
func (x *OfflineUserMacroDistribution) GetCarbs() uint32
func (*OfflineUserMacroDistribution) GetCreatedAt ¶
func (x *OfflineUserMacroDistribution) GetCreatedAt() string
func (*OfflineUserMacroDistribution) GetFats ¶
func (x *OfflineUserMacroDistribution) GetFats() uint32
func (*OfflineUserMacroDistribution) GetGender ¶
func (x *OfflineUserMacroDistribution) GetGender() string
func (*OfflineUserMacroDistribution) GetGoal ¶
func (x *OfflineUserMacroDistribution) GetGoal() uint32
func (*OfflineUserMacroDistribution) GetHeight ¶
func (x *OfflineUserMacroDistribution) GetHeight() uint32
func (*OfflineUserMacroDistribution) GetObjective ¶
func (x *OfflineUserMacroDistribution) GetObjective() string
func (*OfflineUserMacroDistribution) GetObjectiveDescription ¶
func (x *OfflineUserMacroDistribution) GetObjectiveDescription() string
func (*OfflineUserMacroDistribution) GetProtein ¶
func (x *OfflineUserMacroDistribution) GetProtein() uint32
func (*OfflineUserMacroDistribution) GetSystem ¶
func (x *OfflineUserMacroDistribution) GetSystem() string
func (*OfflineUserMacroDistribution) GetTdee ¶
func (x *OfflineUserMacroDistribution) GetTdee() uint32
func (*OfflineUserMacroDistribution) GetWeight ¶
func (x *OfflineUserMacroDistribution) GetWeight() uint32
func (*OfflineUserMacroDistribution) ProtoMessage ¶
func (*OfflineUserMacroDistribution) ProtoMessage()
func (*OfflineUserMacroDistribution) ProtoReflect ¶
func (x *OfflineUserMacroDistribution) ProtoReflect() protoreflect.Message
func (*OfflineUserMacroDistribution) Reset ¶
func (x *OfflineUserMacroDistribution) Reset()
func (*OfflineUserMacroDistribution) String ¶
func (x *OfflineUserMacroDistribution) String() string
type SetActiveUserMacroRequest ¶
type SetActiveUserMacroRequest struct { UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` MacroId string `protobuf:"bytes,2,opt,name=macro_id,json=macroId,proto3" json:"macro_id,omitempty"` // contains filtered or unexported fields }
func (*SetActiveUserMacroRequest) Descriptor
deprecated
func (*SetActiveUserMacroRequest) Descriptor() ([]byte, []int)
Deprecated: Use SetActiveUserMacroRequest.ProtoReflect.Descriptor instead.
func (*SetActiveUserMacroRequest) GetMacroId ¶
func (x *SetActiveUserMacroRequest) GetMacroId() string
func (*SetActiveUserMacroRequest) GetUserId ¶
func (x *SetActiveUserMacroRequest) GetUserId() string
func (*SetActiveUserMacroRequest) ProtoMessage ¶
func (*SetActiveUserMacroRequest) ProtoMessage()
func (*SetActiveUserMacroRequest) ProtoReflect ¶
func (x *SetActiveUserMacroRequest) ProtoReflect() protoreflect.Message
func (*SetActiveUserMacroRequest) Reset ¶
func (x *SetActiveUserMacroRequest) Reset()
func (*SetActiveUserMacroRequest) String ¶
func (x *SetActiveUserMacroRequest) String() string
type SetActiveUserMacroResponse ¶
type SetActiveUserMacroResponse struct { CurrentMacro *UserMacroDistribution `protobuf:"bytes,1,opt,name=current_macro,json=currentMacro,proto3" json:"current_macro,omitempty"` // contains filtered or unexported fields }
func (*SetActiveUserMacroResponse) Descriptor
deprecated
func (*SetActiveUserMacroResponse) Descriptor() ([]byte, []int)
Deprecated: Use SetActiveUserMacroResponse.ProtoReflect.Descriptor instead.
func (*SetActiveUserMacroResponse) GetCurrentMacro ¶
func (x *SetActiveUserMacroResponse) GetCurrentMacro() *UserMacroDistribution
func (*SetActiveUserMacroResponse) ProtoMessage ¶
func (*SetActiveUserMacroResponse) ProtoMessage()
func (*SetActiveUserMacroResponse) ProtoReflect ¶
func (x *SetActiveUserMacroResponse) ProtoReflect() protoreflect.Message
func (*SetActiveUserMacroResponse) Reset ¶
func (x *SetActiveUserMacroResponse) Reset()
func (*SetActiveUserMacroResponse) String ¶
func (x *SetActiveUserMacroResponse) String() string
type System ¶
type System int32
Enum for System
func (System) Descriptor ¶
func (System) Descriptor() protoreflect.EnumDescriptor
func (System) EnumDescriptor
deprecated
func (System) Number ¶
func (x System) Number() protoreflect.EnumNumber
func (System) Type ¶
func (System) Type() protoreflect.EnumType
type UnimplementedCalculatorServer ¶
type UnimplementedCalculatorServer struct{}
UnimplementedCalculatorServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedCalculatorServer) CreateOfflineUserMacro ¶
func (UnimplementedCalculatorServer) CreateOfflineUserMacro(context.Context, *CreateOfflineUserMacroRequest) (*CreateOfflineUserMacroResponse, error)
func (UnimplementedCalculatorServer) CreateUserMacro ¶
func (UnimplementedCalculatorServer) CreateUserMacro(context.Context, *CreateUserMacroRequest) (*CreateUserMacroResponse, error)
func (UnimplementedCalculatorServer) DeleteUserMacro ¶
func (UnimplementedCalculatorServer) DeleteUserMacro(context.Context, *DeleteUserMacroRequest) (*DeleteUserMacroResponse, error)
func (UnimplementedCalculatorServer) GetUserMacros ¶
func (UnimplementedCalculatorServer) GetUserMacros(context.Context, *GetUserMacroRequest) (*GetUserMacroResponse, error)
func (UnimplementedCalculatorServer) GetUsersMacros ¶
func (UnimplementedCalculatorServer) GetUsersMacros(context.Context, *GetAllUserMacrosRequest) (*GetAllUserMacrosResponse, error)
func (UnimplementedCalculatorServer) SetActiveUserMacro ¶
func (UnimplementedCalculatorServer) SetActiveUserMacro(context.Context, *SetActiveUserMacroRequest) (*SetActiveUserMacroResponse, error)
type UnsafeCalculatorServer ¶
type UnsafeCalculatorServer interface {
// contains filtered or unexported methods
}
UnsafeCalculatorServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CalculatorServer will result in compilation errors.
type UserMacroDistribution ¶
type UserMacroDistribution struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` Age uint32 `protobuf:"varint,3,opt,name=age,proto3" json:"age,omitempty"` Height uint32 `protobuf:"varint,4,opt,name=height,proto3" json:"height,omitempty"` Weight float64 `protobuf:"fixed64,5,opt,name=weight,proto3" json:"weight,omitempty"` Gender Gender `protobuf:"varint,6,opt,name=gender,proto3,enum=fitSphere.calculator.Gender" json:"gender,omitempty"` System System `protobuf:"varint,7,opt,name=system,proto3,enum=fitSphere.calculator.System" json:"system,omitempty"` Activity Activity `protobuf:"varint,8,opt,name=activity,proto3,enum=fitSphere.calculator.Activity" json:"activity,omitempty"` ActivityDescription string `protobuf:"bytes,9,opt,name=activity_description,json=activityDescription,proto3" json:"activity_description,omitempty"` Objective Objective `protobuf:"varint,10,opt,name=objective,proto3,enum=fitSphere.calculator.Objective" json:"objective,omitempty"` ObjectiveDescription string `protobuf:"bytes,11,opt,name=objective_description,json=objectiveDescription,proto3" json:"objective_description,omitempty"` CaloriesDistribution CaloriesDistribution `` /* 170-byte string literal not displayed */ CaloriesDistributionDescription string `` /* 157-byte string literal not displayed */ Protein uint32 `protobuf:"varint,14,opt,name=protein,proto3" json:"protein,omitempty"` Fats uint32 `protobuf:"varint,15,opt,name=fats,proto3" json:"fats,omitempty"` Carbs uint32 `protobuf:"varint,16,opt,name=carbs,proto3" json:"carbs,omitempty"` Bmr uint32 `protobuf:"varint,17,opt,name=bmr,proto3" json:"bmr,omitempty"` Tdee uint32 `protobuf:"varint,18,opt,name=tdee,proto3" json:"tdee,omitempty"` Goal uint32 `protobuf:"varint,19,opt,name=goal,proto3" json:"goal,omitempty"` CreatedAt *timestamppb.Timestamp `protobuf:"bytes,20,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` // Use Timestamp instead of string // contains filtered or unexported fields }
func (*UserMacroDistribution) Descriptor
deprecated
func (*UserMacroDistribution) Descriptor() ([]byte, []int)
Deprecated: Use UserMacroDistribution.ProtoReflect.Descriptor instead.
func (*UserMacroDistribution) GetActivity ¶
func (x *UserMacroDistribution) GetActivity() Activity
func (*UserMacroDistribution) GetActivityDescription ¶
func (x *UserMacroDistribution) GetActivityDescription() string
func (*UserMacroDistribution) GetAge ¶
func (x *UserMacroDistribution) GetAge() uint32
func (*UserMacroDistribution) GetBmr ¶
func (x *UserMacroDistribution) GetBmr() uint32
func (*UserMacroDistribution) GetCaloriesDistribution ¶
func (x *UserMacroDistribution) GetCaloriesDistribution() CaloriesDistribution
func (*UserMacroDistribution) GetCaloriesDistributionDescription ¶
func (x *UserMacroDistribution) GetCaloriesDistributionDescription() string
func (*UserMacroDistribution) GetCarbs ¶
func (x *UserMacroDistribution) GetCarbs() uint32
func (*UserMacroDistribution) GetCreatedAt ¶
func (x *UserMacroDistribution) GetCreatedAt() *timestamppb.Timestamp
func (*UserMacroDistribution) GetFats ¶
func (x *UserMacroDistribution) GetFats() uint32
func (*UserMacroDistribution) GetGender ¶
func (x *UserMacroDistribution) GetGender() Gender
func (*UserMacroDistribution) GetGoal ¶
func (x *UserMacroDistribution) GetGoal() uint32
func (*UserMacroDistribution) GetHeight ¶
func (x *UserMacroDistribution) GetHeight() uint32
func (*UserMacroDistribution) GetId ¶
func (x *UserMacroDistribution) GetId() string
func (*UserMacroDistribution) GetObjective ¶
func (x *UserMacroDistribution) GetObjective() Objective
func (*UserMacroDistribution) GetObjectiveDescription ¶
func (x *UserMacroDistribution) GetObjectiveDescription() string
func (*UserMacroDistribution) GetProtein ¶
func (x *UserMacroDistribution) GetProtein() uint32
func (*UserMacroDistribution) GetSystem ¶
func (x *UserMacroDistribution) GetSystem() System
func (*UserMacroDistribution) GetTdee ¶
func (x *UserMacroDistribution) GetTdee() uint32
func (*UserMacroDistribution) GetUserId ¶
func (x *UserMacroDistribution) GetUserId() string
func (*UserMacroDistribution) GetWeight ¶
func (x *UserMacroDistribution) GetWeight() float64
func (*UserMacroDistribution) ProtoMessage ¶
func (*UserMacroDistribution) ProtoMessage()
func (*UserMacroDistribution) ProtoReflect ¶
func (x *UserMacroDistribution) ProtoReflect() protoreflect.Message
func (*UserMacroDistribution) Reset ¶
func (x *UserMacroDistribution) Reset()
func (*UserMacroDistribution) String ¶
func (x *UserMacroDistribution) String() string