Documentation ¶
Index ¶
- Variables
- type Capabilities
- type CapabilitiesChecksums
- type CapabilitiesCore
- type CapabilitiesData
- type CapabilitiesDav
- type CapabilitiesFiles
- type CapabilitiesFilesSharing
- type CapabilitiesFilesSharingFederation
- type CapabilitiesFilesSharingPublic
- type CapabilitiesFilesSharingPublicExpireDate
- type CapabilitiesFilesSharingPublicPassword
- type CapabilitiesFilesSharingPublicPasswordEnforcedFor
- type CapabilitiesFilesSharingUser
- type CapabilitiesFilesSharingUserEnumeration
- type CapabilitiesFilesTusSupport
- type CapabilitiesNotifications
- type ConfigData
- type Groups
- type Meta
- type Quota
- type SigningKey
- type Status
- type User
- type Users
- type Version
Constants ¶
This section is empty.
Variables ¶
var MetaBadRequest = Meta{Status: "error", StatusCode: 400, Message: "Bad Request"}
MetaBadRequest is used for unknown errors
var MetaFailure = Meta{Status: "", StatusCode: 101, Message: "Failure"}
MetaFailure is a failure response with code 101
var MetaForbidden = Meta{Status: "", StatusCode: 104, Message: "Forbidden"}
MetaForbidden is an error response with code 104
var MetaInvalidInput = Meta{Status: "", StatusCode: 102, Message: "Invalid Input"}
MetaInvalidInput is an error response with code 102
var MetaNotFound = Meta{Status: "error", StatusCode: 998, Message: "Not Found"}
MetaNotFound is returned when trying to access not existing resources
var MetaOK = Meta{Status: "ok", StatusCode: 100, Message: "OK"}
MetaOK is the default ok response with code 100
var MetaServerError = Meta{Status: "error", StatusCode: 996, Message: "Server Error"}
MetaServerError is returned on server errors
MetaUnauthorized is returned on unauthorized requests
var MetaUnknownError = Meta{Status: "error", StatusCode: 999, Message: "Unknown Error"}
MetaUnknownError is used for unknown errors
Functions ¶
This section is empty.
Types ¶
type Capabilities ¶
type Capabilities struct { Core *CapabilitiesCore `json:"core" xml:"core"` Checksums *CapabilitiesChecksums `json:"checksums" xml:"checksums"` Files *CapabilitiesFiles `json:"files" xml:"files" mapstructure:"files"` Dav *CapabilitiesDav `json:"dav" xml:"dav"` FilesSharing *CapabilitiesFilesSharing `json:"files_sharing" xml:"files_sharing" mapstructure:"files_sharing"` Notifications *CapabilitiesNotifications `json:"notifications" xml:"notifications"` }
Capabilities groups several capability aspects
type CapabilitiesChecksums ¶
type CapabilitiesChecksums struct { SupportedTypes []string `json:"supportedTypes" xml:"supportedTypes>element" mapstructure:"supported_types"` PreferredUploadType string `json:"preferredUploadType" xml:"preferredUploadType" mapstructure:"preferred_upload_type"` }
CapabilitiesChecksums holds available hashes
type CapabilitiesCore ¶
type CapabilitiesCore struct { PollInterval int `json:"pollinterval" xml:"pollinterval" mapstructure:"poll_interval"` WebdavRoot string `json:"webdav-root,omitempty" xml:"webdav-root,omitempty" mapstructure:"webdav_root"` Status *Status `json:"status" xml:"status" mapstructure:"status"` SupportURLSigning ocsBool `json:"support-url-signing,omitempty" xml:"support-url-signing,omitempty" mapstructure:"support-url-signing"` }
CapabilitiesCore holds webdav config
type CapabilitiesData ¶
type CapabilitiesData struct { Capabilities *Capabilities `json:"capabilities" xml:"capabilities"` Version *Version `json:"version" xml:"version"` }
CapabilitiesData TODO document
type CapabilitiesDav ¶
type CapabilitiesDav struct { Chunking string `json:"chunking" xml:"chunking"` Trashbin string `json:"trashbin" xml:"trashbin"` Reports []string `json:"reports" xml:"reports>element" mapstructure:"reports"` ChunkingParallelUploadDisabled bool `json:"chunkingParallelUploadDisabled" xml:"chunkingParallelUploadDisabled"` }
CapabilitiesDav holds dav endpoint config
type CapabilitiesFiles ¶
type CapabilitiesFiles struct { PrivateLinks ocsBool `json:"privateLinks" xml:"privateLinks" mapstructure:"private_links"` BigFileChunking ocsBool `json:"bigfilechunking" xml:"bigfilechunking"` Undelete ocsBool `json:"undelete" xml:"undelete"` Versioning ocsBool `json:"versioning" xml:"versioning"` BlacklistedFiles []string `json:"blacklisted_files" xml:"blacklisted_files>element" mapstructure:"blacklisted_files"` TusSupport *CapabilitiesFilesTusSupport `json:"tus_support" xml:"tus_support" mapstructure:"tus_support"` }
CapabilitiesFiles TODO this is storage specific, not global. What effect do these options have on the clients?
type CapabilitiesFilesSharing ¶
type CapabilitiesFilesSharing struct { APIEnabled ocsBool `json:"api_enabled" xml:"api_enabled" mapstructure:"api_enabled"` Resharing ocsBool `json:"resharing" xml:"resharing"` GroupSharing ocsBool `json:"group_sharing" xml:"group_sharing" mapstructure:"group_sharing"` SearchMinLength int `json:"search_min_length" xml:"search_min_length" mapstructure:"search_min_length"` DefaultPermissions int `json:"default_permissions" xml:"default_permissions" mapstructure:"default_permissions"` UserEnumeration *CapabilitiesFilesSharingUserEnumeration `json:"user_enumeration" xml:"user_enumeration" mapstructure:"user_enumeration"` Federation *CapabilitiesFilesSharingFederation `json:"federation" xml:"federation"` Public *CapabilitiesFilesSharingPublic `json:"public" xml:"public"` User *CapabilitiesFilesSharingUser `json:"user" xml:"user"` }
CapabilitiesFilesSharing TODO document
type CapabilitiesFilesSharingFederation ¶
type CapabilitiesFilesSharingFederation struct { Outgoing ocsBool `json:"outgoing" xml:"outgoing"` Incoming ocsBool `json:"incoming" xml:"incoming"` }
CapabilitiesFilesSharingFederation holds outgoing and incoming flags
type CapabilitiesFilesSharingPublic ¶
type CapabilitiesFilesSharingPublic struct { Enabled ocsBool `json:"enabled" xml:"enabled"` SendMail ocsBool `json:"send_mail" xml:"send_mail" mapstructure:"send_mail"` Upload ocsBool `json:"upload" xml:"upload"` Multiple ocsBool `json:"multiple" xml:"multiple"` SupportsUploadOnly ocsBool `json:"supports_upload_only" xml:"supports_upload_only" mapstructure:"supports_upload_only"` Password *CapabilitiesFilesSharingPublicPassword `json:"password" xml:"password"` ExpireDate *CapabilitiesFilesSharingPublicExpireDate `json:"expire_date" xml:"expire_date" mapstructure:"expire_date"` }
CapabilitiesFilesSharingPublic TODO document
type CapabilitiesFilesSharingPublicExpireDate ¶
type CapabilitiesFilesSharingPublicExpireDate struct {
Enabled ocsBool `json:"enabled" xml:"enabled"`
}
CapabilitiesFilesSharingPublicExpireDate TODO document
type CapabilitiesFilesSharingPublicPassword ¶
type CapabilitiesFilesSharingPublicPassword struct { EnforcedFor *CapabilitiesFilesSharingPublicPasswordEnforcedFor `json:"enforced_for" xml:"enforced_for" mapstructure:"enforced_for"` Enforced ocsBool `json:"enforced" xml:"enforced"` }
CapabilitiesFilesSharingPublicPassword TODO document
type CapabilitiesFilesSharingPublicPasswordEnforcedFor ¶
type CapabilitiesFilesSharingPublicPasswordEnforcedFor struct { ReadOnly ocsBool `json:"read_only" xml:"read_only,omitempty" mapstructure:"read_only"` ReadWrite ocsBool `json:"read_write" xml:"read_write,omitempty" mapstructure:"read_write"` UploadOnly ocsBool `json:"upload_only" xml:"upload_only,omitempty" mapstructure:"upload_only"` }
CapabilitiesFilesSharingPublicPasswordEnforcedFor TODO document
type CapabilitiesFilesSharingUser ¶
type CapabilitiesFilesSharingUser struct {
SendMail ocsBool `json:"send_mail" xml:"send_mail" mapstructure:"send_mail"`
}
CapabilitiesFilesSharingUser TODO document
type CapabilitiesFilesSharingUserEnumeration ¶
type CapabilitiesFilesSharingUserEnumeration struct { Enabled ocsBool `json:"enabled" xml:"enabled"` GroupMembersOnly ocsBool `json:"group_members_only" xml:"group_members_only" mapstructure:"group_members_only"` }
CapabilitiesFilesSharingUserEnumeration TODO document
type CapabilitiesFilesTusSupport ¶
type CapabilitiesFilesTusSupport struct { Version string `json:"version" xml:"version"` Resumable string `json:"resumable" xml:"resumable"` Extension string `json:"extension" xml:"extension"` MaxChunkSize int `json:"max_chunk_size" xml:"max_chunk_size" mapstructure:"max_chunk_size"` HTTPMethodOverride string `json:"http_method_override" xml:"http_method_override" mapstructure:"http_method_override"` }
CapabilitiesFilesTusSupport TODO this must be a summary of storages
type CapabilitiesNotifications ¶
type CapabilitiesNotifications struct {
Endpoints []string `json:"ocs-endpoints" xml:"ocs-endpoints>element" mapstructure:"endpoints"`
}
CapabilitiesNotifications holds a list of notification endpoints
type ConfigData ¶
type ConfigData struct { Version string `json:"version" xml:"version"` Website string `json:"website" xml:"website"` Host string `json:"host" xml:"host"` Contact string `json:"contact" xml:"contact"` SSL string `json:"ssl" xml:"ssl"` }
ConfigData holds basic config
type Groups ¶
type Groups struct {
Groups []string `json:"groups" xml:"groups>element"`
}
Groups holds group ids for the groups listing
type Meta ¶
type Meta struct { Status string `json:"status" xml:"status"` StatusCode int `json:"statuscode" xml:"statuscode"` Message string `json:"message" xml:"message"` TotalItems string `json:"totalitems,omitempty" xml:"totalitems,omitempty"` ItemsPerPage string `json:"itemsperpage,omitempty" xml:"itemsperpage,omitempty"` }
Meta holds response metadata
type Quota ¶
type Quota struct { Free int64 `json:"free" xml:"free"` Used int64 `json:"used" xml:"used"` Total int64 `json:"total" xml:"total"` Relative float32 `json:"relative" xml:"relative"` Definition string `json:"definition" xml:"definition"` }
Quota holds quota information
type SigningKey ¶
type SigningKey struct { User string `json:"user" xml:"user"` SigningKey string `json:"signing-key" xml:"signing-key"` }
SigningKey holds the Payload for a GetSigningKey response
type Status ¶
type Status struct { Installed ocsBool `json:"installed" xml:"installed"` Maintenance ocsBool `json:"maintenance" xml:"maintenance"` NeedsDBUpgrade ocsBool `json:"needsDbUpgrade" xml:"needsDbUpgrade"` Version string `json:"version" xml:"version"` VersionString string `json:"versionstring" xml:"versionstring"` Edition string `json:"edition" xml:"edition"` ProductName string `json:"productname" xml:"productname"` Hostname string `json:"hostname,omitempty" xml:"hostname,omitempty"` }
Status holds basic status information
type User ¶
type User struct { Enabled string `json:"enabled" xml:"enabled"` UserID string `json:"id" xml:"id"` // UserID is mapped to the preferred_name attribute in accounts DisplayName string `json:"display-name" xml:"display-name"` LegacyDisplayName string `json:"displayname" xml:"displayname"` Email string `json:"email" xml:"email"` Quota *Quota `json:"quota" xml:"quota"` UIDNumber int64 `json:"uidnumber" xml:"uidnumber"` GIDNumber int64 `json:"gidnumber" xml:"gidnumber"` }
User holds the payload for a GetUser response