Back to godoc.org
github.com/documize/community/domain/label

package label

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

Index

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 space label to the store.

func (*Handler) Delete

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

Delete removes space label from store and removes label association from spaces.

func (*Handler) Get

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

Get returns all space labels.

func (*Handler) Update

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

Update persists label name/color changes.

type Store

type Store struct {
	store.Context
	store.LabelStorer
}

Store provides data access to section template information.

func (Store) Add

func (s Store) Add(ctx domain.RequestContext, l label.Label) (err error)

Add saves space label to store.

func (Store) Delete

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

Delete removes space label from the store.

func (Store) Get

func (s Store) Get(ctx domain.RequestContext) (l []label.Label, err error)

Get returns all space labels from store.

func (Store) RemoveReference

func (s Store) RemoveReference(ctx domain.RequestContext, labelID string) (err error)

RemoveReference clears space.labelID for given label.

func (Store) Update

func (s Store) Update(ctx domain.RequestContext, l label.Label) (err error)

Update persists space label changes to the store.

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

Jump to identifier

Keyboard shortcuts

? : This menu
f or F : Jump to identifier