Documentation
¶
Index ¶
- type ArrayChallengeRepository
- func (repo *ArrayChallengeRepository) All(limit int, offset int) []*Challenge
- func (repo *ArrayChallengeRepository) Get(ID string) *Challenge
- func (repo *ArrayChallengeRepository) Remove(challenge *Challenge)
- func (repo *ArrayChallengeRepository) ReportChallengeUpload(challenge *Challenge, filePath string, request *http.Request)
- func (repo *ArrayChallengeRepository) Set(challenge *Challenge)
- type Challenge
- func (challenge *Challenge) Accessible(r *http.Request) bool
- func (challenge *Challenge) CheckPassword(password string) error
- func (challenge *Challenge) CookieName() string
- func (challenge *Challenge) Expired() bool
- func (challenge *Challenge) HitMaxUploadCount() bool
- func (challenge *Challenge) SetExpirationDate(date time.Time)
- func (challenge *Challenge) SetMaxUploadCount(maxUploadCount int)
- func (challenge *Challenge) SetPassword(password string) error
- func (challenge *Challenge) StorePassword(password string, w http.ResponseWriter, r *http.Request)
- func (challenge *Challenge) Uploads() []*ChallengeUpload
- type ChallengeRepository
- type ChallengeUpload
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArrayChallengeRepository ¶
type ArrayChallengeRepository struct {
// contains filtered or unexported fields
}
func (*ArrayChallengeRepository) All ¶
func (repo *ArrayChallengeRepository) All(limit int, offset int) []*Challenge
func (*ArrayChallengeRepository) Get ¶
func (repo *ArrayChallengeRepository) Get(ID string) *Challenge
func (*ArrayChallengeRepository) Remove ¶
func (repo *ArrayChallengeRepository) Remove(challenge *Challenge)
func (*ArrayChallengeRepository) ReportChallengeUpload ¶ added in v0.0.2
func (repo *ArrayChallengeRepository) ReportChallengeUpload(challenge *Challenge, filePath string, request *http.Request)
func (*ArrayChallengeRepository) Set ¶
func (repo *ArrayChallengeRepository) Set(challenge *Challenge)
type Challenge ¶
type Challenge struct {
ID string
Public bool
HasPassword bool
PasswordHash string
Expires bool
ValidUntil time.Time
HasUploadCountLimit bool
MaxUploadCount int
UploadCount int
// contains filtered or unexported fields
}
func (*Challenge) CheckPassword ¶
func (*Challenge) CookieName ¶
func (*Challenge) HitMaxUploadCount ¶ added in v0.0.2
func (*Challenge) SetExpirationDate ¶
func (*Challenge) SetMaxUploadCount ¶ added in v0.0.2
func (*Challenge) SetPassword ¶
func (*Challenge) StorePassword ¶
func (*Challenge) Uploads ¶ added in v0.0.2
func (challenge *Challenge) Uploads() []*ChallengeUpload
type ChallengeRepository ¶
type ChallengeRepository interface {
All(limit int, offset int) []*Challenge
Get(ID string) *Challenge
Set(challenge *Challenge)
Remove(challenge *Challenge)
ReportChallengeUpload(challenge *Challenge, filePath string, request *http.Request)
}
func NewArrayChallengeRepository ¶
func NewArrayChallengeRepository() ChallengeRepository
type ChallengeUpload ¶ added in v0.0.2
Click to show internal directories.
Click to hide internal directories.