Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var LogSortMap map[mo.LogSortField]string = map[mo.LogSortField]string{ mo.LogSortFieldId: "id", mo.LogSortFieldServiceName: "service_name", mo.LogSortFieldEventDate: "verified_at", mo.LogSortFieldCreatedAt: "created_at", mo.LogSortFieldUpdatedAt: "updated_at", }
Functions ¶
This section is empty.
Types ¶
type LogData ¶
type LogData struct { tgorm.Model EventDate time.Time `json:"event_date" gorm:"not null;default:CURRENT_TIMESTAMP"` // EventDate is the date of the event. LogType int `json:"log_type" gorm:"not null;default:0"` // LogType is the type of the log. ServiceName string `json:"service_name" gorm:"not null;default:''"` // ServiceName is the name of source micro service. Path string `json:"path" gorm:"not null;default:''"` // Path is the name of the source function of the source micro service. UserId string `json:"user_id" gorm:"not null;default:''"` // UserId represents the id of the user that the log is for. Message string `json:"message" gorm:"not null;default:''"` // Message is the message of the log. }
LogData is a struct that represents the db mapper of a log.
func NewLogData ¶
func NewLogData(id uuid.UUID, eventDate time.Time, logType int, serviceName string, path string, userId string, message string) *LogData
NewLogData creates a new *LogData.
func NewLogDataFromEntity ¶
NewLogDataFromEntity creates a new *LogData from entity.
type LogDatas ¶
type LogDatas []*LogData
func NewLogDataFromEntities ¶
NewLogDatasFromEntities creates a new []*LogData from entities.
func (LogDatas) ToEntities ¶
ToEntities creates a new []me.LogData entity.
Click to show internal directories.
Click to hide internal directories.