captcha

package
v0.0.28 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2022 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Provides = wire.NewSet(
	wire.Struct(new(Controller), "*"),
	wire.Struct(new(Service), "*"),
)

Functions

This section is empty.

Types

type Controller

type Controller struct {
	SessionsService *Service
}

func (*Controller) In

func (x *Controller) In(r *route.RouterGroup)

type Service

type Service struct {
	Values *common.Values
	Redis  *redis.Client
}

func (*Service) Create

func (x *Service) Create(ctx context.Context, name string, code string, ttl time.Duration) error

Create 创建验证码

func (*Service) Delete

func (x *Service) Delete(ctx context.Context, name string) error

Delete 移除验证码

func (*Service) Exists

func (x *Service) Exists(ctx context.Context, name string) (_ bool, err error)

Exists 存在验证码

func (*Service) Key

func (x *Service) Key(name string) string

func (*Service) Verify

func (x *Service) Verify(ctx context.Context, name string, code string) (_ bool, err error)

Verify 校验验证码

Jump to

Keyboard shortcuts

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