api

package
v0.0.0-...-5594105 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PasteEndPoint

type PasteEndPoint struct {
	// contains filtered or unexported fields
}

PasteEndPoint represents a REST API endpoint for retrieving pastes.

func NewPasteEndPoint

func NewPasteEndPoint(store *model.PasteStore) *PasteEndPoint

NewPasteEndPoint creates a new REST API endpoint for pastes.

func (*PasteEndPoint) BaseURI

func (endPoint *PasteEndPoint) BaseURI() string

BaseURI returns the base URI of the end point.

func (*PasteEndPoint) CreatePaste

func (endPoint *PasteEndPoint) CreatePaste(r *http.Request) (*model.Paste, error)

CreatePaste creates a new paste.

func (*PasteEndPoint) GetPaste

func (endPoint *PasteEndPoint) GetPaste(r *http.Request) (*model.Paste, error)

GetPaste returns a single paste.

func (*PasteEndPoint) GetPastes

func (endPoint *PasteEndPoint) GetPastes(r *http.Request) ([]*model.Paste, error)

GetPastes returns a range of pastes.

func (*PasteEndPoint) URI

func (endPoint *PasteEndPoint) URI() string

URI returns the URI of the end point.

Jump to

Keyboard shortcuts

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