internal

package
v0.0.0-...-a0d1ad3 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2022 License: MIT, Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SavesTable = "saves"
)

Variables

This section is empty.

Functions

func Run

func Run() error

Types

type Editor

type Editor interface {
	EditSavedName(name string) *Saves
	EditSavedComment(comment string) *Saves
}

type Saved

type Saved interface {
	Create() error
	GetSaved() (*Saves, error)
	GetSaves() ([]*Saves, error)
}

type Saves

type Saves struct {
	gorm.Model

	AccountId uint `gorm:"primaryKey;type:bigint;account_id"`

	Name      string `gorm:"type:text;name"`
	Comment   string `gorm:"type:text;comment"`
	Cid       string `gorm:"type:text;cid"`
	Types     string `gorm:"type:text;types"`
	IsPrivate bool   `gorm:"type:boolean;is_private"`
}

Saves a file to the database.

func NewSaves

func NewSaves(accountID uint, name, comment, cid, types string, isPrivate bool) *Saves

func NewSavesAccountId

func NewSavesAccountId(accountID uint) *Saves

func NewSavesDelete

func NewSavesDelete(savedId, accountId uint) *Saves

func NewSavesId

func NewSavesId(savesId uint) *Saves

func (*Saves) Create

func (s *Saves) Create() error

func (*Saves) Delete

func (s *Saves) Delete() error

func (*Saves) DeleteSaves

func (s *Saves) DeleteSaves() error

func (*Saves) EditSaved

func (s *Saves) EditSaved(id, accountId uint) error

func (*Saves) GetSaved

func (s *Saves) GetSaved() (*Saves, error)

func (*Saves) GetSaves

func (s *Saves) GetSaves() ([]*Saves, error)

Jump to

Keyboard shortcuts

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