structs

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2024 License: MIT Imports: 2 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiConfig

type ApiConfig struct {
	Server    string `json:"server"`
	User      string `json:"user"`
	Password  string `json:"password"`
	School    string `json:"school"`
	Useragent string `json:"ClientName"`
}

type AuthParams

type AuthParams struct {
	User     string `json:"user"`
	Password string `json:"password"`
	Client   string `json:"client"`
}

AuthParams represents the parameters for the authenticate method.

type AuthResponse

type AuthResponse struct {
	SessionID  string `json:"sessionId"`
	PersonType int    `json:"personType"`
	PersonID   int    `json:"personId"`
	KlasseId   int    `json:"klasseId"`
}

AuthResponse represents the result of the authenticate method.

type Class

type Class struct {
	ID        int    `json:"id"`
	Name      string `json:"name"`
	LongName  string `json:"longName"`
	ForeColor string `json:"foreColor,omitempty"`
	BackColor string `json:"backColor,omitempty"`
	Did       string `json:"did"`
	Teacher1  int    `json:"teacher1"`
	Teacher2  int    `json:"teacher2"`
}

type ClassRegEvents

type ClassRegEvents struct {
	StudentId  int    `json:"studentid"`
	Surname    string `json:"surname"`
	Forname    string `json:"forname"`
	Date       int    `json:"date"` // Date conversion (current format: int YYYYMMDD)
	Subject    string `json:"subject"`
	Reason     string `json:"reason"`
	Text       string `json:"text"`
	CategoryId int    `json:"categoryId"`
}

type Department

type Department struct {
	ID        int    `json:"id"`
	Name      string `json:"name"`
	LongName  string `json:"longName"`
	ForeColor string `json:"foreColor,omitempty"`
	BackColor string `json:"backColor,omitempty"`
}

type Exam

type Exam struct {
	Id        int       `json:"id"`
	Classes   []Class   `json:"classes"`
	Teachers  []Teacher `json:"teachers"`
	Students  []Student `json:"students"`
	Subject   int       `json:"subject"`
	Date      int       `json:"date"`      // Date conversion (current format: int YYYYMMDD)
	StartTime int       `json:"startTime"` // Date / Time conversion (current format: int HHMM)
	EndTime   int       `json:"endTime"`   // Date / Time conversion (current format: int HHMM)
}

type GetExamsRequest

type GetExamsRequest struct {
	ExamTypeId int    `json:"examTypeId"` // mandatory
	StartDate  int    `json:"startDate"`  // mandatory
	EndDate    string `json:"endDate"`    //mandatory
}

type GetPersonIdRequest

type GetPersonIdRequest struct {
	Type      int    `json:"type"` // type of element, mandatory 2 = teacher, 5 = student
	Surname   string `json:"sn"`   //surname, mandatory
	Forename  string `json:"fn"`   //forename, mandatory
	Birthdata string `json:"dob"`  //birthdata, mandatory, use 0 if unknown

}

type GetSubstitutionsRequest

type GetSubstitutionsRequest struct {
	StartDate    int    `json:"startDate"`    // mandatory
	EndDate      string `json:"endDate"`      //mandatory
	DepartmentId string `json:"departmentId"` //mandatory, use 0 for all departments or if not applicable
}

type GetTimetableRequest

