models

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BanFileModel added in v1.1.0

type BanFileModel struct {
	Ib     uint
	Thread uint
	ID     uint
	User   uint
	Reason string
	Hash   string
}

BanFileModel holds request input

func (*BanFileModel) IsValid added in v1.1.0

func (m *BanFileModel) IsValid() bool

IsValid will check struct validity

func (*BanFileModel) Post added in v1.1.0

func (m *BanFileModel) Post() (err error)

Post will add the file to the table

func (*BanFileModel) Status added in v1.1.0

func (m *BanFileModel) Status() (err error)

Status will return info

type BanIPModel added in v1.2.0

type BanIPModel struct {
	Ib     uint
	Thread uint
	ID     uint
	User   uint
	Reason string
	IP     string
}

BanIPModel holds request input

func (*BanIPModel) IsValid added in v1.2.0

func (m *BanIPModel) IsValid() bool

IsValid will check struct validity

func (*BanIPModel) Post added in v1.2.0

func (m *BanIPModel) Post() (err error)

Post will add the ip to the table

func (*BanIPModel) Status added in v1.2.0

func (m *BanIPModel) Status() (err error)

Status will return info

type BoardLogModel added in v1.1.0

type BoardLogModel struct {
	Ib     uint
	Page   uint
	Result BoardLogType
}

BoardLogModel holds request input

func (*BoardLogModel) Get added in v1.1.0

func (i *BoardLogModel) Get() (err error)

Get will gather the information from the database and return it as JSON serialized data

type BoardLogType added in v1.1.0

type BoardLogType struct {
	Body u.PagedResponse `json:"boardlog"`
}

BoardLogType is the container for the JSON response

type CloseModel

type CloseModel struct {
	ID     uint
	Name   string
	Ib     uint
	Closed bool
}

CloseModel holds request input

func (*CloseModel) IsValid

func (m *CloseModel) IsValid() bool

IsValid will check struct validity

func (*CloseModel) Status

func (m *CloseModel) Status() (err error)

Status will return info

func (*CloseModel) Toggle

func (m *CloseModel) Toggle() (err error)

Toggle will change the thread status

type DeleteImageTagModel

type DeleteImageTagModel struct {
	Image uint
	Tag   uint
	Name  string
	Ib    uint
}

DeleteImageTagModel holds request input

func (*DeleteImageTagModel) Delete

func (m *DeleteImageTagModel) Delete() (err error)

Delete will remove the entry

func (*DeleteImageTagModel) IsValid

func (m *DeleteImageTagModel) IsValid() bool

IsValid will check struct validity

func (*DeleteImageTagModel) Status

func (m *DeleteImageTagModel) Status() (err error)

Status will return info

type DeletePostModel

type DeletePostModel struct {
	Thread  uint
	ID      uint
	Ib      uint
	Name    string
	Deleted bool
}

DeletePostModel holds request input

func (*DeletePostModel) Delete

func (m *DeletePostModel) Delete() (err error)

Delete will remove the entry

func (*DeletePostModel) IsValid

func (m *DeletePostModel) IsValid() bool

IsValid will check struct validity

func (*DeletePostModel) Status

func (m *DeletePostModel) Status() (err error)

Status will return info

type DeleteTagModel

type DeleteTagModel struct {
	ID   uint
	Name string
	Ib   uint
}

DeleteTagModel holds request input

func (*DeleteTagModel) Delete

func (m *DeleteTagModel) Delete() (err error)

Delete will remove the entry

func (*DeleteTagModel) IsValid

func (m *DeleteTagModel) IsValid() bool

IsValid will check struct validity

func (*DeleteTagModel) Status

func (m *DeleteTagModel) Status() (err error)

Status will return info

type DeleteThreadModel

type DeleteThreadModel struct {
	ID      uint
	Name    string
	Ib      uint
	Deleted bool
}

DeleteThreadModel holds request input

func (*DeleteThreadModel) Delete

func (m *DeleteThreadModel) Delete() (err error)

Delete will remove the entry

