models

package
v0.0.0-...-d20b489 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2020 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	gorm.Model
	Name          string `json:"name" gorm:"unique;"`
	Path          string `json:"path"`
	ParentSession int64  `json:"parentSession"`
}

type GenericResponse

type GenericResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
}

Response models

type Session

type Session struct {
	gorm.Model
	Time    int64  `json:"time" form:"time"`
	Subject string `json:"subject" form:"subject"`
	Title   string `json:"title" form:"title"`
}

Database models

type SessionWithFiles

type SessionWithFiles struct {
	Session
	Files []File `json:"files"`
}

type Settings

type Settings struct {
	AllowRegistration bool `json:"allowRegistration"`
}

Misc. models

func (Settings) GetFields

func (b Settings) GetFields() []string

type User

type User struct {
	gorm.Model
	Username     string `json:"username" gorm:"unique;"`
	PasswordHash []byte `json:"-"`
	Salt         string `json:"-"`
}

Jump to

Keyboard shortcuts

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