Documentation ¶
Index ¶
- type AddEventParams
- type CalendarClient
- type GoogleCalendarClient
- func (gcc *GoogleCalendarClient) AddEvent(outRequest *models.OutRequest, buildSourcePath string) models.OutResponse
- func (gcc *GoogleCalendarClient) GetEvent(inRequest *models.InRequest, targetDirectory string) (models.InResponse, *os.File, error)
- func (gcc *GoogleCalendarClient) ListEvents(requestedVersion models.Version) []models.Version
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddEventParams ¶
type AddEventParams struct { Description string `json:"description,omitempty"` EndTime string `json:"end_time"` StartTime string `json:"start_time"` Summary string `json:"summary,omitempty"` TimeZone string `json:"time_zone,omitempty"` }
AddEventParams holds data passed in via `params` from the Conncourse task. StartTime and EndTime must be an RFC3339 formatted time string. For example, "2016-10-15T08:00:00+01:00"
type CalendarClient ¶
type CalendarClient interface { // ListEvents takes a resource version and returns a list of resource versions. // It is assumed each calendar provider will provide some form of unique // identifier for each event. This identifier is used as the Concourse // resource version. // // If the requestedVersion is an event which is currently happening then // ListEvents should return a list containing just that version. Otherwise, // it should return a list containing all current versions. ListEvents(requestedVersion models.Version) []models.Version // GetEvent takes the `in` request data and a directory path under which // a file will be created. It uses the calendar provider's API to get // the event details necessary to provide a response on standard output // and populate a file. The file will then be placed in the Concourse // task's file system. GetEvent(*models.InRequest, string) (models.InResponse, *os.File, error) // AddEvent takes an `out` request and the path to the build sources and // creates a calendar event. The calendar client must make its own data // structures to hold the data passed in via `params`. It must os.Exit // if any error condition is encountered. It should return an OutResponse, // which is a single resource version (identified by an ID) representing // the created event. AddEvent(*models.OutRequest, string) models.OutResponse }
CalendarClient is an interface that must be satisfied in order to implement other calendar providers.
func NewCalendarClient ¶
func NewCalendarClient(source models.Source, args ...string) CalendarClient
func NewGoogleCalendarClient ¶
func NewGoogleCalendarClient(source models.Source, args ...string) CalendarClient
type GoogleCalendarClient ¶
func (*GoogleCalendarClient) AddEvent ¶
func (gcc *GoogleCalendarClient) AddEvent(outRequest *models.OutRequest, buildSourcePath string) models.OutResponse
func (*GoogleCalendarClient) GetEvent ¶
func (gcc *GoogleCalendarClient) GetEvent(inRequest *models.InRequest, targetDirectory string) (models.InResponse, *os.File, error)
func (*GoogleCalendarClient) ListEvents ¶
func (gcc *GoogleCalendarClient) ListEvents(requestedVersion models.Version) []models.Version
Click to show internal directories.
Click to hide internal directories.