models

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2016 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
}

func (*BanFileModel) IsValid added in v1.1.0

func (c *BanFileModel) IsValid() bool

check struct validity

func (*BanFileModel) Post added in v1.1.0

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

Toggle will add the ip to the ban list

func (*BanFileModel) Status added in v1.1.0

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

Status will return info

type BanIpModel added in v1.1.0

type BanIpModel struct {
	Ib     uint
	Thread uint
	Id     uint
	User   uint
	Reason string
	Ip     string
}

func (*BanIpModel) IsValid added in v1.1.0

func (c *BanIpModel) IsValid() bool

check struct validity

func (*BanIpModel) Post added in v1.1.0

func (i *BanIpModel) Post() (err error)

Toggle will add the ip to the ban list

func (*BanIpModel) Status added in v1.1.0

func (i *BanIpModel) Status() (err error)

Status will return info

type BoardLogModel added in v1.1.0

type BoardLogModel struct {
	Ib     uint
	Page   uint
	Result BoardLogType
}

NewModel holds the parameters from the request and also the key for the cache

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"`
}

type CloseModel

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

func (*CloseModel) IsValid

func (c *CloseModel) IsValid() bool

check struct validity

func (*CloseModel) Status

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

Status will return info

func (*CloseModel) Toggle

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

Toggle will change the thread status

type DeleteImageTagModel

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

func (*DeleteImageTagModel) Delete

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

Delete will remove the entry

func (*DeleteImageTagModel) IsValid

func (d *DeleteImageTagModel) IsValid() bool

check struct validity

func (*DeleteImageTagModel) Status

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

Status will return info

type DeletePostModel

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

func (*DeletePostModel) Delete

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

Delete will remove the entry

func (*DeletePostModel) IsValid

func (d *DeletePostModel) IsValid() bool

check struct validity

func (*DeletePostModel) Status

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

Status will return info

type DeleteTagModel

type DeleteTagModel struct {
	Id   uint
	Name string
	Ib   uint
}

func (*DeleteTagModel) Delete

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

Delete will remove the entry

func (*DeleteTagModel) IsValid

func (d *DeleteTagModel) IsValid() bool

check struct validity

func (*DeleteTagModel) Status

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

Status will return info

type DeleteThreadModel

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

func (*DeleteThreadModel) Delete

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

Delete will remove the entry

func (*DeleteThreadModel) IsValid

func (d *DeleteThreadModel) IsValid() bool

check struct validity

func (*DeleteThreadModel) Status

func (i *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"`
}

format for audit log entries

type ModLogModel added in v1.1.0

type ModLogModel struct {
	Ib     uint
	Page   uint
	Result ModLogType
}

NewModel holds the parameters from the request and also the key for the cache

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"`
}

type PostImage

type PostImage struct {
	Id    uint
	File  string
	Thumb string
}

type PurgePostModel

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

func (*PurgePostModel) Delete

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

Delete will remove the entry

func (*PurgePostModel) IsValid

func (p *PurgePostModel) IsValid() bool

check struct validity

func (*PurgePostModel) Status

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

Status will return info

type PurgeThreadModel

type PurgeThreadModel struct {
	Id   uint
	Name string
	Ib   uint
}

func (*PurgeThreadModel) Delete

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

Delete will remove the entry

func (*PurgeThreadModel) IsValid

func (p *PurgeThreadModel) IsValid() bool

check struct validity

func (*PurgeThreadModel) Status

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

Status will return info

type Series

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

type StatisticsModel

type StatisticsModel struct {
	Ib     uint
	Result StatisticsType
}

NewModel holds the parameters from the request and also the key for the cache

func (*StatisticsModel) Get

func (i *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"`
}

type StickyModel

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

func (*StickyModel) IsValid

func (s *StickyModel) IsValid() bool

check struct validity

func (*StickyModel) Status

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

Status will return info

func (*StickyModel) Toggle

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

Toggle will change the thread status

type ThreadImages

type ThreadImages struct {
	Id    uint
	File  string
	Thumb string
}

type UpdateTagModel

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

func (*UpdateTagModel) IsValid

func (u *UpdateTagModel) IsValid() bool

check struct validity

func (*UpdateTagModel) Status

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

Status will return info

func (*UpdateTagModel) Update

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

Update will update the entry

func (*UpdateTagModel) ValidateInput

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

Jump to

Keyboard shortcuts

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