Documentation
¶
Index ¶
- func SetupRoleManager() *rolemanager.RoleManager
- type Application
- func (a Application) Start()
- func (a Application) Stop(ctx context.Context) bool
- func (a Application) StopGRPCServer(wg *sync.WaitGroup)
- func (a Application) StopHTTPServer(ctx context.Context, wg *sync.WaitGroup)
- func (a Application) StopManagerGRPCClient(ctx context.Context, wg *sync.WaitGroup)
- func (a Application) StopManagerInternalGRPCClient(ctx context.Context, wg *sync.WaitGroup)
- type AuthService
- type Config
- type ServiceAuthInfo
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) 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 ¶
Click to show internal directories.
Click to hide internal directories.