csv

package
v0.0.0-...-0db9ae2 Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package csv provides a read-only database for the library from the embedded CSV file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database struct {
	Books []book.Book
}

func NewDatabase

func NewDatabase(r io.Reader) (*Database, error)

func (Database) ReadBook

func (d Database) ReadBook(id string) (*book.Book, error)

func (Database) ReadBookHeaders

func (d Database) ReadBookHeaders(filter book.Filter, limit, offset int) ([]book.Header, error)

func (Database) ReadBookSubjects

func (d Database) ReadBookSubjects(limit, offset int) ([]book.Subject, error)

type Dump

type Dump struct {
	// contains filtered or unexported fields
}

func NewDump

func NewDump(w io.Writer) *Dump

func (*Dump) Write

func (d *Dump) Write(books ...book.Book)

Jump to

Keyboard shortcuts

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