webservice

package
v0.0.0-...-c2e995d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 29, 2021 License: MIT Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SessionKeyUid     = "Uid"
	SessionKeyUserKey = "UserKey"
	SessionKeyUserIp  = "UserIp"
)

Variables

This section is empty.

Functions

func AddCrawlerNode

func AddCrawlerNode(c *fiber.Ctx) error

func AddNode

func AddNode(c *fiber.Ctx) error

func ChangePassword

func ChangePassword(c *fiber.Ctx) error

func CheckUsable

func CheckUsable(c *fiber.Ctx) error

func InitHttpService

func InitHttpService() error

func InitStorage

func InitStorage(dbAddr string) (fiber.Storage, error)

func InitWs

func InitWs(app *fiber.App) error

func Pac

func Pac(c *fiber.Ctx) error

func Registration

func Registration(c *fiber.Ctx) error

func SubClash

func SubClash(c *fiber.Ctx) error

func SubV2ray

func SubV2ray(c *fiber.Ctx) error

func SyncNode

func SyncNode(c *fiber.Ctx) error

func Version

func Version(c *fiber.Ctx) error

Types

type AddCrawlerNodeReq

type AddCrawlerNodeReq struct {
	NodeUrl     string                   `json:"node_url" validate:"required"`
	CrawlerType domain.CrawlType         `json:"crawler_type"`
	Rule        *domain.CrawlerConf_Rule `json:"rule"`
}

type AddNodeReq

type AddNodeReq struct {
	NodeUrl string `json:"node_url" validate:"required"`
}

type WsClient

type WsClient struct {
	// contains filtered or unexported fields
}

func NewWsClient

func NewWsClient(c *websocket.Conn) *WsClient

func (*WsClient) Init

func (p *WsClient) Init(clientId string) error

func (*WsClient) RecvMsgForever

func (p *WsClient) RecvMsgForever()

func (*WsClient) SendMsg

func (p *WsClient) SendMsg(msg interface{}) error

type WsClientDispatch

type WsClientDispatch struct {
	// contains filtered or unexported fields
}

func NewWsClientDispatch

func NewWsClientDispatch() *WsClientDispatch

func (*WsClientDispatch) Add

func (p *WsClientDispatch) Add(c *websocket.Conn) error

func (*WsClientDispatch) OnClose

func (p *WsClientDispatch) OnClose(clientId string)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL