entity

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Book

type Book struct {
	Type            string
	ID              string
	Title           string
	SubTitle        string `json:",omitempty"`
	SeriesTitle     string `json:",omitempty"`
	OriginalTitle   string `json:",omitempty"`
	URL             string `json:",omitempty"`
	Image           BookCover
	ProductType     string    `json:",omitempty"`
	Creators        []Creator `json:",omitempty"`
	Publisher       string    `json:",omitempty"`
	Codes           []Code
	PublicationDate values.Date
	LastRelease     values.Date
	PublicDomain    bool   `json:",omitempty"`
	FirstAppearance string `json:",omitempty"`
	Service         Service
}

Book is entity class of information for book

func ImportBookFromJSON

func ImportBookFromJSON(r io.Reader) (*Book, error)

ImportBookFromJSON import Reviews data with JSON format

func (*Book) CopyFrom

func (b *Book) CopyFrom(src *Book) *Book

CopyFrom copy from Book instance

func (*Book) Format

func (b *Book) Format(tmpltPath string) ([]byte, error)

func (*Book) String

func (b *Book) String() string

type BookCover

type BookCover struct {
	URL    string
	Height uint16 `json:",omitempty"`
	Width  uint16 `json:",omitempty"`
}

BookCover is entity class of book cover image info.

type Code

type Code struct {
	Name  string
	Value string
}

Code is entity class of book code

func (Code) String

func (c Code) String() string

type Creator

type Creator struct {
	Name string
	Role string `json:",omitempty"`
}

Creator is entity class of creator info.

func (Creator) String

func (c Creator) String() string

type Service

type Service struct {
	Name string
	URL  string
}

Service is entity class of API service info.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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