server

package
v0.0.0-...-e474068 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2017 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

Package server provides Syndication's REST API. See docs/API_refrence.md for more information on server requests and responses

Index

Constants

View Source
const DefaultPort = "80"

DefaultPort server binds to

View Source
const DefaultTLSPort = "443"

DefaultTLSPort server binds to if TLS is enabled

Variables

This section is empty.

Functions

This section is empty.

Types

type EntryQueryParams

type EntryQueryParams struct {
	Update bool   `query:"update"`
	Marker string `query:"withMarker"`
	Saved  bool   `query:"saved"`
}

EntryQueryParams maps query parameters used when GETting entries resources

type ErrorResp

type ErrorResp struct {
	Reason  string `json:"reason"`
	Message string `json:"message"`
}

ErrorResp represents a common format for error responses returned by a Server

type Server

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

Server represents a echo server instance and holds references to other components needed for the REST API handlers.

func NewServer

func NewServer(db *database.DB, sync *sync.Sync, config config.Server) *Server

NewServer creates a new server instance

func (*Server) AddFeedsToCategory

func (s *Server) AddFeedsToCategory(c echo.Context) error

AddFeedsToCategory adds a Feed to a Category with id

func (*Server) DeleteCategory

func (s *Server) DeleteCategory(c echo.Context) error

DeleteCategory with id

func (*Server) DeleteFeed

func (s *Server) DeleteFeed(c echo.Context) error

DeleteFeed with id

func (*Server) EditCategory

func (s *Server) EditCategory(c echo.Context) error

EditCategory with id

func (*Server) EditFeed

func (s *Server) EditFeed(c echo.Context) error

EditFeed with id

func (*Server) GetCategories

func (s *Server) GetCategories(c echo.Context) error

GetCategories returns a list of Categories owned by a user

func (*Server) GetCategory

func (s *Server) GetCategory(c echo.Context) error

GetCategory with id

func (*Server) GetEntries

func (s *Server) GetEntries(c echo.Context) error

GetEntries returns a list of entries that belong to a user

func (*Server) GetEntriesFromCategory

func (s *Server) GetEntriesFromCategory(c echo.Context) error

GetEntriesFromCategory returns a list of Entries that belong to a Feed that belongs to a Category

func (*Server) GetEntriesFromFeed

func (s *Server) GetEntriesFromFeed(c echo.Context) error

GetEntriesFromFeed returns a list of entries provided from a feed

func (*Server) GetEntry

func (s *Server) GetEntry(c echo.Context) error

GetEntry with id

func (*Server) GetFeed

func (s *Server) GetFeed(c echo.Context) error

GetFeed with id

func (*Server) GetFeeds

func (s *Server) GetFeeds(c echo.Context) error

GetFeeds returns a list of subscribed feeds

func (*Server) GetFeedsFromCategory

func (s *Server) GetFeedsFromCategory(c echo.Context) error

GetFeedsFromCategory returns a list of Feeds that belong to a Category

func (*Server) GetStatsForCategory

func (s *Server) GetStatsForCategory(c echo.Context) error

GetStatsForCategory returns statistics related to a Category

func (*Server) GetStatsForEntries

func (s *Server) GetStatsForEntries(c echo.Context) error

GetStatsForEntries provides statistics related to Entries

func (*Server) GetStatsForFeed

func (s *Server) GetStatsForFeed(c echo.Context) error

GetStatsForFeed provides statistics related to a Feed

func (*Server) Login

func (s *Server) Login(c echo.Context) error

Login a user

func (*Server) MarkCategory

func (s *Server) MarkCategory(c echo.Context) error

MarkCategory applies a Marker to a Category

func (*Server) MarkEntry

func (s *Server) MarkEntry(c echo.Context) error

MarkEntry applies a Marker to an Entry

func (*Server) MarkFeed

func (s *Server) MarkFeed(c echo.Context) error

MarkFeed applies a Marker to a Feed

func (*Server) NewCategory

func (s *Server) NewCategory(c echo.Context) error

NewCategory creates a new Category

func (*Server) NewFeed

func (s *Server) NewFeed(c echo.Context) error

NewFeed creates a new feed

func (*Server) Register

func (s *Server) Register(c echo.Context) error

Register a user

func (*Server) Start

func (s *Server) Start() error

Start the server

func (*Server) Stop

func (s *Server) Stop() error

Stop the server gracefully

Jump to

Keyboard shortcuts

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