Documentation ¶
Index ¶
- Variables
- func CreateChallenge(challenge *model.Challenge) error
- func CreateSubmission(submission *model.Submission) error
- func DeleteChallenge(id uint) error
- func FindAllChallenges() ([]model.Challenge, error)
- func FindChallenge(id uint) (model.Challenge, error)
- func FindSubmission(id uint) (model.Submission, error)
- func UpdateChallenge(challenge model.Challenge) error
- func UpdateSubmission(submission model.Submission) error
Constants ¶
This section is empty.
Variables ¶
View Source
var Schema, _ = graphql.NewSchema(
graphql.SchemaConfig{
Query: queries,
Mutation: mutations,
},
)
Functions ¶
func CreateChallenge ¶
CreateChallenge inserts a new challenge into the database.
func CreateSubmission ¶
func CreateSubmission(submission *model.Submission) error
func DeleteChallenge ¶
DeleteChallenge receives an id string and deletes the corresponding Challenge from the database.
func FindAllChallenges ¶
FindAllChallenges returns all challenges present in the database.
func FindChallenge ¶
FindChallenge receives an id and returns the corresponding Challenge struct.
func FindSubmission ¶
func FindSubmission(id uint) (model.Submission, error)
FindSubmission receives an id and returns the corresponding Submission struct.
func UpdateChallenge ¶
UpdateChallenge receives an existing Challenge object and updates its value on the database.
func UpdateSubmission ¶
func UpdateSubmission(submission model.Submission) error
UpdateChallenge receives an existing Submission object and updates its value on the database.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.