Back to godoc.org

Package pin

v3.2.0+incompatible
Latest Go to latest
Published: Aug 29, 2019 | License: AGPL-3.0 | Module: github.com/documize/community

Index

Package Files

type Handler

type Handler struct {
	Runtime *env.Runtime
	Store   *store.Store
}

Handler contains the runtime information such as logging and database.

func (*Handler) Add

func (h *Handler) Add(w http.ResponseWriter, r *http.Request)

Add saves pinned item.

func (*Handler) DeleteUserPin

func (h *Handler) DeleteUserPin(w http.ResponseWriter, r *http.Request)

DeleteUserPin removes saved user pin.

func (*Handler) GetUserPins

func (h *Handler) GetUserPins(w http.ResponseWriter, r *http.Request)

GetUserPins returns users' pins.

func (*Handler) UpdatePinSequence

func (h *Handler) UpdatePinSequence(w http.ResponseWriter, r *http.Request)

UpdatePinSequence records order of pinned items.

type Store

type Store struct {
	store.Context
	store.PinStorer
}

Store provides data access to user permission information.

func (Store) Add

func (s Store) Add(ctx domain.RequestContext, pin pin.Pin) (err error)

Add saves pinned item.

func (Store) DeletePin

func (s Store) DeletePin(ctx domain.RequestContext, id string) (rows int64, err error)

DeletePin removes folder from the store.

func (Store) DeletePinnedDocument

func (s Store) DeletePinnedDocument(ctx domain.RequestContext, documentID string) (rows int64, err error)

DeletePinnedDocument removes any pins for specified document.

func (Store) DeletePinnedSpace

func (s Store) DeletePinnedSpace(ctx domain.RequestContext, spaceID string) (rows int64, err error)

DeletePinnedSpace removes any pins for specified space.

func (Store) GetPin

func (s Store) GetPin(ctx domain.RequestContext, id string) (pin pin.Pin, err error)

GetPin returns requested pinned item.

func (Store) GetUserPins

func (s Store) GetUserPins(ctx domain.RequestContext, userID string) (pins []pin.Pin, err error)

GetUserPins returns pinned items for specified user.

func (Store) UpdatePin

func (s Store) UpdatePin(ctx domain.RequestContext, pin pin.Pin) (err error)

UpdatePin updates existing pinned item.

func (Store) UpdatePinSequence

func (s Store) UpdatePinSequence(ctx domain.RequestContext, pinID string, sequence int) (err error)

UpdatePinSequence updates existing pinned item sequence number

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier