Skip to content

anujdecoder/ics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ics

ics file generator for golang

Example

event := &Event{
    Class:       Classification_PUBLIC,
    Summary:     "Meeting with John",
    Description: "About ICS",
    Status:      EventStatus_CONFIRMED,
    DtStart:     time.Date(2019, time.January, 1, 9, 0, 0, 0, time.UTC),
    DtEnd:       time.Date(2019, time.January, 1, 9, 30, 0, 0, time.UTC),
    RRule: []string{
        "FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,WE,FR",
        "FREQ=WEEKLY;INTERVAL=2;BYDAY=SU",
    },
    ExRule:       []string{},
    ExDate:       []time.Time{},
    Transparency: OPAQUE,
    Attendees: []Attendee{{
        CommonName:   "John Wick",
        EmailAddress: "[email protected]",
        Role:         REQUIRED,
        PartStatus:   AttendeeStatus_ACCEPTED,
        CuType:       INDIVIDUAL,
    }},
    Organizer: Attendee{
        CommonName:   "Anuj",
        EmailAddress: "[email protected]",
    },
}

gotIcs, err := event.Generate("com.calendar.my")
if err != nil {
	/* handle error */
}

Releases

No releases published

Packages

No packages published

Languages