Documentation ¶
Index ¶
- Constants
- type Server
- func (s Server) CacheDelete(key string) error
- func (s Server) CacheGet(key string) ([]byte, bool)
- func (s Server) CacheSet(key string, val []byte) error
- func (s Server) GetConfig() config.Config
- func (s Server) GetEmail() email.Client
- func (s Server) GetJWTSigningKey() []byte
- func (s Server) IsEmail(val string) bool
- func (s Server) JSEscapeString(str string) string
- func (s Server) JSON(w http.ResponseWriter, status int, data interface{})
- func (s Server) Log(err error, msg string)
- func (s Server) MEDIA(w http.ResponseWriter, status int, media []byte, mediaType string)
- func (s Server) MarkdownToHTML(str string) stdtemplate.HTML
- func (s Server) Redirect(w http.ResponseWriter, r *http.Request, status int, dst string)
- func (s Server) RegisterPathPrefix(path string, handler http.Handler, methods []string)
- func (s Server) RegisterRoute(path string, handler func(w http.ResponseWriter, r *http.Request), ...)
- func (s Server) Render(r *http.Request, w http.ResponseWriter, status int, htmlView string, ...) error
- func (s Server) RenderPageForCompanies(w http.ResponseWriter, r *http.Request, companyRepo *company.Repository, ...)
- func (s Server) RenderPageForDevelopers(w http.ResponseWriter, r *http.Request, devRepo *developer.Repository, ...)
- func (s Server) RenderPageForLocationAndTag(w http.ResponseWriter, r *http.Request, jobRepo *job.Repository, ...)
- func (s Server) RenderPageForLocationAndTagAdmin(r *http.Request, w http.ResponseWriter, jobRepo *job.Repository, ...)
- func (s Server) RenderPageForProfileRegistration(w http.ResponseWriter, r *http.Request, devRepo *developer.Repository, ...)
- func (s Server) RenderPostAJobForLocation(w http.ResponseWriter, r *http.Request, companyRepo *company.Repository, ...)
- func (s Server) RenderSalaryForLocation(w http.ResponseWriter, r *http.Request, jobRepo *job.Repository, ...)
- func (s Server) Run() error
- func (s Server) SeenSince(r *http.Request, timeAgo time.Duration) bool
- func (s Server) StringToHTML(str string) stdtemplate.HTML
- func (s Server) TEXT(w http.ResponseWriter, status int, text string)
- func (s Server) XML(w http.ResponseWriter, status int, data []byte)
Constants ¶
View Source
const ( CacheKeyPinnedJobs = "pinnedJobs" CacheKeyNewJobsLastWeek = "newJobsLastWeek" CacheKeyNewJobsLastMonth = "newJobsLastMonth" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct { Conn *sql.DB SessionStore *sessions.CookieStore // contains filtered or unexported fields }
func (Server) CacheDelete ¶
func (Server) GetJWTSigningKey ¶
func (Server) JSEscapeString ¶
func (Server) MarkdownToHTML ¶
func (s Server) MarkdownToHTML(str string) stdtemplate.HTML
func (Server) RegisterPathPrefix ¶
func (Server) RegisterRoute ¶
func (Server) RenderPageForCompanies ¶
func (s Server) RenderPageForCompanies(w http.ResponseWriter, r *http.Request, companyRepo *company.Repository, jobRepo *job.Repository, devRepo *developer.Repository, location, page, htmlView string)
func (Server) RenderPageForDevelopers ¶
func (s Server) RenderPageForDevelopers(w http.ResponseWriter, r *http.Request, devRepo *developer.Repository, location, tag, page, htmlView string)
func (Server) RenderPageForLocationAndTag ¶
func (s Server) RenderPageForLocationAndTag(w http.ResponseWriter, r *http.Request, jobRepo *job.Repository, devRepo *developer.Repository, bookmarkRepo *bookmark.Repository, location, tag, page, salary, currency, htmlView string)
func (Server) RenderPageForLocationAndTagAdmin ¶
func (s Server) RenderPageForLocationAndTagAdmin(r *http.Request, w http.ResponseWriter, jobRepo *job.Repository, location, tag, page, salary, currency, htmlView string)
func (Server) RenderPageForProfileRegistration ¶
func (s Server) RenderPageForProfileRegistration(w http.ResponseWriter, r *http.Request, devRepo *developer.Repository, htmlView string)
func (Server) RenderPostAJobForLocation ¶
func (s Server) RenderPostAJobForLocation(w http.ResponseWriter, r *http.Request, companyRepo *company.Repository, jobRepo *job.Repository, location string)
func (Server) RenderSalaryForLocation ¶
func (s Server) RenderSalaryForLocation(w http.ResponseWriter, r *http.Request, jobRepo *job.Repository, devRepo *developer.Repository, location string)
func (Server) StringToHTML ¶
func (s Server) StringToHTML(str string) stdtemplate.HTML
Click to show internal directories.
Click to hide internal directories.