service

package
v0.0.0-...-83adff0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NORMAL      = int(4)
	MEDIUM      = int(8)
	HIGH        = int(16)
	MinLenStart = int(4)
	MinWidth    = int(48)
	MinLength   = int(20)
	Length48    = int(48)

	TypeNone  = int(0)
	TypeLOWER = int(1)
	TypeUPPER = int(2)
	TypeALL   = int(3)
)

CONST VALUE.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bilinear

type Bilinear struct{}

Bilinear Bilinear.

func (Bilinear) RGBA

func (Bilinear) RGBA(src *image.RGBA, x, y float64) color.RGBA

RGBA RGBA.

type BilinearSrc

type BilinearSrc struct {
	// contains filtered or unexported fields
}

BilinearSrc BilinearSrc.

type Captcha

type Captcha struct {
	// contains filtered or unexported fields
}

Captcha captcha.

type Image

type Image struct {
	*image.RGBA
}

Image Image.

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service captcha service.

func New

func New(c *conf.Config) (s *Service)

New new a service.

func (*Service) CaptchaImg

func (s *Service) CaptchaImg(c context.Context, token, bid string) (img []byte, err error)

CaptchaImg get a captcha by token,bid.

func (*Service) Close

func (s *Service) Close()

Close close all dao.

func (*Service) LookUp

func (s *Service) LookUp(bid string) (business *conf.Business)

LookUp look up business services.

func (*Service) Ping

func (s *Service) Ping(c context.Context) error

Ping ping dao.

func (*Service) Token

func (s *Service) Token(c context.Context, bid string) (url string, token string, err error)

Token use bid, get a token.

func (*Service) VerifyCaptcha

func (s *Service) VerifyCaptcha(c context.Context, token, code string) (err error)

VerifyCaptcha verify captcha by token and code.

Jump to

Keyboard shortcuts

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