Documentation ¶
Index ¶
Constants ¶
View Source
const SPLIT_DIFFICULTY = "-"
View Source
const SPLIT_QUERY = ":"
Variables ¶
This section is empty.
Functions ¶
func IsValidName ¶
IsValidName validates the name is only number and alphabets.
Types ¶
type ContextKey ¶
type ContextKey int
ContextKey is type for read/write context
const CtxUserID ContextKey = 1
CtxUserID is context key for getting id
type SearchFilter ¶
type SearchFilter struct { Difficulty SearchFilterDifficulty Genre SearchFilterGenre UserID string Keyword string Public bool ForcePublic bool }
type SearchFilterDifficulty ¶
type SearchFilterDifficulty [2]int
type SearchFilterGenre ¶
type SearchFilterGenre string
const ( GENRE_ALL SearchFilterGenre = "" GENRE_GENERAL SearchFilterGenre = "general" GENRE_JPOP SearchFilterGenre = "jpop" GENRE_ANIME SearchFilterGenre = "anime" GENRE_VOCALOID SearchFilterGenre = "vocaloid" )
type SearchQuery ¶
type SearchQuery struct { Sort SearchSortType Order SearchSortOrder Filter SearchFilter }
func ParseSearchQuery ¶
func ParseSearchQuery(keywords string) SearchQuery
ParseSearchQuery parses the sonolus keywords to query
type SearchSortOrder ¶
type SearchSortOrder int
const ( ORDER_DESC SearchSortOrder = 0 ORDER_ASC SearchSortOrder = 1 )
type SearchSortType ¶
type SearchSortType string
const ( SORT_UPDATED_DATE SearchSortType = "updatedDate" SORT_CREATED_DATE SearchSortType = "createdDate" SORT_NAME SearchSortType = "name" SORT_DIFFICULTY SearchSortType = "rating" SORT_NOTES SearchSortType = "notes" )
Click to show internal directories.
Click to hide internal directories.