defs

package
v0.0.0-...-c69ed2e Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2021 License: BSD-2-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ItemFilter

type ItemFilter struct {
	// Use SQL ILIKE to filter title by this, with % on both ends.
	Query string
	// Limit to this many results.
	Count int
	// Skip this many pages of results.
	Skip int
}

ItemFilter represents a search query for any records in a collection that match the query string. It also enables server-side pagination.

type LinkedRecipe

type LinkedRecipe struct {
	ID    int    `json:"id"`
	Title string `json:"title"`
}

LinkedRecipe is a reference from one recipe to another.

type Recipe

type Recipe struct {
	ID          int      `json:"id"`
	Revision    int      `json:"revision"`
	Amount      string   `json:"amount"`
	AuthorID    int      `json:"author_id"`
	Directions  []string `json:"directions"`
	Ingredients []string `json:"ingredients"`
	Notes       string   `json:"notes"`
	Oven        string   `json:"oven"`
	Source      string   `json:"source"`
	Summary     string   `json:"summary"`
	Time        string   `json:"time"`
	Title       string   `json:"title"`
	/* Fields from other tables. */
	Tags          []string       `json:"tags"`
	AuthorName    string         `json:"author_name"`
	LinkedRecipes []LinkedRecipe `json:"linked_recipes"`
}

Recipe represents a recipe from the DB.

type User

type User struct {
	ID           int       `json:"id"`
	Email        string    `json:"email"`
	Name         string    `json:"name"`
	Role         string    `json:"role"`
	Lastlog      null.Time `json:"lastlog"`
	CreationDate time.Time `json:"creation_date"`
	// Fields from other tables.
	RecipesAuthored int `json:"recipes_authored"`
}

User represents a User from the database.

Jump to

Keyboard shortcuts

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