database

package
v0.0.0-...-61c6b88 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2017 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InmemoryDatabase

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

InmemoryDatabase holds a reference of previously scrapped elements

func NewInmemoryDatabase

func NewInmemoryDatabase() *InmemoryDatabase

NewInmemoryDatabase returns a pointer

func (InmemoryDatabase) FindOne

func (ld InmemoryDatabase) FindOne(phone string, name string) (*Person, error)

FindOne extends inmemory database. Returns a person if previously stored, otherwise returns an error

func (InmemoryDatabase) Update

func (ld InmemoryDatabase) Update(person *Person) error

Update method not implemented

type Person

type Person struct {
	DetailURL string `json:"url"`
	Name      string `json:"name"`
	Phone     string `json:"phone"`
	Address   string `json:"address"`
}

Person Represents the person being looked at

Jump to

Keyboard shortcuts

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