You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
520 B
29 lines
520 B
package service |
|
|
|
import ( |
|
"time" |
|
|
|
"go-common/app/interface/main/captcha/conf" |
|
xtime "go-common/library/time" |
|
) |
|
|
|
var ( |
|
_defaultBusiness = &conf.Business{ |
|
BusinessID: "default", |
|
LenStart: 4, |
|
LenEnd: 4, |
|
Width: 100, |
|
Length: 50, |
|
TTL: xtime.Duration(300 * time.Second), |
|
} |
|
) |
|
|
|
// LookUp look up business services. |
|
func (s *Service) LookUp(bid string) (business *conf.Business) { |
|
for _, b := range s.conf.Business { |
|
if b.BusinessID == bid { |
|
return b |
|
} |
|
} |
|
return _defaultBusiness |
|
}
|
|
|