register/main.go

21 lines
345 B
Go
Raw Normal View History

2018-11-07 18:00:06 +00:00
package register
2018-11-06 06:16:03 +00:00
type Request struct {
Username string
Email string
Why string
SSHPublicKey string
Status string
}
func (r *Request) IsPending() bool {
return r.Status == "Pending"
}
2018-11-06 06:16:03 +00:00
func (r *Request) IsValid() bool {
return r.Username != "" &&
r.Email != "" &&
r.Why != "" &&
r.SSHPublicKey != ""
}