model

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 21, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllQuizType = []QuizType{
	QuizTypeFourChoices,
}
View Source
var AllRole = []Role{
	RoleUser,
}

Functions

This section is empty.

Types

type CurrentUserProfile

type CurrentUserProfile struct {
	ID           string  `json:"id"`
	Email        string  `json:"email"`
	DisplayName  string  `json:"displayName"`
	ScreenImgURL *string `json:"screenImgUrl"`
}

type ErrorCode

type ErrorCode string
const (
	ErrorCodeUnauthenticated ErrorCode = "UNAUTHENTICATED"
	ErrorCodeUnauthorized    ErrorCode = "UNAUTHORIZED"
	ErrorCodeAlreadyExist    ErrorCode = "ALREADY_EXIST"
	ErrorCodeInvalidArgument ErrorCode = "INVALID_ARGUMENT"
	ErrorCodeNotFound        ErrorCode = "NOT_FOUND"
	ErrorCodeInternal        ErrorCode = "INTERNAL"
)

func (ErrorCode) IsValid

func (e ErrorCode) IsValid() bool

func (ErrorCode) MarshalGQL

func (e ErrorCode) MarshalGQL(w io.Writer)

func (ErrorCode) String

func (e ErrorCode) String() string

func (*ErrorCode) UnmarshalGQL

func (e *ErrorCode) UnmarshalGQL(v interface{}) error

type FourChoicesQuiz

type FourChoicesQuiz struct {
	ID       string        `json:"id"`
	QuizType QuizType      `json:"quizType"`
	Question string        `json:"question"`
	Choices  []*QuizChoice `json:"choices"`
}

func (FourChoicesQuiz) IsQuiz

func (FourChoicesQuiz) IsQuiz()

type FourChoicesQuizAnswer

type FourChoicesQuizAnswer struct {
	Quiz             Quiz   `json:"quiz"`
	AnsweredPlayerID string `json:"answeredPlayerID"`
	CorrectChoiceID  string `json:"correctChoiceID"`
}

func (FourChoicesQuizAnswer) IsQuizAnswer

func (FourChoicesQuizAnswer) IsQuizAnswer()

type Node

type Node interface {
	IsNode()
}

type Player

type Player struct {
	ID          string       `json:"id"`
	UserID      string       `json:"userId"`
	UserProfile *UserProfile `json:"userProfile"`
}

func (Player) IsNode

func (Player) IsNode()

type Quiz

type Quiz interface {
	IsQuiz()
}

type QuizAnswer

type QuizAnswer interface {
	IsQuizAnswer()
}

type QuizChoice

type QuizChoice struct {
	ID     string `json:"id"`
	Choice string `json:"choice"`
}

func (QuizChoice) IsNode

func (QuizChoice) IsNode()

type QuizRoom

type QuizRoom struct {
	ID      string    `json:"id"`
	Players []*Player `json:"players"`
}

func (QuizRoom) IsNode

func (QuizRoom) IsNode()

type QuizType

type QuizType string
const (
	QuizTypeFourChoices QuizType = "FourChoices"
)

func (QuizType) IsValid

func (e QuizType) IsValid() bool

func (QuizType) MarshalGQL

func (e QuizType) MarshalGQL(w io.Writer)

func (QuizType) String

func (e QuizType) String() string

func (*QuizType) UnmarshalGQL

func (e *QuizType) UnmarshalGQL(v interface{}) error

type Role

type Role string
const (
	RoleUser Role = "USER"
)

func (Role) IsValid

func (e Role) IsValid() bool

func (Role) MarshalGQL

func (e Role) MarshalGQL(w io.Writer)

func (Role) String

func (e Role) String() string

func (*Role) UnmarshalGQL

func (e *Role) UnmarshalGQL(v interface{}) error

type UpdatePlayerIDInput

type UpdatePlayerIDInput struct {
	PlayerID string `json:"playerId"`
}

type UserProfile

type UserProfile struct {
	ID           string  `json:"id"`
	DisplayName  string  `json:"displayName"`
	ScreenImgURL *string `json:"screenImgUrl"`
}

func (UserProfile) IsNode

func (UserProfile) IsNode()

Jump to

Keyboard shortcuts

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