23 lines
		
	
	
		
			552 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			552 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| package noauthprobe
 | |
| 
 | |
| import "time"
 | |
| 
 | |
| type NoAuthProbeStateType int
 | |
| 
 | |
| const (
 | |
| 	NoAuthProbeStateTypeNotRegisterd NoAuthProbeStateType = iota
 | |
| 	NoAuthProbeStateTypeRegisterd
 | |
| )
 | |
| 
 | |
| type NoAuthProbeConfig struct {
 | |
| 	TempKey  *string    `json:"tempKey,omitempty" yaml:"tempKey" toml:"tempKey"`
 | |
| 	DenyDate *time.Time `json:"denyDate,omitempty" yaml:"denyDate" toml:"denyDate"`
 | |
| }
 | |
| 
 | |
| func (c *NoAuthProbeConfig) State() NoAuthProbeStateType {
 | |
| 	if nil != c.TempKey && "" != *c.TempKey {
 | |
| 		return NoAuthProbeStateTypeRegisterd
 | |
| 	}
 | |
| 	return NoAuthProbeStateTypeNotRegisterd
 | |
| }
 |