models

package
v0.0.0-...-e2fe045 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Problems = []*Problem{
	{Slug: "erzi", De: "Erziehung", En: "Upbringing"},
	{Slug: "schw", De: "Schwangerschaft, Geburt", En: "Prenancy, birth"},
	{Slug: "frej", De: "Freizeit (Jugend)", En: "Leisure activities (youth)"},
	{Slug: "kita", De: "KiTa, Betreuung, Spielen", En: "Kindergarten, care, playing"},
	{Slug: "schu", De: "Schule", En: "School"},
	{Slug: "medi", De: "Medien(-nutzung)", En: "Media (use)"},
	{Slug: "arbs", De: "Arbeitsschutz (Jugend)", En: "Labour protection (youth)"},

	{Slug: "arbl", De: "Arbeitslosigkeit", En: "Unemployment"},
	{Slug: "ausb", De: "Ausbildung, Studium, Praktika, Berufsvorbereitung", En: "Apprenticeships, studies, internships, job preparation"},

	{Slug: "wohl", De: "Wohnungslosigkeit", En: "Homelessness"},
	{Slug: "wohs", De: "Wohnraumsicherung", En: "Securing housing"},
	{Slug: "bewo", De: "Betreutes Wohnen", En: "Assisted living"},
	{Slug: "akle", De: "Ausstattung, Kleidung, Lebensmittel", En: "Furnishings, clothing, groceries"},

	{Slug: "inte", De: "Integration", En: "Integration"},
	{Slug: "spra", De: "Sprache", En: "Language"},
	{Slug: "aufe", De: "Aufenthaltsgenehmigung, Asyl", En: "Residence permit, asylum"},
	{Slug: "form", De: "Formulare, Anträge, Schriftverkehr", En: "Forms, applications, correspondence"},

	{Slug: "pfle", De: "Pflege (Senioren)", En: "Care (seniors)"},
	{Slug: "frea", De: "Freizeit (Senioren)", En: "Leisure activities (seniors)"},

	{Slug: "kges", De: "Körperliche Gesundheit", En: "Physical health"},
	{Slug: "mges", De: "Geistige Gesundheit", En: "Mental health"},
	{Slug: "sexv", De: "Sex, Verhütung, Geschlechtskrankheiten", En: "Sex, birth control, STDs"},
	{Slug: "drog", De: "Drogen, Sucht", En: "Drugs, addiction"},
	{Slug: "behi", De: "Behinderung (körperlich, geistig)", En: "Disability (physical, mental)"},

	{Slug: "krim", De: "Kiminalität, Strafverfahren", En: "Crime, criminal proceedings"},
	{Slug: "inso", De: "Schulden, Insolvenz", En: "Debts, insolvency"},
	{Slug: "gewa", De: "Gewalt (körperlich, sexualisiert, psychisch)", En: "Violence (physical, sexualised, psychological)"},
	{Slug: "extr", De: "Extremismus, Exit", En: "Extremism, Exit"},

	{Slug: "kris", De: "Krisenintervention (\"Nichts geht mehr.\")", En: "Crisis intervention (\"Nothing goes.\")"},
}

Functions

func GetProviderCount

func GetProviderCount(db *database.DB) (int, error)

func GetProviderNameById

func GetProviderNameById(id int64, db *database.DB) string

Types

type EntryLawRow

type EntryLawRow struct {
	Id      int64  `db:"id"`
	EntryId string `db:"entry_id"`
	LawSlug string `db:"law_slug"`
}

type EntryProblemRow

type EntryProblemRow struct {
	Id          int64  `db:"id"`
	EntryId     string `db:"entry_id"`
	ProblemSlug string `db:"problem_slug"`
}

type InsertEntryFormData

type InsertEntryFormData struct {
	Name        string
	Description string
	Url         string
	Location    string
	Contact     string
	Ags         string
	Problem     []*Problem
	AgeMin      uint64
	AgeMax      uint64
	Gender      map[string]bool
	Law         []*Law
	SocialForm  string
	Draft       bool
}

type InsertEntryFormDataRaw

type InsertEntryFormDataRaw struct {
	Name        string
	Description string
	Url         string
	Location    string
	Contact     string
	Ags         string
	Problem     []string
	AgeMin      string
	AgeMax      string
	Gender      map[string]string
	Law         []string
	SocialForm  string
	Draft       string
}

type Law

type Law struct {
	Slug  string `db:"slug"`
	Title string `db:"title"`
}

func GetLawBySlug

func GetLawBySlug(slug string, db *database.DB) (*Law, error)

func GetLawBySlugFromList

func GetLawBySlugFromList(slug string, list []*Law) (*Law, error)

func GetLawList

func GetLawList(db *database.DB) ([]*Law, error)

func GetLawsForEntry

func GetLawsForEntry(entryId int64, db *database.DB) ([]*Law, error)

type LoginData

type LoginData struct {
	Email    string
	Password string
}

type NewPasswordFormData

type NewPasswordFormData struct {
	Uid       string
	Secret    string
	Password  string
	Password2 string
}

type Problem

type Problem struct {
	Slug string `db:"slug"`
	De   string `db:"de"`
	En   string `db:"en"`
}

func GetProblemBySlug

func GetProblemBySlug(slug string) (*Problem, error)

func GetProblemBySlugFromList

func GetProblemBySlugFromList(slug string, list []*Problem) (*Problem, error)

func GetProblemList

func GetProblemList() []*Problem

func GetProblemsForEntry

func GetProblemsForEntry(entryId int64, db *database.DB) ([]*Problem, error)

type Provider

type Provider struct {
	ID          string         `db:"provider_id"`
	Name        string         `db:"name"`
	Description sql.NullString `db:"description"`
	Url         sql.NullString `db:"url"`
	EmailDomain string         `db:"email_domain"`
	Created     time.Time      `db:"created"`
	LastUpdate  time.Time      `db:"last_update"`
}

func GetProviderById

func GetProviderById(id int64, db *database.DB) (*Provider, error)

type RegisterData

type RegisterData struct {
	Email     string
	Password  string
	Password2 string
}

type SearchFilterData

type SearchFilterData struct {
	Ags        string
	Plz        string
	Problem    string
	Birthyear  int64
	Gender     string
	Law        string
	SocialForm string
}

type SettingsNewPasswordFormData

type SettingsNewPasswordFormData struct {
	OldPassword string
	Password    string
	Password2   string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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