zermelo

package
v0.0.0-...-db8f46d Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AppointmentTypeLesson string = "lesson"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AllowedStudentActions

type AllowedStudentActions string
const (
	AllowedStudentActionsNone   AllowedStudentActions = "none"
	AllowedStudentActionsSwitch AllowedStudentActions = "switch"
	AllowedStudentActionsAll    AllowedStudentActions = "all"
)

func (AllowedStudentActions) CanSwitch

func (a AllowedStudentActions) CanSwitch() bool

type Appointment

type Appointment struct {
	ID                         int                `json:"id"`
	AppointmentInstance        int                `json:"appointmentInstance"`
	Start                      jsontypes.UnixTime `json:"start"`
	End                        jsontypes.UnixTime `json:"end"`
	StartTimeSlot              int                `json:"startTimeSlot"`
	EndTimeSlot                int                `json:"endTimeSlot"`
	BranchOfSchool             int                `json:"branchOfSchool"`
	Type                       AppointmentType    `json:"type"`
	Teachers                   []string           `json:"teachers"`
	Groups                     []string           `json:"groups"`
	GroupsInDepartments        []int              `json:"groupsInDepartments"`
	Locations                  []string           `json:"locations"`
	LocationsOfBranch          []int              `json:"locationsOfBranch"`
	IsOptional                 *bool              `json:"optional"`
	IsValid                    *bool              `json:"valid"`
	IsCanceled                 *bool              `json:"cancelled"`
	HasTeacherChanged          *bool              `json:"teacherChanged"`
	HasGroupChanged            *bool              `json:"groupChanged"`
	HasLocationChanged         *bool              `json:"locationChanged"`
	HasTimeChanged             *bool              `json:"timeChanged"`
	ChangeDescription          string             `json:"changeDescription"`
	SchedulerRemark            string             `json:"schedulerRemark"`
	ChoosableInDepartmentCodes []string           `json:"choosableInDepartmentCodes"`
	Remark                     string             `json:"remark"`
	Subjects                   []string           `json:"subjects"`
}

type AppointmentParticipation

type AppointmentParticipation struct {
	ID                    int                   `json:"id"`
	AppointmentInstance   int                   `json:"appointmentInstance"`
	StudentInDepartment   *int                  `json:"studentInDepartment"`
	IsOptional            *bool                 `json:"optional"`
	IsStudentEnrolled     *bool                 `json:"studentEnrolled"`
	Content               string                `json:"content"`
	IsOnline              *bool                 `json:"online"`
	IsAttendancePlanned   *bool                 `json:"plannedAttendance"`
	Capacity              *int                  `json:"capacity"`
	AllowedStudentActions AllowedStudentActions `json:"allowedStudentActions"`
	StudentCode           string                `json:"studentCode"`
	AvailableSpace        *int                  `json:"availableSpace"`
	Groups                []string              `json:"groups"`
	AttendanceType        AttendanceType        `json:"attendanceType"`
}

type AppointmentParticipationsRequest

type AppointmentParticipationsRequest struct {
	Student string
	Week    YearWeek
}

type AppointmentParticipationsResponse

type AppointmentParticipationsResponse struct {
	Response AppointmentParticipationsResponseData `json:"response"`
}

type AppointmentParticipationsResponseData

type AppointmentParticipationsResponseData struct {
	ResponseMetadata
	Data []*AppointmentParticipation `json:"data"`
}

type AppointmentType

type AppointmentType string

type AppointmentsRequest

type AppointmentsRequest struct {
	Start time.Time
	End   time.Time

	PossibleStudents []string
}

type AppointmentsResponse

type AppointmentsResponse struct {
	Response AppointmentsResponseData `json:"response"`
}

type AppointmentsResponseData

type AppointmentsResponseData struct {
	ResponseMetadata
	Data []*Appointment `json:"data"`
}

type AttendanceType

type AttendanceType string
const (
	AttendanceTypeNone      AttendanceType = "none"
	AttendanceTypeMandatory AttendanceType = "mandatory"
)

type ChangeParticipationRequest

type ChangeParticipationRequest struct {
	ParticipationID int  `json:"id"`
	Enrolled        bool `json:"studentEnrolled"`
}

type OrganizationClient

type OrganizationClient struct {
	Client  *http.Client
	Token   []byte
	BaseURL *url.URL
	// contains filtered or unexported fields
}

func NewOrganizationClient

func NewOrganizationClient(
	log logr.Logger,
	msgw *messages.Wrapper,
	organizationID uuid.UUID,
	institution string,
	token []byte,
) (*OrganizationClient, error)

func (*OrganizationClient) ChangeParticipation

func (c *OrganizationClient) ChangeParticipation(ctx context.Context, req *ChangeParticipationRequest) error

func (*OrganizationClient) GetAppointmentParticipation

func (c *OrganizationClient) GetAppointmentParticipation(
	ctx context.Context,
	id int,
) (*AppointmentParticipation, error)

func (*OrganizationClient) GetAppointmentParticipations

func (*OrganizationClient) GetAppointments

func (c *OrganizationClient) GetAppointments(
	ctx context.Context,
	req *AppointmentsRequest,
) (*AppointmentsResponse, error)

type ResponseMetadata

type ResponseMetadata struct {
	Status    int    `json:"status"`
	Message   string `json:"message"`
	Details   string `json:"details"`
	EventID   int    `json:"eventId"`
	StartRow  int    `json:"startRow"`
	EndRow    int    `json:"endRow"`
	TotalRows int    `json:"totalRows"`
}

type SetHeaderRoundTripper

type SetHeaderRoundTripper struct {
	Key, Value string
	Next       http.RoundTripper
	// contains filtered or unexported fields
}

func (*SetHeaderRoundTripper) RoundTrip

func (t *SetHeaderRoundTripper) RoundTrip(r *http.Request) (*http.Response, error)

type StatusError

type StatusError struct {
	Code int
}

func (StatusError) Error

func (e StatusError) Error() string

type YearWeek

type YearWeek struct {
	Year, Week int
}

func YearWeekFromTime

func YearWeekFromTime(t time.Time) YearWeek

func (YearWeek) String

func (yw YearWeek) String() string

Jump to

Keyboard shortcuts

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