Better caldav support (#73)
This commit is contained in:
24
vendor/github.com/samedi/caldav-go/config.go
generated
vendored
Normal file
24
vendor/github.com/samedi/caldav-go/config.go
generated
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
package caldav
|
||||
|
||||
import (
|
||||
"github.com/samedi/caldav-go/data"
|
||||
"github.com/samedi/caldav-go/global"
|
||||
)
|
||||
|
||||
// SetupStorage sets the storage to be used by the server. The storage is where the resources data will be fetched from.
|
||||
// You can provide a custom storage for your own purposes (which might be looking for data in the cloud, DB, etc).
|
||||
// Just make sure it implements the `data.Storage` interface.
|
||||
func SetupStorage(stg data.Storage) {
|
||||
global.Storage = stg
|
||||
}
|
||||
|
||||
// SetupUser sets the current user which is currently interacting with the calendar.
|
||||
// It is used, for example, in some of the CALDAV responses, when rendering the path where to find the user's resources.
|
||||
func SetupUser(username string) {
|
||||
global.User = &data.CalUser{Name: username}
|
||||
}
|
||||
|
||||
// SetupSupportedComponents sets all components which are supported by this storage implementation.
|
||||
func SetupSupportedComponents(components []string) {
|
||||
global.SupportedComponents = components
|
||||
}
|
Reference in New Issue
Block a user