MCPcopy Index your code
hub / github.com/APIParkLab/APIPark / StrategyLogInfo

Method StrategyLogInfo

module/strategy/iml.go:52–68  ·  view source on GitHub ↗
(ctx context.Context, id string)

Source from the content-addressed store, hash-verified

50}
51
52func (i *imlStrategyModule) StrategyLogInfo(ctx context.Context, id string) (*strategy_dto.LogInfo, error) {
53 c, err := i.clusterService.Get(ctx, cluster.DefaultClusterID)
54 if err != nil {
55 return nil, fmt.Errorf("cluster %s not found", cluster.DefaultClusterID)
56 }
57
58 info, err := i.logService.LogInfo(ctx, "loki", c.Cluster, id)
59 if err != nil {
60 return nil, err
61 }
62 return &strategy_dto.LogInfo{
63 ID: info.ID,
64 ContentType: info.ContentType,
65 ProxyResponseBody: info.ProxyResponseBody,
66 ResponseBody: info.ResponseBody,
67 }, nil
68}
69
70func (i *imlStrategyModule) GetStrategyLogs(ctx context.Context, keyword string, strategyID string, start time.Time, end time.Time, limit int64, offset int64) ([]*strategy_dto.LogItem, int64, error) {
71 if strategyID == "" {

Callers

nothing calls this directly

Calls 2

GetMethod · 0.65
LogInfoMethod · 0.65

Tested by

no test coverage detected