1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/shirdonl-captchas_with_go

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Клонировать/Скачать
storeinterface.go 533 Байты
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
shirdonliao Отправлено 07.07.2019 11:26 7390153
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
}

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://api.gitlife.ru/oschina-mirror/shirdonl-captchas_with_go.git
git@api.gitlife.ru:oschina-mirror/shirdonl-captchas_with_go.git
oschina-mirror
shirdonl-captchas_with_go
shirdonl-captchas_with_go
master