suite

package
v0.0.0-...-c34d2c7 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package suite interfaces with the legacy suite.staffjoy.com system

Index

Constants

View Source
const (

	// ServiceName is how this package identifies itself in logs
	ServiceName = "suite"
)

Variables

View Source
var SuiteConfigs = map[string]url.URL{
	"development": {
		Scheme: "http",
		Host:   "suite.local",
	},
	"staging": {
		Scheme: "https",
		Host:   "stage.staffjoy.com",
	},
	"production": {
		Scheme: "https",
		Host:   "suite.staffjoy.com",
	},
}

SuiteConfigs is a map of environment to the url for the suite

Functions

func AccountExists

func AccountExists(email string) (exists bool, err error)

AccountExists checks whether a suite user exists for the given email

Types

type OldData

type OldData struct {
	Data struct {
		PeopleClockedIn       int     `json:"people_clocked_in"`
		ScheduledPerWeek      PerWeek `json:"people_scheduled_per_week"`
		PeopleOnlineInLastDay int     `json:"people_online_in_last_day"`
		PeopleOnShifts        int     `json:"people_on_shifts"`
	} `json:"data"`
}

OldData is the struct referencing old data found on the Suite python API - it holds people scheduled/week, people on shifts, etc.

func GetOldData

func GetOldData() (*OldData, error)

GetOldData grabs v1 'suite' kpi data

type PerWeek

type PerWeek map[string]int

PerWeek holds a map of dates to worker scheduled count for said date

Jump to

Keyboard shortcuts

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