Versions in this module Expand all Collapse all v1 v1.8.0 Jan 15, 2025 Changes in this version type Data + func (d *Data) CountLogsGroup(tagKey string) ([]LogGroupResult, error) type DataApi + CountLogsGroup func(tagKey string) ([]LogGroupResult, error) + type LogGroupResult struct + Date string + Tag string + Total int64 v1.7.4 Nov 25, 2024 v1.7.3 Nov 25, 2024 v1.7.2 Nov 20, 2024 v1.7.1 Nov 13, 2024 Changes in this version + type Data struct + func InitData(config *gorm.Config) (*Data, error) + func (d *Data) CountLogsSize() (int64, error) + func (d *Data) CreateLog(log *LogData) error + func (d *Data) CreateLogGroup(groupLog *LogGroup) error + func (d *Data) DeleteLogByFileId(fileId string) error + func (d *Data) DeleteLogGroupByGroupId(groupId string) error + func (d *Data) FindLogByFileId(FileId string) (*LogData, error) + func (d *Data) FindLogGroup(groupId string) (*LogGroup, error) + func (d *Data) FindLogGroups(query *FileListQuery) (*Page[*LogGroup], error) + func (d *Data) FindLogs(query *FileListQuery) (*Page[*LogData], error) + func (d *Data) FindOldestLogs(size int) ([]*LogData, error) + func (d *Data) FindShouldDeleteLogs(size int) ([]*LogData, error) + func (d *Data) FindTimeoutLogs(before time.Time, size int) ([]*LogData, error) + func (d *Data) UpdateLogGroup(groupLog *LogGroup) error + func (d *Data) UpdateLogStatus(fileId string, status Status) error + type DataApi interface + CountLogsSize func() (int64, error) + CreateLog func(log *LogData) error + CreateLogGroup func(logGroup *LogGroup) error + DeleteLogByFileId func(fileId string) error + DeleteLogGroupByGroupId func(groupId string) error + FindLogByFileId func(fileId string) (*LogData, error) + FindLogGroup func(groupId string) (*LogGroup, error) + FindLogGroups func(query *FileListQuery) (*Page[*LogGroup], error) + FindLogs func(query *FileListQuery) (*Page[*LogData], error) + FindOldestLogs func(size int) ([]*LogData, error) + FindTimeoutLogs func(before time.Time, size int) ([]*LogData, error) + UpdateLogGroup func(logGroup *LogGroup) error + UpdateLogStatus func(fileId string, status Status) error + func NewData(config *config.Config, taskManager *task.TaskManager, ...) (DataApi, error) + type FileListQuery struct + From *int64 + Tags []*storage.Tag + To *int64 + func (f *FileListQuery) GetFrom() *time.Time + func (f *FileListQuery) GetTo() *time.Time + type LogData struct + FileId string + LogGroupID uint + Name string + Size int64 + Status Status + Tags []*Tag + type LogGroup struct + GroupId string + Logs []*LogData + Name string + Size int64 + Tags []*Tag + type Model struct + CreatedAt time.Time + DeletedAt gorm.DeletedAt + ID uint + UpdatedAt time.Time + func (m *Model) GetOrderValue() float64 + type OrderData interface + GetOrderValue func() float64 + type Page struct + Data []T + Total int64 + func (p *Page[T]) Desc() + func (p *Page[T]) Merge(result rpc.MergeResult) error + func (p *Page[T]) New() rpc.MergeResult + type PageQuery struct + Page int + Size int + func (p *PageQuery) GetOffset() int + type Status string + const Created + const Error + const Saved + const Unknown + type Sum struct + Total int64 + type Tag struct + Key string + Value string v1.7.0 Jul 26, 2024 v1.6.0 May 11, 2024 v1.5.1 Apr 3, 2024 v1.5.0 Mar 27, 2024