models

package
v0.0.0-...-2493de3 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2021 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ingredient

type Ingredient struct {
	ID     string
	Name   string
	Amount string

	Tags    []Tag
	Recipes []Recipe
}

Ingredient is a struct that represents a single ingredient

type ManyIngredients

type ManyIngredients struct {
	Ingredients []Ingredient
}

ManyIngredients is a struct that represents multiple ingredients

type ManyNotes

type ManyNotes struct {
	Notes []Note
}

ManyNotes is a struct that represents multiple notes

type ManyRecipes

type ManyRecipes struct {
	Recipes []Recipe
}

ManyRecipes is a struct that represents multiple recipes

type ManyRoles

type ManyRoles struct {
	Roles []Role
}

ManyRoles is a struct that represents multiple roles

type ManyTags

type ManyTags struct {
	Tags []Tag
}

ManyTags is a struct that represents multiple tags

type ManyUsers

type ManyUsers struct {
	Users []User
}

ManyUsers is a struct that represents multiple users

type Note

type Note struct {
	ID   string
	Text string

	User   []User
	Recipe []Recipe
}

Note is a struct that represents a single note

type Recipe

type Recipe struct {
	ID            string
	Name          string
	URL           string
	Domain        string
	Directions    string
	PrepTime      int
	CookTime      int
	TotalServings int
	HasBeenTried  bool

	CreatedBy      User
	Ingredients    []Ingredient
	Tags           []Tag
	RatedBy        []User
	FavoritedBy    []User
	RelatedRecipes []Recipe
	Notes          []Note
}

Recipe is a struct that represents a single recipe.

type Role

type Role struct {
	ID   string
	Name string

	Users []User
}

Role is a struct that represents a single role.

type Tag

type Tag struct {
	ID   string
	Name string

	Recipes     []Recipe
	Ingredients []Ingredient
}

Tag is a struct that represents a single tag

type User

type User struct {
	ID          string
	Name        string
	Username    string
	Password    string
	RatingScore int

	AuthToken            string
	RefreshToken         string
	RefreshTokenIssuedAt int64

	Favorites []Recipe
	Notes     []Note
	Ratings   []Recipe
	Roles     []Role
}

User is a struct that represents a single user.

Jump to

Keyboard shortcuts

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