Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterSleepTrackingServer(s grpc.ServiceRegistrar, srv SleepTrackingServer)
- type GetUserSleepLogsRequest
- func (*GetUserSleepLogsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetUserSleepLogsRequest) GetPageNumber() int32
- func (x *GetUserSleepLogsRequest) GetPageSize() int32
- func (*GetUserSleepLogsRequest) ProtoMessage()
- func (x *GetUserSleepLogsRequest) ProtoReflect() protoreflect.Message
- func (x *GetUserSleepLogsRequest) Reset()
- func (x *GetUserSleepLogsRequest) String() string
- type GetUserSleepLogsResponse
- func (*GetUserSleepLogsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetUserSleepLogsResponse) GetSleepLogs() []*UserSleepLog
- func (*GetUserSleepLogsResponse) ProtoMessage()
- func (x *GetUserSleepLogsResponse) ProtoReflect() protoreflect.Message
- func (x *GetUserSleepLogsResponse) Reset()
- func (x *GetUserSleepLogsResponse) String() string
- type LoginResponse
- func (*LoginResponse) Descriptor() ([]byte, []int)deprecated
- func (x *LoginResponse) GetToken() string
- func (x *LoginResponse) GetUser() *UserResponse
- func (*LoginResponse) ProtoMessage()
- func (x *LoginResponse) ProtoReflect() protoreflect.Message
- func (x *LoginResponse) Reset()
- func (x *LoginResponse) String() string
- type LoginUserRequest
- func (*LoginUserRequest) Descriptor() ([]byte, []int)deprecated
- func (x *LoginUserRequest) GetPassword() string
- func (x *LoginUserRequest) GetUsername() string
- func (*LoginUserRequest) ProtoMessage()
- func (x *LoginUserRequest) ProtoReflect() protoreflect.Message
- func (x *LoginUserRequest) Reset()
- func (x *LoginUserRequest) String() string
- type SleepTrackingClient
- type SleepTrackingServer
- type UnimplementedSleepTrackingServer
- type UnsafeSleepTrackingServer
- type UserResponse
- func (*UserResponse) Descriptor() ([]byte, []int)deprecated
- func (x *UserResponse) GetCreatedAt() *timestamppb.Timestamp
- func (x *UserResponse) GetUsername() string
- func (*UserResponse) ProtoMessage()
- func (x *UserResponse) ProtoReflect() protoreflect.Message
- func (x *UserResponse) Reset()
- func (x *UserResponse) String() string
- type UserSleepLog
- func (*UserSleepLog) Descriptor() ([]byte, []int)deprecated
- func (x *UserSleepLog) GetCreatedAt() *timestamppb.Timestamp
- func (x *UserSleepLog) GetEndTime() *timestamppb.Timestamp
- func (x *UserSleepLog) GetId() string
- func (x *UserSleepLog) GetQuality() string
- func (x *UserSleepLog) GetStartTime() *timestamppb.Timestamp
- func (*UserSleepLog) ProtoMessage()
- func (x *UserSleepLog) ProtoReflect() protoreflect.Message
- func (x *UserSleepLog) Reset()
- func (x *UserSleepLog) String() string
Constants ¶
const ( SleepTracking_LoginUser_FullMethodName = "/pb.SleepTracking/LoginUser" SleepTracking_GetUserSleepLogs_FullMethodName = "/pb.SleepTracking/GetUserSleepLogs" )
Variables ¶
var File_rpc_get_sleep_logs_proto protoreflect.FileDescriptor
var File_rpc_login_user_proto protoreflect.FileDescriptor
var File_service_sleep_tracking_proto protoreflect.FileDescriptor
var SleepTracking_ServiceDesc = grpc.ServiceDesc{ ServiceName: "pb.SleepTracking", HandlerType: (*SleepTrackingServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "LoginUser", Handler: _SleepTracking_LoginUser_Handler, }, { MethodName: "GetUserSleepLogs", Handler: _SleepTracking_GetUserSleepLogs_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "service_sleep_tracking.proto", }
SleepTracking_ServiceDesc is the grpc.ServiceDesc for SleepTracking service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterSleepTrackingServer ¶
func RegisterSleepTrackingServer(s grpc.ServiceRegistrar, srv SleepTrackingServer)
Types ¶
type GetUserSleepLogsRequest ¶
type GetUserSleepLogsRequest struct { PageNumber int32 `protobuf:"varint,1,opt,name=pageNumber,proto3" json:"pageNumber,omitempty"` PageSize int32 `protobuf:"varint,2,opt,name=pageSize,proto3" json:"pageSize,omitempty"` // contains filtered or unexported fields }
func (*GetUserSleepLogsRequest) Descriptor
deprecated
func (*GetUserSleepLogsRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetUserSleepLogsRequest.ProtoReflect.Descriptor instead.
func (*GetUserSleepLogsRequest) GetPageNumber ¶
func (x *GetUserSleepLogsRequest) GetPageNumber() int32
func (*GetUserSleepLogsRequest) GetPageSize ¶
func (x *GetUserSleepLogsRequest) GetPageSize() int32
func (*GetUserSleepLogsRequest) ProtoMessage ¶
func (*GetUserSleepLogsRequest) ProtoMessage()
func (*GetUserSleepLogsRequest) ProtoReflect ¶
func (x *GetUserSleepLogsRequest) ProtoReflect() protoreflect.Message
func (*GetUserSleepLogsRequest) Reset ¶
func (x *GetUserSleepLogsRequest) Reset()
func (*GetUserSleepLogsRequest) String ¶
func (x *GetUserSleepLogsRequest) String() string
type GetUserSleepLogsResponse ¶
type GetUserSleepLogsResponse struct { SleepLogs []*UserSleepLog `protobuf:"bytes,1,rep,name=sleep_logs,json=sleepLogs,proto3" json:"sleep_logs,omitempty"` // contains filtered or unexported fields }
func (*GetUserSleepLogsResponse) Descriptor
deprecated
func (*GetUserSleepLogsResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetUserSleepLogsResponse.ProtoReflect.Descriptor instead.
func (*GetUserSleepLogsResponse) GetSleepLogs ¶
func (x *GetUserSleepLogsResponse) GetSleepLogs() []*UserSleepLog
func (*GetUserSleepLogsResponse) ProtoMessage ¶
func (*GetUserSleepLogsResponse) ProtoMessage()
func (*GetUserSleepLogsResponse) ProtoReflect ¶
func (x *GetUserSleepLogsResponse) ProtoReflect() protoreflect.Message
func (*GetUserSleepLogsResponse) Reset ¶
func (x *GetUserSleepLogsResponse) Reset()
func (*GetUserSleepLogsResponse) String ¶
func (x *GetUserSleepLogsResponse) String() string
type LoginResponse ¶
type LoginResponse struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` User *UserResponse `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
func (*LoginResponse) Descriptor
deprecated
func (*LoginResponse) Descriptor() ([]byte, []int)
Deprecated: Use LoginResponse.ProtoReflect.Descriptor instead.
func (*LoginResponse) GetToken ¶
func (x *LoginResponse) GetToken() string
func (*LoginResponse) GetUser ¶
func (x *LoginResponse) GetUser() *UserResponse
func (*LoginResponse) ProtoMessage ¶
func (*LoginResponse) ProtoMessage()
func (*LoginResponse) ProtoReflect ¶
func (x *LoginResponse) ProtoReflect() protoreflect.Message
func (*LoginResponse) Reset ¶
func (x *LoginResponse) Reset()
func (*LoginResponse) String ¶
func (x *LoginResponse) String() string
type LoginUserRequest ¶
type LoginUserRequest struct { Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
func (*LoginUserRequest) Descriptor
deprecated
func (*LoginUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use LoginUserRequest.ProtoReflect.Descriptor instead.
func (*LoginUserRequest) GetPassword ¶
func (x *LoginUserRequest) GetPassword() string
func (*LoginUserRequest) GetUsername ¶
func (x *LoginUserRequest) GetUsername() string
func (*LoginUserRequest) ProtoMessage ¶
func (*LoginUserRequest) ProtoMessage()
func (*LoginUserRequest) ProtoReflect ¶
func (x *LoginUserRequest) ProtoReflect() protoreflect.Message
func (*LoginUserRequest) Reset ¶
func (x *LoginUserRequest) Reset()
func (*LoginUserRequest) String ¶
func (x *LoginUserRequest) String() string
type SleepTrackingClient ¶
type SleepTrackingClient interface { LoginUser(ctx context.Context, in *LoginUserRequest, opts ...grpc.CallOption) (*LoginResponse, error) GetUserSleepLogs(ctx context.Context, in *GetUserSleepLogsRequest, opts ...grpc.CallOption) (*GetUserSleepLogsResponse, error) }
SleepTrackingClient is the client API for SleepTracking 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 NewSleepTrackingClient ¶
func NewSleepTrackingClient(cc grpc.ClientConnInterface) SleepTrackingClient
type SleepTrackingServer ¶
type SleepTrackingServer interface { LoginUser(context.Context, *LoginUserRequest) (*LoginResponse, error) GetUserSleepLogs(context.Context, *GetUserSleepLogsRequest) (*GetUserSleepLogsResponse, error) // contains filtered or unexported methods }
SleepTrackingServer is the server API for SleepTracking service. All implementations must embed UnimplementedSleepTrackingServer for forward compatibility.
type UnimplementedSleepTrackingServer ¶
type UnimplementedSleepTrackingServer struct{}
UnimplementedSleepTrackingServer 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 (UnimplementedSleepTrackingServer) GetUserSleepLogs ¶
func (UnimplementedSleepTrackingServer) GetUserSleepLogs(context.Context, *GetUserSleepLogsRequest) (*GetUserSleepLogsResponse, error)
func (UnimplementedSleepTrackingServer) LoginUser ¶
func (UnimplementedSleepTrackingServer) LoginUser(context.Context, *LoginUserRequest) (*LoginResponse, error)
type UnsafeSleepTrackingServer ¶
type UnsafeSleepTrackingServer interface {
// contains filtered or unexported methods
}
UnsafeSleepTrackingServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SleepTrackingServer will result in compilation errors.
type UserResponse ¶
type UserResponse struct { Username string `protobuf:"bytes,1,opt,name=Username,proto3" json:"Username,omitempty"` CreatedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=CreatedAt,proto3" json:"CreatedAt,omitempty"` // contains filtered or unexported fields }
func (*UserResponse) Descriptor
deprecated
func (*UserResponse) Descriptor() ([]byte, []int)
Deprecated: Use UserResponse.ProtoReflect.Descriptor instead.
func (*UserResponse) GetCreatedAt ¶
func (x *UserResponse) GetCreatedAt() *timestamppb.Timestamp
func (*UserResponse) GetUsername ¶
func (x *UserResponse) GetUsername() string
func (*UserResponse) ProtoMessage ¶
func (*UserResponse) ProtoMessage()
func (*UserResponse) ProtoReflect ¶
func (x *UserResponse) ProtoReflect() protoreflect.Message
func (*UserResponse) Reset ¶
func (x *UserResponse) Reset()
func (*UserResponse) String ¶
func (x *UserResponse) String() string
type UserSleepLog ¶
type UserSleepLog struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` StartTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` EndTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` Quality string `protobuf:"bytes,4,opt,name=quality,proto3" json:"quality,omitempty"` CreatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` // contains filtered or unexported fields }
func (*UserSleepLog) Descriptor
deprecated
func (*UserSleepLog) Descriptor() ([]byte, []int)
Deprecated: Use UserSleepLog.ProtoReflect.Descriptor instead.
func (*UserSleepLog) GetCreatedAt ¶
func (x *UserSleepLog) GetCreatedAt() *timestamppb.Timestamp
func (*UserSleepLog) GetEndTime ¶
func (x *UserSleepLog) GetEndTime() *timestamppb.Timestamp
func (*UserSleepLog) GetId ¶
func (x *UserSleepLog) GetId() string
func (*UserSleepLog) GetQuality ¶
func (x *UserSleepLog) GetQuality() string
func (*UserSleepLog) GetStartTime ¶
func (x *UserSleepLog) GetStartTime() *timestamppb.Timestamp
func (*UserSleepLog) ProtoMessage ¶
func (*UserSleepLog) ProtoMessage()
func (*UserSleepLog) ProtoReflect ¶
func (x *UserSleepLog) ProtoReflect() protoreflect.Message
func (*UserSleepLog) Reset ¶
func (x *UserSleepLog) Reset()
func (*UserSleepLog) String ¶
func (x *UserSleepLog) String() string