gabby

package module
v0.6.6 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

README

gabby

Gabby is a helpful assistant for your organization's directory and calendar systems, that currently supports Office 365.

Installing

Gabby is written in Go. You can install Gabby by running: go install github.com/joefitzgerald/gabby/cmd/gabby@latest.

Usage

$ gabby
Usage: gabby <command>

Flags:
  -h, --help    Show context-sensitive help.

Commands:
  calendar impact
    Perform an impact analysis of events over a given time period.

  person photo <ids> ...
    Get User Photo for ID

  person name <ids> ...
    Get User Name for ID

Run "gabby <command> --help" for more information on a command.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PopulateProperties

func PopulateProperties(events []Event, me string)

func RangeForWeeks

func RangeForWeeks(n int) (time.Time, time.Time)

func RoundRect added in v0.6.5

func RoundRect(path draw2dimg.GraphicContext, x1, y1, x2, y2, arcWidth, arcHeight float64)

func WriteEvents

func WriteEvents(w io.Writer, events Events, weeks int, detail bool, pretty bool) error

Types

type API

type API interface {
	GetMe(ctx context.Context) (string, error)
	GetRecurringEvents(ctx context.Context) (Events, error)
	GetRecurringEventsWithInstancesForWeeks(ctx context.Context, weeks int) (Events, error)
	GetPhoto(ctx context.Context, id string) (*Photo, error)
	GetName(ctx context.Context, id string) (string, error)
}

type Attendee

type Attendee struct {
	Name  string
	Email string
}

type Event

type Event struct {
	ID             string
	Name           string
	Organizer      string
	SeriesMasterID string
	RecurrenceType string
	StartDate      time.Time
	EndDate        time.Time
	Start          time.Time
	End            time.Time
	Interval       int
	Duration       int
	Categories     []string
	Instances      []Event
	Attendees      []Attendee
	Properties     []string
}

func FilterEvents

func FilterEvents(events []Event, must []string, mustNot []string) []Event

func (*Event) Impact

func (e *Event) Impact(start time.Time, weeks int) (result []int, total int)

func (*Event) SetProperty

func (e *Event) SetProperty(p string)

type Events

type Events []Event

func (Events) SortByImpact

func (e Events) SortByImpact(start time.Time, weeks int)

type Person

type Person struct {
	FirstName   string
	LastName    string
	Email       string
	StayInTouch bool
	Location    string
	Priority    int
	MinInterval int
	MaxInterval int
	IdealDay    string
	IdealTime   string
}

type Photo

type Photo struct {
	Data               []byte
	ID                 string
	SuggestedExtension string
}

func (*Photo) CropCircle added in v0.1.0

func (p *Photo) CropCircle(width int) *Photo

func (*Photo) CropRoundRect added in v0.6.5

func (p *Photo) CropRoundRect(width int, arc float64) *Photo

func (*Photo) SuggestedFilename

func (p *Photo) SuggestedFilename() string

Directories

Path Synopsis
cmd
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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