xkcdstore

package
v0.0.0-...-aa806d1 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type XkcdComic

type XkcdComic struct {
	Num        int    `json:"num"`
	Title      string `json:"title"`
	Image      string `json:"img"`
	Alt        string `json:"alt"`
	Transcript string `json:"transcript"`
}

type XkcdStore

type XkcdStore struct {
	Entries []XkcdComic
	// contains filtered or unexported fields
}

func New

func New(fileName string) (*XkcdStore, error)

func (*XkcdStore) Close

func (s *XkcdStore) Close() error

func (*XkcdStore) Current

func (s *XkcdStore) Current() (int, error)

func (*XkcdStore) Fetch

func (s *XkcdStore) Fetch(ID int) (*XkcdComic, error)

func (*XkcdStore) Insert

func (s *XkcdStore) Insert(entry *XkcdComic) error

func (*XkcdStore) Search

func (s *XkcdStore) Search(term string) (*[]XkcdComic, error)

Jump to

Keyboard shortcuts

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