Localelistener Go-API
localelistener
Section titled “localelistener”import "givc/modules/pkgs/localelistener"SPDX-FileCopyrightText: 2024-2026 TII (SSRC) and the Ghaf contributors SPDX-License-Identifier: Apache-2.0
Package localelistener provides functionality to listen for locale and timezone changes.
- type LocaleController
- type LocaleServer
- func NewLocaleServer() (*LocaleServer, error)
- func (s *LocaleServer) LocaleSet(ctx context.Context, req *givc_locale.LocaleMessage) (*givc_locale.Empty, error)
- func (s *LocaleServer) Name() string
- func (s *LocaleServer) RegisterGrpcService(srv *grpc.Server)
- func (s *LocaleServer) TimezoneSet(ctx context.Context, req *givc_locale.TimezoneMessage) (*givc_locale.Empty, error)
type LocaleController
Section titled “type LocaleController”type LocaleController struct {}func NewController
Section titled “func NewController”func NewController() (*LocaleController, error)func (*LocaleController) SetLocale
Section titled “func (*LocaleController) SetLocale”func (c *LocaleController) SetLocale(ctx context.Context, assignments []*givc_locale.LocaleAssignment) errorSetLocale sets the system locale.
func (*LocaleController) SetTimezone
Section titled “func (*LocaleController) SetTimezone”func (c *LocaleController) SetTimezone(ctx context.Context, timezone string) errorSetTimezone sets the system timezone.
type LocaleServer
Section titled “type LocaleServer”type LocaleServer struct { Controller *LocaleController givc_locale.UnimplementedLocaleClientServer}func NewLocaleServer
Section titled “func NewLocaleServer”func NewLocaleServer() (*LocaleServer, error)NewLocaleServer creates a new instance of LocaleServer.
func (*LocaleServer) LocaleSet
Section titled “func (*LocaleServer) LocaleSet”func (s *LocaleServer) LocaleSet(ctx context.Context, req *givc_locale.LocaleMessage) (*givc_locale.Empty, error)LocaleSet handles incoming requests to set the locale.
func (*LocaleServer) Name
Section titled “func (*LocaleServer) Name”func (s *LocaleServer) Name() stringfunc (*LocaleServer) RegisterGrpcService
Section titled “func (*LocaleServer) RegisterGrpcService”func (s *LocaleServer) RegisterGrpcService(srv *grpc.Server)func (*LocaleServer) TimezoneSet
Section titled “func (*LocaleServer) TimezoneSet”func (s *LocaleServer) TimezoneSet(ctx context.Context, req *givc_locale.TimezoneMessage) (*givc_locale.Empty, error)TimezoneSet handles incoming requests to set the timezone.
Generated by gomarkdoc