type GetTimetableRequest struct {
	Element           GetTimetableRequestElement `json:"element"`
	StartDate         int                        `json:"startDate,omitempty"`         // number, format: YYYYMMDD, optional (default: current date)
	EndDate           int                        `json:"endDate,omitempty"`           // number, format: YYYYMMDD, optional (default: current date)
	OnlyBaseTimetable bool                       `json:"onlyBaseTimetable,omitempty"` //  boolean, returns only the base timetable (without bookings etc.)(default:false)
	ShowBooking       bool                       `json:"showBooking,omitempty"`       //  returns the period's booking info if available (default: false)
	ShowInfo          bool                       `json:"showInfo,omitempty"`          //  returns the period information if available (default: false)
	ShowSubstText     bool                       `json:"showSubstText,omitempty"`     //  returns the Untis substitution text if available (default: false)
	ShowLsText        bool                       `json:"showLsText,omitempty"`        //  returns the text of the period's lesson (default: false)
	ShowLsNumber      bool                       `json:"showLsNumber,omitempty"`      //  returns the number of the period's lesson (default: false)
	ShowStudentgroup  bool                       `json:"showStudentgroup,omitempty"`  //  returns the name(s) of the studentgroup(s) (default: false)
	KlasseFields      []string                   `json:"klasseFields,omitempty"`      //  optional, values: „id“, „name“, „longname“, „externalkey“ //TODO: to enum
	RoomFields        []string                   `json:"roomFields,omitempty"`        //  optional, values: „id“, „name“, „longname“, „externalkey“//TODO: to enum
	SubjectFields     []string                   `json:"subjectFields,omitempty"`     //  optional, values: „id“, „name“, „longname“, „externalkey“//TODO: to enum
	TeacherFields     []string                   `json:"teacherFields,omitempty"`     //  optional, values: „id“, „name“, „longname“, „externalkey“//TODO: to enum

}

type GetTimetableRequestElement added in v1.0.6

type GetTimetableRequestElement struct {
	Id      int    `json:"id,omitempty"`
	Type    int    `json:"type,omitempty"` // type of element, mandatory 	1 = klasse, 2 = teacher, 3 = subject, 4 = room, 5 = student
	KeyType string `json:"keyType,omitempty"`
}

type GetTimetableSimpleRequest

type GetTimetableSimpleRequest struct {
	ElementId int `json:"id"`
	Type      int `json:"type"`                // type of element, mandatory 	1 = klasse, 2 = teacher, 3 = subject, 4 = room, 5 = student
	StartDate int `json:"startDate,omitempty"` // optional
	EndDate   int `json:"endDate,omitempty"`   // optional
}

type Holiday

type Holiday struct {
	ID        int    `json:"id"`
	Name      string `json:"name"`
	LongName  string `json:"longName"`
	StartDate int    `json:"startDate"`
	EndDate   int    `json:"endDate"`
}

type IdObject

type IdObject struct {
	Id                  int    `json:"id"`
	Name                string `json:"name"`
	ExternalKey         string `json:"externalkey"`
	OriginalId          int    `json:"orgid"`
	OriginalName        string `json:"orgname"`
	OriginalExternalKey string `json:"orgexternalkey"`
}

type OriginalData added in v1.2.0

type OriginalData interface {
}

type Period

type Period struct {
	Id               int       `json:"id"`
	Date             int       `json:"date"`
	StartTime        int       `json:"startTime"`
	EndTime          int       `json:"endTime"`
	Classes          []Class   `json:"kl"`
	Teachers         []Teacher `json:"te"`
	Subjects         []Subject `json:"su"`
	Rooms            []Room    `json:"ro"`
	OriginalClasses  []Class   `json:"orgkl,omitempty"`
	OriginalTeachers []Teacher `json:"orgte,omitempty"`
	OriginalSubjects []Subject `json:"orgsu,omitempty"`
	OriginalRooms    []Room    `json:"orgro,omitempty"`
	LessonType       string    `json:"lstype,omitempty"`    //„ls“ (lesson) | „oh“ (office hour) | „sb“ (standby) | „bs“ (break supervision) | „ex“(examination)  omitted if lesson
	Code             string    `json:"code,omitempty"`      //„“ | „cancelled“ | „irregular“ omitted if empty
	Info             string    `json:"info"`                //Only in custom request
	SubstitutionText string    `json:"substText"`           //Only in custom request
	LessonText       string    `json:"lstext,omitempty"`    //omitempty only in non-custom request
	LessonNumber     int       `json:"lsnumber"`            //Only in custom request
	StatisticalFlags string    `json:"statflags,omitempty"` //omitempty only in non-custom request
	StudentGroup     string    `json:"sg"`
	BookingRemark    string    `json:"bkRemark"`
	BookingText      string    `json:"bkText"`
	ActivityType     string    `json:"activityType,omitempty"`
}

