Files
services/time/proto/time.pb.go
2021-06-21 19:42:12 +01:00

476 lines
15 KiB
Go

// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.15.6
// source: proto/time.proto
package time
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// Get the current time
type NowRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// optional location, otherwise returns UTC
Location string `protobuf:"bytes,1,opt,name=location,proto3" json:"location,omitempty"`
}
func (x *NowRequest) Reset() {
*x = NowRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_time_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *NowRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NowRequest) ProtoMessage() {}
func (x *NowRequest) ProtoReflect() protoreflect.Message {
mi := &file_proto_time_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use NowRequest.ProtoReflect.Descriptor instead.
func (*NowRequest) Descriptor() ([]byte, []int) {
return file_proto_time_proto_rawDescGZIP(), []int{0}
}
func (x *NowRequest) GetLocation() string {
if x != nil {
return x.Location
}
return ""
}
type NowResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// the current time as HH:MM:SS
Localtime string `protobuf:"bytes,1,opt,name=localtime,proto3" json:"localtime,omitempty"`
// timestamp as 2006-01-02T15:04:05.999999999Z07:00
Timestamp string `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
// the location as Europe/London
Location string `protobuf:"bytes,3,opt,name=location,proto3" json:"location,omitempty"`
// the timezone as BST
Timezone string `protobuf:"bytes,4,opt,name=timezone,proto3" json:"timezone,omitempty"`
// the unix timestamp
Unix int64 `protobuf:"varint,5,opt,name=unix,proto3" json:"unix,omitempty"`
}
func (x *NowResponse) Reset() {
*x = NowResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_time_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *NowResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NowResponse) ProtoMessage() {}
func (x *NowResponse) ProtoReflect() protoreflect.Message {
mi := &file_proto_time_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use NowResponse.ProtoReflect.Descriptor instead.
func (*NowResponse) Descriptor() ([]byte, []int) {
return file_proto_time_proto_rawDescGZIP(), []int{1}
}
func (x *NowResponse) GetLocaltime() string {
if x != nil {
return x.Localtime
}
return ""
}
func (x *NowResponse) GetTimestamp() string {
if x != nil {
return x.Timestamp
}
return ""
}
func (x *NowResponse) GetLocation() string {
if x != nil {
return x.Location
}
return ""
}
func (x *NowResponse) GetTimezone() string {
if x != nil {
return x.Timezone
}
return ""
}
func (x *NowResponse) GetUnix() int64 {
if x != nil {
return x.Unix
}
return 0
}
// Get the timezone info for a specific location
type ZoneRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// location to lookup e.g postcode, city, ip address
Location string `protobuf:"bytes,1,opt,name=location,proto3" json:"location,omitempty"`
}
func (x *ZoneRequest) Reset() {
*x = ZoneRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_time_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ZoneRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ZoneRequest) ProtoMessage() {}
func (x *ZoneRequest) ProtoReflect() protoreflect.Message {
mi := &file_proto_time_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ZoneRequest.ProtoReflect.Descriptor instead.
func (*ZoneRequest) Descriptor() ([]byte, []int) {
return file_proto_time_proto_rawDescGZIP(), []int{2}
}
func (x *ZoneRequest) GetLocation() string {
if x != nil {
return x.Location
}
return ""
}
type ZoneResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// location requested
Location string `protobuf:"bytes,1,opt,name=location,proto3" json:"location,omitempty"`
// region of timezone
Region string `protobuf:"bytes,2,opt,name=region,proto3" json:"region,omitempty"`
// country of the timezone
Country string `protobuf:"bytes,3,opt,name=country,proto3" json:"country,omitempty"`
// e.g 51.42
Latitude float64 `protobuf:"fixed64,4,opt,name=latitude,proto3" json:"latitude,omitempty"`
// e.g -0.37
Longitude float64 `protobuf:"fixed64,5,opt,name=longitude,proto3" json:"longitude,omitempty"`
// the timezone e.g Europe/London
Timezone string `protobuf:"bytes,6,opt,name=timezone,proto3" json:"timezone,omitempty"`
// the abbreviated code e.g BST
Abbreviation string `protobuf:"bytes,7,opt,name=abbreviation,proto3" json:"abbreviation,omitempty"`
// the local time
Localtime string `protobuf:"bytes,8,opt,name=localtime,proto3" json:"localtime,omitempty"`
// is daylight savings
Dst bool `protobuf:"varint,9,opt,name=dst,proto3" json:"dst,omitempty"`
}
func (x *ZoneResponse) Reset() {
*x = ZoneResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_time_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ZoneResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ZoneResponse) ProtoMessage() {}
func (x *ZoneResponse) ProtoReflect() protoreflect.Message {
mi := &file_proto_time_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ZoneResponse.ProtoReflect.Descriptor instead.
func (*ZoneResponse) Descriptor() ([]byte, []int) {
return file_proto_time_proto_rawDescGZIP(), []int{3}
}
func (x *ZoneResponse) GetLocation() string {
if x != nil {
return x.Location
}
return ""
}
func (x *ZoneResponse) GetRegion() string {
if x != nil {
return x.Region
}
return ""
}
func (x *ZoneResponse) GetCountry() string {
if x != nil {
return x.Country
}
return ""
}
func (x *ZoneResponse) GetLatitude() float64 {
if x != nil {
return x.Latitude
}
return 0
}
func (x *ZoneResponse) GetLongitude() float64 {
if x != nil {
return x.Longitude
}
return 0
}
func (x *ZoneResponse) GetTimezone() string {
if x != nil {
return x.Timezone
}
return ""
}
func (x *ZoneResponse) GetAbbreviation() string {
if x != nil {
return x.Abbreviation
}
return ""
}
func (x *ZoneResponse) GetLocaltime() string {
if x != nil {
return x.Localtime
}
return ""
}
func (x *ZoneResponse) GetDst() bool {
if x != nil {
return x.Dst
}
return false
}
var File_proto_time_proto protoreflect.FileDescriptor
var file_proto_time_proto_rawDesc = []byte{
0x0a, 0x10, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x12, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x28, 0x0a, 0x0a, 0x4e, 0x6f, 0x77, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x22, 0x95, 0x01, 0x0a, 0x0b, 0x4e, 0x6f, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x74, 0x69, 0x6d, 0x65, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x74, 0x69, 0x6d, 0x65,
0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1a,
0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x69,
0x6d, 0x65, 0x7a, 0x6f, 0x6e, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x69,
0x6d, 0x65, 0x7a, 0x6f, 0x6e, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x6e, 0x69, 0x78, 0x18, 0x05,
0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x75, 0x6e, 0x69, 0x78, 0x22, 0x29, 0x0a, 0x0b, 0x5a, 0x6f,
0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x6f, 0x63,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x63,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x86, 0x02, 0x0a, 0x0c, 0x5a, 0x6f, 0x6e, 0x65, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01,
0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f,
0x75, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x75,
0x6e, 0x74, 0x72, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65,
0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65,
0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x05, 0x20,
0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1a,
0x0a, 0x08, 0x74, 0x69, 0x6d, 0x65, 0x7a, 0x6f, 0x6e, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09,
0x52, 0x08, 0x74, 0x69, 0x6d, 0x65, 0x7a, 0x6f, 0x6e, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x61, 0x62,
0x62, 0x72, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09,
0x52, 0x0c, 0x61, 0x62, 0x62, 0x72, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c,
0x0a, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28,
0x09, 0x52, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03,
0x64, 0x73, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x64, 0x73, 0x74, 0x32, 0x65,
0x0a, 0x04, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x03, 0x4e, 0x6f, 0x77, 0x12, 0x10, 0x2e,
0x74, 0x69, 0x6d, 0x65, 0x2e, 0x4e, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x11, 0x2e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x4e, 0x6f, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x22, 0x00, 0x12, 0x2f, 0x0a, 0x04, 0x5a, 0x6f, 0x6e, 0x65, 0x12, 0x11, 0x2e, 0x74,
0x69, 0x6d, 0x65, 0x2e, 0x5a, 0x6f, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x12, 0x2e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x5a, 0x6f, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x0e, 0x5a, 0x0c, 0x2e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x3b, 0x74, 0x69, 0x6d, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_proto_time_proto_rawDescOnce sync.Once
file_proto_time_proto_rawDescData = file_proto_time_proto_rawDesc
)
func file_proto_time_proto_rawDescGZIP() []byte {
file_proto_time_proto_rawDescOnce.Do(func() {
file_proto_time_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_time_proto_rawDescData)
})
return file_proto_time_proto_rawDescData
}
var file_proto_time_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_proto_time_proto_goTypes = []interface{}{
(*NowRequest)(nil), // 0: time.NowRequest
(*NowResponse)(nil), // 1: time.NowResponse
(*ZoneRequest)(nil), // 2: time.ZoneRequest
(*ZoneResponse)(nil), // 3: time.ZoneResponse
}
var file_proto_time_proto_depIdxs = []int32{
0, // 0: time.Time.Now:input_type -> time.NowRequest
2, // 1: time.Time.Zone:input_type -> time.ZoneRequest
1, // 2: time.Time.Now:output_type -> time.NowResponse
3, // 3: time.Time.Zone:output_type -> time.ZoneResponse
2, // [2:4] is the sub-list for method output_type
0, // [0:2] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_proto_time_proto_init() }
func file_proto_time_proto_init() {
if File_proto_time_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_proto_time_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NowRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_proto_time_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NowResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_proto_time_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ZoneRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_proto_time_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ZoneResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_proto_time_proto_rawDesc,
NumEnums: 0,
NumMessages: 4,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_proto_time_proto_goTypes,
DependencyIndexes: file_proto_time_proto_depIdxs,
MessageInfos: file_proto_time_proto_msgTypes,
}.Build()
File_proto_time_proto = out.File
file_proto_time_proto_rawDesc = nil
file_proto_time_proto_goTypes = nil
file_proto_time_proto_depIdxs = nil
}