Documentation
¶
Index ¶
- Constants
- func Archive(nodeid string) (err error)
- func ArchiveProject(token string, nodeid, projectid, name, targetdir string) (err error)
- func CopyCollection(nodeid string, dstParentCollection Collection) error
- func CopyWork(nodeid string, dstParentCollection Collection) error
- func DeleteCollection(nodeid string) error
- func DeleteWork(nodeid string) error
- func GetToken(projectid, rootid string) (token string, err error)
- func Login(clientid, pubkey, token, email, phone, pwd string) (access string, err error)
- func LoginParams() (clientid, token, publickey string, err error)
- func MoveCollection(nodeid, dstParentNodeid string) error
- func MoveWork(nodeid, dstParentNodeid string) error
- func RenameCollection(nodeid string, title string) error
- func RenameWork(nodeid string, title string) error
- func TwoFactor(clientid, token, verify string) error
- type ArchiveInfo
- type Collection
- type MeConfig
- type OAEP
- type Org
- type Project
- type Role
- type UploadInfo
- type Work
Constants ¶
View Source
const ( HASH_SHA1 = "sha1" HASH_SHA256 = "sha256" HASH_MD5 = "md5" )
View Source
const ( OBJECT_COLLECTION = "collection" OBJECT_WORK = "work" )
Variables ¶
This section is empty.
Functions ¶
func ArchiveProject ¶
func CopyCollection ¶
func CopyCollection(nodeid string, dstParentCollection Collection) error
func CopyWork ¶
func CopyWork(nodeid string, dstParentCollection Collection) error
func DeleteCollection ¶
func DeleteWork ¶
func LoginParams ¶
func MoveCollection ¶
func RenameCollection ¶
func RenameWork ¶
Types ¶
type ArchiveInfo ¶
type ArchiveInfo struct { ObjectType string `json:"boundToObjectType"` Created string `json:"created"` Title string `json:"subTitle"` ProjectId string `json:"_projectId"` NodeId string `json:"_boundToObjectId"` }
func GetArchives ¶
func GetArchives(projectid, objectType string) (list []ArchiveInfo, err error)
type Collection ¶
type Collection struct { Nodeid string `json:"_id"` Pinyin string `json:"pinyin"` Title string `json:"title"` ParentId string `json:"_parentId"` ProjectId string `json:"_projectId"` ObjectType string `json:"objectType"` CollectionCount int `json:"collectionCount"` WorkCount int `json:"workCount"` Updated string `json:"updated"` Created string `json:"created"` }
func Collections ¶
func Collections(nodeid, projectid string) (list []Collection, err error)
func CreateCollection ¶
func CreateCollection(nodeid, projectid, name string) (c Collection, err error)
type MeConfig ¶
type Org ¶
type Project ¶
type Role ¶
type Role struct { RoleId string `json:"_id"` OrganizationId string `json:"_organizationId"` Level int `json:"level"` Permissions []string `json:"-"` }
===================================== user =====================================
type UploadInfo ¶
type UploadInfo struct { FileKey string `json:"fileKey"` FileName string `json:"fileName"` FileType string `json:"fileType"` FileSize int `json:"fileSize"` FileCategory string `json:"fileCategory"` Source string `json:"source"` DownloadUrl string `json:"downloadUrl"` }
===================================== project =====================================
func UploadProjectFile ¶
func UploadProjectFile(token, path string) (upload UploadInfo, err error)
func UploadProjectFileChunk ¶
func UploadProjectFileChunk(token, path string) (upload UploadInfo, err error)
type Work ¶
type Work struct { Nodeid string `json:"_id"` FileKey string `json:"fileKey"` FileName string `json:"fileName"` FileSize int `json:"fileSize"` DownloadUrl string `json:"downloadUrl"` ProjectId string `json:"_projectId"` ParentId string `json:"_parentId"` ObjectType string `json:"objectType"` Updated string `json:"updated"` Created string `json:"created"` }
func CreateWork ¶
func CreateWork(nodeid string, upload UploadInfo) (w Work, err error)
Click to show internal directories.
Click to hide internal directories.