Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Content ¶
type Content struct { Data struct { Question QuestionContent `json:"question"` } `json:"data"` }
type Editor ¶
type Editor struct { Data struct { Question QuestionEditor `json:"question"` } `json:"data"` }
type Hints ¶
type Hints struct { Data struct { Question QuestionHints `json:"question"` } `json:"data"` }
type Question ¶
type Question struct { AcRate float64 `json:"acRate"` Difficulty string `json:"difficulty"` FreqBar interface{} `json:"freqBar"` FrontendQuestionID string `json:"frontendQuestionId"` IsFavor bool `json:"isFavor"` PaidOnly bool `json:"paidOnly"` Status string `json:"status"` Title string `json:"title"` TitleSlug string `json:"titleSlug"` TopicTags []struct { Name string `json:"name"` ID string `json:"id"` Slug string `json:"slug"` } `json:"topicTags"` HasSolution bool `json:"hasSolution"` HasVideoSolution bool `json:"hasVideoSolution"` }
func GetQuestionList ¶
type QuestionContent ¶
type QuestionContent struct { Content string `json:"content"` MysqlSchemas []interface{} `json:"mysqlSchemas"` DataSchemas []interface{} `json:"dataSchemas"` }
func GetQuestionContent ¶
func GetQuestionContent(titleSlug string) (QuestionContent, error)
type QuestionEditor ¶
type QuestionEditor struct { QuestionID string `json:"questionId"` QuestionFrontendID string `json:"questionFrontendId"` CodeSnippets []struct { Lang string `json:"lang"` LangSlug string `json:"langSlug"` Code string `json:"code"` } `json:"codeSnippets"` EnvInfo string `json:"envInfo"` EnableRunCode bool `json:"enableRunCode"` HasFrontendPreview bool `json:"hasFrontendPreview"` FrontendPreviews string `json:"frontendPreviews"` }
func GetQuestionEditorData ¶
func GetQuestionEditorData(titleSlug string) (QuestionEditor, error)
type QuestionHints ¶
type QuestionHints struct {
Hints []string `json:"hints"`
}
func GetQuestionHints ¶
func GetQuestionHints(titleSlug string) (QuestionHints, error)
type QuestionTitle ¶
type QuestionTitle struct { QuestionID string `json:"questionId"` QuestionFrontendID string `json:"questionFrontendId"` Title string `json:"title"` TitleSlug string `json:"titleSlug"` IsPaidOnly bool `json:"isPaidOnly"` Difficulty string `json:"difficulty"` Likes int `json:"likes"` Dislikes int `json:"dislikes"` CategoryTitle string `json:"categoryTitle"` }
func GetQuestionTitle ¶
func GetQuestionTitle(titleSlug string) (QuestionTitle, error)
type Store ¶
func (*Store) SaveQuestion ¶
func (s *Store) SaveQuestion(ctx context.Context, q Question, c QuestionContent, e QuestionEditor, h QuestionHints) error
type Title ¶
type Title struct { Data struct { Question QuestionTitle `json:"question"` } `json:"data"` }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.