Documentation ¶
Index ¶
- func AddContentToCollection(coluuid string, contentID string, dir string, overwrite bool, db *gorm.DB, ...) error
- func ConstructDirectoryPath(dir string) (string, error)
- func Contains(collection *Collection, fullPath string, db *gorm.DB) bool
- type CidType
- type Collection
- type CollectionListResponse
- type CollectionRef
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddContentToCollection ¶ added in v0.3.8
func ConstructDirectoryPath ¶ added in v0.3.8
Types ¶
type Collection ¶
type Collection struct { ID uint `gorm:"primarykey" json:"-"` CreatedAt time.Time `json:"createdAt"` UUID string `gorm:"index" json:"uuid"` Name string `json:"name"` Description string `json:"description"` UserID uint `json:"userId"` CID string `json:"cid"` }
func GetCollection ¶
type CollectionListResponse ¶ added in v0.2.3
type CollectionListResponse struct { Name string `json:"name"` Type CidType `json:"type"` Size int64 `json:"size"` ContID uint64 `json:"contId"` Cid *util.DbCID `json:"cid,omitempty"` Dir string `json:"dir"` ColUuid string `json:"coluuid"` UpdatedAt time.Time `json:"updatedAt"` }
func GetDirectoryContents ¶ added in v0.2.3
func GetDirectoryContents(refs []util.ContentWithPath, queryDir, coluuid string) ([]*CollectionListResponse, error)
type CollectionRef ¶
type CollectionRef struct { ID uint `gorm:"primaryKey"` CreatedAt time.Time Collection uint `gorm:"index:,option:CONCURRENTLY;not null"` Content uint64 `gorm:"index:,option:CONCURRENTLY;not null"` Path *string `gorm:"null"` }
func GetContentsInPath ¶
func GetContentsInPath(coluuid string, path string, db *gorm.DB, u *util.User) ([]CollectionRef, error)
refs = collections.GetContentsInPath(path, s.DB, u)
Click to show internal directories.
Click to hide internal directories.