events

package
v0.0.0-...-db8ebed Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EventsCmd = &cobra.Command{
	Use:   "events",
	Short: "Manage your events",
	Long:  "Insert new events, delete event or check all your events by day or week",
}
View Source
var EventsDeleteCmd = &cobra.Command{
	Use:   "delete",
	Short: "Delete event by ID",
	Run: func(cmd *cobra.Command, args []string) {
		client := calendar.NewClient()
		err := client.GetAgendaID()
		if err != nil {
			log.Fatal(err)
		}

		client.DeleteEvent(eventId)
	},
}
View Source
var EventsInsertCmd = &cobra.Command{
	Use:   "insert",
	Short: "Insert new event",
	Run: func(cmd *cobra.Command, args []string) {
		client := calendar.NewClient()
		err := client.GetAgendaID()
		if err != nil {
			log.Fatal(err)
		}

		client.InsertEvent(calendar.InsertEventData{
			Title:         title,
			Description:   description,
			Location:      location,
			DateTimeStart: dateTimeStart,
			DateTimeEnd:   dateTimeEnd,
		})
	},
}
View Source
var EventsTodayCmd = &cobra.Command{
	Use:   "today",
	Short: "List all today events",
	Run: func(cmd *cobra.Command, args []string) {
		client := calendar.NewClient()
		err := client.GetAgendaID()
		if err != nil {
			log.Fatal(err)
		}

		client.ListTodayEvents()
	},
}
View Source
var EventsWeekCmd = &cobra.Command{
	Use:   "week",
	Short: "List all week events",
	Run: func(cmd *cobra.Command, args []string) {
		client := calendar.NewClient()
		err := client.GetAgendaID()
		if err != nil {
			log.Fatal(err)
		}

		client.ListWeekEvents()
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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