api

package
v1.73.2-bclone Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 26, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package api provides types used by the Teldrive API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CategorySize

type CategorySize struct {
	Size int64 `json:"totalSize"`
}

type CopyFile

type CopyFile struct {
	Newname     string    `json:"newName"`
	Destination string    `json:"destination"`
	ModTime     time.Time `json:"updatedAt,omitempty"`
}

type CreateDirRequest

type CreateDirRequest struct {
	Path string `json:"path"`
}

type CreateFileRequest

type CreateFileRequest struct {
	Name      string     `json:"name"`
	Type      string     `json:"type"`
	Path      string     `json:"path,omitempty"`
	MimeType  string     `json:"mimeType,omitempty"`
	Size      int64      `json:"size,omitempty"`
	ChannelID int64      `json:"channelId,omitempty"`
	Encrypted bool       `json:"encrypted,omitempty"`
	Parts     []FilePart `json:"parts,omitempty"`
	ParentId  string     `json:"parentId,omitempty"`
	ModTime   time.Time  `json:"updatedAt,omitempty"`
}

type DirMove

type DirMove struct {
	Source      string `json:"source"`
	Destination string `json:"destination"`
}

type Error

type Error struct {
	Code    bool   `json:"code,omitempty"`
	Message string `json:"message,omitempty"`
}

func (Error) Error

func (e Error) Error() string

type Event

type Event struct {
	ID        string      `json:"id"`
	Type      string      `json:"type"`
	CreatedAt time.Time   `json:"createdAt"`
	Source    EventSource `json:"source"`
}

type EventSource

type EventSource struct {
	ID           string `json:"id"`
	Name         string `json:"name"`
	Type         string `json:"type"`
	ParentId     string `json:"parentId"`
	DestParentId string `json:"destParentId"`
}

type FileInfo

type FileInfo struct {
	Id       string    `json:"id"`
	Name     string    `json:"name"`
	MimeType string    `json:"mimeType"`
	Size     int64     `json:"size"`
	ParentId string    `json:"parentId"`
	Type     string    `json:"type"`
	ModTime  time.Time `json:"updatedAt"`
}

FileInfo represents a file when listing folder contents

type FilePart

type FilePart struct {
	ID   int    `json:"id"`
	Salt string `json:"salt,omitempty"`
}

type FileShare

type FileShare struct {
	ID        string     `json:"id,omitempty"`
	ExpiresAt *time.Time `json:"expiresAt,omitempty"`
}

type Meta

type Meta struct {
	Count       int `json:"count,omitempty"`
	TotalPages  int `json:"totalPages,omitempty"`
	CurrentPage int `json:"currentPage,omitempty"`
}

type MetadataRequestOptions

type MetadataRequestOptions struct {
	Page  int64
	Limit int64
}

MetadataRequestOptions represents all the options when listing folder contents

type MoveFileRequest

type MoveFileRequest struct {
	Destination     string   `json:"destinationParent,omitempty"`
	DestinationLeaf string   `json:"destinationName,omitempty"`
	Files           []string `json:"ids,omitempty"`
}

type Part

type Part struct {
	Id    int64
	Size  int64
	Name  string
	Start int64
	End   int64
}

type PartFile

type PartFile struct {
	Name       string `json:"name"`
	PartId     int    `json:"partId"`
	PartNo     int    `json:"partNo"`
	TotalParts int    `json:"totalParts"`
	Size       int64  `json:"size"`
	ChannelID  int64  `json:"channelId"`
	Encrypted  bool   `json:"encrypted"`
	Salt       string `json:"salt"`
}

type ReadMetadataResponse

type ReadMetadataResponse struct {
	Files []FileInfo `json:"items"`
	Meta  Meta       `json:"meta"`
}

type RemoveFileRequest

type RemoveFileRequest struct {
	Source string   `json:"source,omitempty"`
	Files  []string `json:"ids,omitempty"`
}

type Session

type Session struct {
	UserName string `json:"userName"`
	UserId   int64  `json:"userId"`
	Hash     string `json:"hash"`
}

type UpdateFileInformation

type UpdateFileInformation struct {
	Name      string     `json:"name,omitempty"`
	ModTime   *time.Time `json:"updatedAt,omitempty"`
	Parts     []FilePart `json:"parts,omitempty"`
	Size      int64      `json:"size,omitempty"`
	UploadId  string     `json:"uploadId,omitempty"`
	ChannelID int64      `json:"channelId,omitempty"`
	ParentID  string     `json:"parentId,omitempty"`
	Encrypted bool       `json:"encrypted,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL