Documentation
¶
Overview ¶
Copyright (c) 2025 Chakib Ben Ziane <contact@blob42.xyz> and [`gosuki` contributors](https://github.com/blob42/gosuki/graphs/contributors). All rights reserved.
SPDX-License-Identifier: AGPL-3.0-or-later
This file is part of GoSuki.
GoSuki is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
GoSuki is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with gosuki. If not, see <http://www.gnu.org/licenses/>.
Index ¶
- func GetAPIBookmarks(w http.ResponseWriter, r *http.Request)
- func GetBookmarks(r *http.Request) ([]*gosuki.Bookmark, uint, error)
- func GetPaginationParams(r *http.Request) *db.PaginationParams
- func IsFuzzy(r *http.Request) bool
- func ParseSearchQuery(query string) searchQueryParts
- type Bookmark
- type Payload
- type RawBookmark
- type ReqIsFuzzy
- type ResetPage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAPIBookmarks ¶
func GetAPIBookmarks(w http.ResponseWriter, r *http.Request)
func GetPaginationParams ¶
func GetPaginationParams(r *http.Request) *db.PaginationParams
func ParseSearchQuery ¶ added in v1.3.0
func ParseSearchQuery(query string) searchQueryParts
ParseSearchQuery parses a search query string into its components. The query consists of an optional text search term followed by optional tag filters. The text search term matches against URL and Title fields and comes before any filters. Tag filters start with a colon (:) followed by either: 1. A comma-separated list of tags (AND logic - all tags must be present) 2. ":OR" followed by a comma-separated list of tag names (OR logic - any tag can match)
Example queries:
- "golang": text query "golang" with no tags
- "golang :web,programming": text query "golang" with AND tags "web" and "programming"
- "golang :OR web,programming": text query "golang" with OR tags "web" and "programming"
Types ¶
type RawBookmark ¶
type RawBookmark = db.RawBookmark
type ReqIsFuzzy ¶
type ReqIsFuzzy struct{}