Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Account ¶
type Account struct {
// Name is the human-readable name of the account.
Name string `json:"name"`
// Calendars is the list of calendars to pull from the account.
Calendars []Calendar `json:"calendars"`
// Credentials is credentials JSON file downloaded from Google.
Credentials map[string]interface{} `json:"credentials"`
}
Account configures a google account.
func (Account) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Account) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*Account) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Account) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type Calendar ¶
type Calendar struct {
// Name is the name of the calendar in Google.
// Likely an email address.
Name string `json:"name"`
// Path is the path to org file to store calendar data.
Path string `json:"path"`
}
Calendar configures a google calendar.
func (Calendar) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Calendar) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*Calendar) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Calendar) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type Context ¶
type Context interface {
libcontext.Context
// FS returns the underlying filesystem to read/write from.
FS() afero.Fs
// Config returns the entire configuration as a struct.
Config() Global
// Accounts are all of the calendar accounts to sync.
Accounts() []Account
// CalendarDir is the path to the base directory to store calendars in.
CalendarDir() string
// TokenDir is the path to store account tokens
TokenDir() string
}
Context represents all the values stored in the configuration.
type Global ¶
type Global struct {
// Accounts are all of the calendar accounts to sync.
Accounts []Account `yaml:"accounts"`
// CalendarDir is the path to the base directory to store calendars in.
CalendarDir string `mapstructure:"calendar_dir" yaml:"calendarDir"`
// TokenDir is the path to store account tokens
TokenDir string `mapstructure:"token_dir"`
}
Global is the configuration for the entire daemon.
func (Global) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Global) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*Global) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Global) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface