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/>.
Copyright (c) 2024-2025-2025-2025-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 ¶
Constants ¶
const ( BindPort = 2025 BindHost = "0.0.0.0" )
Variables ¶
var BindAddr = fmt.Sprintf("%s:%d", BindHost, BindPort)
var Static embed.FS
var Templates embed.FS
var Views embed.FS
Functions ¶
func ListBookmarks ¶
func ListBookmarks(w http.ResponseWriter, r *http.Request)
func NamedView ¶
func NamedView(name string) http.HandlerFunc
View handler that takes a name and parses the view file with same name. The view name must match the URL path. /test -> test.html
Types ¶
type Bookmarks ¶
func (Bookmarks) UIBookmarks ¶
func (marks Bookmarks) UIBookmarks() []*UIBookmark
type MarksContext ¶
type MarksContext struct {
Bookmarks []*UIBookmark
Total int // total number of results for query (excluding pagination)
Pages int
QueryParams
}
type QueryParams ¶
type QueryParams struct {
Query string
Tag string
Fuzzy bool
NoHighlight bool
*db.PaginationParams
}
func DefaultQueryParams ¶
func DefaultQueryParams() QueryParams
type UIBookmark ¶
func NewUIBookmark ¶
func NewUIBookmark(b *gosuki.Bookmark) *UIBookmark