Versions in this module Expand all Collapse all v0 v0.0.2 May 30, 2020 v0.0.1 Apr 24, 2020 Changes in this version + type ArrayChallengeRepository struct + 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) ReportChallengeView(challenge *Challenge, filePath string, request *http.Request) + func (repo *ArrayChallengeRepository) Set(challenge *Challenge) + type Challenge struct + Expires bool + HasPassword bool + HasViewCountLimit bool + ID string + MaxViewCount int + PasswordHash string + Public bool + SharedPath string + ValidUntil time.Time + ViewCount int + 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) HitMaxViewCount() bool + func (challenge *Challenge) SetExpirationDate(date time.Time) + func (challenge *Challenge) SetMaxViewCount(maxViewCount int) + func (challenge *Challenge) SetPassword(password string) error + func (challenge *Challenge) StorePassword(password string, w http.ResponseWriter, r *http.Request) + func (challenge *Challenge) Views() []*ChallengeView + type ChallengeRepository interface + All func(limit int, offset int) []*Challenge + Get func(ID string) *Challenge + Remove func(challenge *Challenge) + ReportChallengeView func(challenge *Challenge, filePath string, request *http.Request) + Set func(challenge *Challenge) + func NewArrayChallengeRepository() ChallengeRepository + type ChallengeView struct + IP string + Time time.Time