Documentation ¶
Index ¶
Constants ¶
View Source
const ( LanguageIDPathParam = "languageID" SearchEndpoint = "/{" + LanguageIDPathParam + "}/search/" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GetResourcesRepoAction ¶
type GetResourcesRepoAction interface {
GetResources(context.Context, ResourcesQuery) (entities.Resource[SearchResource], error)
}
type GetResourcesService ¶
type GetResourcesService interface {
Execute(context.Context, ResourcesQuery) (entities.Resource[SearchResource], error)
}
type Repo ¶
type Repo interface { GetResourcesRepoAction }
type ResourceSource ¶
type ResourcesQuery ¶
type ResourcesQuery struct { rest.GetDummyRequester `url:"-"` entities.Pagination SortBy entities.SortBy `url:"sortBy"` Type entities.ResourceType `url:"type"` Level entities.ResourceLevel `url:"level"` Language string `url:"-"` IsExternal bool `url:"isExternal,omitempty"` IsPersonal bool `url:"isPersonal,omitempty"` Tags []string `url:"tags"` Shelf string `url:"shelf"` TitleName string `url:"q"` }
func (ResourcesQuery) ToPathParameter ¶
func (r ResourcesQuery) ToPathParameter() (map[string]string, error)
type SearchResource ¶
type SearchResource struct { ID uint `json:"id"` Title string `json:"title"` Type entities.ResourceType `json:"type"` Status entities.ResourceStatus `json:"status"` Source ResourceSource `json:"source"` ImageURL string `json:"imageUrl"` VideoURL string `json:"videoUrl"` AudioURL string `json:"audioUrl"` AudioPending bool `json:"audioPending"` Description string `json:"description"` CollectionID uint `json:"collectionId"` CollectionTitle string `json:"collectionTitle"` NewWordsCount uint `json:"newWordsCount"` Difficulty float32 `json:"difficulty"` Level entities.ResourceLevel `json:"level"` Date entities.DateOnly `json:"date"` Tags []string `json:"tags"` URL string `json:"url"` }
Click to show internal directories.
Click to hide internal directories.