Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ContextNameImage = ContextName("image")
View Source
var ContextNameSign = ContextName("sign")
View Source
var ContextNameSubmited = ContextName("submited")
View Source
var ContextNameTimestamp = ContextName("timestamp")
View Source
var ContextNameToken = ContextName("token")
View Source
var ContextNameWanted = ContextName("wanted")
View Source
var DefaultScene = Scene("")
View Source
var ErrByteNotAvaliable = errors.New("captcha: byte not avaliable")
Functions ¶
This section is empty.
Types ¶
type Collection ¶
type Collection map[ContextName]ContextData
func NewCollection ¶
func NewCollection() *Collection
func (*Collection) GetCaptchaData ¶
func (c *Collection) GetCaptchaData(n ContextName) (ContextData, error)
func (*Collection) SetCaptchaData ¶
func (c *Collection) SetCaptchaData(n ContextName, v ContextData) error
type Context ¶
type Context interface { SetCaptchaData(ContextName, ContextData) error GetCaptchaData(ContextName) (ContextData, error) CaptchaScene() (Scene, error) CaptchaTrusted() (bool, error) }
type ContextData ¶
type ContextData []byte
func (ContextData) Equal ¶
func (d ContextData) Equal(data ContextData) bool
type ContextName ¶
type ContextName string
type ContextValue ¶
type ContextValue struct { Name ContextName Data ContextData }
type PlainContext ¶
type PlainContext struct { Scene Scene Trusted bool *Collection }
func NewPlainContext ¶
func NewPlainContext() *PlainContext
func (*PlainContext) CaptchaScene ¶
func (c *PlainContext) CaptchaScene() (Scene, error)
func (*PlainContext) CaptchaTrusted ¶
func (c *PlainContext) CaptchaTrusted() (bool, error)
type Wanted ¶
func (*Wanted) NewWantedBytes ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.