log

package
v1.8.1-beta Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 26, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ILogService

type ILogService interface {
	UpdateLogSource(ctx context.Context, driver string, input *Save) error
	GetLogSource(ctx context.Context, driver string) (*Source, error)
	Logs(ctx context.Context, driver string, cluster string, conditions map[string]string, start time.Time, end time.Time, limit int64, offset int64) ([]*Item, int64, error)
	LogRecordsByService(ctx context.Context, serviceId string, start time.Time, end time.Time, page int, size int) ([]*Item, int64, error)
	LogCount(ctx context.Context, driver string, cluster string, conditions map[string]string, spendHour int64, group string) (map[string]int64, error)
	LogInfo(ctx context.Context, driver string, cluster string, id string) (*Info, error)
	InsertLog(ctx context.Context, driver string, input *InsertLog) error
}

type ILogUpdateService

type ILogUpdateService interface {
	UpdateLogSource(ctx context.Context, driver string, input *Save) error
}

type Info

type Info struct {
	Item
	ContentType       string
	RequestBody       string
	ProxyBody         string
	ProxyResponseBody string
	ResponseBody      string
	RequestHeader     string
	ResponseHeader    string
}

type InsertLog

type InsertLog struct {
	ID            string
	Driver        string
	Strategy      string
	Service       string
	API           string
	Method        string
	Url           string
	RemoteIP      string
	Consumer      string
	Authorization string
	InputToken    int64
	OutputToken   int64
	TotalToken    int64
	AIProvider    string
	AIModel       string
	StatusCode    int64
	ResponseTime  int64
	Traffic       int64
	RecordTime    time.Time
}

type Item

type Item struct {
	ID            string
	Strategy      string
	Service       string
	API           string
	Method        string
	Url           string
	RemoteIP      string
	Consumer      string
	Authorization string
	InputToken    int64
	OutputToken   int64
	TotalToken    int64
	AIProvider    string
	AIModel       string
	StatusCode    int64
	ResponseTime  int64
	Traffic       int64
	RecordTime    time.Time
}

type Save

type Save struct {
	ID           string
	Cluster      *string
	Config       *string
	LastPullTime *time.Time
}

type Source

type Source struct {
	ID           string
	Cluster      string
	Driver       string
	Config       string
	Creator      string
	Updater      string
	CreateAt     time.Time
	UpdateAt     time.Time
	LastPullTime time.Time
}

func FromEntity

func FromEntity(ov *log_source.LogSource) *Source

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL