Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LogData ¶
type LogData struct { Id uuid.UUID `json:"id"` // Id is the id of the log. mo.LogHeader // LogHeader is the header of the log. mo.LogBody // LogBody is the body of the log. // Only for view CreatedAt time.Time `json:"created_at"` // CreatedAt is the create time. UpdatedAt time.Time `json:"updated_at"` // UpdatedAt is the update time. }
LogData is a struct that represents the entity of a log.
func NewEmptyLogData ¶
func NewEmptyLogData() *LogData
NewEmptyLogData creates a new *LogData with empty values.
func NewLogData ¶
NewLogData creates a new *LogData.
func (*LogData) IsNotEmpty ¶
IsNotEmpty returns true if the LogData is not empty.
type LogDataFilter ¶
type LogDataFilter struct { Id uuid.UUID `json:"id"` // Id is the id of the log. EventDateFrom time.Time `json:"event_date_from"` // EventDate of the log is in the between of EventDateFrom and EventDateTo. EventDateTo time.Time `json:"event_date_to"` // EventDate of the log is in the between of EventDateFrom and EventDateTo. LogType mo.LogType `json:"log_type"` // 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. CreatedAtFrom time.Time `json:"created_at_from"` // CreatedAt is in the between of CreatedAtFrom and CreatedAtTo. CreatedAtTo time.Time `json:"created_at_to"` // CreatedAt is in the between of CreatedAtFrom and CreatedAtTo. UpdatedAtFrom time.Time `json:"updated_at_from"` // UpdatedAt is in the between of UpdatedAtFrom and UpdatedAtTo. UpdatedAtTo time.Time `json:"updated_at_to"` // UpdatedAt is in the between of UpdatedAtFrom and UpdatedAtTo. SearchText string `json:"search_text"` // SearchText is the full-text search value. SortType string `json:"sort_type"` // SortType is the sorting type (ASC,DESC). SortField mo.LogSortField `json:"sort_field"` // SortField is the sorting field of the logData. Limit int `json:"limit"` // Limit provides to limitation row size. Offset int `json:"offset"` // Offset provides a starting row number of the limitation. }
LogDataFilter is a struct that represents the filter of a log.
func NewEmptyLogDataFilter ¶
func NewEmptyLogDataFilter() *LogDataFilter
NewEmptyLogDataFilter creates a new *LogDataFilter with empty values.
func NewLogDataFilter ¶
func NewLogDataFilter(id uuid.UUID, eventDateFrom time.Time, eventDateTo time.Time, logType mo.LogType, serviceName string, path string, userId string, createdAtFrom time.Time, createdAtTo time.Time, updatedAtFrom time.Time, updatedAtTo time.Time, searchText string, sortType string, sortField mo.LogSortField, limit int, offset int) *LogDataFilter
NewLogDataFilter creates a new *LogDataFilter.
func (*LogDataFilter) String ¶
func (s *LogDataFilter) String() string
String returns a string representation of the LogDataFilter.
Click to show internal directories.
Click to hide internal directories.