csv

package
v0.0.0-...-14b48b0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2017 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPairs

func GetPairs(path string) (map[string]string, error)

GetPairs reads a SantaList.csv file and returns a map of matches

Types

type Address

type Address struct {
	Fullname string
	Street1  string
	Street2  string
	City     string
	State    string
	Country  string
	Zipcode  string
}

func (*Address) String

func (a *Address) String() string

type ShippingStatus

type ShippingStatus struct {
	User                        string
	Sent, Fail, Resolved, Check bool
}

ShippingStatus ...

type ShippingStatusMap

type ShippingStatusMap map[string]string

ShippingStatusMap maps a username to a status

func GetShippingStatusInf

func GetShippingStatusInf(path string) (ShippingStatusMap, error)

GetShippingStatusInf returns a ShippingStatusMap from a CSV

type User

type User struct {
	Username       string
	ShareName      bool
	AgreeRules     bool
	RepSubreddit   string
	MessageToSanta string
	Watchlist      *url.URL
	Address        Address
	Regift         bool
	International  bool
}

User represents a participant in the ClosetSanta

func GetUserList

func GetUserList(path string) ([]User, error)

GetUserList returns a list of users found in the CSV file

func (User) Bucket

func (u User) Bucket() []byte

Bucket implements the boltclient.Thing interface

func (User) Key

func (u User) Key() []byte

Key implements the boltclient.Thing interface

Jump to

Keyboard shortcuts

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