entities

package
v0.0.0-...-198ac2f Latest Latest
Warning

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

Go to latest
Published: May 19, 2023 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AllPoints

type AllPoints struct {
	Points []TeamPoints `json:"allpoints"`
}

type Announcement

type Announcement struct {
	Message string `json:"message"`
	ID      int    `json:"id"`
}

type Announcements

type Announcements struct {
	Announcements []Announcement `json:"announcements"`
}

type AutomaticStart

type AutomaticStart struct {
	StartTime int64 `json:"starttime"`
	StopTime  int64 `json:"stoptime"`
	// false if manual start is used
	IsValid bool `json:"isvalid"`
	ID      int  `json:"id"`
}

type Backup

type Backup struct {
	Base64 string `json:"base64"`
}

type Challenge

type Challenge struct {
	Name        string          `json:"name"`
	Files       []ChallengeFile `json:"files"`
	Flag        string          `json:"flag"`
	Points      int             `json:"points"`
	Description string          `json:"description"`
	CountryCode string          `json:"country"`
}

type ChallengeFile

type ChallengeFile struct {
	FileName string `json:"filename"`
	Base64   string `json:"base64"`
}

type Challenges

type Challenges struct {
	Challenges []Challenge `json:"challenges"`
}

type Flag

type Flag struct {
	Challenge string `json:"challenge"`
	Value     string `json:"value"`
}

type ManualStart

type ManualStart struct {
	IsStarted bool `json:"isstarted"`

	// false if automatic start is used
	IsValid bool `json:"isvalid"`
	ID      int  `json:"id"`
}

type ReturnChallenge

type ReturnChallenge struct {
	Name        string          `json:"name"`
	Files       []ChallengeFile `json:"files"`
	Points      int             `json:"points"`
	Description string          `json:"description"`
	CountryCode string          `json:"country"`
}

this will be sent to the client, basically challenge struct stripped by the flag

type ReturnChallenges

type ReturnChallenges struct {
	Challenges []ReturnChallenge `json:"challenges"`
}

type Session

type Session struct {
	ID        string `json:"id"`
	Username  string `json:"username"`
	ExpiresIn int64  `json:"expiresin"`
}

type Sessions

type Sessions struct {
	Sessions []Session `json:"sessions"`
}

type StartStopInfo

type StartStopInfo struct {
	Automatic AutomaticStart `json:"automatic"`
	Manual    ManualStart    `json:"manual"`
}

this is used to write both of entries to the "database"

type TeamPoints

type TeamPoints struct {
	Team        string `json:"team"`
	PointAmount int    `json:"points"`
	Solved      string `json:"solved"`
	ID          int    `json:"id"`
}

type User

type User struct {
	Username string `json:"username"`
	Password string `json:"password"`
	ID       int    `json:"id"`
}

type Users

type Users struct {
	Users []User `json:"users"`
}

Jump to

Keyboard shortcuts

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