bookapp

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthorBookListing

type AuthorBookListing struct {
	AuthorName   string `json:"author_name"`
	WrittenBooks []Book `json:"written_books"`
}

type Book

type Book struct {
	BookID uuid.UUID `json:"book_id"` // A line comment about BookID that should be kept.
	Title  string    `json:"title"`
	// ISBN identifier of the book, null if not known.
	ISBN ISBN `json:"isbn"`

	Genre    string    `json:"genre" tstype:"'novel' | 'crime' | 'fantasy'"`
	Chapters []Chapter `json:"chapters"`

	PublishedAt *time.Time `json:"published_at"`
}

type Chapter

type Chapter struct {
	// Chapter title
	Title string `json:"title"`
	// The amount of words in this chapter
	NumberOfWords uint `json:"number_of_words"`
}

Chapter some random docs TsType -- tells tygo to generate ts type for this struct

type ISBN

type ISBN null.String

Jump to

Keyboard shortcuts

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