Skip to content

Localelistener Go-API

import "givc/modules/pkgs/localelistener"

Copyright 2024 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 struct {
}

func NewController() (*LocaleController, error)

func (c *LocaleController) SetLocale(ctx context.Context, locale string) error

SetLocale sets the system locale.

func (c *LocaleController) SetTimezone(ctx context.Context, timezone string) error

SetTimezone sets the system timezone.

type LocaleServer struct {
Controller *LocaleController
givc_locale.UnimplementedLocaleClientServer
}

func NewLocaleServer() (*LocaleServer, error)

NewLocaleServer creates a new instance of LocaleServer.

func (s *LocaleServer) LocaleSet(ctx context.Context, req *givc_locale.LocaleMessage) (*givc_locale.Empty, error)

LocaleSet handles incoming requests to set the locale.

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)

TimezoneSet handles incoming requests to set the timezone.

Generated by gomarkdoc