gorgonzola

package module
v0.0.0-...-d8520b2 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2015 License: MIT Imports: 17 Imported by: 0

README

gorgonzola GoDoc

Gorgonzola is simple barebone job board using the Json-job format to aggregate job offers.

Demo on: http://gorgonzola-gophergala.appspot.com/

Supported features:

  • Add jobs by submitting jobs.json file. More informatin here.
  • Json file validation using json-schema.
  • Automatic update for job offers
  • Microformats for job offers
  • Google App Engine hosted

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Datastore

type Datastore struct{}

Datastore implements the Storage interface targeting GAE Datastore

func NewDatastore

func NewDatastore() *Datastore

NewDatastore creates new Datastore

func (*Datastore) AddURL

func (ds *Datastore) AddURL(r *http.Request, url string) error

AddURL adds new Json-job url to the job board

func (*Datastore) GetJob

func (ds *Datastore) GetJob(r *http.Request, hash string) (*Job, error)

GetJob returns single job by hash value

func (*Datastore) GetJobs

func (ds *Datastore) GetJobs(r *http.Request, limit int) ([]Job, error)

GetJobs returns maximum `limit` jobs ordered by creation date

func (*Datastore) Update

func (ds *Datastore) Update(r *http.Request) error

Update updates the job offers for single Link

type Equity

type Equity struct {
	From float32 `json:"from"`
	To   float32 `json:"to"`
}

Equity contains the job equity

type Gorgonzola

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

Gorgonzola is the main application structure

func NewGorgonzola

func NewGorgonzola() *Gorgonzola

NewGorgonzola creates Gorgonzola

func (*Gorgonzola) Run

func (g *Gorgonzola) Run()

Run initializes the application

type HTTPError

type HTTPError struct {
	Err     error
	Message string
	Code    int
}

HTTPError represents custom HTTP error

func (HTTPError) Error

func (e HTTPError) Error() string

Error implements the error interface

type JSONJob

type JSONJob struct {
	Position    string      `json:"position"`
	Title       string      `json:"title"`
	Description string      `json:"description"`
	URL         string      `json:"url"`
	Type        string      `json:"type"`
	Posted      string      `json:"posted"`
	Location    string      `json:"location"`
	Skills      []string    `json:"skills"`
	SalaryRange SalaryRange `json:"salaryRange"`
	Equity      Equity      `json:"equity"`
	Perks       []string    `json:"perks"`
	Apply       string      `json:"apply"`
}

JSONJob contains single job offer

type JSONJobs

type JSONJobs struct {
	Company        string    `json:"company"`
	URL            string    `json:"url"`
	RemoteFriendly bool      `json:"remoteFriendly"`
	Market         string    `json:"market"`
	Size           string    `json:"size"`
	Jobs           []JSONJob `json:"jobs"`
}

JSONJobs contains the whole jobs.json struct

type Job

type Job struct {
	LinkKey               string
	Hash                  string
	CompanyName           string
	CompanyURL            string
	CompanyRemoteFriendly bool
	CompanyMarket         string
	CompanySize           string
	Position              string
	Title                 string
	Description           string
	URL                   string
	Type                  string
	Posted                string
	Location              string
	Skills                []string
	SalaryRangeFrom       int
	SalaryRangeTo         int
	SalaryRangeCurrency   string
	EquityFrom            float32
	EquityTo              float32
	Perks                 []string
	Apply                 string
	Active                bool
	Created               time.Time
}

Job contains single flattened job offer

type Link struct {
	URL     string
	Created time.Time
	Fetched time.Time
}

Link contains Json-job link

type SalaryRange

type SalaryRange struct {
	From     int    `json:"from"`
	To       int    `json:"to"`
	Currency string `json:"currency"`
}

SalaryRange contains the job salary range

type Storage

type Storage interface {
	AddURL(r *http.Request, url string) error
	GetJobs(r *http.Request, limit int) ([]Job, error)
	GetJob(r *http.Request, hash string) (*Job, error)
	Update(r *http.Request) error
}

Storage interface to handle data persistence

type Template

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

Template is the user facing template helper structure

func NewTemplate

func NewTemplate(w http.ResponseWriter) *Template

NewTemplate creates new Template

Jump to

Keyboard shortcuts

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