Documentation ¶ Index ¶ Variables type Module type Paste func New(store store, config config.Config) Paste func (u Paste) Create(r *http.Request, m Module) (string, error) func (u Paste) Get(r *http.Request, addr string) (Module, error) func (u Paste) Render(m Module) (string, error) type TemplateData Constants ¶ This section is empty. Variables ¶ View Source var ErrNoPasteFound = errors.New("no paste found") Functions ¶ This section is empty. Types ¶ type Module ¶ type Module struct { ID int `json:"-"` Text string `json:"text,omitempty"` Lang string `json:"lang,omitempty"` LineCount int `json:"linecount,omitempty"` Address string `json:"address,omitempty"` TimeStamp string `json:"-"` } type Paste ¶ type Paste struct { // contains filtered or unexported fields } func New ¶ func New(store store, config config.Config) Paste New returns a instance of Paste. func (Paste) Create ¶ func (u Paste) Create(r *http.Request, m Module) (string, error) Create creates a new paste in store. func (Paste) Get ¶ func (u Paste) Get(r *http.Request, addr string) (Module, error) Get gets paste by its address. func (Paste) Render ¶ func (u Paste) Render(m Module) (string, error) Render render text in selected syntax highlighted language. type TemplateData ¶ type TemplateData struct { Address string TextHighlighted string LineCount int Lang string Message string IncludeHome bool } Source Files ¶ View all Source files paste.go Click to show internal directories. Click to hide internal directories.