types

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2018 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Main = State(iota)
	Enter
	Exit
	SetAccessTime
	SetTimezone
	Settings
	UserSetupAccessTime
	UserSetupClientSecret
	UserSetupTimezone
)

Enumeration of possibile states.

Variables

This section is empty.

Functions

This section is empty.

Types

type State

type State uint

State holds the information for the current state the user is in.

type User

type User struct {
	Id             int            `db:"id"`
	FirstName      string         `db:"first_name"`
	AccessStart    time.Time      `db:"access_start_time"`
	AccessEnd      time.Time      `db:"access_end_time"`
	WorkDay        time.Time      `db:"work_day"`
	ExtraWorkStart time.Time      `db:"extra_work_start"`
	SheetId        string         `db:"sheet_id"`
	ClientSecret   types.JSONText `db:"client_secret"`
	State          State          `db:"state"`
	TimeZone       string         `db:"time_zone"`
}

User holds the information needed to identify each user

func NewUser

func NewUser() *User

NewUser creates a new user with sensible defaults

Jump to

Keyboard shortcuts

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