Documentation
¶
Index ¶
- func HandleWithTransaction(http *httpserver.HttpServer, trxItf transaction.TransactionInterface, ...) gin.HandlerFunc
- func NewValidator() (*validation.Validator, error)
- func Run(serviceName string, options Options, ...)
- func WithTransaction(ctx context.Context, fn func(db *gorm.DB) error) error
- type BaseService
- type Options
- type ServiceStartPointMetrics
- type WrappedHandlerFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleWithTransaction ¶ added in v0.2.2
func HandleWithTransaction(http *httpserver.HttpServer, trxItf transaction.TransactionInterface, handler WrappedHandlerFunc) gin.HandlerFunc
func NewValidator ¶ added in v0.2.6
func NewValidator() (*validation.Validator, error)
Types ¶
type BaseService ¶
type BaseService struct {
Config *config.Config
Probe *health.Probe
Validator *validation.Validator
Environment env.Environment
// contains filtered or unexported fields
}
func (*BaseService) GetDatabase ¶ added in v0.2.2
func (bs *BaseService) GetDatabase() (*database.Database, error)
func (*BaseService) GetHttpServer ¶ added in v0.2.2
func (bs *BaseService) GetHttpServer() (*httpserver.HttpServer, error)
func (*BaseService) GetMqPublisher ¶ added in v0.2.3
func (bs *BaseService) GetMqPublisher() (*events.Publisher, error)
func (*BaseService) GetMqSubscriber ¶ added in v0.2.3
func (bs *BaseService) GetMqSubscriber() (*events.Subscriber, error)
type ServiceStartPointMetrics ¶ added in v0.2.3
type ServiceStartPointMetrics struct {
metricsDomain.BaseMetric
Start int `metric:"start"`
}
TODO: Determine if we should add the version and commit hash to metrics
Source Files
¶
Click to show internal directories.
Click to hide internal directories.