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: 9 Imported by: 1

Documentation

Overview

Provides models for controllers

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddTagModel

type AddTagModel struct {
	Ib    uint
	Tag   uint
	Image uint
}

func (*AddTagModel) IsValid

func (a *AddTagModel) IsValid() bool

check struct validity

func (*AddTagModel) Post

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

Post will add the reply to the database with a transaction

func (*AddTagModel) Status

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

Status will return info about the thread

func (*AddTagModel) ValidateInput

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

ValidateInput will make sure all the parameters are valid

type EmailModel

type EmailModel struct {
	Uid          uint
	Name         string
	Email        string
	CurrentEmail string
}

EmailModel contains new email

func (*EmailModel) IsValid

func (e *EmailModel) IsValid() bool

check struct validity

func (*EmailModel) Update

func (r *EmailModel) Update() (err error)

update email

func (*EmailModel) Validate

func (r *EmailModel) Validate() (err error)

Validate will check the provided email

type FavoritesModel

type FavoritesModel struct {
	Uid   uint
	Image uint
}

func (*FavoritesModel) IsValid

func (f *FavoritesModel) IsValid() bool

check struct validity

func (*FavoritesModel) Post

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

Post will add the fav to the database

func (*FavoritesModel) Status

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

Status will return info

func (*FavoritesModel) ValidateInput

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

ValidateInput will make sure all the parameters are valid

type NewTagModel

type NewTagModel struct {
	Ib      uint
	Tag     string
	TagType uint
}

func (*NewTagModel) IsValid

func (n *NewTagModel) IsValid() bool

check struct validity

func (*NewTagModel) Post

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

Post will add the reply to the database with a transaction

func (*NewTagModel) Status

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

Status will return info about the thread

func (*NewTagModel) ValidateInput

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

ValidateInput will make sure all the parameters are valid

type PasswordModel

type PasswordModel struct {
	Uid       uint
	Name      string
	OldPw     string
	NewPw     string
	NewHashed []byte
}

Password contains information for initial account creation

func (*PasswordModel) IsValid

func (p *PasswordModel) IsValid() bool

check struct validity

func (*PasswordModel) Update

func (r *PasswordModel) Update() (err error)

change password

func (*PasswordModel) Validate

func (r *PasswordModel) Validate() (err error)

Validate will check the provided password

type RegisterModel

type RegisterModel struct {
	Uid      uint
	Name     string
	Email    string
	Password string
	Hashed   []byte
}

Register contains information for initial account creation

func (*RegisterModel) IsValid

func (r *RegisterModel) IsValid() bool

check struct validity

func (*RegisterModel) Register

func (r *RegisterModel) Register() (err error)

register new user

func (*RegisterModel) Validate

func (r *RegisterModel) Validate() (err error)

Validate will check the provided name length and email

type ReplyModel

type ReplyModel struct {
	Uid         uint
	Ib          uint
	Thread      uint
	Ip          string
	Comment     string
	Filename    string
	Thumbnail   string
	MD5         string
	OrigWidth   int
	OrigHeight  int
	ThumbWidth  int
	ThumbHeight int
	Image       bool
}

func (*ReplyModel) IsValid

func (r *ReplyModel) IsValid() bool

check struct validity

func (*ReplyModel) Post

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

Post will add the reply to the database with a transaction

func (*ReplyModel) Status

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

Status will return info about the thread

func (*ReplyModel) ValidateInput

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

ValidateInput will make sure all the parameters are valid

type ThreadModel

type ThreadModel struct {
	Uid         uint
	Ib          uint
	Ip          string
	Title       string
	Comment     string
	Filename    string
	Thumbnail   string
	MD5         string
	OrigWidth   int
	OrigHeight  int
	ThumbWidth  int
	ThumbHeight int
}

func (*ThreadModel) IsValid

func (t *ThreadModel) IsValid() bool

check struct validity

func (*ThreadModel) Post

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

Post will add the thread to the database with a transaction

func (*ThreadModel) ValidateInput

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

ValidateInput will make sure all the parameters are valid

Jump to

Keyboard shortcuts

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