Giter Club home page Giter Club logo

caldav-go's Introduction

caldav-go

A CalDAV (rfc4791) and iCalendar client for Go

Project Structure

This project contains several modules, all of which work together to to allow for calendaring using CalDAV:

  • An HTTP Client
  • A WebDAV Client and Mapping Layer
  • A CalDAV Client and Mapping Layer
  • An iCalendar (Un)Marshaler

Getting Started

To install the library into your project, add caldev-go into your GOPATH:

$ go get github.com/dolanor/caldav-go

Then, in your go application, include the caldav client and start making requests:

import "github.com/dolanor/caldav-go/caldav"

// create a reference to your CalDAV-compliant server
var server = caldav.NewServer("http://my-caldav-host.net:8008")

// create a CalDAV client to speak to the server
var client = caldav.NewClient(server, http.DefaultClient)

// start executing requests!
err := client.ValidateServer()

Testing

To test the client, you must first have access to (or run your own) caldav-compliant server. On the machine you wish to test on, ensure that the CALDAV_SERVER_URL environment variable is set to the host and path of the account you wish to run tests on. Afterwords, the standard go test command will run the tests for the whole library. For instance, if you have a server running locally on port 8008, you could run the tests in one command:

CALDAV_SERVER_URL='http://localhost:8008/calendars/users/admin/calendar/' go test ./...

HTTP Basic authentication can be baked into the URL as well:

CALDAV_SERVER_URL='http://admin:admin@localhost:8008/calendars/users/admin/calendar/' go test ./...

caldav-go's People

Contributors

johnboiles avatar dolanor avatar thegrumpylion avatar dmlambea avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.