bookmark

package
v0.11.3 Latest Latest
Warning

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

Go to latest
Published: May 12, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(svc *Service) *Handler

func (*Handler) Register

func (h *Handler) Register(mux *http.ServeMux, midd *login.Middleware)

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(db *gorm.DB) *Service

func (*Service) ListForUser

func (s *Service) ListForUser(ctx context.Context, userID string) (map[string]bool, error)

ListForUser returns the set of tool paths bookmarked by the user.

func (*Service) Toggle

func (s *Service) Toggle(ctx context.Context, userID, toolPath string) (bookmarked bool, err error)

Toggle adds or removes a bookmark and reports the new state.

Jump to

Keyboard shortcuts

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