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

Method RestLogs

controller/service/iml.go:121–145  ·  view source on GitHub ↗
(ctx *gin.Context, serviceId string, start string, end string, page string, size string)

Source from the content-addressed store, hash-verified

119}
120
121func (i *imlServiceController) RestLogs(ctx *gin.Context, serviceId string, start string, end string, page string, size string) ([]*service_dto.RestLogItem, int64, error) {
122 s, e, err := formatTime(start, end)
123 if err != nil {
124 return nil, 0, err
125 }
126 if serviceId == "" {
127 return nil, 0, fmt.Errorf("service id is empty")
128 }
129 if page == "" {
130 page = "1"
131 }
132 if size == "" {
133 size = "20"
134 }
135 p, err := strconv.Atoi(page)
136 if err != nil {
137 return nil, 0, err
138 }
139 ps, err := strconv.Atoi(size)
140 if err != nil {
141 return nil, 0, err
142 }
143
144 return i.module.RestLogs(ctx, serviceId, s, e, p, ps)
145}
146
147func (i *imlServiceController) ServiceOverview(ctx *gin.Context, serviceId string) (*service_dto.Overview, error) {
148 o, err := i.module.ServiceOverview(ctx, serviceId)

Callers

nothing calls this directly

Calls 2

formatTimeFunction · 0.70
RestLogsMethod · 0.65

Tested by

no test coverage detected