storage

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Db

type Db struct {
	Path          string
	Disabled      bool
	SkipMigration bool
}

func NewDb

func NewDb() *Db

func (*Db) Get

func (db *Db) Get() (*gorm.DB, error)

type Event added in v0.0.6

type Event struct {
	gorm.Model

	Hidden bool

	ID            uint64
	CTFID         int
	Title         string
	Description   string
	URL           string
	URLIsCTFD     bool
	Weight        float64
	Onsite        bool
	Location      string
	Restrictions  string
	Format        string
	FormatID      int
	Participants  int
	CTFTimeURL    string
	LiveFeed      string
	IsVotableNow  bool
	PublicVotable bool
	Start         time.Time
	Finish        time.Time
}

func (*Event) MarshallCSV added in v0.0.6

func (ctf *Event) MarshallCSV() (res []string)

MarshallCSV returns values as a slice

func (*Event) MarshallJSON added in v0.0.6

func (ctf *Event) MarshallJSON() ([]byte, error)

MarshallJSON returns values as a slice

type EventCustomDate added in v0.0.6

type EventCustomDate struct {
	gorm.Model

	ID     uint64
	Start  time.Time
	Finish time.Time
}

type EventCustomDescription added in v0.0.6

type EventCustomDescription struct {
	gorm.Model

	ID          uint64
	Description string
}

type EventCustomTitle added in v0.0.6

type EventCustomTitle struct {
	gorm.Model

	ID    uint64
	Title string
}

type EventCustomURL added in v0.0.6

type EventCustomURL struct {
	gorm.Model

	ID  uint64
	URL string
}

Jump to

Keyboard shortcuts

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