Documentation
¶
Index ¶
- Variables
- func Complements(as, bs []string) (missingFromA, missingFromB []string)
- func Int64Complements(a, b []int64) (missingFromA, missingFromB []int64)
- func NewPetsHandler(db config.DatabaseConfig) (h handler)
- func UpdateParameter(input, key, value string) (output string)
- type Int64Slice
- type Pet
- type PetWithTimestamp
Constants ¶
This section is empty.
Variables ¶
View Source
var Pets = aspect.Table("pets", aspect.Column("id", aspect.String{PrimaryKey: true}), aspect.Column("name", aspect.String{}), aspect.Column("type", aspect.String{}), aspect.Column("gender", aspect.String{}), aspect.Column("color", aspect.String{}), aspect.Column("breed", aspect.String{}), aspect.Column("age", aspect.String{}), aspect.Column("location", aspect.String{}), aspect.Column("detail_url", aspect.String{}), aspect.Column("image_url", aspect.String{}), aspect.Column("added", aspect.Timestamp{WithTimezone: true}), aspect.Column("removed", aspect.Timestamp{WithTimezone: true}), )
Functions ¶
func Complements ¶
Complements determine the complements of both strings arrays.
func Int64Complements ¶
Int64Complements determine the complements of both int64 arrays.
func NewPetsHandler ¶
func NewPetsHandler(db config.DatabaseConfig) (h handler)
func UpdateParameter ¶
Types ¶
type Int64Slice ¶
type Int64Slice []int64
func (Int64Slice) Len ¶
func (a Int64Slice) Len() int
func (Int64Slice) Less ¶
func (a Int64Slice) Less(i, j int) bool
func (Int64Slice) Swap ¶
func (a Int64Slice) Swap(i, j int)
type Pet ¶
type Pet struct {
ID string
Name string
Type string
Gender string
Color string
Breed string
Age string
Location string
DetailURL string // TODO Or URL?
ImageURL string // TODO Or URL?
}
func ParsePetsFile ¶
func ParsePetsHTML ¶
type PetWithTimestamp ¶
type PetWithTimestamp struct {
ID string
Name string
Type string
Gender string
Color string
Breed string
Age string
Location string
DetailURL string
ImageURL string
Added time.Time
Removed *time.Time // A pointer is used so the zero init is nil
}
func PWTFromPet ¶
func PWTFromPet(i Pet) (o PetWithTimestamp)
Click to show internal directories.
Click to hide internal directories.