Documentation ¶
Index ¶
- Variables
- func NewCheckFlagInterceptor(ts store.TeamStore, fp *FlagPool) *checkFlagInterception
- func NewLoginInterceptor(ts store.TeamStore) *loginInterception
- func NewRegisterInterception(ts store.TeamStore, opts ...RegisterInterceptOpts) *registerInterception
- func NewSignupInterception(ef *ExtraFields) *signupInterception
- type CTFd
- type Checkbox
- type Config
- type ExtraFields
- type FlagPool
- func (fp *FlagPool) AddFlag(flag store.FlagConfig, cid int) string
- func (fp *FlagPool) GetFlagByTag(t store.Tag) (string, error)
- func (fp *FlagPool) GetIdentifierByTag(t store.Tag) (int, error)
- func (fp *FlagPool) GetTagByIdentifier(id int) (store.Tag, error)
- func (fp *FlagPool) TranslateFlagForTeam(t store.Team, cid int, value string) string
- type Input
- type InputRow
- type RegisterInterceptOpts
- type RespModifier
- type Selector
- type Theme
Constants ¶
This section is empty.
Variables ¶
View Source
var ( NONCEREGEXP = regexp.MustCompile(`csrf_nonce[ ]*=[ ]*"(.+)"`) UserNotFoundErr = errors.New("Could not find the specified user") CouldNotFindSessionErr = errors.New("Could not find the specified session") NoSessionErr = errors.New("No session found") ChallengeNotFoundErr = errors.New("Could not find the specified challenge") FlagNotFoundErr = errors.New("Could not find the specified flag") )
View Source
var ( DuplicateConsentErr = errors.New("Cannot have more than one consent checkbox") NoConsentErr = errors.New("No consent given") )
View Source
var ( Themes = map[string]Theme{ "aau": Theme{ CSS: aauCss, }, "aau-survey": Theme{ ExtraFields: survey, CSS: aauCss, }, } )
Functions ¶
func NewCheckFlagInterceptor ¶
func NewLoginInterceptor ¶
func NewRegisterInterception ¶
func NewRegisterInterception(ts store.TeamStore, opts ...RegisterInterceptOpts) *registerInterception
func NewSignupInterception ¶
func NewSignupInterception(ef *ExtraFields) *signupInterception
Types ¶
type CTFd ¶
type CTFd interface { docker.Identifier io.Closer ProxyHandler(...func(*store.Team) error) svcs.ProxyConnector Start(context.Context) error Stop() error Flags() []store.FlagConfig }
type ExtraFields ¶
type ExtraFields struct {
// contains filtered or unexported fields
}
func NewExtraFields ¶
func NewExtraFields(rows []InputRow) (*ExtraFields, error)
func (*ExtraFields) Html ¶
func (ef *ExtraFields) Html() string
func (*ExtraFields) ReadMetadata ¶
type FlagPool ¶
type FlagPool struct {
// contains filtered or unexported fields
}
func NewFlagPool ¶
func NewFlagPool() *FlagPool
func (*FlagPool) GetIdentifierByTag ¶
func (*FlagPool) GetTagByIdentifier ¶
type RegisterInterceptOpts ¶
type RegisterInterceptOpts func(*registerInterception)
func WithExtraRegisterFields ¶
func WithExtraRegisterFields(ef *ExtraFields) RegisterInterceptOpts
func WithRegisterHooks ¶
func WithRegisterHooks(hooks ...func(*store.Team) error) RegisterInterceptOpts
type RespModifier ¶
func WithAppendErrors ¶
func WithAppendErrors(errs []error) RespModifier
func WithExtraFields ¶
func WithExtraFields(ef *ExtraFields) RespModifier
func WithRemoveErrors ¶
func WithRemoveErrors() RespModifier
type Selector ¶
type Theme ¶
type Theme struct { ExtraFields *ExtraFields Index string CSS string }
Click to show internal directories.
Click to hide internal directories.