Documentation ¶
Index ¶
- Constants
- func GetReqidFromContext(ctx context.Context) string
- func NewReqidContext(ctx context.Context, reqid string) context.Context
- type HTTPPluginOptions
- type LoginContent
- type Manager
- func (m *Manager) Login(content *LoginContent) (*LoginContent, error)
- func (m *Manager) NewProxy(content *NewProxyContent) (*NewProxyContent, error)
- func (m *Manager) NewUserConn(content *NewUserConnContent) (*NewUserConnContent, error)
- func (m *Manager) NewWorkConn(content *NewWorkConnContent) (*NewWorkConnContent, error)
- func (m *Manager) Ping(content *PingContent) (*PingContent, error)
- func (m *Manager) Register(p Plugin)
- type NewProxyContent
- type NewUserConnContent
- type NewWorkConnContent
- type PingContent
- type Plugin
- type Request
- type Response
- type UserInfo
Constants ¶
View Source
const ( APIVersion = "0.1.0" OpLogin = "Login" OpNewProxy = "NewProxy" OpPing = "Ping" OpNewWorkConn = "NewWorkConn" OpNewUserConn = "NewUserConn" )
Variables ¶
This section is empty.
Functions ¶
func GetReqidFromContext ¶
Types ¶
type HTTPPluginOptions ¶
type LoginContent ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func NewManager() *Manager
func (*Manager) Login ¶
func (m *Manager) Login(content *LoginContent) (*LoginContent, error)
func (*Manager) NewProxy ¶
func (m *Manager) NewProxy(content *NewProxyContent) (*NewProxyContent, error)
func (*Manager) NewUserConn ¶ added in v0.33.0
func (m *Manager) NewUserConn(content *NewUserConnContent) (*NewUserConnContent, error)
func (*Manager) NewWorkConn ¶ added in v0.32.1
func (m *Manager) NewWorkConn(content *NewWorkConnContent) (*NewWorkConnContent, error)
func (*Manager) Ping ¶ added in v0.32.1
func (m *Manager) Ping(content *PingContent) (*PingContent, error)
type NewProxyContent ¶
type NewUserConnContent ¶ added in v0.33.0
type NewWorkConnContent ¶ added in v0.32.1
type NewWorkConnContent struct { User UserInfo `json:"user"` msg.NewWorkConn }
type PingContent ¶ added in v0.32.1
type Plugin ¶
type Plugin interface { Name() string IsSupport(op string) bool Handle(ctx context.Context, op string, content interface{}) (res *Response, retContent interface{}, err error) }
func NewHTTPPluginOptions ¶
func NewHTTPPluginOptions(options HTTPPluginOptions) Plugin
Click to show internal directories.
Click to hide internal directories.