models

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2016 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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 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