graph

package
v0.0.0-...-68ed2e7 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AcceptEvent

func AcceptEvent(ctx context.Context, client *msgraphsdkgo.GraphServiceClient, eventID, calendarID string, owner OwnerType) error

func DeclineEvent

func DeclineEvent(ctx context.Context, client *msgraphsdkgo.GraphServiceClient, eventID, calendarID string, owner OwnerType) error

func DeleteEvent

func DeleteEvent(ctx context.Context, client *msgraphsdkgo.GraphServiceClient, eventID, calendarID string, owner OwnerType) error

func GetEvent

func GetEvent(ctx context.Context, client *msgraphsdkgo.GraphServiceClient, eventID, calendarID string, owner OwnerType) (models.Eventable, error)

func GetGroupNameFromID

func GetGroupNameFromID(ctx context.Context, client *msgraphsdkgo.GraphServiceClient, id string) (string, error)

func InviteUserToEvent

func InviteUserToEvent(ctx context.Context, client *msgraphsdkgo.GraphServiceClient, eventID, calendarID string, owner OwnerType, userEmail, message string) error

func ListCalendarView

func ListCalendarView(ctx context.Context, client *msgraphsdkgo.GraphServiceClient, id string, owner OwnerType, start, end *time.Time) ([]models.Eventable, error)

func SearchEvents

func SearchEvents(ctx context.Context, client *msgraphsdkgo.GraphServiceClient, query string, start, end time.Time) (map[CalendarInfo][]models.Eventable, error)

func TentativelyAcceptEvent

func TentativelyAcceptEvent(ctx context.Context, client *msgraphsdkgo.GraphServiceClient, eventID, calendarID string, owner OwnerType) error

Types

type CalendarInfo

type CalendarInfo struct {
	Calendar models.Calendarable
	ID       string
	Owner    OwnerType
}

func GetCalendar

func GetCalendar(ctx context.Context, client *msgraphsdkgo.GraphServiceClient, owner OwnerType, id string) (CalendarInfo, error)

func ListCalendars

func ListCalendars(ctx context.Context, client *msgraphsdkgo.GraphServiceClient) ([]CalendarInfo, error)

type CreateEventInfo

type CreateEventInfo struct {
	Attendees                   []string // slice of email addresses
	Subject, Location, Body, ID string
	Owner                       OwnerType
	IsOnline                    bool
	Start, End                  time.Time
}

type OwnerType

type OwnerType string
const (
	OwnerTypeUser  OwnerType = "user"
	OwnerTypeGroup OwnerType = "group"
)

Jump to

Keyboard shortcuts

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