community: github.com/documize/community/domain/pin Index | Files

package pin

import "github.com/documize/community/domain/pin"

Index

Package Files

endpoint.go store.go

type Handler Uses

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

Handler contains the runtime information such as logging and database.

func (*Handler) Add Uses

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

Add saves pinned item.

func (*Handler) DeleteUserPin Uses

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

DeleteUserPin removes saved user pin.

func (*Handler) GetUserPins Uses

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

GetUserPins returns users' pins.

func (*Handler) UpdatePinSequence Uses

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

UpdatePinSequence records order of pinned items.

type Store Uses

type Store struct {
    store.Context
    store.PinStorer
}

Store provides data access to user permission information.

func (Store) Add Uses

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

Add saves pinned item.

func (Store) DeletePin Uses

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

DeletePin removes folder from the store.

func (Store) DeletePinnedDocument Uses

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

DeletePinnedDocument removes any pins for specified document.

func (Store) DeletePinnedSpace Uses

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

DeletePinnedSpace removes any pins for specified space.

func (Store) GetPin Uses

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

GetPin returns requested pinned item.

func (Store) GetUserPins Uses

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

GetUserPins returns pinned items for specified user.

func (Store) UpdatePin Uses

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

UpdatePin updates existing pinned item.

func (Store) UpdatePinSequence Uses

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

UpdatePinSequence updates existing pinned item sequence number

Package pin imports 16 packages (graph) and is imported by 2 packages. Updated 2018-12-07. Refresh now. Tools for package owners.