mock

package
v0.0.0-...-cf27a83 Latest Latest
Warning

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

Go to latest
Published: May 27, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DB struct {
		Users    []*User        `json:"users"`
		Posts    []*Post        `json:"posts"`
		Comments []*Comment     `json:"comments"`
		Quotes   []*quote.Quote `json:"quotes"`

		UserByID map[string]*User
	}
)

Functions

func Load

func Load(filename string)

Types

type Comment

type Comment struct {
	ID        string    `json:"id"`
	Created   time.Time `json:"created_on"`
	AuthorID  string    `json:"author_id"`
	Moderated bool      `json:"moderated"`
	PostID    string    `json:"post_id"`
	Message   string    `json:"message"`
}

type Post

type Post struct {
	ID       string    `json:"id"`
	Created  time.Time `json:"created_on"`
	AuthorID string    `json:"author_id"`
	Slug     string    `json:"slug"`
	Title    string    `json:"title"`
	Message  string    `json:"message"`
}

type User

type User struct {
	ID           string `json:"id"`
	Username     string `json:"username"`
	PasswordHash string `json:"password_hash"`
	IsLocked     bool   `json:"is_locked"`
	FirstName    string `json:"first_name"`
	LastName     string `json:"last_name"`
}

Jump to

Keyboard shortcuts

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