core

package
v0.0.0-...-e94906c Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2017 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseModel

type BaseModel struct {
	ID    bson.ObjectId `json:"id,omitempty" bson:"_id"`
	Title string        `json:"title" bson:"title"`
	Body  string        `json:"title" bson:"body"`
	Tags  []tags.Tag    `json:"tags" body:"tags"`
}

BaseModel is a model that all other models (Except Tag) should inherit from

func (*BaseModel) IsValid

func (bm *BaseModel) IsValid() (ok bool, errs []error)

IsValid checks if model fields are valid before save

Jump to

Keyboard shortcuts

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