models

package
v0.0.0-...-31c068b Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Version         string
	Revision        string
	LogLevel        log.Lvl
	LernoAPIKey     string
	AnthropicAPIKey string
	DeepLAuthKey    *DeepLAPI
	Languages       map[string]bool
	SystemPrompt    string
	DefaultIconURL  string
	DefaultImageURL string
	DBConfig        *DBConfig
	DB              *sql.DB
}

Main configuration

type Course

type Course struct {
	CourseTitle       string   `yaml:"courseTitle"`
	CourseDescription string   `yaml:"courseDescription"`
	Icon              string   `yaml:"icon"`
	Image             string   `yaml:"image"`
	Lessons           []Lesson `yaml:"lessons"`
	IsAvailable       bool     `json:"isAvailable"`
}

New structs for course data

type DBConfig

type DBConfig struct {
	Host     string
	Port     int
	User     string
	Password string
	DBName   string
	SSLMode  string
}

DB configuration

type DeepLAPI

type DeepLAPI struct {
	URL    string
	APIKey string
}

DeepLAPI configuration

type HealthCheckData

type HealthCheckData struct {
	Version  string
	Revision string
}

HealthCheckData returns build information

type Lesson

type Lesson struct {
	LessonTitle  string    `yaml:"lessonTitle"`
	Order        int       `yaml:"order"`
	IsLastLesson bool      `yaml:"isLastLesson"`
	Sections     []Section `yaml:"sections"`
	QuizQuestion Quiz      `yaml:"quizQuestion"`
}

type NewCourseResponse

type NewCourseResponse struct {
	CourseID          int64  `json:"id"`
	CourseTitle       string `json:"title"`
	CourseDescription string `json:"description"`
	Icon              string `json:"icon"`
	Image             string `json:"image"`
}

type Quiz

type Quiz struct {
	Question      string   `yaml:"question"`
	Answers       []string `yaml:"answers"`
	CorrectAnswer string   `yaml:"correctAnswer"`
}

type Section

type Section struct {
	Order         int    `yaml:"order"`
	IsLastSection bool   `yaml:"isLastSection"`
	Content       string `yaml:"content"`
}

type TranslationResult

type TranslationResult struct {
	Language string
	Course   *Course
	Error    error
}

Jump to

Keyboard shortcuts

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