func (*DeleteThreadModel) IsValid

func (m *DeleteThreadModel) IsValid() bool

IsValid will check struct validity

func (*DeleteThreadModel) Status

func (m *DeleteThreadModel) Status() (err error)

Status will return info

type Log added in v1.1.0

type Log struct {
	UID    uint       `json:"user_id"`
	Name   string     `json:"user_name"`
	Group  uint       `json:"user_group"`
	Time   *time.Time `json:"log_time"`
	Action string     `json:"log_action"`
	Meta   string     `json:"log_meta"`
}

Log format for audit log entries

type ModLogModel added in v1.1.0

type ModLogModel struct {
	Ib     uint
	Page   uint
	Result ModLogType
}

ModLogModel holds request input

func (*ModLogModel) Get added in v1.1.0

func (i *ModLogModel) Get() (err error)

Get will gather the information from the database and return it as JSON serialized data

type ModLogType added in v1.1.0

type ModLogType struct {
	Body u.PagedResponse `json:"modlog"`
}

ModLogType is container for JSON response

type PurgePostModel

type PurgePostModel struct {
	Thread uint
	ID     uint
	Ib     uint
	Name   string
}

PurgePostModel holds request input

func (*PurgePostModel) Delete

func (m *PurgePostModel) Delete() (err error)

Delete will remove the entry

func (*PurgePostModel) IsValid

func (m *PurgePostModel) IsValid() bool

IsValid will check struct validity

func (*PurgePostModel) Status

func (m *PurgePostModel) Status() (err error)

Status will return info

type PurgeThreadModel

type PurgeThreadModel struct {
	ID   uint
	Name string
	Ib   uint
}

PurgeThreadModel holds request input

func (*PurgeThreadModel) Delete

func (m *PurgeThreadModel) Delete() (err error)

Delete will remove the entry

func (*PurgeThreadModel) IsValid

func (m *PurgeThreadModel) IsValid() bool

IsValid will check struct validity

func (*PurgeThreadModel) Status

func (m *PurgeThreadModel) Status() (err error)

Status will return info

type Series

type Series struct {
	Name string `json:"name"`
	Data []uint `json:"data"`
}

Series holds the analytics data

type StatisticsModel

type StatisticsModel struct {
	Ib     uint
	Result StatisticsType
}

StatisticsModel holds request input

func (*StatisticsModel) Get

func (m *StatisticsModel) Get() (err error)

Get will gather the information from the database and return it as JSON serialized data

type StatisticsType

type StatisticsType struct {
	Visitors uint        `json:"visitors"`
	Hits     uint        `json:"hits"`
	Threads  uint        `json:"threads"`
	Posts    uint        `json:"posts"`
	Images   uint        `json:"images"`
	Labels   []time.Time `json:"labels"`
	Series   []Series    `json:"series"`
}

StatisticsType holds the analytics metadata

type StickyModel

type StickyModel struct {
	ID     uint
	Name   string
	Ib     uint
	Sticky bool
}

StickyModel holds request input

func (*StickyModel) IsValid

func (m *StickyModel) IsValid() bool

IsValid will check struct validity

func (*StickyModel) Status

func (m *StickyModel) Status() (err error)

Status will return info

func (*StickyModel) Toggle

func (m *StickyModel) Toggle() (err error)

Toggle will change the thread status

type UpdateTagModel

type UpdateTagModel struct {
	ID      uint
	Ib      uint
	Tag     string
	TagType uint
}

UpdateTagModel holds request input

func (*UpdateTagModel) IsValid

func (m *UpdateTagModel) IsValid() bool

IsValid will check struct validity

func (*UpdateTagModel) Status

func (m *UpdateTagModel) Status() (err error)

Status will return info

func (*UpdateTagModel) Update

func (m *UpdateTagModel) Update() (err error)

Update will update the entry

func (*UpdateTagModel) ValidateInput

func (m *UpdateTagModel) ValidateInput() (err error)

ValidateInput checks the data input for correctness

Jump to

Keyboard shortcuts

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