Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( MoodState_name = map[int32]string{ 0: "Happy", 1: "Sad", } MoodState_value = map[string]int32{ "Happy": 0, "Sad": 1, } )
Enum value maps for MoodState.
var File_cmd_api_protos_tracker_api_proto protoreflect.FileDescriptor
var TrackerAPI_ServiceDesc = grpc.ServiceDesc{ ServiceName: "tracker.TrackerAPI", HandlerType: (*TrackerAPIServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateLog", Handler: _TrackerAPI_CreateLog_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "cmd/api/protos/tracker-api.proto", }
TrackerAPI_ServiceDesc is the grpc.ServiceDesc for TrackerAPI service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterTrackerAPIServer ¶
func RegisterTrackerAPIServer(s grpc.ServiceRegistrar, srv TrackerAPIServer)
Types ¶
type DailyLog ¶
type DailyLog struct { Date int64 `protobuf:"varint,1,opt,name=Date,proto3" json:"Date,omitempty"` // Date following the epoch format. Mood *Mood `protobuf:"bytes,2,opt,name=Mood,proto3" json:"Mood,omitempty"` // Mood log of the day. // contains filtered or unexported fields }
func (*DailyLog) Descriptor
deprecated
func (*DailyLog) ProtoMessage ¶
func (*DailyLog) ProtoMessage()
func (*DailyLog) ProtoReflect ¶
func (x *DailyLog) ProtoReflect() protoreflect.Message
type Mood ¶
type Mood struct { State MoodState `protobuf:"varint,1,opt,name=State,proto3,enum=tracker.MoodState" json:"State,omitempty"` // MoodState defines the mood state among defined values. // contains filtered or unexported fields }
Mood definition.
func (*Mood) Descriptor
deprecated
func (*Mood) ProtoMessage ¶
func (*Mood) ProtoMessage()
func (*Mood) ProtoReflect ¶
func (x *Mood) ProtoReflect() protoreflect.Message
type MoodState ¶
type MoodState int32
MoodType, the possible values for a mood.
func (MoodState) Descriptor ¶
func (MoodState) Descriptor() protoreflect.EnumDescriptor
func (MoodState) EnumDescriptor
deprecated
func (MoodState) Number ¶
func (x MoodState) Number() protoreflect.EnumNumber
func (MoodState) Type ¶
func (MoodState) Type() protoreflect.EnumType
type TrackerAPIClient ¶
type TrackerAPIClient interface { // CreateLog adds the given mood. CreateLog(ctx context.Context, in *DailyLog, opts ...grpc.CallOption) (*emptypb.Empty, error) }
TrackerAPIClient is the client API for TrackerAPI 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.
func NewTrackerAPIClient ¶
func NewTrackerAPIClient(cc grpc.ClientConnInterface) TrackerAPIClient
type TrackerAPIServer ¶
type TrackerAPIServer interface { // CreateLog adds the given mood. CreateLog(context.Context, *DailyLog) (*emptypb.Empty, error) // contains filtered or unexported methods }
TrackerAPIServer is the server API for TrackerAPI service. All implementations must embed UnimplementedTrackerAPIServer for forward compatibility
type UnimplementedTrackerAPIServer ¶
type UnimplementedTrackerAPIServer struct { }
UnimplementedTrackerAPIServer must be embedded to have forward compatible implementations.
type UnsafeTrackerAPIServer ¶
type UnsafeTrackerAPIServer interface {
// contains filtered or unexported methods
}
UnsafeTrackerAPIServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TrackerAPIServer will result in compilation errors.