get

package
v0.0.0-...-ff01a36 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Copyright © 2023 imartinezalberte

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const (
	IsExternalName    = "external"
	IsExternalUsage   = "the resource that you are looking for is external or not"
	IsExternalDefault = false

	IsPersonalName    = "personal"
	IsPersonalUsage   = "the resource that you are looking for is personal or not"
	IsPersonalDefault = false

	TagsName  = "tag"
	TagsUsage = "specify tags to query by"

	ShelfName    = "shelf"
	ShelfUsage   = "specify the shelf where you want to do the research"
	ShelfDefault = "my_lessons"

	TitleName    = "title"
	TitleUsage   = "specify the title of the resource"
	TitleDefault = utils.Empty

	LanguageName    = "language"
	LanguageUsage   = "Specify the code of the language. It must be in two letter format. Mandatory"
	LanguageDefault = utils.Empty
)

Variables

View Source
var GetSearchCmd = &cobra.Command{
	Use:   "get",
	Short: "",
	Long:  ``,
	Run: func(cmd *cobra.Command, _ []string) {
		resources, err := getResources()
		utils.HandleResponse(cmd, resources, err)
	},
}

GetSearchCmd represents the search command

Functions

This section is empty.

Types

type SearchResources

type SearchResources struct {
	Pagination entities.Pagination
	SortBy     entities.SortBy
	Type       entities.ResourceType
	Level      entities.ResourceLevel
	Language   string
	IsExternal bool
	IsPersonal bool
	Tags       []string
	Shelf      string
	Title      string
}

func (*SearchResources) Args

func (s *SearchResources) Args(cmd *cobra.Command)

func (SearchResources) ToCommand

func (s SearchResources) ToCommand() (any, error)

Jump to

Keyboard shortcuts

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