bakapi

package module
v0.0.0-...-54331f0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2020 License: MIT Imports: 10 Imported by: 0

README

Golang API for Bakaláři

Working modules

  • absence
  • auth - for authentification
  • interfaces
  • komdel
  • login
  • predmety
  • predvidac
  • setok
  • user

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHashedPwd

func GetHashedPwd(login, pwd, address string) string

func GetToken

func GetToken(login, hashedpwd string) string

Types

type Abs

type Abs struct {
	XMLName xml.Name `xml:"abs"`
	Datum   string   `xml:"datum"`
	Den     string   `xml:"den"`
	A       int      `xml:"A"`
	AOk     int      `xml:"AOk"`
	AMiss   int      `xml:"AMiss"`
	ALate   int      `xml:"ALate"`
	ASoon   int      `xml:"ASoon"`
	ASchool int      `xml:"ASchool"`
}

type Absence

type Absence struct {
	XMLName     xml.Name    `xml:"absence"`
	Hranice     string      `xml:"hranice"`
	Seznam      Seznam      `xml:"seznam"`
	Zameskanost Zameskanost `xml:"zameskanost"`
}

type AbsenceResult

type AbsenceResult struct {
	XMLName xml.Name `xml:"results"`
	Absence Absence  `xml:"absence"`
	Result  int      `xml:"result"`
}

func GetAbsence

func GetAbsence(user User) AbsenceResult

type HxResults

type HxResults struct {
	XMLName xml.Name `xml:"results"`
	Res     int      `xml:"res"`
	Typ     string   `xml:"typ"`
	Ikod    string   `xml:"ikod"`
	Salt    string   `xml:"salt"`
}

type Interface

type Interface struct {
	XMLName      xml.Name `xml:"interface"`
	Version      int      `xml:"version"`
	Deprecated   bool     `xml:"deprecated"`
	Experimental bool     `xml:"experimental"`
}

type Interfaces

type Interfaces struct {
	XMLName   xml.Name    `xml:"interfaces"`
	Interface []Interface `xml:"interface"`
	Result    int         `xml:"result"`
}

func GetInterfaces

func GetInterfaces(user User) Interfaces

type KomDelResults

type KomDelResults struct {
	XMLName xml.Name `xml:"results"`
	Code    int      `xml:"code"`
	Message string   `xml:"message"`
	Result  int      `xml:"result"`
}

func KomDel

func KomDel(user User, id int) KomDelResults

type Login

type Login struct {
	XMLName xml.Name `xml:"results"`
	Verze   string   `xml:"verze"`
	Jmeno   string   `xml:"jmeno"`
	Typ     string   `xml:"typ"`
	Strtyp  string   `xml:"strtyp"`
	Skola   string   `xml:"skola"`
	Trida   string   `xml:"trida"`
	Rocnik  string   `xml:"rocnik"`
	Moduly  string   `xml:"moduly"`
	Params  Params   `xml:"params"`
	Result  int      `xml:"result"`
}

func GetLogin

func GetLogin(user User) Login

type Params

type Params struct {
	XMLName     xml.Name `xml:"params"`
	NewMarkDays int      `xml:"newmarkdays"`
}

type Predmet

type Predmet struct {
	XMLName   xml.Name `xml:"predmet"`
	Nazev     string   `xml:"nazev"`
	Oduceno   int      `xml:"oduceno"`
	Absbase   int      `xml:"absbase"`
	Absschool int      `xml:"absschool"`
	Abssoon   int      `xml:"abssoon"`
	Abslate   int      `xml:"abslate"`
}

type Predmety

type Predmety struct {
	XMLName xml.Name  `xml:"predmety"`
	Predmet []Subject `xml:"predmet"`
}

type PredmetyResults

type PredmetyResults struct {
	XMLName  xml.Name `xml:"results"`
	Predmety Predmety `xml:"predmety"`
	Result   int      `xml:"result"`
}

func GetPredmety

func GetPredmety(user User) PredmetyResults

type PredvidacResults

type PredvidacResults struct {
	XMLName xml.Name `xml:"results"`
	Typypru Typypru  `xml:"typypru"`
	Result  int      `xml:"result"`
}

func GetPredvidac

func GetPredvidac(user User) PredvidacResults

type SetOkResults

type SetOkResults struct {
	XMLName xml.Name `xml:"results"`
	Result  int      `xml:"result"`
}

func SetOk

func SetOk(user User, id int) SetOkResults

type Seznam

type Seznam struct {
	XMLName xml.Name `xml:"seznam"`
	Abs     []Abs    `xml:"abs"`
}

type Subject

type Subject struct {
	XMLName   xml.Name `xml:"predmet"`
	Nazev     string   `xml:"nazev"`
	Zkratka   string   `xml:"zkratka"`
	KodPred   string   `xml:"kod_pred"`
	Ucitel    string   `xml:"ucitel"`
	ZkratkaUc string   `xml:"zkratkauc"`
}

type Typ

type Typ struct {
	XMLName xml.Name `xml:"typ"`
	Zkratka string   `xml:"zkratka"`
	Nazev   string   `xml:"nazev"`
	Vaha    int      `xml:"vaha"`
}

type Typypru

type Typypru struct {
	XMLName xml.Name `xml:"typypru"`
	Typ     []Typ    `xml:"typ"`
}

type User

type User struct {
	Token   string
	Address string
}

func Authentificate

func Authentificate(login, hashedpwd, address string) User

type Zameskanost

type Zameskanost struct {
	XMLName xml.Name  `xml:"zameskanost"`
	Nadpis  string    `xml:"nadpis"`
	Predmet []Predmet `xml:"predmet"`
}

Jump to

Keyboard shortcuts

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