Documentation ¶
Index ¶
- type Config
- type HTTPController
- type Service
- func (receiver *Service) AddHTTPControllers(httpControllers ...HTTPController)
- func (receiver *Service) GetClock() clock.Clock
- func (receiver *Service) GetConfig() Config
- func (receiver *Service) GetGin() *gin.Engine
- func (receiver *Service) GetGorm(ctx context.Context) *gorm.DB
- func (receiver *Service) GetGormWithEmbeddedMigrations(ctx context.Context, dbEmbedMigrations *embed.FS) *gorm.DB
- func (receiver *Service) GetGrpc() *grpc.Serverdeprecated
- func (receiver *Service) GetGrpcClientInterceptors(authClientInterceptor *client.AuthClientInterceptor)
- func (receiver *Service) GetGrpcServer() *grpc.Server
- func (receiver *Service) GetGrpcServerMetrics() *grpcPrometheus.ServerMetrics
- func (receiver *Service) GetJwtToken() jwtToken.JwtToken
- func (receiver *Service) GetScheduler() *gocron.Scheduler
- func (receiver *Service) InitDB(ctx context.Context, dbEmbedMigrations *embed.FS) *Service
- func (receiver *Service) InitGrpcServerMetrics(serverMetricsOptions []grpcPrometheus.ServerMetricsOption, ...) *Service
- func (receiver *Service) Run()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { ServiceName string `env:"SERVICE_NAME"` DbGormDisabled bool `env:"DB_GORM_DISABLED"` SchedulerEnabled bool `env:"SCHEDULER_ENABLED"` RestServerHost string `env:"REST_SERVER_HOST" envDefault:"0.0.0.0"` RestServerPort int `env:"REST_SERVER_PORT" envDefault:"8080"` GrpcServerDisabled bool `env:"GRPC_SERVER_DISABLED"` GrpcServerHost string `env:"GRPC_SERVER_HOST" envDefault:"0.0.0.0"` GrpcServerPort int `env:"GRPC_SERVER_PORT" envDefault:"9000"` GrpcReflectionEnabled bool `env:"GRPC_REFLECTION_ENABLED" envDefault:"true"` }
type HTTPController ¶
type HTTPController struct { Method string Path string Handler gin.HandlerFunc }
type Service ¶
type Service struct { GrpcClientInterceptors []grpc.DialOption // contains filtered or unexported fields }
func NewServiceWithConfig ¶
func (*Service) AddHTTPControllers ¶
func (receiver *Service) AddHTTPControllers(httpControllers ...HTTPController)
func (*Service) GetGormWithEmbeddedMigrations ¶
func (*Service) GetGrpcClientInterceptors ¶
func (receiver *Service) GetGrpcClientInterceptors(authClientInterceptor *client.AuthClientInterceptor)
func (*Service) GetGrpcServer ¶
func (*Service) GetGrpcServerMetrics ¶
func (receiver *Service) GetGrpcServerMetrics() *grpcPrometheus.ServerMetrics
func (*Service) GetJwtToken ¶
func (*Service) GetScheduler ¶
func (*Service) InitGrpcServerMetrics ¶
func (receiver *Service) InitGrpcServerMetrics( serverMetricsOptions []grpcPrometheus.ServerMetricsOption, promHTTPHandlerOpts *promhttp.HandlerOpts, ) *Service
Source Files ¶
Click to show internal directories.
Click to hide internal directories.