gopher

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2019 License: MIT Imports: 0 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Gopher

type Gopher struct {
	ID    string `json:"ID"`
	Name  string `json:"name,omitempty"`
	Image string `json:"image,omitempty"`
	Age   int    `json:"age,omitempty"`
}

Gopher defines the properties of a gopher to be listed

type GopherRepository

type GopherRepository interface {
	// CreateGopher saves a given gopher
	CreateGopher(g *Gopher) error
	// FetchGophers return all gophers saved in storage
	FetchGophers() ([]*Gopher, error)
	// DeleteGopher remove gopher with given ID
	DeleteGopher(ID string) error
	// UpdateGopher modify gopher with given ID and given new data
	UpdateGopher(ID string, g *Gopher) error
	// FetchGopherByID returns the gopher with given ID
	FetchGopherByID(ID string) (*Gopher, error)
}

Repository provides access to the gopher storage

Directories

Path Synopsis
storage

Jump to

Keyboard shortcuts

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