1 Star 0 Fork 43

shangjiankeji / go验证码合集包

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
storeinterface.go 533 Bytes
一键复制 编辑 原始数据 按行查看 历史
shirdon 提交于 2019-07-07 16:26 . 优化提交
package captchas_with_go
var storeCreators = map[string]func(*StoreConfig) (StoreInterface, error){}
//StoreInterface is the interface of store
type StoreInterface interface {
Get(key string) *CaptchaInfo
Add(captcha *CaptchaInfo) string
Update(key string, captcha *CaptchaInfo) bool
Del(key string)
Destroy()
OnConstruct()
OnDestruct()
}
func RegisterStore(name string, f func(*StoreConfig) (StoreInterface, error)) bool {
if _, has := storeCreators[name]; has {
return false
}
storeCreators[name] = f
return true
}
Go
1
https://gitee.com/shangjiankeji/captchas_with_go.git
git@gitee.com:shangjiankeji/captchas_with_go.git
shangjiankeji
captchas_with_go
go验证码合集包
master

搜索帮助