Locale Go-API
locale
Section titled “locale”import "givc/modules/api/locale"
- Constants
- Variables
- func RegisterLocaleClientServer(s grpc.ServiceRegistrar, srv LocaleClientServer)
- func _LocaleClient_LocaleSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error)
- func _LocaleClient_TimezoneSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error)
- func file_locale_locale_proto_init()
- func file_locale_locale_proto_rawDescGZIP() []byte
- func init()
- type Empty
- type LocaleAssignment
- func (*LocaleAssignment) Descriptor() ([]byte, []int)
- func (x *LocaleAssignment) GetKey() LocaleMacroKey
- func (x *LocaleAssignment) GetValue() string
- func (*LocaleAssignment) ProtoMessage()
- func (x *LocaleAssignment) ProtoReflect() protoreflect.Message
- func (x *LocaleAssignment) Reset()
- func (x *LocaleAssignment) String() string
- type LocaleClientClient
- type LocaleClientServer
- type LocaleMacroKey
- func (LocaleMacroKey) Descriptor() protoreflect.EnumDescriptor
- func (x LocaleMacroKey) Enum() *LocaleMacroKey
- func (LocaleMacroKey) EnumDescriptor() ([]byte, []int)
- func (x LocaleMacroKey) Number() protoreflect.EnumNumber
- func (x LocaleMacroKey) String() string
- func (LocaleMacroKey) Type() protoreflect.EnumType
- type LocaleMessage
- type TimezoneMessage
- type UnimplementedLocaleClientServer
- func (UnimplementedLocaleClientServer) LocaleSet(context.Context, *LocaleMessage) (*Empty, error)
- func (UnimplementedLocaleClientServer) TimezoneSet(context.Context, *TimezoneMessage) (*Empty, error)
- func (UnimplementedLocaleClientServer) mustEmbedUnimplementedLocaleClientServer()
- func (UnimplementedLocaleClientServer) testEmbeddedByValue()
- type UnsafeLocaleClientServer
- type localeClientClient
Constants
Section titled “Constants”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))
const ( LocaleClient_LocaleSet_FullMethodName = "/locale.LocaleClient/LocaleSet" LocaleClient_TimezoneSet_FullMethodName = "/locale.LocaleClient/TimezoneSet")
This is a compile-time assertion to ensure that this generated file is compatible with the grpc package it is being compiled against. Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const file_locale_locale_proto_rawDesc = "" + "\n" + "\x13locale/locale.proto\x12\x06locale\"R\n" + "\x10LocaleAssignment\x12(\n" + "\x03key\x18\x01 \x01(\x0e2\x16.locale.LocaleMacroKeyR\x03key\x12\x14\n" + "\x05value\x18\x02 \x01(\tR\x05value\"K\n" + "\rLocaleMessage\x12:\n" + "\vassignments\x18\x01 \x03(\v2\x18.locale.LocaleAssignmentR\vassignments\"-\n" + "\x0fTimezoneMessage\x12\x1a\n" + "\bTimezone\x18\x01 \x01(\tR\bTimezone\"\a\n" + "\x05Empty*\xeb\x01\n" + "\x0eLocaleMacroKey\x12\b\n" + "\x04LANG\x10\x00\x12\x0e\n" + "\n" + "LC_ADDRESS\x10\x01\x12\x0e\n" + "\n" + "LC_COLLATE\x10\x02\x12\f\n" + "\bLC_CTYPE\x10\x03\x12\x15\n" + "\x11LC_IDENTIFICATION\x10\x04\x12\x0f\n" + "\vLC_MONETARY\x10\x05\x12\x0f\n" + "\vLC_MESSAGES\x10\x06\x12\x12\n" + "\x0eLC_MEASUREMENT\x10\a\x12\v\n" + "\aLC_NAME\x10\b\x12\x0e\n" + "\n" + "LC_NUMERIC\x10\t\x12\f\n" + "\bLC_PAPER\x10\n" + "\x12\x10\n" + "\fLC_TELEPHONE\x10\v\x12\v\n" + "\aLC_TIME\x10\f\x12\n" + "\n" + "\x06LC_ALL\x10\r2|\n" + "\fLocaleClient\x123\n" + "\tLocaleSet\x12\x15.locale.LocaleMessage\x1a\r.locale.Empty\"\x00\x127\n" + "\vTimezoneSet\x12\x17.locale.TimezoneMessage\x1a\r.locale.Empty\"\x00B\x19Z\x17givc/modules/api/localeb\x06proto3"
Variables
Section titled “Variables”Enum value maps for LocaleMacroKey.
var ( LocaleMacroKey_name = map[int32]string{ 0: "LANG", 1: "LC_ADDRESS", 2: "LC_COLLATE", 3: "LC_CTYPE", 4: "LC_IDENTIFICATION", 5: "LC_MONETARY", 6: "LC_MESSAGES", 7: "LC_MEASUREMENT", 8: "LC_NAME", 9: "LC_NUMERIC", 10: "LC_PAPER", 11: "LC_TELEPHONE", 12: "LC_TIME", 13: "LC_ALL", } LocaleMacroKey_value = map[string]int32{ "LANG": 0, "LC_ADDRESS": 1, "LC_COLLATE": 2, "LC_CTYPE": 3, "LC_IDENTIFICATION": 4, "LC_MONETARY": 5, "LC_MESSAGES": 6, "LC_MEASUREMENT": 7, "LC_NAME": 8, "LC_NUMERIC": 9, "LC_PAPER": 10, "LC_TELEPHONE": 11, "LC_TIME": 12, "LC_ALL": 13, })
var ( file_locale_locale_proto_rawDescOnce sync.Once file_locale_locale_proto_rawDescData []byte)
var File_locale_locale_proto protoreflect.FileDescriptor
LocaleClient_ServiceDesc is the grpc.ServiceDesc for LocaleClient service. It’s only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var LocaleClient_ServiceDesc = grpc.ServiceDesc{ ServiceName: "locale.LocaleClient", HandlerType: (*LocaleClientServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "LocaleSet", Handler: _LocaleClient_LocaleSet_Handler, }, { MethodName: "TimezoneSet", Handler: _LocaleClient_TimezoneSet_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "locale/locale.proto",}
var file_locale_locale_proto_depIdxs = []int32{ 0, 1, 2, 3, 4, 4, 4, 2, 2, 2, 0,}
var file_locale_locale_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_locale_locale_proto_goTypes = []any{ (LocaleMacroKey)(0), (*LocaleAssignment)(nil), (*LocaleMessage)(nil), (*TimezoneMessage)(nil), (*Empty)(nil),}
var file_locale_locale_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
func RegisterLocaleClientServer
Section titled “func RegisterLocaleClientServer”func RegisterLocaleClientServer(s grpc.ServiceRegistrar, srv LocaleClientServer)
func _LocaleClient_LocaleSet_Handler
Section titled “func _LocaleClient_LocaleSet_Handler”func _LocaleClient_LocaleSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error)
func _LocaleClient_TimezoneSet_Handler
Section titled “func _LocaleClient_TimezoneSet_Handler”func _LocaleClient_TimezoneSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error)
func file_locale_locale_proto_init
Section titled “func file_locale_locale_proto_init”func file_locale_locale_proto_init()
func file_locale_locale_proto_rawDescGZIP
Section titled “func file_locale_locale_proto_rawDescGZIP”func file_locale_locale_proto_rawDescGZIP() []byte
func init
Section titled “func init”func init()
type Empty
Section titled “type Empty”Empty message
type Empty struct { state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache}
func (*Empty) Descriptor
Section titled “func (*Empty) Descriptor”func (*Empty) Descriptor() ([]byte, []int)
Deprecated: Use Empty.ProtoReflect.Descriptor instead.
func (*Empty) ProtoMessage
Section titled “func (*Empty) ProtoMessage”func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect
Section titled “func (*Empty) ProtoReflect”func (x *Empty) ProtoReflect() protoreflect.Message
func (*Empty) Reset
Section titled “func (*Empty) Reset”func (x *Empty) Reset()
func (*Empty) String
Section titled “func (*Empty) String”func (x *Empty) String() string
type LocaleAssignment
Section titled “type LocaleAssignment”type LocaleAssignment struct { state protoimpl.MessageState `protogen:"open.v1"` Key LocaleMacroKey `protobuf:"varint,1,opt,name=key,proto3,enum=locale.LocaleMacroKey" json:"key,omitempty"` // e.g., LC_TIME, LC_NUMERIC Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` // e.g., en_US.UTF-8 unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache}
func (*LocaleAssignment) Descriptor
Section titled “func (*LocaleAssignment) Descriptor”func (*LocaleAssignment) Descriptor() ([]byte, []int)
Deprecated: Use LocaleAssignment.ProtoReflect.Descriptor instead.
func (*LocaleAssignment) GetKey
Section titled “func (*LocaleAssignment) GetKey”func (x *LocaleAssignment) GetKey() LocaleMacroKey
func (*LocaleAssignment) GetValue
Section titled “func (*LocaleAssignment) GetValue”func (x *LocaleAssignment) GetValue() string
func (*LocaleAssignment) ProtoMessage
Section titled “func (*LocaleAssignment) ProtoMessage”func (*LocaleAssignment) ProtoMessage()
func (*LocaleAssignment) ProtoReflect
Section titled “func (*LocaleAssignment) ProtoReflect”func (x *LocaleAssignment) ProtoReflect() protoreflect.Message
func (*LocaleAssignment) Reset
Section titled “func (*LocaleAssignment) Reset”func (x *LocaleAssignment) Reset()
func (*LocaleAssignment) String
Section titled “func (*LocaleAssignment) String”func (x *LocaleAssignment) String() string
type LocaleClientClient
Section titled “type LocaleClientClient”LocaleClientClient is the client API for LocaleClient 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.
type LocaleClientClient interface { // System-wide locale broadcast LocaleSet(ctx context.Context, in *LocaleMessage, opts ...grpc.CallOption) (*Empty, error) // System-wide timezone broadcast TimezoneSet(ctx context.Context, in *TimezoneMessage, opts ...grpc.CallOption) (*Empty, error)}
func NewLocaleClientClient
Section titled “func NewLocaleClientClient”func NewLocaleClientClient(cc grpc.ClientConnInterface) LocaleClientClient
type LocaleClientServer
Section titled “type LocaleClientServer”LocaleClientServer is the server API for LocaleClient service. All implementations must embed UnimplementedLocaleClientServer for forward compatibility.
type LocaleClientServer interface { // System-wide locale broadcast LocaleSet(context.Context, *LocaleMessage) (*Empty, error) // System-wide timezone broadcast TimezoneSet(context.Context, *TimezoneMessage) (*Empty, error) mustEmbedUnimplementedLocaleClientServer()}
type LocaleMacroKey
Section titled “type LocaleMacroKey”Locale macros as defined in [locale(7)](https://man7.org/linux/man-pages/man7/locale.7.html\)
type LocaleMacroKey int32
const ( LocaleMacroKey_LANG LocaleMacroKey = 0 LocaleMacroKey_LC_ADDRESS LocaleMacroKey = 1 LocaleMacroKey_LC_COLLATE LocaleMacroKey = 2 LocaleMacroKey_LC_CTYPE LocaleMacroKey = 3 LocaleMacroKey_LC_IDENTIFICATION LocaleMacroKey = 4 LocaleMacroKey_LC_MONETARY LocaleMacroKey = 5 LocaleMacroKey_LC_MESSAGES LocaleMacroKey = 6 LocaleMacroKey_LC_MEASUREMENT LocaleMacroKey = 7 LocaleMacroKey_LC_NAME LocaleMacroKey = 8 LocaleMacroKey_LC_NUMERIC LocaleMacroKey = 9 LocaleMacroKey_LC_PAPER LocaleMacroKey = 10 LocaleMacroKey_LC_TELEPHONE LocaleMacroKey = 11 LocaleMacroKey_LC_TIME LocaleMacroKey = 12 LocaleMacroKey_LC_ALL LocaleMacroKey = 13)
func (LocaleMacroKey) Descriptor
Section titled “func (LocaleMacroKey) Descriptor”func (LocaleMacroKey) Descriptor() protoreflect.EnumDescriptor
func (LocaleMacroKey) Enum
Section titled “func (LocaleMacroKey) Enum”func (x LocaleMacroKey) Enum() *LocaleMacroKey
func (LocaleMacroKey) EnumDescriptor
Section titled “func (LocaleMacroKey) EnumDescriptor”func (LocaleMacroKey) EnumDescriptor() ([]byte, []int)
Deprecated: Use LocaleMacroKey.Descriptor instead.
func (LocaleMacroKey) Number
Section titled “func (LocaleMacroKey) Number”func (x LocaleMacroKey) Number() protoreflect.EnumNumber
func (LocaleMacroKey) String
Section titled “func (LocaleMacroKey) String”func (x LocaleMacroKey) String() string
func (LocaleMacroKey) Type
Section titled “func (LocaleMacroKey) Type”func (LocaleMacroKey) Type() protoreflect.EnumType
type LocaleMessage
Section titled “type LocaleMessage”type LocaleMessage struct { state protoimpl.MessageState `protogen:"open.v1"` Assignments []*LocaleAssignment `protobuf:"bytes,1,rep,name=assignments,proto3" json:"assignments,omitempty"` // List of locale assignments unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache}
func (*LocaleMessage) Descriptor
Section titled “func (*LocaleMessage) Descriptor”func (*LocaleMessage) Descriptor() ([]byte, []int)
Deprecated: Use LocaleMessage.ProtoReflect.Descriptor instead.
func (*LocaleMessage) GetAssignments
Section titled “func (*LocaleMessage) GetAssignments”func (x *LocaleMessage) GetAssignments() []*LocaleAssignment
func (*LocaleMessage) ProtoMessage
Section titled “func (*LocaleMessage) ProtoMessage”func (*LocaleMessage) ProtoMessage()
func (*LocaleMessage) ProtoReflect
Section titled “func (*LocaleMessage) ProtoReflect”func (x *LocaleMessage) ProtoReflect() protoreflect.Message
func (*LocaleMessage) Reset
Section titled “func (*LocaleMessage) Reset”func (x *LocaleMessage) Reset()
func (*LocaleMessage) String
Section titled “func (*LocaleMessage) String”func (x *LocaleMessage) String() string
type TimezoneMessage
Section titled “type TimezoneMessage”type TimezoneMessage struct { state protoimpl.MessageState `protogen:"open.v1"` Timezone string `protobuf:"bytes,1,opt,name=Timezone,proto3" json:"Timezone,omitempty"` // String with timezone value. Format: [tz database](https://en.wikipedia.org/wiki/Tz_database) name, usually Area/City or Etc/GMT+3. unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache}
func (*TimezoneMessage) Descriptor
Section titled “func (*TimezoneMessage) Descriptor”func (*TimezoneMessage) Descriptor() ([]byte, []int)
Deprecated: Use TimezoneMessage.ProtoReflect.Descriptor instead.
func (*TimezoneMessage) GetTimezone
Section titled “func (*TimezoneMessage) GetTimezone”func (x *TimezoneMessage) GetTimezone() string
func (*TimezoneMessage) ProtoMessage
Section titled “func (*TimezoneMessage) ProtoMessage”func (*TimezoneMessage) ProtoMessage()
func (*TimezoneMessage) ProtoReflect
Section titled “func (*TimezoneMessage) ProtoReflect”func (x *TimezoneMessage) ProtoReflect() protoreflect.Message
func (*TimezoneMessage) Reset
Section titled “func (*TimezoneMessage) Reset”func (x *TimezoneMessage) Reset()
func (*TimezoneMessage) String
Section titled “func (*TimezoneMessage) String”func (x *TimezoneMessage) String() string
type UnimplementedLocaleClientServer
Section titled “type UnimplementedLocaleClientServer”UnimplementedLocaleClientServer 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.
type UnimplementedLocaleClientServer struct{}
func (UnimplementedLocaleClientServer) LocaleSet
Section titled “func (UnimplementedLocaleClientServer) LocaleSet”func (UnimplementedLocaleClientServer) LocaleSet(context.Context, *LocaleMessage) (*Empty, error)
func (UnimplementedLocaleClientServer) TimezoneSet
Section titled “func (UnimplementedLocaleClientServer) TimezoneSet”func (UnimplementedLocaleClientServer) TimezoneSet(context.Context, *TimezoneMessage) (*Empty, error)
func (UnimplementedLocaleClientServer) mustEmbedUnimplementedLocaleClientServer
Section titled “func (UnimplementedLocaleClientServer) mustEmbedUnimplementedLocaleClientServer”func (UnimplementedLocaleClientServer) mustEmbedUnimplementedLocaleClientServer()
func (UnimplementedLocaleClientServer) testEmbeddedByValue
Section titled “func (UnimplementedLocaleClientServer) testEmbeddedByValue”func (UnimplementedLocaleClientServer) testEmbeddedByValue()
type UnsafeLocaleClientServer
Section titled “type UnsafeLocaleClientServer”UnsafeLocaleClientServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to LocaleClientServer will result in compilation errors.
type UnsafeLocaleClientServer interface { mustEmbedUnimplementedLocaleClientServer()}
type localeClientClient
Section titled “type localeClientClient”type localeClientClient struct { cc grpc.ClientConnInterface}
func (*localeClientClient) LocaleSet
Section titled “func (*localeClientClient) LocaleSet”func (c *localeClientClient) LocaleSet(ctx context.Context, in *LocaleMessage, opts ...grpc.CallOption) (*Empty, error)
func (*localeClientClient) TimezoneSet
Section titled “func (*localeClientClient) TimezoneSet”func (c *localeClientClient) TimezoneSet(ctx context.Context, in *TimezoneMessage, opts ...grpc.CallOption) (*Empty, error)
Generated by gomarkdoc