Documentation ¶
Index ¶
- func LaunchAuth(fn GenerateAuthInfoFunc) tp.Plugin
- func Proxy(caller Caller) tp.Plugin
- func ProxyPull(fn PullFunc) tp.Plugin
- func ProxyPush(fn PushFunc) tp.Plugin
- func VerifyAuth(fn VerifyAuthInfoFunc) tp.Plugin
- type AuthSession
- type Caller
- type GenerateAuthInfoFunc
- type PullFunc
- type PushFunc
- type VerifyAuthInfoFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LaunchAuth ¶
func LaunchAuth(fn GenerateAuthInfoFunc) tp.Plugin
LaunchAuth creates a plugin for initiating authorization.
func VerifyAuth ¶
func VerifyAuth(fn VerifyAuthInfoFunc) tp.Plugin
VerifyAuth creates a plugin for verifying authorization.
Types ¶
type AuthSession ¶
type AuthSession interface { // SetId sets the session id. SetId(newId string) // RemoteAddr returns the remote network address. RemoteAddr() net.Addr // Swap returns custom data swap of the session(socket). Swap() goutil.Map }
AuthSession auth session provides SetId, RemoteAddr and Swap methods in base session
type Caller ¶
type Caller interface { Pull(uri string, args interface{}, reply interface{}, setting ...socket.PacketSetting) tp.PullCmd Push(uri string, args interface{}, setting ...socket.PacketSetting) *tp.Rerror }
Caller the object used to pull and push
type GenerateAuthInfoFunc ¶
type GenerateAuthInfoFunc func() string
GenerateAuthInfoFunc the function used to generate auth info
type PullFunc ¶
type PullFunc func(uri string, args interface{}, reply interface{}, setting ...socket.PacketSetting) tp.PullCmd
PullFunc the function used to pull
type PushFunc ¶
type PushFunc func(uri string, args interface{}, setting ...socket.PacketSetting) *tp.Rerror
PushFunc the function used to push
type VerifyAuthInfoFunc ¶
type VerifyAuthInfoFunc func(authInfo string, sess AuthSession) *tp.Rerror
VerifyAuthInfoFunc the function used to verify auth info
Click to show internal directories.
Click to hide internal directories.