model

package
v0.0.0-...-f2bd8bc Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Blog

type Blog struct {
	ID        string     `json:"id" bson:"_id,omitempty"`
	Title     string     `json:"title" bson:"title"`
	Content   string     `json:"content" bson:"content"`
	Author    *User      `json:"author" bson:"author"`
	CreatedAt time.Time  `json:"createdAt" bson:"createdAt"`
	UpdatedAt *time.Time `json:"updatedAt" bson:"updatedAt"`
}

type DeleteBlog

type DeleteBlog struct {
	BlogID string `json:"blogId" bson:"blogId"`
}

type EditBlog

type EditBlog struct {
	BlogID  string `json:"blogId" bson:"blogId"`
	Title   string `json:"title" bson:"title"`
	Content string `json:"content" bson:"content"`
}

type LoginInput

type LoginInput struct {
	Email    string `json:"email" bson:"email"`
	Password string `json:"password" bson:"password"`
}

type NewBlog

type NewBlog struct {
	Title   string `json:"title" bson:"title"`
	Content string `json:"content" bson:"content"`
}

type NewUser

type NewUser struct {
	Username string `json:"username" bson:"username"`
	Email    string `json:"email" bson:"email"`
	Password string `json:"password" bson:"password"`
}

type User

type User struct {
	ID        string     `json:"id" bson:"_id,omitempty"`
	Username  string     `json:"username" bson:"username"`
	Email     string     `json:"email" bson:"email"`
	Password  string     `json:"password" bson:"password"`
	CreatedAt time.Time  `json:"createdAt" bson:"createdAt"`
	UpdatedAt *time.Time `json:"updatedAt" bson:"updatedAt"`
}

Jump to

Keyboard shortcuts

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