Documentation ¶
Index ¶
- type DefaultLogEntry
- type GinService
- type HTTPRequestLogEntry
- type HTTPResponseLogEntry
- type HttpRequest
- type Labels
- type LoggerService
- func (l *LoggerService) CombineErrorMessage(format string, args ...interface{}) string
- func (l *LoggerService) GetLogEntrySeverity(level int) string
- func (l *LoggerService) GetLoggerFields(logEntry any) logrus.Fields
- func (l *LoggerService) LogFile(ctx context.Context, level logrus.Level, logEntry any, message string)
- type PostgresService
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultLogEntry ¶
type GinService ¶
func ProvideGinService ¶
func ProvideGinService() *GinService
type HTTPRequestLogEntry ¶
type HTTPRequestLogEntry struct { HttpRequest HttpRequest `json:"http_request" structs:"logging.googleapis.com/httpRequest"` Labels Labels `json:"labels" structs:"logging.googleapis.com/labels"` Severity string `json:"severity" structs:"logging.googleapis.com/severity"` RequestBody any `json:"request_body" structs:"requestBody"` }
type HTTPResponseLogEntry ¶
type HTTPResponseLogEntry struct { HttpRequest HttpRequest `json:"http_request" structs:"logging.googleapis.com/httpRequest"` Labels Labels `json:"labels" structs:"logging.googleapis.com/labels"` Severity string `json:"severity" structs:"logging.googleapis.com/severity"` UserID int64 `json:"user_id" structs:"userId"` ResponseBody any `json:"response_body" structs:"responseBody"` }
type HttpRequest ¶
type HttpRequest struct { RequestMethod string `json:"request_method" structs:"requestMethod"` RequestURL string `json:"request_url" structs:"requestUrl"` Status int `json:"status" structs:"status"` UserAgent string `json:"user_agent" structs:"userAgent"` RemoteIP string `json:"remote_ip" structs:"remoteIp"` Latency string `json:"latency" structs:"latency"` Protocol string `json:"protocol" structs:"protocol"` }
type LoggerService ¶
func ProvideLogger ¶
func ProvideLogger() (*LoggerService, error)
func (*LoggerService) CombineErrorMessage ¶
func (l *LoggerService) CombineErrorMessage(format string, args ...interface{}) string
func (*LoggerService) GetLogEntrySeverity ¶
func (l *LoggerService) GetLogEntrySeverity(level int) string
func (*LoggerService) GetLoggerFields ¶
func (l *LoggerService) GetLoggerFields(logEntry any) logrus.Fields
type PostgresService ¶
func ProvidePostgreService ¶
func ProvidePostgreService() (*PostgresService, error)
type Service ¶
type Service struct { GinService *GinService PostgresService *PostgresService LoggerService *LoggerService }
func InitService ¶
func ProvideService ¶
func ProvideService(g *GinService, p *PostgresService, l *LoggerService) *Service
Click to show internal directories.
Click to hide internal directories.