volume

package
v0.0.0-...-c1cd75e Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2026 License: AGPL-3.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const PresignedGetURLExpiration = 3600 // 1 hour

Variables

This section is empty.

Functions

func CalculateDirSize

func CalculateDirSize(path string) (uint64, error)

func GetVolumePaths

func GetVolumePaths(workspaceName string, volumeExternalId string, volumePath string) (string, string, error)

GetVolumePaths returns the absolute parent directory and absolute volumePath. Because volumePath can contain 1 or more of "..", we will return an error if volumePath tries to go above the rootVolumePath. The error should be used to indicate someone accessing a directory above a Volume's directory, which may be a security issue depending on the context.

func JoinVolumePath

func JoinVolumePath(workspaceName, volumeExternalId string, subPaths ...string) string

Types

type CopyPathContent

type CopyPathContent struct {
	Path    string
	Content []byte
}

type FileInfo

type FileInfo struct {
	Path    string `json:"path"`
	Size    uint64 `json:"size"`
	ModTime int64  `json:"mod_time"`
	IsDir   bool   `json:"is_dir"`
}

type GlobalVolumeService

type GlobalVolumeService struct {
	pb.UnimplementedVolumeServiceServer
	// contains filtered or unexported fields
}

func (*GlobalVolumeService) AbortMultipartUpload

func (*GlobalVolumeService) CompleteMultipartUpload

func (*GlobalVolumeService) CopyPathStream

func (*GlobalVolumeService) CreateMultipartUpload

func (*GlobalVolumeService) CreatePresignedURL

func (*GlobalVolumeService) DeletePath

func (*GlobalVolumeService) DeleteVolume

func (*GlobalVolumeService) GenerateWorkspaceVolumePathDownloadToken

func (gvs *GlobalVolumeService) GenerateWorkspaceVolumePathDownloadToken(workspaceId string, volumePath string) (string, error)

func (*GlobalVolumeService) GetFileServiceInfo

func (*GlobalVolumeService) GetOrCreateVolume

func (*GlobalVolumeService) ListPath

func (*GlobalVolumeService) ListVolumes

func (*GlobalVolumeService) MovePath

func (*GlobalVolumeService) StatPath

func (*GlobalVolumeService) ValidateWorkspaceVolumePathDownloadToken

func (gvs *GlobalVolumeService) ValidateWorkspaceVolumePathDownloadToken(workspaceId string, volumePath string, token string) error

type VolumePathTokenData

type VolumePathTokenData struct {
	WorkspaceId string `redis:"workspace_id"`
	VolumePath  string `redis:"volume_path"`
}

Jump to

Keyboard shortcuts

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