gonextcloud/responses.go

185 lines
3.6 KiB
Go
Raw Normal View History

package gonextcloud
2018-07-30 08:18:54 +00:00
//Meta
2018-07-24 18:26:12 +00:00
type Meta struct {
Status string `json:"status"`
Statuscode int `json:"statuscode"`
Message string `json:"message"`
Totalitems string `json:"totalitems"`
Itemsperpage string `json:"itemsperpage"`
}
2018-07-30 08:18:54 +00:00
//ErrorResponse
type ErrorResponse struct {
Ocs struct {
2018-07-24 18:26:12 +00:00
Meta Meta `json:"meta"`
Data []interface{} `json:"data"`
} `json:"ocs"`
}
2018-07-30 08:18:54 +00:00
//UserListResponse
type UserListResponse struct {
Ocs struct {
2018-07-24 18:26:12 +00:00
Meta Meta `json:"meta"`
Data struct {
Users []string `json:"users"`
} `json:"data"`
} `json:"ocs"`
}
type UserListDetailsResponse struct {
Ocs struct {
Meta Meta `json:"meta"`
Data struct {
Users map[string]UserDetails `json:"users"`
} `json:"data"`
} `json:"ocs"`
}
2018-07-30 08:18:54 +00:00
//UserResponse
type UserResponse struct {
Ocs struct {
Meta Meta `json:"meta"`
Data UserDetails `json:"data"`
} `json:"ocs"`
}
2018-07-30 08:18:54 +00:00
//BaseResponse
2018-07-09 10:53:53 +00:00
type BaseResponse struct {
2018-07-05 14:15:51 +00:00
Ocs struct {
2018-07-24 18:26:12 +00:00
Meta Meta `json:"meta"`
2018-07-05 14:15:51 +00:00
Data []string `json:"data"`
} `json:"ocs"`
}
2018-07-30 08:18:54 +00:00
//GroupListResponse
type GroupListResponse struct {
Ocs struct {
2018-07-24 18:26:12 +00:00
Meta Meta `json:"meta"`
Data struct {
Groups []string `json:"groups"`
} `json:"data"`
} `json:"ocs"`
}
//GroupListDetailsResponse
type GroupListDetailsResponse struct {
Ocs struct {
Meta Meta `json:"meta"`
Data struct {
Groups []Group `json:"groups"`
} `json:"data"`
} `json:"ocs"`
}
2018-07-30 08:18:54 +00:00
//AppListResponse
2018-07-24 18:26:12 +00:00
type AppListResponse struct {
Ocs struct {
Meta Meta `json:"meta"`
Data struct {
Apps []string `json:"apps"`
} `json:"data"`
} `json:"ocs"`
}
2018-07-30 08:18:54 +00:00
//AppResponse
2018-07-24 18:26:12 +00:00
type AppResponse struct {
Ocs struct {
Meta Meta `json:"meta"`
Data App `json:"data"`
} `json:"ocs"`
}
type AppConfigResponse struct {
Ocs struct {
Meta Meta `json:"meta"`
Data struct {
Data []string `json:"data"`
} `json:"data"`
} `json:"ocs"`
}
type AppcConfigValueResponse struct {
Ocs struct {
Meta Meta `json:"meta"`
Data struct {
Data string `json:"data"`
} `json:"data"`
} `json:"ocs"`
}
2018-07-30 08:18:54 +00:00
//CapabilitiesResponse
type CapabilitiesResponse struct {
Ocs struct {
2018-07-24 18:26:12 +00:00
Meta Meta `json:"meta"`
Data struct {
Version Version `json:"version"`
Capabilities Capabilities `json:"capabilities"`
} `json:"data"`
} `json:"ocs"`
}
2018-07-31 11:24:20 +00:00
type Version struct {
Major int `json:"major"`
Minor int `json:"minor"`
Micro int `json:"micro"`
String string `json:"string"`
Edition string `json:"edition"`
}
2018-07-31 11:24:20 +00:00
type MonitoringResponse struct {
Ocs struct {
2018-08-08 14:04:06 +00:00
Meta Meta `json:"meta"`
2018-07-31 11:24:20 +00:00
Data Monitoring `json:"data"`
} `json:"ocs"`
}
2018-08-08 14:04:06 +00:00
type SharesListResponse struct {
Ocs struct {
Meta Meta `json:"meta"`
Data []Share `json:"data"`
} `json:"ocs"`
}
type SharesResponse struct {
Ocs struct {
Meta Meta `json:"meta"`
Data Share `json:"data"`
} `json:"ocs"`
}
type GroupFoldersListResponse struct {
Ocs struct {
Meta Meta `json:"meta"`
Data map[string]GroupFolderBadFormatIDAndGroups `json:"data"`
} `json:"ocs"`
}
type GroupFoldersCreateResponse struct {
Ocs struct {
Meta Meta `json:"meta"`
Data GroupFolderBadFormatIDAndGroups `json:"data"`
} `json:"ocs"`
}
type GroupFoldersResponse struct {
Ocs struct {
Meta Meta `json:"meta"`
Data GroupFolderBadFormatGroups `json:"data"`
} `json:"ocs"`
}
2018-10-17 09:15:27 +00:00
type NotificationsListResponse struct {
Ocs struct {
Meta Meta `json:"meta"`
Data []Notification `json:"data"`
} `json:"ocs"`
}
type NotificationResponse struct {
Ocs struct {
Meta Meta `json:"meta"`
Data Notification `json:"data"`
} `json:"ocs"`
}