orm

package
v0.0.0-...-3433f89 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2021 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Schema, _ = graphql.NewSchema(
	graphql.SchemaConfig{
		Query:    queries,
		Mutation: mutations,
	},
)

Functions

func CreateChallenge

func CreateChallenge(challenge *model.Challenge) error

CreateChallenge inserts a new challenge into the database.

func CreateSubmission

func CreateSubmission(submission *model.Submission) error

func DeleteChallenge

func DeleteChallenge(id uint) error

DeleteChallenge receives an id string and deletes the corresponding Challenge from the database.

func FindAllChallenges

func FindAllChallenges() ([]model.Challenge, error)

FindAllChallenges returns all challenges present in the database.

func FindChallenge

func FindChallenge(id uint) (model.Challenge, error)

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

func UpdateChallenge(challenge model.Challenge) error

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL