Documentation
¶
Index ¶
- func Ancestors(ctx context.Context, orgID, parentID int64) ([]*share_model.ShareItem, error)
- func Append(ctx context.Context, orgID int64, uploadID string, start int64, r io.Reader, ...) (*share_model.ShareUpload, error)
- func BeginUpload(ctx context.Context, orgID, uploaderID, parentID int64, relativePath string, ...) (*share_model.ShareUpload, error)
- func Cleanup(ctx context.Context, now time.Time) error
- func Clear(ctx context.Context, orgID int64) error
- func Complete(ctx context.Context, orgID int64, uploadID string) (*share_model.ShareItem, error)
- func CreateText(ctx context.Context, orgID, uploaderID, parentID int64, name, body string, ...) (*share_model.ShareItem, error)
- func Delete(ctx context.Context, orgID, id int64) error
- func List(ctx context.Context, orgID, parentID int64) ([]*share_model.ShareItem, error)
- func Open(ctx context.Context, orgID, id int64) (*share_model.ShareItem, *os.File, error)
- func QuotaLimit(ctx context.Context, orgID int64) (int64, bool, error)
- func Root() string
- func SetPermanent(ctx context.Context, orgID, id int64, permanent bool) (*share_model.ShareItem, error)
- func SetQuota(ctx context.Context, orgID, maxBytes int64) error
- func UploadMissing(upload *share_model.ShareUpload) ([]orgshare.Span, error)
- type DiskReport
- type Usage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Append ¶
func Append(ctx context.Context, orgID int64, uploadID string, start int64, r io.Reader, length int64) (*share_model.ShareUpload, error)
Append writes one chunk. Chunks may arrive out of order.
func BeginUpload ¶
func BeginUpload(ctx context.Context, orgID, uploaderID, parentID int64, relativePath string, size int64, permanent, resume bool) (*share_model.ShareUpload, error)
BeginUpload creates parent folders and a resumable session. resume returns an existing session for the same object instead of reserving the quota twice.
func CreateText ¶
func CreateText(ctx context.Context, orgID, uploaderID, parentID int64, name, body string, permanent bool) (*share_model.ShareItem, error)
CreateText stores a shared note.
func QuotaLimit ¶
QuotaLimit is the per-organization cap, or the server default when no override is stored.
func Root ¶
func Root() string
Root is the organization share directory. It is not a Git or LFS path.
func SetPermanent ¶
func SetPermanent(ctx context.Context, orgID, id int64, permanent bool) (*share_model.ShareItem, error)
SetPermanent changes one object's deadline. permanent false applies the configured lifetime from now.
func UploadMissing ¶
func UploadMissing(upload *share_model.ShareUpload) ([]orgshare.Span, error)
UploadMissing returns byte ranges that still need to be sent.
Types ¶
type DiskReport ¶
type DiskReport struct {
Path string `json:"path"`
Capacity int64 `json:"capacity_bytes"`
Available int64 `json:"available_bytes"`
Reserve int64 `json:"reserve_bytes"`
Error string `json:"error,omitempty"`
Orgs []Usage `json:"orgs"`
}
DiskReport is the share volume plus each organization.
Click to show internal directories.
Click to hide internal directories.