Help us shape the future of Go! Take the 2026 Go Developer Survey

types

package
v1.10.1 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Domain     = "aulaglobal.uc3m.es"
	Webservice = "/webservice/rest/server.php"
	Service    = "aulaglobal_mobile"
	TokenDir   = "aulaglobal-token"
)

Variables

This section is empty.

Functions

func GetJson added in v1.8.5

func GetJson(URL string) []byte

Types

type Course

type Course struct {
	Name string
	ID   string
}

type Courses added in v1.10.1

type Courses []Course

Define a named type for a slice of Course

func (Courses) GetCoursesName added in v1.10.1

func (c Courses) GetCoursesName() []string

Map the courses to obtain a []string with the names of the courses

type File

type File struct {
	FileName string
	FileURL  string
}

type FileStore

type FileStore struct {
	FileName string
	FileURL  string
	Dir      string
}

type ProgramArgs added in v1.10.1

type ProgramArgs struct {
	Language      int
	UserToken     string
	DirPath       string
	MaxGoroutines int
	CoursesList   []string
}

func (ProgramArgs) CheckAllAsigned added in v1.10.1

func (p ProgramArgs) CheckAllAsigned() bool

CHeck if all the arguments are assigned

type UserInfo

type UserInfo struct {
	FullName string
	UserID   string
}

type WebCourse added in v1.8.0

type WebCourse []struct {
	Hiddenbynumsections int `json:"hiddenbynumsections"`
	ID                  int `json:"id"`
	Modules             []struct {
		Afterlink        *string `json:"afterlink"`
		Availabilityinfo string  `json:"availabilityinfo,omitempty"`
		Completion       int     `json:"completion,omitempty"`
		Contents         []struct {
			Author         *string `json:"author"`
			Filename       string  `json:"filename"`
			Filepath       *string `json:"filepath"`
			Filesize       int     `json:"filesize"`
			Fileurl        string  `json:"fileurl"`
			Isexternalfile bool    `json:"isexternalfile"`
			License        *string `json:"license"`
			Mimetype       string  `json:"mimetype,omitempty"`
			Sortorder      *int    `json:"sortorder"`
			Timecreated    *int    `json:"timecreated"`
			Timemodified   int     `json:"timemodified"`
			Type           string  `json:"type"`
			Userid         *int    `json:"userid"`
		} `json:"contents,omitempty"`
		Contentsinfo *struct {
			Filescount     int      `json:"filescount"`
			Filessize      int      `json:"filessize"`
			Lastmodified   int      `json:"lastmodified"`
			Mimetypes      []string `json:"mimetypes"`
			Repositorytype string   `json:"repositorytype"`
		} `json:"contentsinfo,omitempty"`
		Contextid  int    `json:"contextid"`
		Customdata string `json:"customdata"`
		Dates      []struct {
			Dataid    string `json:"dataid"`
			Label     string `json:"label"`
			Timestamp int    `json:"timestamp"`
		} `json:"dates"`
		Description         string `json:"description"`
		Downloadcontent     int    `json:"downloadcontent"`
		ID                  int    `json:"id"`
		Indent              int    `json:"indent"`
		Instance            int    `json:"instance"`
		Modicon             string `json:"modicon"`
		Modname             string `json:"modname"`
		Modplural           string `json:"modplural"`
		Name                string `json:"name"`
		Noviewlink          bool   `json:"noviewlink"`
		Onclick             string `json:"onclick"`
		URL                 string `json:"url,omitempty"`
		Uservisible         bool   `json:"uservisible"`
		Visible             int    `json:"visible"`
		Visibleoncoursepage int    `json:"visibleoncoursepage"`
	} `json:"modules"`
	Name          string `json:"name"`
	Section       int    `json:"section"`
	Summary       string `json:"summary"`
	Summaryformat int    `json:"summaryformat"`
	Uservisible   bool   `json:"uservisible"`
	Visible       int    `json:"visible"`
}

type WebUser added in v1.8.5

type WebUser []struct {
	Category                 int    `json:"category"`
	Completed                any    `json:"completed"`
	Completionhascriteria    bool   `json:"completionhascriteria"`
	Completionusertracked    bool   `json:"completionusertracked"`
	Displayname              string `json:"displayname"`
	Enablecompletion         any    `json:"enablecompletion"`
	Enddate                  any    `json:"enddate"`
	Format                   any    `json:"format"`
	Fullname                 string `json:"fullname"`
	Hidden                   bool   `json:"hidden"`
	ID                       int    `json:"id"`
	Idnumber                 string `json:"idnumber"`
	Isfavourite              bool   `json:"isfavourite"`
	Lang                     string `json:"lang"`
	Lastaccess               any    `json:"lastaccess"`
	Marker                   any    `json:"marker"`
	Overviewfiles            []any  `json:"overviewfiles"`
	Progress                 any    `json:"progress"`
	Shortname                string `json:"shortname"`
	Showactivitydates        bool   `json:"showactivitydates"`
	Showcompletionconditions any    `json:"showcompletionconditions"`
	Showgrades               any    `json:"showgrades"`
	Startdate                int    `json:"startdate"`
	Summary                  string `json:"summary"`
	Summaryformat            int    `json:"summaryformat"`
	Timemodified             any    `json:"timemodified"`
	Visible                  int    `json:"visible"`
}

Jump to

Keyboard shortcuts

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