Documentation ¶
Index ¶
- Variables
- func RegisterLanguagesServiceServer(s grpc.ServiceRegistrar, srv LanguagesServiceServer)
- type AddLanguageRequest
- func (*AddLanguageRequest) Descriptor() ([]byte, []int)deprecated
- func (x *AddLanguageRequest) GetLanguage() *Language
- func (*AddLanguageRequest) ProtoMessage()
- func (x *AddLanguageRequest) ProtoReflect() protoreflect.Message
- func (x *AddLanguageRequest) Reset()
- func (x *AddLanguageRequest) String() string
- type Empty
- type Language
- func (*Language) Descriptor() ([]byte, []int)deprecated
- func (x *Language) GetBase() string
- func (x *Language) GetEnabled() bool
- func (x *Language) GetFlag() string
- func (x *Language) GetIso3() string
- func (x *Language) GetName() string
- func (x *Language) GetNativeName() string
- func (x *Language) GetTag() string
- func (*Language) ProtoMessage()
- func (x *Language) ProtoReflect() protoreflect.Message
- func (x *Language) Reset()
- func (x *Language) String() string
- type LanguageAction
- func (LanguageAction) Descriptor() protoreflect.EnumDescriptor
- func (x LanguageAction) Enum() *LanguageAction
- func (LanguageAction) EnumDescriptor() ([]byte, []int)deprecated
- func (x LanguageAction) Number() protoreflect.EnumNumber
- func (x LanguageAction) String() string
- func (LanguageAction) Type() protoreflect.EnumType
- type LanguageFilter
- func (LanguageFilter) Descriptor() protoreflect.EnumDescriptor
- func (x LanguageFilter) Enum() *LanguageFilter
- func (LanguageFilter) EnumDescriptor() ([]byte, []int)deprecated
- func (x LanguageFilter) Number() protoreflect.EnumNumber
- func (x LanguageFilter) String() string
- func (LanguageFilter) Type() protoreflect.EnumType
- type LanguageTag
- func (*LanguageTag) Descriptor() ([]byte, []int)deprecated
- func (x *LanguageTag) GetFlag() string
- func (x *LanguageTag) GetNativeName() string
- func (x *LanguageTag) GetTag() string
- func (*LanguageTag) ProtoMessage()
- func (x *LanguageTag) ProtoReflect() protoreflect.Message
- func (x *LanguageTag) Reset()
- func (x *LanguageTag) String() string
- type LanguagesServiceClient
- type LanguagesServiceServer
- type ListLanguagesRequest
- func (*ListLanguagesRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListLanguagesRequest) GetFilter() LanguageFilter
- func (*ListLanguagesRequest) ProtoMessage()
- func (x *ListLanguagesRequest) ProtoReflect() protoreflect.Message
- func (x *ListLanguagesRequest) Reset()
- func (x *ListLanguagesRequest) String() string
- type ListLanguagesResponse
- func (*ListLanguagesResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListLanguagesResponse) GetLanguages() []*Language
- func (*ListLanguagesResponse) ProtoMessage()
- func (x *ListLanguagesResponse) ProtoReflect() protoreflect.Message
- func (x *ListLanguagesResponse) Reset()
- func (x *ListLanguagesResponse) String() string
- type UnimplementedLanguagesServiceServer
- func (UnimplementedLanguagesServiceServer) AddLanguage(context.Context, *AddLanguageRequest) (*Empty, error)
- func (UnimplementedLanguagesServiceServer) ListLanguages(context.Context, *ListLanguagesRequest) (*ListLanguagesResponse, error)
- func (UnimplementedLanguagesServiceServer) UpdateLanguages(context.Context, *UpdateLanguagesRequest) (*UpdateLanguagesResponse, error)
- type UnsafeLanguagesServiceServer
- type UpdateLanguagesRequest
- func (*UpdateLanguagesRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateLanguagesRequest) GetAction() LanguageAction
- func (x *UpdateLanguagesRequest) GetTags() []*LanguageTag
- func (*UpdateLanguagesRequest) ProtoMessage()
- func (x *UpdateLanguagesRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateLanguagesRequest) Reset()
- func (x *UpdateLanguagesRequest) String() string
- type UpdateLanguagesResponse
- func (*UpdateLanguagesResponse) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateLanguagesResponse) GetLanguages() []*Language
- func (*UpdateLanguagesResponse) ProtoMessage()
- func (x *UpdateLanguagesResponse) ProtoReflect() protoreflect.Message
- func (x *UpdateLanguagesResponse) Reset()
- func (x *UpdateLanguagesResponse) String() string
Constants ¶
This section is empty.
Variables ¶
var ( LanguageFilter_name = map[int32]string{ 0: "unspecified", 1: "enabled", 2: "not_enabled", 3: "all_available", } LanguageFilter_value = map[string]int32{ "unspecified": 0, "enabled": 1, "not_enabled": 2, "all_available": 3, } )
Enum value maps for LanguageFilter.
var ( LanguageAction_name = map[int32]string{ 0: "enable", 1: "disable", } LanguageAction_value = map[string]int32{ "enable": 0, "disable": 1, } )
Enum value maps for LanguageAction.
var File_languages_api_languages_v1_languages_proto protoreflect.FileDescriptor
var LanguagesService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "languages_api.v1.LanguagesService", HandlerType: (*LanguagesServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ListLanguages", Handler: _LanguagesService_ListLanguages_Handler, }, { MethodName: "UpdateLanguages", Handler: _LanguagesService_UpdateLanguages_Handler, }, { MethodName: "AddLanguage", Handler: _LanguagesService_AddLanguage_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "languages-api/languages/v1/languages.proto", }
LanguagesService_ServiceDesc is the grpc.ServiceDesc for LanguagesService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterLanguagesServiceServer ¶
func RegisterLanguagesServiceServer(s grpc.ServiceRegistrar, srv LanguagesServiceServer)
Types ¶
type AddLanguageRequest ¶
type AddLanguageRequest struct { Language *Language `protobuf:"bytes,1,opt,name=language,proto3" json:"language,omitempty"` // contains filtered or unexported fields }
func (*AddLanguageRequest) Descriptor
deprecated
func (*AddLanguageRequest) Descriptor() ([]byte, []int)
Deprecated: Use AddLanguageRequest.ProtoReflect.Descriptor instead.
func (*AddLanguageRequest) GetLanguage ¶
func (x *AddLanguageRequest) GetLanguage() *Language
func (*AddLanguageRequest) ProtoMessage ¶
func (*AddLanguageRequest) ProtoMessage()
func (*AddLanguageRequest) ProtoReflect ¶
func (x *AddLanguageRequest) ProtoReflect() protoreflect.Message
func (*AddLanguageRequest) Reset ¶
func (x *AddLanguageRequest) Reset()
func (*AddLanguageRequest) String ¶
func (x *AddLanguageRequest) String() string
type Empty ¶
type Empty struct {
// contains filtered or unexported fields
}
func (*Empty) Descriptor
deprecated
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶
func (x *Empty) ProtoReflect() protoreflect.Message
type Language ¶
type Language struct { // tag BCP 47 language tag Tag string `protobuf:"bytes,2,opt,name=tag,proto3" json:"tag,omitempty"` // name display English name Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` // enabled Enabled bool `protobuf:"varint,4,opt,name=enabled,proto3" json:"enabled,omitempty"` // base code Base string `protobuf:"bytes,5,opt,name=base,proto3" json:"base,omitempty"` // iso3 code Iso3 string `protobuf:"bytes,6,opt,name=iso3,proto3" json:"iso3,omitempty"` // flag emoji Flag string `protobuf:"bytes,7,opt,name=flag,proto3" json:"flag,omitempty"` // Native name NativeName string `protobuf:"bytes,8,opt,name=native_name,json=nativeName,proto3" json:"native_name,omitempty"` // contains filtered or unexported fields }
Language (according BCP 47)
func (*Language) Descriptor
deprecated
func (*Language) GetEnabled ¶
func (*Language) GetNativeName ¶
func (*Language) ProtoMessage ¶
func (*Language) ProtoMessage()
func (*Language) ProtoReflect ¶
func (x *Language) ProtoReflect() protoreflect.Message
type LanguageAction ¶
type LanguageAction int32
LanguageAction
const ( // LANGUAGE_ACTION_ENABLE // enable valid language codes or tags // sets filter for response as LANGUAGE_FILTER_ENABLED // action changes only not enabled codes from request LanguageAction_enable LanguageAction = 0 // LANGUAGE_ACTION_DISABLE // disable valid language codes or tags // sets filter for response as LANGUAGE_FILTER_NOT_ENABLED // action changes only enabled codes from request LanguageAction_disable LanguageAction = 1 )
func (LanguageAction) Descriptor ¶
func (LanguageAction) Descriptor() protoreflect.EnumDescriptor
func (LanguageAction) Enum ¶
func (x LanguageAction) Enum() *LanguageAction
func (LanguageAction) EnumDescriptor
deprecated
func (LanguageAction) EnumDescriptor() ([]byte, []int)
Deprecated: Use LanguageAction.Descriptor instead.
func (LanguageAction) Number ¶
func (x LanguageAction) Number() protoreflect.EnumNumber
func (LanguageAction) String ¶
func (x LanguageAction) String() string
func (LanguageAction) Type ¶
func (LanguageAction) Type() protoreflect.EnumType
type LanguageFilter ¶
type LanguageFilter int32
LanguageFilter
const ( // LANGUAGE_FILTER_UNSPECIFIED // behaves as LANGUAGE_FILTER_ENABLED LanguageFilter_unspecified LanguageFilter = 0 // LANGUAGE_FILTER_ENABLED // list enabled languages // is DEFAULT for LANGUAGE_FILTER_UNSPECIFIED LanguageFilter_enabled LanguageFilter = 1 // LANGUAGE_FILTER_NOT_ENABLED // lists available languages which are not enabled LanguageFilter_not_enabled LanguageFilter = 2 // LANGUAGE_FILTER_ALL_AVAILABLE // lists available languages with valid code ISO 639-3 // can be limited to ISO 639-1 // or enhanced to BCP 47 Language Tag LanguageFilter_all_available LanguageFilter = 3 )
func (LanguageFilter) Descriptor ¶
func (LanguageFilter) Descriptor() protoreflect.EnumDescriptor
func (LanguageFilter) Enum ¶
func (x LanguageFilter) Enum() *LanguageFilter
func (LanguageFilter) EnumDescriptor
deprecated
func (LanguageFilter) EnumDescriptor() ([]byte, []int)
Deprecated: Use LanguageFilter.Descriptor instead.
func (LanguageFilter) Number ¶
func (x LanguageFilter) Number() protoreflect.EnumNumber
func (LanguageFilter) String ¶
func (x LanguageFilter) String() string
func (LanguageFilter) Type ¶
func (LanguageFilter) Type() protoreflect.EnumType
type LanguageTag ¶
type LanguageTag struct { // tag must be valid BCP 47 Language Tag // converts ISO 639-1, ISO 639-2, ISO 639-3, Tag string `protobuf:"bytes,2,opt,name=tag,proto3" json:"tag,omitempty"` NativeName string `protobuf:"bytes,3,opt,name=native_name,json=nativeName,proto3" json:"native_name,omitempty"` Flag string `protobuf:"bytes,4,opt,name=flag,proto3" json:"flag,omitempty"` // contains filtered or unexported fields }
LanguageTag
func (*LanguageTag) Descriptor
deprecated
func (*LanguageTag) Descriptor() ([]byte, []int)
Deprecated: Use LanguageTag.ProtoReflect.Descriptor instead.
func (*LanguageTag) GetFlag ¶
func (x *LanguageTag) GetFlag() string
func (*LanguageTag) GetNativeName ¶
func (x *LanguageTag) GetNativeName() string
func (*LanguageTag) GetTag ¶
func (x *LanguageTag) GetTag() string
func (*LanguageTag) ProtoMessage ¶
func (*LanguageTag) ProtoMessage()
func (*LanguageTag) ProtoReflect ¶
func (x *LanguageTag) ProtoReflect() protoreflect.Message
func (*LanguageTag) Reset ¶
func (x *LanguageTag) Reset()
func (*LanguageTag) String ¶
func (x *LanguageTag) String() string
type LanguagesServiceClient ¶
type LanguagesServiceClient interface { // ListLanguages // lists various sets of languages ListLanguages(ctx context.Context, in *ListLanguagesRequest, opts ...grpc.CallOption) (*ListLanguagesResponse, error) // UpdateLanguages // enables and disables selected, valid language codes (2,3) UpdateLanguages(ctx context.Context, in *UpdateLanguagesRequest, opts ...grpc.CallOption) (*UpdateLanguagesResponse, error) AddLanguage(ctx context.Context, in *AddLanguageRequest, opts ...grpc.CallOption) (*Empty, error) }
LanguagesServiceClient is the client API for LanguagesService 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 NewLanguagesServiceClient ¶
func NewLanguagesServiceClient(cc grpc.ClientConnInterface) LanguagesServiceClient
type LanguagesServiceServer ¶
type LanguagesServiceServer interface { // ListLanguages // lists various sets of languages ListLanguages(context.Context, *ListLanguagesRequest) (*ListLanguagesResponse, error) // UpdateLanguages // enables and disables selected, valid language codes (2,3) UpdateLanguages(context.Context, *UpdateLanguagesRequest) (*UpdateLanguagesResponse, error) AddLanguage(context.Context, *AddLanguageRequest) (*Empty, error) // contains filtered or unexported methods }
LanguagesServiceServer is the server API for LanguagesService service. All implementations must embed UnimplementedLanguagesServiceServer for forward compatibility
type ListLanguagesRequest ¶
type ListLanguagesRequest struct { // filter is enumerated filter of languages Filter LanguageFilter `protobuf:"varint,2,opt,name=filter,proto3,enum=languages_api.v1.LanguageFilter" json:"filter,omitempty"` // contains filtered or unexported fields }
ListLanguagesRequest
func (*ListLanguagesRequest) Descriptor
deprecated
func (*ListLanguagesRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListLanguagesRequest.ProtoReflect.Descriptor instead.
func (*ListLanguagesRequest) GetFilter ¶
func (x *ListLanguagesRequest) GetFilter() LanguageFilter
func (*ListLanguagesRequest) ProtoMessage ¶
func (*ListLanguagesRequest) ProtoMessage()
func (*ListLanguagesRequest) ProtoReflect ¶
func (x *ListLanguagesRequest) ProtoReflect() protoreflect.Message
func (*ListLanguagesRequest) Reset ¶
func (x *ListLanguagesRequest) Reset()
func (*ListLanguagesRequest) String ¶
func (x *ListLanguagesRequest) String() string
type ListLanguagesResponse ¶
type ListLanguagesResponse struct { // languages with status Languages []*Language `protobuf:"bytes,2,rep,name=languages,proto3" json:"languages,omitempty"` // contains filtered or unexported fields }
ListLanguagesResponse
func (*ListLanguagesResponse) Descriptor
deprecated
func (*ListLanguagesResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListLanguagesResponse.ProtoReflect.Descriptor instead.
func (*ListLanguagesResponse) GetLanguages ¶
func (x *ListLanguagesResponse) GetLanguages() []*Language
func (*ListLanguagesResponse) ProtoMessage ¶
func (*ListLanguagesResponse) ProtoMessage()
func (*ListLanguagesResponse) ProtoReflect ¶
func (x *ListLanguagesResponse) ProtoReflect() protoreflect.Message
func (*ListLanguagesResponse) Reset ¶
func (x *ListLanguagesResponse) Reset()
func (*ListLanguagesResponse) String ¶
func (x *ListLanguagesResponse) String() string
type UnimplementedLanguagesServiceServer ¶
type UnimplementedLanguagesServiceServer struct { }
UnimplementedLanguagesServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedLanguagesServiceServer) AddLanguage ¶
func (UnimplementedLanguagesServiceServer) AddLanguage(context.Context, *AddLanguageRequest) (*Empty, error)
func (UnimplementedLanguagesServiceServer) ListLanguages ¶
func (UnimplementedLanguagesServiceServer) ListLanguages(context.Context, *ListLanguagesRequest) (*ListLanguagesResponse, error)
func (UnimplementedLanguagesServiceServer) UpdateLanguages ¶
func (UnimplementedLanguagesServiceServer) UpdateLanguages(context.Context, *UpdateLanguagesRequest) (*UpdateLanguagesResponse, error)
type UnsafeLanguagesServiceServer ¶
type UnsafeLanguagesServiceServer interface {
// contains filtered or unexported methods
}
UnsafeLanguagesServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to LanguagesServiceServer will result in compilation errors.
type UpdateLanguagesRequest ¶
type UpdateLanguagesRequest struct { // action - enables or disables valid language codes Action LanguageAction `protobuf:"varint,2,opt,name=action,proto3,enum=languages_api.v1.LanguageAction" json:"action,omitempty"` // tags are validated according any of // BCP 47, ISO 639-1, ISO 639-2, ISO 639-3 Tags []*LanguageTag `protobuf:"bytes,3,rep,name=tags,proto3" json:"tags,omitempty"` // contains filtered or unexported fields }
UpdateLanguagesRequest
func (*UpdateLanguagesRequest) Descriptor
deprecated
func (*UpdateLanguagesRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateLanguagesRequest.ProtoReflect.Descriptor instead.
func (*UpdateLanguagesRequest) GetAction ¶
func (x *UpdateLanguagesRequest) GetAction() LanguageAction
func (*UpdateLanguagesRequest) GetTags ¶
func (x *UpdateLanguagesRequest) GetTags() []*LanguageTag
func (*UpdateLanguagesRequest) ProtoMessage ¶
func (*UpdateLanguagesRequest) ProtoMessage()
func (*UpdateLanguagesRequest) ProtoReflect ¶
func (x *UpdateLanguagesRequest) ProtoReflect() protoreflect.Message
func (*UpdateLanguagesRequest) Reset ¶
func (x *UpdateLanguagesRequest) Reset()
func (*UpdateLanguagesRequest) String ¶
func (x *UpdateLanguagesRequest) String() string
type UpdateLanguagesResponse ¶
type UpdateLanguagesResponse struct { // languages with status Languages []*Language `protobuf:"bytes,2,rep,name=languages,proto3" json:"languages,omitempty"` // contains filtered or unexported fields }
UpdateLanguagesResponse
func (*UpdateLanguagesResponse) Descriptor
deprecated
func (*UpdateLanguagesResponse) Descriptor() ([]byte, []int)
Deprecated: Use UpdateLanguagesResponse.ProtoReflect.Descriptor instead.
func (*UpdateLanguagesResponse) GetLanguages ¶
func (x *UpdateLanguagesResponse) GetLanguages() []*Language
func (*UpdateLanguagesResponse) ProtoMessage ¶
func (*UpdateLanguagesResponse) ProtoMessage()
func (*UpdateLanguagesResponse) ProtoReflect ¶
func (x *UpdateLanguagesResponse) ProtoReflect() protoreflect.Message
func (*UpdateLanguagesResponse) Reset ¶
func (x *UpdateLanguagesResponse) Reset()
func (*UpdateLanguagesResponse) String ¶
func (x *UpdateLanguagesResponse) String() string