Documentation
¶
Index ¶
- Variables
- func Run(ctx context.Context, args []string) error
- type CLIOptions
- type CalendarService
- type CreateOption
- type DeleteOption
- type Event
- type Koyomi
- func (k *Koyomi) Create(ctx context.Context, opt *CreateOption) error
- func (k *Koyomi) Delete(ctx context.Context, opt *DeleteOption) error
- func (k *Koyomi) Dispatch(ctx context.Context, command string, opts *CLIOptions) error
- func (k *Koyomi) List(ctx context.Context, opt *ListOption) error
- func (k *Koyomi) Update(ctx context.Context, opt *UpdateOption) error
- type ListOption
- type UpdateOption
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Version string
)
Functions ¶
Types ¶
type CLIOptions ¶
type CLIOptions struct {
List *ListOption `cmd:"" help:"List events"`
Create *CreateOption `cmd:"" help:"Creates an event"`
Update *UpdateOption `cmd:"" help:"Updates an event"`
Delete *DeleteOption `cmd:"" help:"Deletes an event"`
CredentialPath string `name:"credential" help:"JSON credential file for access to calendar" default:"credential.json"`
LogLevel string `name:"loglevel" help:"Logging level: DEBUG, INFO, WARN, ERROR" enum:"DEBUG,INFO,WARN,ERROR" default:"INFO"`
Version kong.VersionFlag `short:"v" help:"Show Version"`
}
type CalendarService ¶
type CalendarService interface {
List(ctx context.Context, calendarID string, startTime, endTime time.Time) ([]*Event, error)
Insert(ctx context.Context, calendarID string, event *Event) (*Event, error)
Update(ctx context.Context, calendarID string, event *Event) (*Event, error)
Delete(ctx context.Context, calendarID, eventID string) error
}
type CreateOption ¶
type CreateOption struct {
CalendarID string `required:"" help:"Calendar identifier"`
Summary string `help:"Title of the event"`
Description string `help:"Descriptuon of the event"`
StartTime string `help:"The start time of the event" short:"s"`
EndTime string `help:"The end time of the event" short:"e"`
}
type DeleteOption ¶
type Koyomi ¶
type Koyomi struct {
// contains filtered or unexported fields
}
type ListOption ¶
type UpdateOption ¶
type UpdateOption struct {
CalendarID string `required:"" help:"Calendar identifier"`
ID string `required:"" help:"Identifier of the event"`
Summary string `help:"Title of the event"`
Description string `help:"Description of the event"`
StartTime string `help:"The start time of the event" short:"s"`
EndTime string `help:"The end time of the event" short:"e"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.