Documentation ¶
Index ¶
- type IdentifiableController
- func (c *IdentifiableController) Authenticate(sid string, env *common.SessionEnv) (*common.ConnectResult, error)
- func (c *IdentifiableController) Disconnect(sid string, env *common.SessionEnv, id string, subscriptions []string) error
- func (c *IdentifiableController) Perform(sid string, env *common.SessionEnv, id string, channel string, data string) (*common.CommandResult, error)
- func (c *IdentifiableController) Shutdown() error
- func (c *IdentifiableController) Start() error
- func (c *IdentifiableController) Subscribe(sid string, env *common.SessionEnv, id string, channel string) (*common.CommandResult, error)
- func (c *IdentifiableController) Unsubscribe(sid string, env *common.SessionEnv, id string, channel string) (*common.CommandResult, error)
- type Identifier
- type JWTConfig
- type JWTIdentifier
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IdentifiableController ¶
type IdentifiableController struct {
// contains filtered or unexported fields
}
func NewIdentifiableController ¶
func NewIdentifiableController(c node.Controller, i Identifier) *IdentifiableController
func (*IdentifiableController) Authenticate ¶
func (c *IdentifiableController) Authenticate(sid string, env *common.SessionEnv) (*common.ConnectResult, error)
func (*IdentifiableController) Disconnect ¶
func (c *IdentifiableController) Disconnect(sid string, env *common.SessionEnv, id string, subscriptions []string) error
func (*IdentifiableController) Perform ¶
func (c *IdentifiableController) Perform(sid string, env *common.SessionEnv, id string, channel string, data string) (*common.CommandResult, error)
func (*IdentifiableController) Shutdown ¶
func (c *IdentifiableController) Shutdown() error
func (*IdentifiableController) Start ¶
func (c *IdentifiableController) Start() error
func (*IdentifiableController) Subscribe ¶
func (c *IdentifiableController) Subscribe(sid string, env *common.SessionEnv, id string, channel string) (*common.CommandResult, error)
func (*IdentifiableController) Unsubscribe ¶
func (c *IdentifiableController) Unsubscribe(sid string, env *common.SessionEnv, id string, channel string) (*common.CommandResult, error)
type Identifier ¶
type Identifier interface {
Identify(sid string, env *common.SessionEnv) (*common.ConnectResult, error)
}
type JWTConfig ¶
type JWTConfig struct { Secret string Param string Algo jwt.SigningMethod Force bool }
func NewJWTConfig ¶
type JWTIdentifier ¶
type JWTIdentifier struct {
// contains filtered or unexported fields
}
func NewJWTIdentifier ¶
func NewJWTIdentifier(config *JWTConfig) *JWTIdentifier
func (*JWTIdentifier) Identify ¶
func (i *JWTIdentifier) Identify(sid string, env *common.SessionEnv) (*common.ConnectResult, error)
Click to show internal directories.
Click to hide internal directories.