Documentation
¶
Index ¶
- func PatchSettings(client *ctfd.Client, params PatchSettingsParams, opts ...ctfd.Option) error
- type Challenge
- func GetChallenge(client *ctfd.Client, id string, opts ...ctfd.Option) (*Challenge, error)
- func PatchChallenges(client *ctfd.Client, id string, params *PatchChallengeParams, ...) (*Challenge, error)
- func PostChallenges(client *ctfd.Client, params *PostChallengesParams, opts ...ctfd.Option) (*Challenge, error)
- type DeleteAdminInstanceParams
- type DeleteInstanceParams
- type GetAdminInstanceParams
- type GetInstanceParams
- type Instance
- func DeleteAdminInstance(client *ctfd.Client, params *DeleteAdminInstanceParams, opts ...ctfd.Option) (*Instance, error)
- func DeleteInstance(client *ctfd.Client, params *DeleteInstanceParams, opts ...ctfd.Option) (*Instance, error)
- func GetAdminInstance(client *ctfd.Client, params *GetAdminInstanceParams, opts ...ctfd.Option) (*Instance, error)
- func GetInstance(client *ctfd.Client, params *GetInstanceParams, opts ...ctfd.Option) (*Instance, error)
- func PatchAdminInstance(client *ctfd.Client, params *PatchAdminInstanceParams, opts ...ctfd.Option) (*Instance, error)
- func PatchInstance(client *ctfd.Client, params *PatchInstanceParams, opts ...ctfd.Option) (*Instance, error)
- func PostAdminInstance(client *ctfd.Client, params *PostAdminInstanceParams, opts ...ctfd.Option) (*Instance, error)
- func PostInstance(client *ctfd.Client, params *PostInstanceParams, opts ...ctfd.Option) (*Instance, error)
- type Mana
- type PatchAdminInstanceParams
- type PatchChallengeParams
- type PatchInstanceParams
- type PatchSettingsParams
- type PostAdminInstanceParams
- type PostChallengesParams
- type PostInstanceParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PatchSettings ¶
PatchSettings handle the patch of CTFd-Chall-Manager settings.
Types ¶
type Challenge ¶
type Challenge struct { ID int `json:"id"` Name string `json:"name"` Description string `json:"description"` Attribution *string `json:"attribution,omitempty"` ConnectionInfo *string `json:"connection_info,omitempty"` MaxAttempts *int `json:"max_attempts,omitempty"` Function *string `json:"function,omitempty"` Value int `json:"value"` Initial *int `json:"initial,omitempty"` Decay *int `json:"decay,omitempty"` Minimum *int `json:"minimum,omitempty"` Category string `json:"category"` Type string `json:"type"` TypeData *ctfd.Type `json:"type_data,omitempty"` State string `json:"state"` NextID *int `json:"next_id"` Requirements *ctfd.Requirements `json:"requirements"` // List of challenge IDs to complete before Solves int `json:"solves"` SolvedByMe bool `json:"solved_by_me"` DestroyOnFlag bool `json:"destroy_on_flag"` ManaCost int `json:"mana_cost"` ScenarioID int `json:"scenario_id"` Until *string `json:"until,omitempty"` Timeout *int `json:"timeout,omitempty"` Additional map[string]string `json:"additional,omitempty"` Min int `json:"min"` Max int `json:"max"` }
func GetChallenge ¶
GetChallenge return the challenge corresponding to the given id, in the CTFd-Chall-Manager plugin datamodel.
func PatchChallenges ¶
func PatchChallenges(client *ctfd.Client, id string, params *PatchChallengeParams, opts ...ctfd.Option) (*Challenge, error)
PatchChallenges updates a challenge configuration.
func PostChallenges ¶
func PostChallenges(client *ctfd.Client, params *PostChallengesParams, opts ...ctfd.Option) (*Challenge, error)
PostChallenges creates a CTFd-Chall-Manager plugin challenge.
type DeleteInstanceParams ¶
type DeleteInstanceParams struct {
ChallengeID string `json:"challengeId"`
}
type GetAdminInstanceParams ¶
type GetInstanceParams ¶
type GetInstanceParams struct {
ChallengeID string `schema:"challengeId"`
}
type Instance ¶
func DeleteAdminInstance ¶
func DeleteInstance ¶
func GetAdminInstance ¶
func GetInstance ¶
func PatchAdminInstance ¶
func PatchInstance ¶
func PostAdminInstance ¶
func PostInstance ¶
type PatchChallengeParams ¶
type PatchChallengeParams struct { Name string `json:"name"` Category string `json:"category"` Description string `json:"description"` Attribution *string `json:"attribution,omitempty"` Function *string `json:"function,omitempty"` ConnectionInfo *string `json:"connection_info,omitempty"` Value *int `json:"value,omitempty"` Initial *int `json:"initial,omitempty"` Decay *int `json:"decay,omitempty"` Minimum *int `json:"minimum,omitempty"` MaxAttempts *int `json:"max_attempts,omitempty"` NextID *int `json:"next_id,omitempty"` // Requirements can update the challenge's behavior and prerequisites i.e. // the other challenges the team/user must have solved before. // WARNING: it won't return those in the response body, so updating this // field requires you to do it manually through *Client.GetChallengeRequirements Requirements *ctfd.Requirements `json:"requirements,omitempty"` State string `json:"state"` DestroyOnFlag bool `json:"destroy_on_flag"` ManaCost int `json:"mana_cost"` ScenarioID int `json:"scenario_id"` Timeout *int `json:"timeout,omitempty"` Until *string `json:"until,omitempty"` Additional map[string]string `json:"additional,omitempty"` Min int `json:"min"` Max int `json:"max"` }
type PatchInstanceParams ¶
type PatchInstanceParams struct {
ChallengeID string `json:"challengeId"`
}
type PatchSettingsParams ¶
type PostAdminInstanceParams ¶
type PostChallengesParams ¶
type PostChallengesParams struct { Name string `json:"name"` Category string `json:"category"` Description string `json:"description"` Attribution *string `json:"attribution,omitempty"` Function *string `json:"function,omitempty"` ConnectionInfo *string `json:"connection_info,omitempty"` Initial *int `json:"initial,omitempty"` Decay *int `json:"decay,omitempty"` Minimum *int `json:"minimum,omitempty"` MaxAttempts *int `json:"max_attempts,omitempty"` NextID *int `json:"next_id,omitempty"` Requirements *ctfd.Requirements `json:"requirements,omitempty"` State string `json:"state"` Type string `json:"type"` DestroyOnFlag bool `json:"destroy_on_flag"` ManaCost int `json:"mana_cost"` ScenarioID int `json:"scenario_id"` Timeout *int `json:"timeout,omitempty"` Until *string `json:"until,omitempty"` Additional map[string]string `json:"additional,omitempty"` Min int `json:"min"` Max int `json:"max"` }
type PostInstanceParams ¶
type PostInstanceParams struct {
ChallengeID string `json:"challengeId"`
}
Click to show internal directories.
Click to hide internal directories.