Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthConfig ¶
type AuthService ¶
type AuthService struct {
// contains filtered or unexported fields
}
AuthService implements AuthService interface
func NewAuthService ¶
func NewAuthService(config Config) (*AuthService, error)
NewAuthService create a new go auth service
func (*AuthService) GenerateJWT ¶
func (s *AuthService) GenerateJWT() (string, error)
func (*AuthService) GetDefaultError ¶
func (s *AuthService) GetDefaultError() (error, int)
type Config ¶
type Config struct { DB DBConfig `mapstructure:"db"` MessageBroker MessageBrokerConfig `mapstructure:"message-broker"` Limiter LimiterConfig `mapstructure:"limiter"` Auth AuthConfig `mapstructure:"auth"` }
type LimiterConfig ¶
type LimiterService ¶
type LimiterService struct {
// contains filtered or unexported fields
}
LimiterService implements LimiterService interface
func NewLimiterService ¶
func NewLimiterService(config Config) (*LimiterService, error)
NewLimiterService create a new go rate limiter service
func (*LimiterService) Allow ¶
func (s *LimiterService) Allow() bool
func (*LimiterService) GetDefaultError ¶
func (s *LimiterService) GetDefaultError() (error, int)
type MessageBrokerConfig ¶
type MessageBrokerService ¶
type MessageBrokerService struct {
// contains filtered or unexported fields
}
MessageBrokerService implements MessageBrokerService interface
func NewRabbitMQService ¶
func NewRabbitMQService(config Config, metric MetricProvider) (*MessageBrokerService, error)
NewRabbitService create a new rabbit mq service
func (*MessageBrokerService) Publish ¶
func (s *MessageBrokerService) Publish(queue string, body interface{}) error
type MetricProvider ¶
type MetricService ¶
type MetricService struct {
// contains filtered or unexported fields
}
MetricService implements MetricService interface
func NewPrometheusService ¶
func NewPrometheusService() (*MetricService, error)
NewPrometheusService create a new prometheus service
func (*MetricService) Handler ¶
func (s *MetricService) Handler() http.Handler
func (*MetricService) SaveHistogram ¶
func (s *MetricService) SaveHistogram(handler, method, statusCode string, duration float64)
Click to show internal directories.
Click to hide internal directories.