Documentation
¶
Index ¶
- func DeleteOld(targetTimestamp int64) (int64, error)
- func GetAll(logType int, startTimestamp int64, endTimestamp int64, modelName string, ...) ([]*model.Log, error)
- func GetByID(logID string) (*model.Log, error)
- func GetUser(userId string, logType int, startTimestamp int64, endTimestamp int64, ...) ([]*model.Log, error)
- func GetUserByID(userId string, logID string) (*model.Log, error)
- func MinLogTimestampByUserId(userId string, logTypes []int) (int64, error)
- func RecordConsumeLog(ctx context.Context, log *model.Log)
- func RecordLog(ctx context.Context, userId string, logType int, content string)
- func RecordTestLog(ctx context.Context, log *model.Log)
- func RecordTopupLog(ctx context.Context, userId string, content string, quota int)
- func SearchAll(keyword string) ([]*model.Log, error)
- func SearchLogModelsByPeriod(userId string, start, end int) ([]string, error)
- func SearchLogsByPeriodAndModel(userId string, start, end int, granularity string, models []string) ([]*model.LogStatistic, error)
- func SearchUser(userId string, keyword string) ([]*model.Log, error)
- func SumUsedQuota(logType int, startTimestamp int64, endTimestamp int64, modelName string, ...) int64
- func SumUsedQuotaByUserId(logType int, userId string, startTimestamp int64, endTimestamp int64) (int64, error)
- func SumUsedQuotaByUserIdWithModels(logType int, userId string, startTimestamp int64, endTimestamp int64, ...) (int64, error)
- func SumUsedToken(logType int, startTimestamp int64, endTimestamp int64, modelName string, ...) int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetUserByID ¶ added in v0.0.3
func MinLogTimestampByUserId ¶
func RecordTopupLog ¶
func SearchLogModelsByPeriod ¶
func SumUsedQuota ¶
func SumUsedQuotaByUserId ¶
func SumUsedQuotaByUserIdWithModels ¶ added in v0.0.6
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.