models

package
v0.0.0-...-143f45a Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2024 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllowedJobTitles = []string{
	"Artificial Intelligence (AI) Engineer",
	"Back-End Developer",
	"Business Analyst",
	"Cloud Solutions Architect",
	"Computer Hardware Engineer",
	"Cybersecurity Analyst",
	"Data Scientist",
	"Database Administrator (DBA)",
	"DevOps Engineer",
	"Front-End Developer",
	"Full-Stack Developer",
	"Game Developer",
	"IT Project Manager",
	"IT Support Specialist",
	"Machine Learning Engineer",
	"Mobile App Developer",
	"Network Administrator",
	"Network Engineer",
	"Product Designer",
	"Quality Assurance (QA) Engineer",
	"Software Engineer",
	"Systems Administrator",
	"Technical Writer",
	"UI/UX Designer",
	"Web Developer",
}
View Source
var AllowedLocations = []string{
	"New York, NY",
	"Austin, TX",
	"Boston, MA",
	"Charlotte, NC",
	"Chicago, IL",
	"Columbus, OH",
	"Dallas, TX",
	"Denver, CO",
	"Detroit, MI",
	"El Paso, TX",
	"Fort Worth, TX",
	"Houston, TX",
	"Indianapolis, IN",
	"Jacksonville, FL",
	"Los Angeles, CA",
	"Nashville, TN",
	"Oklahoma City, OK",
	"Philadelphia, PA",
	"Phoenix, AZ",
	"San Antonio, TX",
	"San Diego, CA",
	"San Francisco, CA",
	"San Jose, CA",
	"Seattle, WA",
	"Washington, D.C.",
}

Functions

func GetJobCountFromScraper

func GetJobCountFromScraper(jobType, location string) (int, error)

func InsertJobCount

func InsertJobCount(db *sql.DB, location string, jobType string, jobCount int) error

Runs python script and upload results to DB

func IsValidJobTitle

func IsValidJobTitle(title string) bool

func IsValidLocation

func IsValidLocation(location string) bool

Types

type JobCount

type JobCount struct {
	ID       *int       `json:"id"`
	JobType  *string    `json:"job_type"`
	Location *string    `json:"location"`
	Count    *int       `json:"job_count"`
	Date     *time.Time `json:"date"`
}

JobCount structure to represent a job count entry in the database

func GetJobCountByParams

func GetJobCountByParams(db *sql.DB, date, location, jobType string) (*JobCount, error)

GetJobCountByParams fetches the job count based on the given parameters

Jump to

Keyboard shortcuts

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