chatapp

package
v0.0.0-...-0f16109 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 18, 2026 License: AGPL-3.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupRoleManager

func SetupRoleManager() *rolemanager.RoleManager

Types

type Application

type Application struct {
	// contains filtered or unexported fields
}

func Setup

func Setup(cfg Config, logger *slog.Logger, trap <-chan os.Signal, psqAdapter *postgres.Database, re *redis.Adapter,
	userInternalLocalAd service.UserInternalService, authInternalAd AuthService) (
	Application, *service.Service, *jwtvalidator.Validator)

func (Application) Start

func (a Application) Start()

func (Application) Stop

func (a Application) Stop(ctx context.Context) bool

func (Application) StopGRPCServer

func (a Application) StopGRPCServer(wg *sync.WaitGroup)

func (Application) StopHTTPServer

func (a Application) StopHTTPServer(ctx context.Context, wg *sync.WaitGroup)

func (Application) StopManagerGRPCClient

func (a Application) StopManagerGRPCClient(ctx context.Context, wg *sync.WaitGroup)

func (Application) StopManagerInternalGRPCClient

func (a Application) StopManagerInternalGRPCClient(ctx context.Context, wg *sync.WaitGroup)

type AuthService

type AuthService interface {
	GetPublicKey(ctx context.Context, req *empty.Empty, opts ...grpc.CallOption) (*authpb.GetPublicKeyResponse, error)
	Login(ctx context.Context, req *authpb.LoginRequest, opts ...grpc.CallOption) (*authpb.LoginResponse, error)
	TokenRefresh(ctx context.Context, req *authpb.TokenRefreshRequest, opts ...grpc.CallOption) (*authpb.TokenRefreshResponse, error)
}

type Config

type Config struct {
	ShutdownTimeout        time.Duration     `koanf:"shutdown_timeout"`
	HTTPServer             httpserver.Config `koanf:"http_server"`
	Logger                 logger.Config     `koanf:"logger"`
	Websocket              websocket.Config  `koanf:"websocket"`
	ChatService            service.Config    `koanf:"chat"`
	Postgres               postgres.Config   `koanf:"postgres"`
	ManagerAppGRPC         grpcclient.Config `koanf:"manager_app_grpc"`
	ManagerAppInternalGRPC grpcclient.Config `koanf:"manager_app_internal_grpc"`
	GRPCServer             grpcserver.Config `koanf:"grpc_server"`
	Redis                  redis.Config      `koanf:"redis"`
	ServiceAuthInfo        ServiceAuthInfo   `koanf:"service_auth_info"`
}

type ServiceAuthInfo

type ServiceAuthInfo struct {
	Username string `koanf:"username"`
	Password string `koanf:"password"`
}

Directories

Path Synopsis
delivery
Package docs Code generated by swaggo/swag.
Package docs Code generated by swaggo/swag.
repository

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL