231 lines
4.9 KiB
Go
231 lines
4.9 KiB
Go
package api
|
|
|
|
import (
|
|
"next-terminal/server/common/maps"
|
|
|
|
"github.com/labstack/echo/v4"
|
|
)
|
|
|
|
type AuthorisedAssetApi struct{}
|
|
|
|
func (api AuthorisedAssetApi) PagingEndpoint(c echo.Context) error {
|
|
return Success(c, maps.Map{
|
|
"total": 0,
|
|
"items": []interface{}{},
|
|
})
|
|
}
|
|
|
|
func (api AuthorisedAssetApi) AuthorisedAssetsEndpoint(c echo.Context) error {
|
|
return Success(c, nil)
|
|
}
|
|
|
|
func (api AuthorisedAssetApi) AuthorisedUsersEndpoint(c echo.Context) error {
|
|
return Success(c, nil)
|
|
}
|
|
|
|
func (api AuthorisedAssetApi) AuthorisedDepartmentsEndpoint(c echo.Context) error {
|
|
return Success(c, nil)
|
|
}
|
|
|
|
func (api AuthorisedAssetApi) SelectedEndpoint(c echo.Context) error {
|
|
return Success(c, []string{})
|
|
}
|
|
|
|
func (api AuthorisedAssetApi) DeleteEndpoint(c echo.Context) error {
|
|
return Success(c, nil)
|
|
}
|
|
|
|
func (api AuthorisedAssetApi) GetEndpoint(c echo.Context) error {
|
|
return Success(c, nil)
|
|
}
|
|
|
|
func (api AuthorisedAssetApi) UpdateEndpoint(c echo.Context) error {
|
|
return Success(c, nil)
|
|
}
|
|
|
|
func (api AuthorisedAssetApi) CreateEndpoint(c echo.Context) error {
|
|
return Success(c, nil)
|
|
}
|
|
|
|
type AuthorisedDatabaseAssetApi struct{}
|
|
|
|
func (api AuthorisedDatabaseAssetApi) PagingEndpoint(c echo.Context) error {
|
|
return Success(c, maps.Map{
|
|
"total": 0,
|
|
"items": []interface{}{},
|
|
})
|
|
}
|
|
|
|
func (api AuthorisedDatabaseAssetApi) SelectedEndpoint(c echo.Context) error {
|
|
return Success(c, []string{})
|
|
}
|
|
|
|
func (api AuthorisedDatabaseAssetApi) DeleteEndpoint(c echo.Context) error {
|
|
return Success(c, nil)
|
|
}
|
|
|
|
func (api AuthorisedDatabaseAssetApi) GetEndpoint(c echo.Context) error {
|
|
return Success(c, nil)
|
|
}
|
|
|
|
func (api AuthorisedDatabaseAssetApi) UpdateEndpoint(c echo.Context) error {
|
|
return Success(c, nil)
|
|
}
|
|
|
|
func (api AuthorisedDatabaseAssetApi) CreateEndpoint(c echo.Context) error {
|
|
return Success(c, nil)
|
|
}
|
|
|
|
type AuthorisedWebsiteApi struct{}
|
|
|
|
func (api AuthorisedWebsiteApi) PagingEndpoint(c echo.Context) error {
|
|
return Success(c, maps.Map{
|
|
"total": 0,
|
|
"items": []interface{}{},
|
|
})
|
|
}
|
|
|
|
func (api AuthorisedWebsiteApi) DeleteEndpoint(c echo.Context) error {
|
|
return Success(c, nil)
|
|
}
|
|
|
|
func (api AuthorisedWebsiteApi) CreateEndpoint(c echo.Context) error {
|
|
return Success(c, nil)
|
|
}
|
|
|
|
type DbWorkOrderApi struct{}
|
|
|
|
func (api DbWorkOrderApi) PagingEndpoint(c echo.Context) error {
|
|
return Success(c, maps.Map{
|
|
"total": 0,
|
|
"items": []interface{}{},
|
|
})
|
|
}
|
|
|
|
func (api DbWorkOrderApi) GetEndpoint(c echo.Context) error {
|
|
return Success(c, nil)
|
|
}
|
|
|
|
func (api DbWorkOrderApi) CreateEndpoint(c echo.Context) error {
|
|
return Success(c, nil)
|
|
}
|
|
|
|
func (api DbWorkOrderApi) ApproveEndpoint(c echo.Context) error {
|
|
return Success(c, nil)
|
|
}
|
|
|
|
func (api DbWorkOrderApi) RejectEndpoint(c echo.Context) error {
|
|
return Success(c, nil)
|
|
}
|
|
|
|
func (api DbWorkOrderApi) DeleteEndpoint(c echo.Context) error {
|
|
return Success(c, nil)
|
|
}
|
|
|
|
type DatabaseSQLLogApi struct{}
|
|
|
|
func (api DatabaseSQLLogApi) PagingEndpoint(c echo.Context) error {
|
|
return Success(c, maps.Map{
|
|
"total": 0,
|
|
"items": []interface{}{},
|
|
})
|
|
}
|
|
|
|
func (api DatabaseSQLLogApi) ClearEndpoint(c echo.Context) error {
|
|
return Success(c, nil)
|
|
}
|
|
|
|
type DnsProviderApi struct{}
|
|
|
|
func (api DnsProviderApi) GetConfigEndpoint(c echo.Context) error {
|
|
return Success(c, maps.Map{
|
|
"ok": false,
|
|
"email": "",
|
|
"type": "",
|
|
})
|
|
}
|
|
|
|
func (api DnsProviderApi) SetConfigEndpoint(c echo.Context) error {
|
|
return Success(c, nil)
|
|
}
|
|
|
|
func (api DnsProviderApi) DeleteConfigEndpoint(c echo.Context) error {
|
|
return Success(c, nil)
|
|
}
|
|
|
|
type LicenseApi struct{}
|
|
|
|
func (api LicenseApi) GetMachineIdEndpoint(c echo.Context) error {
|
|
return Success(c, maps.Map{
|
|
"machineId": "",
|
|
})
|
|
}
|
|
|
|
func (api LicenseApi) GetLicenseEndpoint(c echo.Context) error {
|
|
return Success(c, maps.Map{
|
|
"type": "free",
|
|
"machineId": "",
|
|
"asset": 0,
|
|
"concurrent": 0,
|
|
"user": 0,
|
|
"expired": 0,
|
|
})
|
|
}
|
|
|
|
func (api LicenseApi) GetSimpleLicenseEndpoint(c echo.Context) error {
|
|
return Success(c, maps.Map{
|
|
"type": "free",
|
|
"expired": 0,
|
|
"oem": false,
|
|
})
|
|
}
|
|
|
|
func (api LicenseApi) SetLicenseEndpoint(c echo.Context) error {
|
|
return Success(c, nil)
|
|
}
|
|
|
|
func (api LicenseApi) RequestLicenseEndpoint(c echo.Context) error {
|
|
return Success(c, nil)
|
|
}
|
|
|
|
type OidcApi struct{}
|
|
|
|
func (api OidcApi) AuthorizeEndpoint(c echo.Context) error {
|
|
return Success(c, maps.Map{
|
|
"authorizeUrl": "",
|
|
"state": "",
|
|
})
|
|
}
|
|
|
|
func (api OidcApi) LoginEndpoint(c echo.Context) error {
|
|
return Success(c, maps.Map{
|
|
"token": "",
|
|
"needTotp": false,
|
|
})
|
|
}
|
|
|
|
type WechatWorkApi struct{}
|
|
|
|
func (api WechatWorkApi) AuthorizeEndpoint(c echo.Context) error {
|
|
return Success(c, maps.Map{
|
|
"authorizeUrl": "",
|
|
})
|
|
}
|
|
|
|
func (api WechatWorkApi) LoginEndpoint(c echo.Context) error {
|
|
return Success(c, maps.Map{
|
|
"token": "",
|
|
"needTotp": false,
|
|
})
|
|
}
|
|
|
|
type WebsiteTempAllowApi struct{}
|
|
|
|
func (api WebsiteTempAllowApi) ListEndpoint(c echo.Context) error {
|
|
return Success(c, []interface{}{})
|
|
}
|
|
|
|
func (api WebsiteTempAllowApi) DeleteEndpoint(c echo.Context) error {
|
|
return Success(c, nil)
|
|
}
|