data

package
v0.0.0-...-d1da509 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Friendship

type Friendship map[int][]int

Friendship is a map of Person.ID to []Person.ID

type People

type People []Person

People is a list of Person

func All

func All() People

All people returns the list of all Person

func FriendsByID

func FriendsByID(id int) (People, error)

FriendsByID looks up the list of friends for a Person

type Person

type Person struct {
	ID       int       `json:"id"`
	Name     string    `json:"name"`
	Birthday time.Time `json:"birthday"`
}

Person has an ID and Name

func PersonByID

func PersonByID(id int) (Person, error)

PersonByID looks up a Person

Jump to

Keyboard shortcuts

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