(ctx *gin.Context, input *monitor_dto.Top10Input)
| 173 | } |
| 174 | |
| 175 | func (i *imlMonitorStatisticController) Top10(ctx *gin.Context, input *monitor_dto.Top10Input) (interface{}, error) { |
| 176 | switch input.DataType { |
| 177 | case monitor_dto.DataTypeApi: |
| 178 | return i.module.TopAPIStatistics(ctx, 10, input.CommonInput) |
| 179 | case monitor_dto.DataTypeProvider: |
| 180 | return i.module.TopProviderStatistics(ctx, 10, input.CommonInput) |
| 181 | case monitor_dto.DataTypeSubscriber: |
| 182 | return i.module.TopSubscriberStatistics(ctx, 10, input.CommonInput) |
| 183 | default: |
| 184 | return nil, fmt.Errorf("unsupported data type: %s", input.DataType) |
| 185 | } |
| 186 | } |
| 187 | |
| 188 | var ( |
| 189 | _ IMonitorConfigController = (*imlMonitorConfig)(nil) |
nothing calls this directly
no test coverage detected