box

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2025 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadBoxFolder

func DownloadBoxFolder(client *http.Client, boxFolderPath string) error

func DownloadBoxItem added in v1.0.5

func DownloadBoxItem(client *http.Client, boxPath string, localPath string) (string, error)

func GetBoxClient

func GetBoxClient(credentialsFile string) (*http.Client, error)

func HumanReadableBoxSize

func HumanReadableBoxSize(size int64) string

func ListBoxContents

func ListBoxContents(client *http.Client, path string) ([]BoxItemDisplay, []BoxItemDisplay, error)

func ResolvePath

func ResolvePath(path string) (string, error)

func SyncBoxDirectory added in v1.0.5

func SyncBoxDirectory(client *http.Client, localDir string, remotePath string) error

func UploadBoxFolder

func UploadBoxFolder(client *http.Client, localPath string, boxFolderPath string) error

func UploadBoxItem added in v1.0.5

func UploadBoxItem(client *http.Client, localPath string, boxFolderPath string) error

Types

type BoxCredentials

type BoxCredentials struct {
	ClientID     string `json:"client_id"`
	ClientSecret string `json:"client_secret"`
}

type BoxError

type BoxError struct {
	Type    string `json:"type"`
	Status  int    `json:"status"`
	Code    string `json:"code"`
	Message string `json:"message"`
}

type BoxFolderItems

type BoxFolderItems struct {
	TotalCount int       `json:"total_count"`
	Entries    []BoxItem `json:"entries"`
}

type BoxItem

type BoxItem struct {
	Type   string `json:"type"`
	ID     string `json:"id"`
	Name   string `json:"name"`
	Size   *int64 `json:"size"`
	Parent *struct {
		ID string `json:"id"`
	} `json:"parent"`
	ModifiedAt *string `json:"modified_at"`
}

type BoxItemDisplay

type BoxItemDisplay struct {
	Name         string
	ModifiedTime string
	Size         int64
	Type         string
}

type FileInfo added in v1.0.5

type FileInfo struct {
	Path string
	Hash string
	ID   string
}

type FileTree added in v1.0.5

type FileTree struct {
	Files map[string]FileInfo
	Dirs  map[string]*FileTree
}

Jump to

Keyboard shortcuts

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