crusader 312284ff6d ing
2018-04-18 16:46:18 +09:00

25 lines
576 B
Go

package config
import "time"
type AuthStateType int
const (
AuthStateTypeNotRegisterd AuthStateType = iota
AuthStateTypeRegisterd
)
type Auth struct {
TempKey *string `json:"tempKey,omitempty" yaml:"tempKey" toml:"tempKey"`
AcceptedDate *time.Time `json:"acceptedDate,omitempty" yaml:"acceptedDate" toml:"acceptedDate"`
DeniedDate *time.Time `json:"deniedDate,omitempty" yaml:"deniedDate" toml:"deniedDate"`
}
func (a *Auth) State() AuthStateType {
if nil != a.TempKey && "" != *a.TempKey {
return AuthStateTypeRegisterd
}
return AuthStateTypeNotRegisterd
}