models

package
v0.0.0-...-4635459 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2018 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Image

type Image struct {
	Id       uuid.UUID  `json:"id"`
	Uploaded *time.Time `json:"uploaded"`
	Path     string     `json:"path"`
}

Contains information for an Image which will be embedded in a blog post. Path is the directory path that can be followed to reach the image

type Post

type Post struct {
	Id          uuid.UUID  `json:"id"`
	Tag         string     `json:"tag"`
	Title       string     `json:"title"`
	ContentMD   string     `json:"contentMd"`
	ContentHTML string     `json:"contentHtml"`
	Published   *time.Time `json:"published"`
	Edited      *time.Time `json:"edited"`
	IsFavorite  bool       `json:"isFavorite"`
	Author      uuid.UUID  `json:"author"`
}

Contains all information about a blog post

type PostLite

type PostLite struct {
	Id         uuid.UUID  `json:"id"`
	Tag        string     `json:"tag"`
	Title      string     `json:"title"`
	Published  *time.Time `json:"published"`
	IsFavorite bool       `json:"isFavorite"`
}

Contains only the information about a blog post that is necessary for displaying in a list of blog posts. ie. to be able to identify the post

type User

type User struct {
	Id          uuid.UUID `json:"id"`
	FirstName   string    `json:"firstName"`
	LastName    string    `json:"lastName"`
	Email       string    `json:"email"`
	Location    string    `json:"location"`
	CatchPhrase string    `json:"catchPhrase"`
	Login       string    `json:"-"`
	HashedPw    string    `json:"-"`
}

Contains all information about a user (admin) of the blog. The Login and Hashed Password information is never returned in json responses.

Jump to

Keyboard shortcuts

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