Documentation
¶
Index ¶
- Variables
- func GenCodeWithPath(path string, name string, code *Code) (string, error)
- func GetGroupName(num string) string
- func GetNameCleanupChinese(name string) string
- func GetWorkPath(group string, name string) string
- func IsNumber(str string) bool
- func WriteCodeJSON(name string, code Code)
- func WriteMarkdownTo(path string, code *Code) error
- type Code
- type CodeSnippet
- type DailyQuestionRecord
- type DailyQuestionRecordQuestion
- type Data
- type DataQuestion
- type Difficulty
- type Extra
- type ExtraTypename
- type Filters
- type Payload
- type ProblemSetQuestionList
- type Query
- type Question
- type QuestionTypename
- type Result
- type Slug
- type Status
- type TodayRecord
- type TopCompanyTag
- type TopCompanyTagTypename
- type TopicTag
- type Translation
- type TypeName
- type Untitled1
- type UserStatus
- type Variables
Constants ¶
This section is empty.
Variables ¶
View Source
var DEBUG = false
Functions ¶
func GetNameCleanupChinese ¶
GetNameCleanupChinese ...
func GetWorkPath ¶
GetWorkPath ... @Description: 获取工作目录 @param string @return string
func WriteCodeJSON ¶
func WriteMarkdownTo ¶
Types ¶
type CodeSnippet ¶
type DailyQuestionRecord ¶
type DailyQuestionRecord struct {
Date string `json:"date"`
Question DailyQuestionRecordQuestion `json:"question"`
UserStatus string `json:"userStatus"`
Typename string `json:"__typename"`
}
type DailyQuestionRecordQuestion ¶
type DailyQuestionRecordQuestion struct {
QuestionID string `json:"questionId"`
QuestionFrontendID string `json:"questionFrontendId"`
QuestionTitle string `json:"questionTitle"`
QuestionTitleSlug string `json:"questionTitleSlug"`
TranslatedTitle string `json:"translatedTitle"`
Title string `json:"title"`
TitleSlug string `json:"titleSlug"`
Typename string `json:"__typename"`
}
type Data ¶
type Data struct {
ProblemSetQuestionList ProblemSetQuestionList `json:"problemsetQuestionList"`
DailyQuestionRecords []DailyQuestionRecord `json:"dailyQuestionRecords,omitempty"`
Question DataQuestion `json:"question,omitempty"`
TodayRecord []TodayRecord `json:"todayRecord,omitempty"`
Translations []Translation `json:"translations,omitempty"`
}
type DataQuestion ¶
type DataQuestion struct {
QuestionID string `json:"questionId"`
QuestionFrontendID string `json:"questionFrontendId"`
CategoryTitle string `json:"categoryTitle"`
BoundTopicID int64 `json:"boundTopicId"`
Title string `json:"title"`
TitleSlug string `json:"titleSlug"`
Content string `json:"content"`
TranslatedTitle string `json:"translatedTitle"`
TranslatedContent string `json:"translatedContent"`
IsPaidOnly bool `json:"isPaidOnly"`
Difficulty string `json:"difficulty"`
Likes int64 `json:"likes"`
Dislikes int64 `json:"dislikes"`
IsLiked interface{} `json:"isLiked"`
SimilarQuestions string `json:"similarQuestions"`
Contributors []interface{} `json:"contributors"`
LangToValidPlayground string `json:"langToValidPlayground"`
TopicTags []TopicTag `json:"topicTags"`
CompanyTagStats interface{} `json:"companyTagStats"`
CodeSnippets []CodeSnippet `json:"codeSnippets"`
Stats string `json:"stats"`
Hints []interface{} `json:"hints"`
Solution interface{} `json:"solution"`
Status string `json:"status"`
SampleTestCase string `json:"sampleTestCase"`
MetaData string `json:"metaData"`
JudgerAvailable bool `json:"judgerAvailable"`
JudgeType string `json:"judgeType"`
MysqlSchemas []interface{} `json:"mysqlSchemas"`
EnableRunCode bool `json:"enableRunCode"`
EnvInfo string `json:"envInfo"`
Book interface{} `json:"book"`
IsSubscribed bool `json:"isSubscribed"`
IsDailyQuestion bool `json:"isDailyQuestion"`
DailyRecordStatus string `json:"dailyRecordStatus"`
EditorType string `json:"editorType"`
UgcQuestionID interface{} `json:"ugcQuestionId"`
Style string `json:"style"`
ExampleTestcases string `json:"exampleTestcases"`
Typename string `json:"__typename"`
}
type Difficulty ¶
type Difficulty string
const ( Easy Difficulty = "EASY" Hard Difficulty = "HARD" Medium Difficulty = "MEDIUM" )
type Extra ¶
type Extra struct {
CompanyTagNum int64 `json:"companyTagNum"`
HasVideoSolution bool `json:"hasVideoSolution"`
TopCompanyTags []TopCompanyTag `json:"topCompanyTags"`
Typename ExtraTypename `json:"__typename"`
}
type ExtraTypename ¶
type ExtraTypename string
const (
QuestionExtraInfoNode ExtraTypename = "QuestionExtraInfoNode"
)
type ProblemSetQuestionList ¶
type Question ¶
type Question struct {
TranslatedTitle string `json:"translatedTitle"`
QuestionFrontendID string `json:"questionFrontendId,omitempty"`
QuestionTitleSlug string `json:"questionTitleSlug,omitempty"`
TypeName string `json:"__typename,omitempty"`
ACRate float64 `json:"acRate,omitempty"`
Difficulty Difficulty `json:"difficulty,omitempty"`
FreqBar int64 `json:"freqBar,omitempty"`
PaidOnly bool `json:"paidOnly,omitempty"`
Status Status `json:"status,omitempty"`
FrontendQuestionID string `json:"frontendQuestionId,omitempty"`
IsFavor bool `json:"isFavor,omitempty"`
SolutionNum int64 `json:"solutionNum,omitempty"`
Title string `json:"title,omitempty"`
TitleCN string `json:"titleCn,omitempty"`
TitleSlug string `json:"titleSlug,omitempty"`
TopicTags []TopicTag `json:"topicTags,omitempty"`
Extra Extra `json:"extra,omitempty"`
}
type QuestionTypename ¶
type QuestionTypename string
const (
QuestionLightNode QuestionTypename = "QuestionLightNode"
)
type Slug ¶
type Slug string
const ( Adobe Slug = "adobe" Amazon Slug = "amazon" Apple Slug = "apple" Bytedance Slug = "bytedance" Facebook Slug = "facebook" GoldmanSachs Slug = "goldman-sachs" Google Slug = "google" Intuit Slug = "intuit" Jpmorgan Slug = "jpmorgan" Linkedin Slug = "linkedin" Microsoft Slug = "microsoft" Tencent Slug = "tencent" )
type TodayRecord ¶
type TopCompanyTag ¶
type TopCompanyTagTypename ¶
type TopCompanyTagTypename string
const (
CommonTagNode TopCompanyTagTypename = "CommonTagNode"
)
type Translation ¶
type UserStatus ¶
type UserStatus string
const ( Finish UserStatus = "FINISH" NotStart UserStatus = "NOT_START" )
type Variables ¶
type Variables struct {
CategorySlug string `json:"categorySlug,omitempty"`
TitleSlug string `json:"titleSlug,omitempty"`
Year int `json:"year,omitempty"`
Month int `json:"month,omitempty"`
Skip int `json:"skip,omitempty"`
Limit int `json:"limit,omitempty"`
Filters Filters `json:"filters,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.