models

package
v0.0.0-...-969198b Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2017 License: LGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DBOpen

func DBOpen() *gorm.DB

Types

type Project

type Project struct {
	ID          int32
	Name        string `valid:"Required;Max(256)"`
	Description string
	DescType    TextType
}

func (Project) TableName

func (Project) TableName() string

type TextType

type TextType int8
const (
	TEXT TextType = 0
	HTML TextType = 1
	MD   TextType = 2
)

func (TextType) String

func (t TextType) String() string

type User

type User struct {
	ID         int32  `json:"id"`
	Name       string `json:"name"`
	Email      string `json:"email"`
	Password   string `json:"password"`
	FullName   string `json:"full_name"`
	IsActivate bool   `json:"is_activate"`
	Salt       string
}

func (*User) HashPassword

func (u *User) HashPassword()

func (User) TableName

func (User) TableName() string

type Validate

type Validate interface {
	Validate() (bool, error)
}

Jump to

Keyboard shortcuts

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