342 lines
7.6 KiB
Go
342 lines
7.6 KiB
Go
package api
|
|
|
|
import (
|
|
"context"
|
|
"next-terminal/server/common/maps"
|
|
"strconv"
|
|
|
|
"github.com/labstack/echo/v4"
|
|
)
|
|
|
|
type ScheduledTaskApi struct{}
|
|
|
|
func (api ScheduledTaskApi) AllEndpoint(c echo.Context) error {
|
|
return Success(c, []interface{}{})
|
|
}
|
|
|
|
func (api ScheduledTaskApi) PagingEndpoint(c echo.Context) error {
|
|
pageIndex, _ := strconv.Atoi(c.QueryParam("pageIndex"))
|
|
pageSize, _ := strconv.Atoi(c.QueryParam("pageSize"))
|
|
if pageIndex == 0 {
|
|
pageIndex = 1
|
|
}
|
|
if pageSize == 0 {
|
|
pageSize = 10
|
|
}
|
|
return Success(c, maps.Map{
|
|
"total": 0,
|
|
"items": []interface{}{},
|
|
})
|
|
}
|
|
|
|
func (api ScheduledTaskApi) CreateEndpoint(c echo.Context) error {
|
|
return Success(c, "")
|
|
}
|
|
|
|
func (api ScheduledTaskApi) UpdateEndpoint(c echo.Context) error {
|
|
return Success(c, nil)
|
|
}
|
|
|
|
func (api ScheduledTaskApi) DeleteEndpoint(c echo.Context) error {
|
|
return Success(c, nil)
|
|
}
|
|
|
|
func (api ScheduledTaskApi) GetEndpoint(c echo.Context) error {
|
|
return Success(c, nil)
|
|
}
|
|
|
|
func (api ScheduledTaskApi) ChangeStatusEndpoint(c echo.Context) error {
|
|
return Success(c, nil)
|
|
}
|
|
|
|
func (api ScheduledTaskApi) ExecEndpoint(c echo.Context) error {
|
|
return Success(c, nil)
|
|
}
|
|
|
|
func (api ScheduledTaskApi) GetLogsEndpoint(c echo.Context) error {
|
|
return Success(c, maps.Map{
|
|
"total": 0,
|
|
"items": []interface{}{},
|
|
})
|
|
}
|
|
|
|
func (api ScheduledTaskApi) DeleteLogsEndpoint(c echo.Context) error {
|
|
return Success(c, nil)
|
|
}
|
|
|
|
func (api ScheduledTaskApi) NextTenRunsEndpoint(c echo.Context) error {
|
|
return Success(c, []string{})
|
|
}
|
|
|
|
type SessionCommandApi struct{}
|
|
|
|
func (api SessionCommandApi) AllEndpoint(c echo.Context) error {
|
|
return Success(c, []interface{}{})
|
|
}
|
|
|
|
func (api SessionCommandApi) PagingEndpoint(c echo.Context) error {
|
|
return Success(c, maps.Map{
|
|
"total": 0,
|
|
"items": []interface{}{},
|
|
})
|
|
}
|
|
|
|
func (api SessionCommandApi) GetEndpoint(c echo.Context) error {
|
|
return Success(c, nil)
|
|
}
|
|
|
|
type OperationLogApi struct{}
|
|
|
|
func (api OperationLogApi) AllEndpoint(c echo.Context) error {
|
|
return Success(c, []interface{}{})
|
|
}
|
|
|
|
func (api OperationLogApi) PagingEndpoint(c echo.Context) error {
|
|
return Success(c, maps.Map{
|
|
"total": 0,
|
|
"items": []interface{}{},
|
|
})
|
|
}
|
|
|
|
func (api OperationLogApi) ClearEndpoint(c echo.Context) error {
|
|
return Success(c, nil)
|
|
}
|
|
|
|
func (api OperationLogApi) DeleteEndpoint(c echo.Context) error {
|
|
return Success(c, nil)
|
|
}
|
|
|
|
type OidcClientApi struct{}
|
|
|
|
func (api OidcClientApi) AllEndpoint(c echo.Context) error {
|
|
return Success(c, []interface{}{})
|
|
}
|
|
|
|
func (api OidcClientApi) PagingEndpoint(c echo.Context) error {
|
|
return Success(c, maps.Map{
|
|
"total": 0,
|
|
"items": []interface{}{},
|
|
})
|
|
}
|
|
|
|
func (api OidcClientApi) CreateEndpoint(c echo.Context) error {
|
|
return Success(c, maps.Map{
|
|
"client": maps.Map{},
|
|
"secret": "",
|
|
})
|
|
}
|
|
|
|
func (api OidcClientApi) UpdateEndpoint(c echo.Context) error {
|
|
return Success(c, nil)
|
|
}
|
|
|
|
func (api OidcClientApi) DeleteEndpoint(c echo.Context) error {
|
|
return Success(c, nil)
|
|
}
|
|
|
|
func (api OidcClientApi) GetEndpoint(c echo.Context) error {
|
|
return Success(c, nil)
|
|
}
|
|
|
|
func (api OidcClientApi) RegenerateSecretEndpoint(c echo.Context) error {
|
|
return Success(c, maps.Map{
|
|
"clientSecret": "",
|
|
})
|
|
}
|
|
|
|
func (api OidcClientApi) UpdateStatusEndpoint(c echo.Context) error {
|
|
return Success(c, nil)
|
|
}
|
|
|
|
type LoginLockedApi struct{}
|
|
|
|
func (api LoginLockedApi) AllEndpoint(c echo.Context) error {
|
|
return Success(c, []interface{}{})
|
|
}
|
|
|
|
func (api LoginLockedApi) PagingEndpoint(c echo.Context) error {
|
|
return Success(c, maps.Map{
|
|
"total": 0,
|
|
"items": []interface{}{},
|
|
})
|
|
}
|
|
|
|
func (api LoginLockedApi) DeleteEndpoint(c echo.Context) error {
|
|
return Success(c, nil)
|
|
}
|
|
|
|
type FilesystemLogApi struct{}
|
|
|
|
func (api FilesystemLogApi) AllEndpoint(c echo.Context) error {
|
|
return Success(c, []interface{}{})
|
|
}
|
|
|
|
func (api FilesystemLogApi) PagingEndpoint(c echo.Context) error {
|
|
return Success(c, maps.Map{
|
|
"total": 0,
|
|
"items": []interface{}{},
|
|
})
|
|
}
|
|
|
|
func (api FilesystemLogApi) DeleteEndpoint(c echo.Context) error {
|
|
return Success(c, nil)
|
|
}
|
|
|
|
func (api FilesystemLogApi) ClearEndpoint(c echo.Context) error {
|
|
return Success(c, nil)
|
|
}
|
|
|
|
type CommandFilterRuleApi struct{}
|
|
|
|
func (api CommandFilterRuleApi) AllEndpoint(c echo.Context) error {
|
|
return Success(c, []interface{}{})
|
|
}
|
|
|
|
func (api CommandFilterRuleApi) PagingEndpoint(c echo.Context) error {
|
|
return Success(c, maps.Map{
|
|
"total": 0,
|
|
"items": []interface{}{},
|
|
})
|
|
}
|
|
|
|
func (api CommandFilterRuleApi) CreateEndpoint(c echo.Context) error {
|
|
return Success(c, "")
|
|
}
|
|
|
|
func (api CommandFilterRuleApi) UpdateEndpoint(c echo.Context) error {
|
|
return Success(c, nil)
|
|
}
|
|
|
|
func (api CommandFilterRuleApi) DeleteEndpoint(c echo.Context) error {
|
|
return Success(c, nil)
|
|
}
|
|
|
|
func (api CommandFilterRuleApi) GetEndpoint(c echo.Context) error {
|
|
return Success(c, nil)
|
|
}
|
|
|
|
type AgentGatewayTokenApi struct{}
|
|
|
|
func (api AgentGatewayTokenApi) AllEndpoint(c echo.Context) error {
|
|
return Success(c, []interface{}{})
|
|
}
|
|
|
|
func (api AgentGatewayTokenApi) PagingEndpoint(c echo.Context) error {
|
|
return Success(c, maps.Map{
|
|
"total": 0,
|
|
"items": []interface{}{},
|
|
})
|
|
}
|
|
|
|
func (api AgentGatewayTokenApi) CreateEndpoint(c echo.Context) error {
|
|
return Success(c, "")
|
|
}
|
|
|
|
func (api AgentGatewayTokenApi) UpdateEndpoint(c echo.Context) error {
|
|
return Success(c, nil)
|
|
}
|
|
|
|
func (api AgentGatewayTokenApi) DeleteEndpoint(c echo.Context) error {
|
|
return Success(c, nil)
|
|
}
|
|
|
|
func (api AgentGatewayTokenApi) GetEndpoint(c echo.Context) error {
|
|
return Success(c, nil)
|
|
}
|
|
|
|
type AccessLogApi struct{}
|
|
|
|
func (api AccessLogApi) AllEndpoint(c echo.Context) error {
|
|
return Success(c, []interface{}{})
|
|
}
|
|
|
|
func (api AccessLogApi) PagingEndpoint(c echo.Context) error {
|
|
return Success(c, maps.Map{
|
|
"total": 0,
|
|
"items": []interface{}{},
|
|
})
|
|
}
|
|
|
|
func (api AccessLogApi) DeleteEndpoint(c echo.Context) error {
|
|
return Success(c, nil)
|
|
}
|
|
|
|
func (api AccessLogApi) ClearEndpoint(c echo.Context) error {
|
|
return Success(c, nil)
|
|
}
|
|
|
|
func (api AccessLogApi) GetDomainStatsEndpoint(c echo.Context) error {
|
|
return Success(c, []interface{}{})
|
|
}
|
|
|
|
func (api AccessLogApi) GetDailyStatsEndpoint(c echo.Context) error {
|
|
return Success(c, []interface{}{})
|
|
}
|
|
|
|
func (api AccessLogApi) GetStatusCodeStatsEndpoint(c echo.Context) error {
|
|
return Success(c, []interface{}{})
|
|
}
|
|
|
|
func (api AccessLogApi) GetHourlyStatsEndpoint(c echo.Context) error {
|
|
return Success(c, []interface{}{})
|
|
}
|
|
|
|
func (api AccessLogApi) GetTotalStatsEndpoint(c echo.Context) error {
|
|
return Success(c, maps.Map{
|
|
"totalRequests": 0,
|
|
"uniqueDomains": 0,
|
|
"uniqueVisitors": 0,
|
|
"avgResponseTime": 0,
|
|
})
|
|
}
|
|
|
|
func (api AccessLogApi) GetWebsiteStatsEndpoint(c echo.Context) error {
|
|
return Success(c, maps.Map{
|
|
"websiteId": "",
|
|
"websiteName": "",
|
|
"domain": "",
|
|
"pv": 0,
|
|
"uv": 0,
|
|
"ip": 0,
|
|
"traffic": 0,
|
|
"requests": 0,
|
|
"realtimeTraffic": 0,
|
|
"requestsPerSecond": 0,
|
|
"avgResponseTime": 0,
|
|
})
|
|
}
|
|
|
|
func (api AccessLogApi) GetWebsiteTrafficTrendEndpoint(c echo.Context) error {
|
|
return Success(c, []interface{}{})
|
|
}
|
|
|
|
func (api AccessLogApi) GetTopPagesEndpoint(c echo.Context) error {
|
|
return Success(c, []interface{}{})
|
|
}
|
|
|
|
func (api AccessLogApi) GetTopReferersEndpoint(c echo.Context) error {
|
|
return Success(c, []interface{}{})
|
|
}
|
|
|
|
func (api AccessLogApi) GetRealtimeMetricsEndpoint(c echo.Context) error {
|
|
return Success(c, maps.Map{
|
|
"currentOnline": 0,
|
|
"requestsPerSecond": 0,
|
|
"trafficPerSecond": 0,
|
|
"avgResponseTime": 0,
|
|
"errorRate": 0,
|
|
})
|
|
}
|
|
|
|
func (api AccessLogApi) GetWebsiteHourlyStatsEndpoint(c echo.Context) error {
|
|
return Success(c, []interface{}{})
|
|
}
|
|
|
|
func (api AccessLogApi) GetWebsiteStatusCodeStatsEndpoint(c echo.Context) error {
|
|
return Success(c, []interface{}{})
|
|
}
|
|
|
|
func init() {
|
|
_ = context.TODO()
|
|
}
|