feed

package
v0.0.0-...-5ac641f Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	FeedDB   *gorm.DB
	Router   *mux.Router
	Template *template.Template
}

Server is s server for intelligence feeds based on the information contained in the database

func NewServer

func NewServer(feedTmpl string, fddb *gorm.DB) (*Server, error)

NewServer is a factory method for FeedServer using default gorilla-mux router and the provided * db, temlpate string

func NewServerTmplFile

func NewServerTmplFile(feedTmplFile string, fddb *gorm.DB) (*Server, error)

NewServerTmplFile loads a new sever as above except the template arg is a filename with a template content

func (*Server) Routes

func (fserver *Server) Routes()

Routes binds the routes of the configured router for the FeedServer, add additional routes here!

Jump to

Keyboard shortcuts

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