resources

package
v0.0.0-...-2bcb128 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const AddPlayerSignalChannelName = "add-player-signal"
View Source
const AnswerSignalChannelName = "answer-signal"
View Source
const GameSignalChannelName = "start-game-signal"

Variables

This section is empty.

Functions

func GetClientOptions

func GetClientOptions(clientType string) client.Options

Types

type AddPlayerActivityInput

type AddPlayerActivityInput struct {
	WorkflowId string `json:"workflowId"`
	Player     string `json:"player"`
}

type AddPlayerWorkflowInput

type AddPlayerWorkflowInput struct {
	GameWorkflowId  string `json:"gameWorkflowId"`
	Player          string `json:"player"`
	NumberOfPlayers int    `json:"numberOfPlayers"`
}

type GameConfiguration

type GameConfiguration struct {
	Category          string `json:"category"`
	NumberOfQuestions int    `json:"numberOfQuestions"`
	NumberOfPlayers   int    `json:"numberOfPlayers"`
	AnswerTimeLimit   int    `json:"answerTimeLimit"`
	StartTimeLimit    int    `json:"startTimeLimit"`
	ResultTimeLimit   int    `json:"resultTimeLimit"`
}

func NewGameConfiguration

func NewGameConfiguration(opts []GameConfigurationOption) *GameConfiguration

func NewGameConfigurationFromWorkflowInput

func NewGameConfigurationFromWorkflowInput(input GameWorkflowInput) *GameConfiguration

type GameConfigurationOption

type GameConfigurationOption func(*GameConfiguration)

func WithAnswerTimeLimit

func WithAnswerTimeLimit(n int) GameConfigurationOption

func WithCategory

func WithCategory(s string) GameConfigurationOption

func WithNUmberOfQuestions

func WithNUmberOfQuestions(n int) GameConfigurationOption

func WithNumberOfPlayers

func WithNumberOfPlayers(n int) GameConfigurationOption

func WithResultTimeout

func WithResultTimeout(n int) GameConfigurationOption

func WithStartTimeout

func WithStartTimeout(n int) GameConfigurationOption

type GameWorkflowConfig

type GameWorkflowConfig struct {
	ChatGptKey string `json:"chatGptKey"`
}

type GameWorkflowInput

type GameWorkflowInput struct {
	Category          string `json:"category"`
	NumberOfQuestions int    `json:"numberOfQuestions"`
	NumberOfPlayers   int    `json:"numberOfPlayers"`
	AnswerTimeLimit   int    `json:"answerTimeLimit"`
	StartTimeLimit    int    `json:"startTimeLimit"`
	ResultTimeLimit   int    `json:"resultTimeLimit"`
}

type ModerationInput

type ModerationInput struct {
	Url  string `json:"url"`
	Name string `json:"name"`
}

type Player

type Player struct {
	Score int `json:"score"`
}

type QueryPlayerActivityInput

type QueryPlayerActivityInput struct {
	WorkflowId      string `json:"workflowId"`
	Player          string `json:"player"`
	NumberOfPlayers int    `json:"numberOfPlayers"`
	QueryType       string `json:"queryType"`
}

type Result

type Result struct {
	Question          string                `json:"question"`
	Answer            string                `json:"answer"`
	Submissions       map[string]Submission `json:"submissions"`
	MultipleChoiceMap map[string]string     `json:"multipleChoiceAnswers"`
	Winner            string                `json:"winner"`
}

type ScoreBoard

type ScoreBoard struct {
	Player string `json:"value"`
	Score  int    `json:"key"`
}

type Submission

type Submission struct {
	Answer    string `json:"answer"`
	IsCorrect bool   `json:"isCorrect"`
	IsFirst   bool   `json:"isFirst"`
}

type TriviaQuestionsActivityInput

type TriviaQuestionsActivityInput struct {
	Key               string `json:"key"`
	Category          string `json:"category"`
	NumberOfQuestions int    `json:"question"`
}

Jump to

Keyboard shortcuts

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