Documentation ¶
Index ¶
- func CalculateDirSize(path string) (uint64, error)
- func GetVolumePaths(workspaceName string, volumeExternalId string, volumePath string) (string, string, error)
- func JoinVolumePath(workspaceName, volumeExternalId string, subPaths ...string) string
- type CopyPathContent
- type FileInfo
- type GlobalVolumeService
- func (vs *GlobalVolumeService) CopyPathStream(stream pb.VolumeService_CopyPathStreamServer) error
- func (vs *GlobalVolumeService) DeletePath(ctx context.Context, in *pb.DeletePathRequest) (*pb.DeletePathResponse, error)
- func (vs *GlobalVolumeService) DeleteVolume(ctx context.Context, in *pb.DeleteVolumeRequest) (*pb.DeleteVolumeResponse, error)
- func (gvs *GlobalVolumeService) GenerateWorkspaceVolumePathDownloadToken(workspaceId string, volumePath string) (string, error)
- func (vs *GlobalVolumeService) GetOrCreateVolume(ctx context.Context, in *pb.GetOrCreateVolumeRequest) (*pb.GetOrCreateVolumeResponse, error)
- func (vs *GlobalVolumeService) ListPath(ctx context.Context, in *pb.ListPathRequest) (*pb.ListPathResponse, error)
- func (vs *GlobalVolumeService) ListVolumes(ctx context.Context, in *pb.ListVolumesRequest) (*pb.ListVolumesResponse, error)
- func (vs *GlobalVolumeService) MovePath(ctx context.Context, in *pb.MovePathRequest) (*pb.MovePathResponse, error)
- func (gvs *GlobalVolumeService) ValidateWorkspaceVolumePathDownloadToken(workspaceId string, volumePath string, token string) error
- type VolumePathTokenData
- type VolumeService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculateDirSize ¶
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 ¶
Types ¶
type CopyPathContent ¶
type GlobalVolumeService ¶
type GlobalVolumeService struct { pb.UnimplementedVolumeServiceServer // contains filtered or unexported fields }
func (*GlobalVolumeService) CopyPathStream ¶
func (vs *GlobalVolumeService) CopyPathStream(stream pb.VolumeService_CopyPathStreamServer) error
func (*GlobalVolumeService) DeletePath ¶
func (vs *GlobalVolumeService) DeletePath(ctx context.Context, in *pb.DeletePathRequest) (*pb.DeletePathResponse, error)
func (*GlobalVolumeService) DeleteVolume ¶
func (vs *GlobalVolumeService) DeleteVolume(ctx context.Context, in *pb.DeleteVolumeRequest) (*pb.DeleteVolumeResponse, error)
func (*GlobalVolumeService) GenerateWorkspaceVolumePathDownloadToken ¶
func (gvs *GlobalVolumeService) GenerateWorkspaceVolumePathDownloadToken(workspaceId string, volumePath string) (string, error)
func (*GlobalVolumeService) GetOrCreateVolume ¶
func (vs *GlobalVolumeService) GetOrCreateVolume(ctx context.Context, in *pb.GetOrCreateVolumeRequest) (*pb.GetOrCreateVolumeResponse, error)
func (*GlobalVolumeService) ListPath ¶
func (vs *GlobalVolumeService) ListPath(ctx context.Context, in *pb.ListPathRequest) (*pb.ListPathResponse, error)
func (*GlobalVolumeService) ListVolumes ¶
func (vs *GlobalVolumeService) ListVolumes(ctx context.Context, in *pb.ListVolumesRequest) (*pb.ListVolumesResponse, error)
func (*GlobalVolumeService) MovePath ¶
func (vs *GlobalVolumeService) MovePath(ctx context.Context, in *pb.MovePathRequest) (*pb.MovePathResponse, error)
func (*GlobalVolumeService) ValidateWorkspaceVolumePathDownloadToken ¶
func (gvs *GlobalVolumeService) ValidateWorkspaceVolumePathDownloadToken(workspaceId string, volumePath string, token string) error
type VolumePathTokenData ¶
type VolumeService ¶
type VolumeService interface { pb.VolumeServiceServer GetOrCreateVolume(ctx context.Context, in *pb.GetOrCreateVolumeRequest) (*pb.GetOrCreateVolumeResponse, error) DeleteVolume(ctx context.Context, in *pb.DeleteVolumeRequest) (*pb.DeleteVolumeResponse, error) ListPath(ctx context.Context, in *pb.ListPathRequest) (*pb.ListPathResponse, error) DeletePath(ctx context.Context, in *pb.DeletePathRequest) (*pb.DeletePathResponse, error) MovePath(ctx context.Context, in *pb.MovePathRequest) (*pb.MovePathResponse, error) CopyPathStream(stream pb.VolumeService_CopyPathStreamServer) error }
func NewGlobalVolumeService ¶
func NewGlobalVolumeService(backendRepo repository.BackendRepository, workspaceRepo repository.WorkspaceRepository, rdb *common.RedisClient, routeGroup *echo.Group) (VolumeService, error)
Click to show internal directories.
Click to hide internal directories.