calendar

package
v0.0.0-...-6fa130f Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2016 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Appointment

type Appointment struct {
	ID     string    `gorethink:"id,omitempty"`
	What   string    `gorethink:"what"`
	When   time.Time `gorethink:"when"`
	Where  string    `gorethink:"where"`
	Who    string    `gorethink:"who"`
	Status string    `gorethink:"status"`

	Email       string `gorethink:"email"`
	Notes       string `gorethink:"notes"`
	Phone       string `gorethink:"phone"`
	Problematic bool   `gorethink:"problematic"`
	SendEmail   bool   `gorethink:"send_email"`
	SendSMS     bool   `gorethink:"send_sms"`
	Urgent      bool   `gorethink:"urgent"`
}

Appointment is defined by 4 why question plus some other collateral info.

func (*Appointment) Merge

func (a *Appointment) Merge(new *Appointment)

type Client

type Client struct {
	DB    r.QueryExecutor
	Table string
}

Client is the way you use this module. Just instantiate it with a db instance and call its methods

func (*Client) Between

func (c *Client) Between(location string, start, end time.Time) ([]Appointment, error)

Between returns all the appointments in a certain location, after the time start and before the time end, included.

func (*Client) Delete

func (c *Client) Delete(app *Appointment) error

Delete removes an appointment from the database

func (*Client) Get

func (c *Client) Get(id string) (*Appointment, error)

Get an appointment with a specific id

func (*Client) Save

func (c *Client) Save(app *Appointment) error

Save persists the appointment in database

Jump to

Keyboard shortcuts

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