Documentation ¶
Index ¶
- Variables
- type Config
- type HttpController
- type RestControllerdeprecated
- type Service
- func (receiver *Service) AddHttpControllers(httpControllers ...HttpController)
- func (receiver *Service) AddRestControllers(restControllers ...RestController)deprecated
- func (receiver *Service) GetClock() clock.Clock
- func (receiver *Service) GetConfig() Config
- func (receiver *Service) GetGin() *gin.Engine
- func (receiver *Service) GetGorm() *gorm.DB
- func (receiver *Service) GetGormWithEmbeddedMigrations(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(dbEmbedMigrations *embed.FS) *Service
- func (receiver *Service) InitGrpcServerMetrics(serverMetricsOptions []grpcPrometheus.ServerMetricsOption, ...) *Service
- func (receiver *Service) Run()
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ReturnFalse = wrapperspb.Bool(false) ReturnTrue = wrapperspb.Bool(true) )
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 ¶ added in v0.0.9
type HttpController struct { Method string Path string Handler gin.HandlerFunc }
type RestController
deprecated
type RestController = HttpController
Deprecated: use HttpController
type Service ¶
type Service struct { GrpcClientInterceptors []grpc.DialOption // contains filtered or unexported fields }
func NewServiceWithConfig ¶
func NewServiceWithEnvironment ¶
func NewServiceWithEnvironment() *Service
func (*Service) AddHttpControllers ¶ added in v0.0.9
func (receiver *Service) AddHttpControllers(httpControllers ...HttpController)
func (*Service) AddRestControllers
deprecated
func (receiver *Service) AddRestControllers(restControllers ...RestController)
Deprecated: use AddHttpControllers
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.