Documentation ¶
Overview ¶
Package console implements a web console for Walker in Go
Index ¶
- Constants
- Variables
- func AddLinkIndexController(w http.ResponseWriter, req *http.Request)
- func BuildRender()
- func ChangePriorityController(w http.ResponseWriter, req *http.Request)
- func ExcludeToggleController(w http.ResponseWriter, req *http.Request)
- func FilterLinksController(w http.ResponseWriter, req *http.Request)
- func FindDomainController(w http.ResponseWriter, req *http.Request)
- func FindLinksController(w http.ResponseWriter, req *http.Request)
- func HomeController(w http.ResponseWriter, req *http.Request)
- func LinksController(w http.ResponseWriter, req *http.Request)
- func LinksHistoricalController(w http.ResponseWriter, req *http.Request)
- func ListDomainsController(w http.ResponseWriter, req *http.Request)
- func RestAdd(w http.ResponseWriter, req *http.Request)
- func Run()
- func SpoofData()
- func Start()
- func Stop()
- type Route
- type Session
- func (sess *Session) AddErrorFlash(message string)
- func (sess *Session) AddInfoFlash(message string)
- func (sess *Session) Flashes() (infos []string, errors []string)
- func (sess *Session) LinksPageWindowLength() int
- func (sess *Session) ListPageWindowLength() int
- func (sess *Session) SetLinksPageWindowLength(plen int)
- func (sess *Session) SetListPageWindowLength(plen int)
Constants ¶
const DefaultPageWindowLength = 15
S E S S I O N S
Variables ¶
var DS cassandra.ModelDatastore
var PageWindowLengthChoices = []int{10, 15, 25, 35, 50, 75, 100, 150, 250}
PageWindowLengthChoices lists the window length's listed on /list and /links page
var Render *render.Render
Render is the global render.Render object used by all controllers
Functions ¶
func AddLinkIndexController ¶
func AddLinkIndexController(w http.ResponseWriter, req *http.Request)
AddLinkIndexController returns pages rooted at /add
func ChangePriorityController ¶
func ChangePriorityController(w http.ResponseWriter, req *http.Request)
ChangePriorityController handles web-based priority changes.
func ExcludeToggleController ¶
func ExcludeToggleController(w http.ResponseWriter, req *http.Request)
ExcludeToggleController handles web based exclusions
func FilterLinksController ¶
func FilterLinksController(w http.ResponseWriter, req *http.Request)
FilterLinksController returns pages rooted at /filterLinks
func FindDomainController ¶
func FindDomainController(w http.ResponseWriter, req *http.Request)
FindDomainController returns pages rooted at /find
func FindLinksController ¶
func FindLinksController(w http.ResponseWriter, req *http.Request)
FindLinksController returns pages rooted at /findLinks
func HomeController ¶
func HomeController(w http.ResponseWriter, req *http.Request)
HomeController returns / page
func LinksController ¶
func LinksController(w http.ResponseWriter, req *http.Request)
LinksController returns pages rooted at /links IMPL NOTE: Why does linksController encode the seedURL in base32, rather than URL encode it? The reason is that various components along the way are tripping on the appearance of the seedURL argument. First, it appears that the browser is unencoding the link BEFORE submitting it to the server. That looks like a problem with the browser to me. But in addition, the server appears to be choking on the url-encoded text as well. For example if the url encoded seedURL ends with .html, it appears that this is causing the server to throw a 301. Unknown why that is. But the net effect is that, if I totally disguise the link in base32, everything works.
func LinksHistoricalController ¶
func LinksHistoricalController(w http.ResponseWriter, req *http.Request)
LinksHistoricalController returns pages rooted at /links
func ListDomainsController ¶
func ListDomainsController(w http.ResponseWriter, req *http.Request)
ListDomainsController returns pages rooted at /list
func RestAdd ¶
func RestAdd(w http.ResponseWriter, req *http.Request)
RestAdd manages the rest endpoint rooted at /rest/add.
Types ¶
type Route ¶
type Route struct { Path string Controller func(w http.ResponseWriter, req *http.Request) }
Route represents an http endpoint
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session object manages all controller sessions
func GetSession ¶
GetSession returns a session object
func (*Session) AddErrorFlash ¶
func (*Session) AddInfoFlash ¶
func (*Session) LinksPageWindowLength ¶
LinksPageWindowLength returns the page length for /links page
func (*Session) ListPageWindowLength ¶
ListPageWindowLength returns page length for /list page