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

package label

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

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

func (*Handler) Delete Uses

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 Uses

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

Get returns all space labels.

func (*Handler) Update Uses

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

Update persists label name/color changes.

type Store Uses

type Store struct {
    store.Context
    store.LabelStorer
}

Store provides data access to section template information.

func (Store) Add Uses

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

Add saves space label to store.

func (Store) Delete Uses

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

Delete removes space label from the store.

func (Store) Get Uses

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

Get returns all space labels from store.

func (Store) RemoveReference Uses

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

RemoveReference clears space.labelID for given label.

func (Store) Update Uses

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

Update persists space label changes to the store.

Package label imports 15 packages (graph) and is imported by 2 packages. Updated 2019-07-01. Refresh now. Tools for package owners.