label

package
v2.2.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2019 License: AGPL-3.0 Imports: 15 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 {
	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.

Jump to

Keyboard shortcuts

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