plugin

package
v3.3.6+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

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 Proxy

func Proxy(caller Caller) tp.Plugin

Proxy creates a proxy plugin for handling unknown pulling and pushing.

func ProxyPull

func ProxyPull(fn PullFunc) tp.Plugin

ProxyPull creates a proxy plugin for handling unknown pulling.

func ProxyPush

func ProxyPush(fn PushFunc) tp.Plugin

ProxyPush creates a proxy plugin for handling unknown pushing.

func VerifyAuth

func VerifyAuth(fn VerifyAuthInfoFunc) tp.Plugin

VerifyAuth creates a plugin for verifying authorization.

Types

type AuthSession

type AuthSession interface {
	Public() goutil.Map
	Id() string
	SetId(string)
}

AuthSession auth session provides Public,Id and SetId methods in early 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

Jump to

Keyboard shortcuts

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