apimodel

package
v0.0.0-...-3c77d5a Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CompleteTimetable

type CompleteTimetable struct {
	Days map[string][]CompleteTimetableItem // key format is YYYY-MM-dd or 2006-01-02
}

type CompleteTimetableItem

type CompleteTimetableItem struct {
	Type       string            `json:"type"`
	Date       string            `json:"date"`
	Period     string            `json:"uniperiod"`
	StartTime  string            `json:"starttime"`
	EndTime    string            `json:"endtime"`
	Subject    model.Subject     `json:"subject"`
	Classes    []model.Class     `json:"classes"`
	GroupNames []string          `json:"groupnames"`
	IGroupID   string            `json:"igroupid"`
	Teachers   []model.Teacher   `json:"teachers"`
	Classrooms []model.Classroom `json:"classrooms"`
	StudentIDs []string          `json:"studentids"`
	Colors     []string          `json:"colors"`
}

type HomeworkReduced

type HomeworkReduced struct {
	ID               string                 `json:"hwkid"`
	HomeworkID       string                 `json:"homeworkid"`
	UserID           string                 `json:"userid"`
	LessonID         int                    `json:"predmetid"`
	Name             string                 `json:"name"`
	Details          string                 `json:"details"`
	DateCreated      string                 `json:"datecreated"`
	Period           interface{}            `json:"period"`
	Timestamp        string                 `json:"timestamp"`
	TestID           string                 `json:"testid"`
	Type             string                 `json:"typ"`
	LikeCount        int                    `json:"pocet_like"`
	ReactionCount    int                    `json:"pocet_reakcii"`
	DoneCount        int                    `json:"pocet_done"`
	State            string                 `json:"stav"`
	LastResult       string                 `json:"posledny_vysledok"`
	GradeEventID     interface{}            `json:"znamky_udalostid"`
	StudentsHidden   string                 `json:"students_hidden"`
	Data             model.StringJsonObject `json:"data"`
	EvaluationStatus string                 `json:"stavhodnotetimelinePathd"`
	Attachments      interface{}            `json:"attachements"`
}

type ICanteenBadRequestResponse

type ICanteenBadRequestResponse struct {
	Error string `json:"error" example:"username is missing"`
}

type ICanteenInternalErrorResponse

type ICanteenInternalErrorResponse struct {
	Error string `` /* 170-byte string literal not displayed */
}

type InternalErrorResponse

type InternalErrorResponse struct {
	Error string `json:"error" example:"failed to create payload"`
}

type LoginBadRequestResponse

type LoginBadRequestResponse struct {
	Success bool   `json:"success" example:"false"`
	Error   string `json:"error" example:"Username and Password are required"`
}

type LoginInternalErrorResponse

type LoginInternalErrorResponse struct {
	Success bool   `json:"success" example:"false"`
	Error   string `` /* 146-byte string literal not displayed */
}

type LoginSuccessResponse

type LoginSuccessResponse struct {
	Success   bool   `json:"success" example:"true"`
	Error     string `json:"error" example:""`
	Token     string `json:"token" example:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM"`
	Firstname string `json:"firstname" example:"John"`
	Lastname  string `json:"lastname" example:"Doe"`
}

type LoginUnauthorizedResponse

type LoginUnauthorizedResponse struct {
	Success bool   `json:"success" example:"false"`
	Error   string `json:"error" example:"Unexpected response from server, make sure credentials are specified correctly"`
}

type Recipient

type Recipient struct {
	ID   string `json:"id"`
	Type string `json:"type"`
	Name string `json:"name"`
}

type SendMessageRequest

type SendMessageRequest struct {
	Recipient string                 `json:"recipient"`
	Message   edupage.MessageOptions `json:"message"`
}

type Timeline

type Timeline struct {
	Homeworks map[string]HomeworkReduced
	Items     map[string]TimelineItemReduced
}

type TimelineItemReduced

type TimelineItemReduced struct {
	ID            string                 `json:"timelineid"`
	Timestamp     model.Time             `json:"timestamp"`
	ReactionTo    string                 `json:"reakcia_na"`
	Type          string                 `json:"typ"`
	User          string                 `json:"user"`
	TargetUser    string                 `json:"target_user"`
	Text          string                 `json:"text"`
	Data          model.StringJsonObject `json:"data"`
	Owner         string                 `json:"vlastnik"`
	ReactionCount int                    `json:"poct_reakcii"`
	Removed       int                    `json:"removed"`
}

type TimelineItemWithOrigin

type TimelineItemWithOrigin struct {
	ID              string                   `json:"timelineid"`
	Timestamp       model.Time               `json:"timestamp"`
	ReactionTo      string                   `json:"reakcia_na"`
	Type            string                   `json:"typ"`
	User            string                   `json:"user"`
	TargetUser      string                   `json:"target_user"`
	UserName        string                   `json:"user_meno"`
	OtherID         string                   `json:"ineid"`
	Text            string                   `json:"text"`
	TimeAdded       model.Time               `json:"cas_pridania"`
	TimeEvent       model.Time               `json:"cas_udalosti"`
	Data            model.StringJsonObject   `json:"data"`
	Owner           string                   `json:"vlastnik"`
	OwnerName       string                   `json:"vlastnik_meno"`
	ReactionCount   int                      `json:"poct_reakcii"`
	LastReaction    string                   `json:"posledna_reakcia"`
	PomocnyZaznam   string                   `json:"pomocny_zaznam"`
	Removed         any                      `json:"removed"`
	TimeAddedBTC    model.Time               `json:"cas_pridania_btc"`
	LastReactionBTC model.Time               `json:"cas_udalosti_btc"`
	OriginServer    string                   `json:"origin_server"`
	Replies         []TimelineItemWithOrigin `json:"replies"`
}

type TimelineRequest

type TimelineRequest struct {
	From string `json:"from" example:"2022-01-01T00:00:00Z"`
	To   string `json:"to" example:"2022-01-01T00:00:00Z" default:"time.Now()"`
}

type TimetableRequest

type TimetableRequest struct {
	From string `json:"from" example:"2022-01-01T00:00:00Z"`
	To   string `json:"to" example:"2022-01-01T00:00:00Z" default:"time.Now()"`
}

type UnauthorizedResponse

type UnauthorizedResponse struct {
	Error string `json:"error" example:"Unauthorized"`
}

type ValidateTokenSuccessResponse

type ValidateTokenSuccessResponse struct {
	Success bool   `json:"success" example:"true"`
	Error   string `json:"error" example:""`
	Expires string `json:"expires" example:"1620000000"`
}

type ValidateTokenUnauthorizedResponse

type ValidateTokenUnauthorizedResponse struct {
	Success bool   `json:"success" example:"false"`
	Error   string `json:"error" example:"Unauthorized"`
}

Jump to

Keyboard shortcuts

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