Documentation ¶
Overview ¶
The memory package provides methods to work with pastes using memory as a * storage. * * This package provides a PasteService type that implements api.PasteService * interface and use a map of Pastes as a storage. * * Note: according to the documentation (https://blog.golang.org/maps#TOC_6.), * maps are not safe for concurrent use.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PasteService ¶
PasteService stores all the pastes in memory and implements the api.PasteService interface.
func (*PasteService) Create ¶
func (s *PasteService) Create(p *api.Paste) error
Create adds a new paste to the storage
func (*PasteService) Delete ¶
func (s *PasteService) Delete(id uint64) error
Delete removes the paste from the storage
Click to show internal directories.
Click to hide internal directories.