type PeriodWithAbsenceObject

type PeriodWithAbsenceObject struct {
}

type RPCError

type RPCError struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

RPCError represents an error in a JSON-RPC response.

func (*RPCError) Error added in v1.0.3

func (e *RPCError) Error() string

type RPCRequest

type RPCRequest struct {
	ID      string      `json:"id"`
	Method  string      `json:"method"`
	Params  interface{} `json:"params"`
	JSONRPC string      `json:"jsonrpc"`
}

RPCRequest represents a JSON-RPC request.

type RPCResponse

type RPCResponse struct {
	JSONRPC string          `json:"jsonrpc"`
	ID      string          `json:"id"`
	Result  json.RawMessage `json:"result"`
	Error   *RPCError       `json:"error,omitempty"`
}

RPCResponse represents a JSON-RPC response.

type Room

type Room struct {
	ID        int    `json:"id"`
	Name      string `json:"name"`
	LongName  string `json:"longName"`
	ForeColor string `json:"foreColor,omitempty"`
	BackColor string `json:"backColor,omitempty"`
}

type SchoolYear

type SchoolYear struct {
	Id        int    `json:"id"`
	Name      string `json:"name"`
	StartDate int    `json:"startDate"`
	EndDate   int    `json:"endDate"`
}

type StartAndEndDate

type StartAndEndDate struct {
	StartDate int    `json:"startDate"` // mandatory
	EndDate   string `json:"endDate"`   //mandatory
}

type StatusData

type StatusData struct {
	Lstypes json.RawMessage `json:"lstypes"`
	Codes   json.RawMessage `json:"codes"`
}

type Student

type Student struct {
	ID       int    `json:"id"`
	Key      string `json:"key"`
	Name     string `json:"name"`
	ForeName string `json:"foreName"`
	LongName string `json:"longName"`
	Gender   string `json:"gender"`
}

type Subject

type Subject struct {
	ID        int    `json:"id"`
	Name      string `json:"name"`
	LongName  string `json:"longName"`
	ForeColor string `json:"foreColor,omitempty"`
	BackColor string `json:"backColor,omitempty"`
}

type Substitutions

type Substitutions struct {
	Type             string     `json:"type"` //"cancel" -> cancellation | subst -> teacher substitution | add -> additional period | shift -> shifted period | rmchg -> room change | rmlk -> locked period | bs -> break supervision | oh -> office hour | sb -> standby | other -> foreign substitutions | free -> free periods | ac -> activity | holi -> holiday | stxt -> substitution text
	LessonId         int        `json:"lsid"`
	Date             int        `json:"date"`      // Date conversion (current format: int YYYYMMDD)
	StartTime        int        `json:"startTime"` // Date / Time conversion (current format: int HHMM)
	EndTime          int        `json:"endTime"`   // Date / Time conversion (current format: int HHMM)
	Classes          []IdObject `json:"kl"`
	Teachers         []IdObject `json:"te"`
	Subjects         []IdObject `json:"su"`
	Rooms            []IdObject `json:"ro"`
	SubstitutionText string     `json:"txt"`
	Reschedule       struct {
		Date      int `json:"date"`      // Date conversion (current format: int YYYYMMDD)
		StartTime int `json:"startTime"` // Date / Time conversion (current format: int HHMM)
		EndTime   int `json:"endTime"`   // Date / Time conversion (current format: int HHMM)
	} `json:"reschedule"`
}

type Teacher

type Teacher struct {
	ID        int    `json:"id"`
	Name      string `json:"name"`
	ForeName  string `json:"foreName"`
	LongName  string `json:"longName"`
	ForeColor string `json:"foreColor,omitempty"`
	BackColor string `json:"backColor,omitempty"`
}

type TimegridUnit

type TimegridUnit struct {
	Day       int `json:"day"` //1 = sunday, 2 = monday, ..., 7 = saturday
	TimeUnits struct {
		StartTime int `json:"startTime"`
		EndTime   int `json:"endTime"`
	} `json:"timeUnits"`
}

Jump to

Keyboard shortcuts

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