Documentation
Index ¶
- Variables
- func ListenNBIServer(manager *models.ModelManager) error
- func ServerRecover(debug bool) echo.MiddlewareFunc
- type HTTPError
- type HttpHandler
- func (h *HttpHandler) AddCpeData(c echo.Context) error
- func (h *HttpHandler) AddData(c echo.Context) error
- func (h *HttpHandler) AddOperator(c echo.Context) error
- func (h *HttpHandler) AddSubscribeData(c echo.Context) error
- func (h *HttpHandler) AddVpeData(c echo.Context) error
- func (h *HttpHandler) ClearRadiusOnline(c echo.Context) error
- func (h *HttpHandler) CreateAuthToken(operator *models.Operator) (string, error)
- func (h *HttpHandler) DeleteData(c echo.Context) error
- func (h *HttpHandler) DeleteMikrotikAcsTasks(c echo.Context) error
- func (h *HttpHandler) DeleteOperator(c echo.Context) error
- func (h *HttpHandler) ExportData(c echo.Context) error
- func (h *HttpHandler) FetchExcelData(c echo.Context, sheet string) ([]map[string]string, error)
- func (h *HttpHandler) GetConfig() *config.AppConfig
- func (h *HttpHandler) GetData(c echo.Context) error
- func (h *HttpHandler) GetDataValues(c echo.Context) error
- func (h *HttpHandler) GetInternalError(err interface{}) *echo.HTTPError
- func (h *HttpHandler) GetJwtData(c echo.Context) jwt.MapClaims
- func (h *HttpHandler) GetManager() *models.ModelManager
- func (h *HttpHandler) GetMikrotikAcsTasks(c echo.Context) error
- func (h *HttpHandler) GetRadiusOnlineCountText(c echo.Context) error
- func (h *HttpHandler) GetUserId(c echo.Context) string
- func (h *HttpHandler) GetUserLevel(c echo.Context) string
- func (h *HttpHandler) GetUsername(c echo.Context) string
- func (h *HttpHandler) GoInternalErrPage(c echo.Context, err interface{}) error
- func (h *HttpHandler) ImportData(c echo.Context) error
- func (h *HttpHandler) InitAllRouter(e *echo.Echo)
- func (h *HttpHandler) InitRouter(group *echo.Group)
- func (h *HttpHandler) IsManager(c echo.Context) bool
- func (h *HttpHandler) ParseFormInt64(c echo.Context, name string) (int64, error)
- func (h *HttpHandler) ParseJsonBody(c echo.Context) (web.RequestParams, error)
- func (h *HttpHandler) QueryConfig(c echo.Context) error
- func (h *HttpHandler) QueryCpes(c echo.Context) error
- func (h *HttpHandler) QueryData(c echo.Context) error
- func (h *HttpHandler) QueryDataOptions(c echo.Context) error
- func (h *HttpHandler) QueryMikrotikDeviceDnsClientServer(c echo.Context) error
- func (h *HttpHandler) QueryMikrotikDeviceInterfaces(c echo.Context) error
- func (h *HttpHandler) QueryMikrotikDeviceIpInterfaces(c echo.Context) error
- func (h *HttpHandler) QueryMikrotikDevicePPPInterfaces(c echo.Context) error
- func (h *HttpHandler) QueryMikrotikDeviceRouters(c echo.Context) error
- func (h *HttpHandler) QueryOperator(c echo.Context) error
- func (h *HttpHandler) QueryPageData(c echo.Context) error
- func (h *HttpHandler) QueryRadiusAccounting(c echo.Context) error
- func (h *HttpHandler) QueryRadiusAuthlog(c echo.Context) error
- func (h *HttpHandler) QueryRadiusOnline(c echo.Context) error
- func (h *HttpHandler) QuerySubscribes(c echo.Context) error
- func (h *HttpHandler) QuerySyslog(c echo.Context) error
- func (h *HttpHandler) QueryVpes(c echo.Context) error
- func (h *HttpHandler) RequestParse(c echo.Context) web.RequestParams
- func (h *HttpHandler) RequestParseForm(c echo.Context) web.RequestParams
- func (h *HttpHandler) RequestParseGet(c echo.Context) web.RequestParams
- func (h *HttpHandler) RequestToken(c echo.Context) error
- func (h *HttpHandler) RestError(msg string) *RestResult
- func (h *HttpHandler) RestResult(data interface{}) *RestResult
- func (h *HttpHandler) RestSucc(msg string) *RestResult
- func (h *HttpHandler) RetryMikrotikAcsTasks(c echo.Context) error
- func (h *HttpHandler) RunCpeTr069Policy(c echo.Context) error
- func (h *HttpHandler) RunMikrotikCpeApiPolicy(c echo.Context) error
- func (h *HttpHandler) RunMikrotikCpeScriptPolicy(c echo.Context) error
- func (h *HttpHandler) RunMikrotikVpeApiPolicy(c echo.Context) error
- func (h *HttpHandler) SaveAction(c echo.Context) error
- func (h *HttpHandler) Status(c echo.Context) error
- func (h *HttpHandler) SyncManageUser(c echo.Context) error
- func (h *HttpHandler) SyncSocksUser(c echo.Context) error
- func (h *HttpHandler) TruncateRadiusOnline(c echo.Context) error
- func (h *HttpHandler) UpdateConfig(c echo.Context) error
- func (h *HttpHandler) UpdateCpeData(c echo.Context) error
- func (h *HttpHandler) UpdateData(c echo.Context) error
- func (h *HttpHandler) UpdateOperator(c echo.Context) error
- func (h *HttpHandler) UpdateRadiusConfigs(c echo.Context) error
- func (h *HttpHandler) UpdateVpeData(c echo.Context) error
- func (h *HttpHandler) UploadCpeBackup(c echo.Context) error
- type RestResult
- type WebContext
- type WebHandler
Constants ¶
This section is empty.
Variables ¶
View Source
var COLNAMES = map[int]string{0: "A", 1: "B", 2: "C", 3: "D", 4: "E", 5: "F", 6: "G", 7: "H", 8: "I", 9: "J", 10: "K", 11: "L", 12: "M",
13: "N", 14: "O", 15: "P", 16: "Q", 17: "R", 18: "S", 19: "T", 20: "U", 21: "V", 22: "W", 23: "X", 24: "Y",
25: "Z", 26: "AA", 27: "AB", 28: "AC", 29: "AD", 30: "AE", 31: "AF", 32: "AG", 33: "AH", 34: "AI", 35: "AJ",
36: "AK", 37: "AL", 38: "AM", 39: "AN",
}
Functions ¶
func ServerRecover ¶
func ServerRecover(debug bool) echo.MiddlewareFunc
Types ¶
type HTTPError ¶
type HTTPError struct { Code int `json:"-"` Message interface{} `json:"message"` Internal error `json:"-"` // Stores the error returned by an external dependency }
func NewHTTPError ¶
type HttpHandler ¶
type HttpHandler struct {
Ctx *WebContext
}
func NewHttpHandler ¶
func NewHttpHandler(ctx *WebContext) HttpHandler
func (*HttpHandler) AddCpeData ¶
func (h *HttpHandler) AddCpeData(c echo.Context) error
func (*HttpHandler) AddOperator ¶
func (h *HttpHandler) AddOperator(c echo.Context) error
AddOperator
func (*HttpHandler) AddSubscribeData ¶
func (h *HttpHandler) AddSubscribeData(c echo.Context) error
func (*HttpHandler) AddVpeData ¶
func (h *HttpHandler) AddVpeData(c echo.Context) error
func (*HttpHandler) ClearRadiusOnline ¶
func (h *HttpHandler) ClearRadiusOnline(c echo.Context) error
func (*HttpHandler) CreateAuthToken ¶
func (h *HttpHandler) CreateAuthToken(operator *models.Operator) (string, error)
func (*HttpHandler) DeleteMikrotikAcsTasks ¶
func (h *HttpHandler) DeleteMikrotikAcsTasks(c echo.Context) error
func (*HttpHandler) DeleteOperator ¶
func (h *HttpHandler) DeleteOperator(c echo.Context) error
DeleteOperator
func (*HttpHandler) FetchExcelData ¶
func (*HttpHandler) GetConfig ¶
func (h *HttpHandler) GetConfig() *config.AppConfig
func (*HttpHandler) GetDataValues ¶
func (h *HttpHandler) GetDataValues(c echo.Context) error
AddData
func (*HttpHandler) GetInternalError ¶
func (h *HttpHandler) GetInternalError(err interface{}) *echo.HTTPError
func (*HttpHandler) GetJwtData ¶
func (h *HttpHandler) GetJwtData(c echo.Context) jwt.MapClaims
func (*HttpHandler) GetManager ¶
func (h *HttpHandler) GetManager() *models.ModelManager
func (*HttpHandler) GetMikrotikAcsTasks ¶
func (h *HttpHandler) GetMikrotikAcsTasks(c echo.Context) error
func (*HttpHandler) GetRadiusOnlineCountText ¶
func (h *HttpHandler) GetRadiusOnlineCountText(c echo.Context) error
func (*HttpHandler) GetUserId ¶
func (h *HttpHandler) GetUserId(c echo.Context) string
Get current api user id
func (*HttpHandler) GetUserLevel ¶
func (h *HttpHandler) GetUserLevel(c echo.Context) string
Get current api user level
func (*HttpHandler) GetUsername ¶
func (h *HttpHandler) GetUsername(c echo.Context) string
Get current api user name
func (*HttpHandler) GoInternalErrPage ¶
func (h *HttpHandler) GoInternalErrPage(c echo.Context, err interface{}) error
func (*HttpHandler) InitAllRouter ¶
func (h *HttpHandler) InitAllRouter(e *echo.Echo)
func (*HttpHandler) InitRouter ¶
func (h *HttpHandler) InitRouter(group *echo.Group)
func (*HttpHandler) IsManager ¶
func (h *HttpHandler) IsManager(c echo.Context) bool
Get current api user level
func (*HttpHandler) ParseFormInt64 ¶
func (*HttpHandler) ParseJsonBody ¶
func (h *HttpHandler) ParseJsonBody(c echo.Context) (web.RequestParams, error)
解析 JSON POST 参数
func (*HttpHandler) QueryConfig ¶
func (h *HttpHandler) QueryConfig(c echo.Context) error
func (*HttpHandler) QueryDataOptions ¶
func (h *HttpHandler) QueryDataOptions(c echo.Context) error
QueryData
func (*HttpHandler) QueryMikrotikDeviceDnsClientServer ¶
func (h *HttpHandler) QueryMikrotikDeviceDnsClientServer(c echo.Context) error
func (*HttpHandler) QueryMikrotikDeviceInterfaces ¶
func (h *HttpHandler) QueryMikrotikDeviceInterfaces(c echo.Context) error
QueryMikrotikDeviceInterfaces
func (*HttpHandler) QueryMikrotikDeviceIpInterfaces ¶
func (h *HttpHandler) QueryMikrotikDeviceIpInterfaces(c echo.Context) error
func (*HttpHandler) QueryMikrotikDevicePPPInterfaces ¶
func (h *HttpHandler) QueryMikrotikDevicePPPInterfaces(c echo.Context) error
func (*HttpHandler) QueryMikrotikDeviceRouters ¶
func (h *HttpHandler) QueryMikrotikDeviceRouters(c echo.Context) error
func (*HttpHandler) QueryOperator ¶
func (h *HttpHandler) QueryOperator(c echo.Context) error
QueryOperator
func (*HttpHandler) QueryPageData ¶
func (h *HttpHandler) QueryPageData(c echo.Context) error
QueryData
func (*HttpHandler) QueryRadiusAccounting ¶
func (h *HttpHandler) QueryRadiusAccounting(c echo.Context) error
func (*HttpHandler) QueryRadiusAuthlog ¶
func (h *HttpHandler) QueryRadiusAuthlog(c echo.Context) error
func (*HttpHandler) QueryRadiusOnline ¶
func (h *HttpHandler) QueryRadiusOnline(c echo.Context) error
func (*HttpHandler) QuerySubscribes ¶
func (h *HttpHandler) QuerySubscribes(c echo.Context) error
func (*HttpHandler) QuerySyslog ¶
func (h *HttpHandler) QuerySyslog(c echo.Context) error
func (*HttpHandler) RequestParse ¶
func (h *HttpHandler) RequestParse(c echo.Context) web.RequestParams
func (*HttpHandler) RequestParseForm ¶
func (h *HttpHandler) RequestParseForm(c echo.Context) web.RequestParams
解析表单提交参数
func (*HttpHandler) RequestParseGet ¶
func (h *HttpHandler) RequestParseGet(c echo.Context) web.RequestParams
解析查询参数
func (*HttpHandler) RequestToken ¶
func (h *HttpHandler) RequestToken(c echo.Context) error
func (*HttpHandler) RestError ¶
func (h *HttpHandler) RestError(msg string) *RestResult
func (*HttpHandler) RestResult ¶
func (h *HttpHandler) RestResult(data interface{}) *RestResult
func (*HttpHandler) RestSucc ¶
func (h *HttpHandler) RestSucc(msg string) *RestResult
func (*HttpHandler) RetryMikrotikAcsTasks ¶
func (h *HttpHandler) RetryMikrotikAcsTasks(c echo.Context) error
func (*HttpHandler) RunCpeTr069Policy ¶
func (h *HttpHandler) RunCpeTr069Policy(c echo.Context) error
RunCpeTr069Policy params >> sn string : cpe sn pid string : policy id
func (*HttpHandler) RunMikrotikCpeApiPolicy ¶
func (h *HttpHandler) RunMikrotikCpeApiPolicy(c echo.Context) error
RunCpeApiPolicy params >> sn string : cpe sn pid string : policy id
func (*HttpHandler) RunMikrotikCpeScriptPolicy ¶
func (h *HttpHandler) RunMikrotikCpeScriptPolicy(c echo.Context) error
RunCpeTr069Policy params >> sn string : cpe sn pid string : policy id
func (*HttpHandler) RunMikrotikVpeApiPolicy ¶
func (h *HttpHandler) RunMikrotikVpeApiPolicy(c echo.Context) error
RunMikrotikVpeApiPolicy sn string pid string
func (*HttpHandler) SyncManageUser ¶
func (h *HttpHandler) SyncManageUser(c echo.Context) error
SyncUser sync socks account
func (*HttpHandler) SyncSocksUser ¶
func (h *HttpHandler) SyncSocksUser(c echo.Context) error
SyncUser sync socks account
func (*HttpHandler) TruncateRadiusOnline ¶
func (h *HttpHandler) TruncateRadiusOnline(c echo.Context) error
func (*HttpHandler) UpdateConfig ¶
func (h *HttpHandler) UpdateConfig(c echo.Context) error
func (*HttpHandler) UpdateCpeData ¶
func (h *HttpHandler) UpdateCpeData(c echo.Context) error
func (*HttpHandler) UpdateOperator ¶
func (h *HttpHandler) UpdateOperator(c echo.Context) error
UpdateOperator
func (*HttpHandler) UpdateRadiusConfigs ¶
func (h *HttpHandler) UpdateRadiusConfigs(c echo.Context) error
func (*HttpHandler) UpdateVpeData ¶
func (h *HttpHandler) UpdateVpeData(c echo.Context) error
func (*HttpHandler) UploadCpeBackup ¶
func (h *HttpHandler) UploadCpeBackup(c echo.Context) error
type RestResult ¶
type WebContext ¶
type WebContext struct { Manager *models.ModelManager Config *config.AppConfig }