Documentation ¶
Index ¶
- Constants
- func ContextWithAccessManager(parent context.Context, manager AccessManager) context.Context
- func ContextWithClientProvider(parent context.Context, provider ClientProvider) context.Context
- func ContextWithRouterProvider(parent context.Context, provider RouterProvider) context.Context
- func ContextWithSourcesServiceClientProvider(parent context.Context, provider SourcesServiceClientProvider) context.Context
- func ContextWithTransfersServiceClientProvider(parent context.Context, provider TransfersServiceClientProvider) context.Context
- func CopyFile(ctx context.Context, sourceID string, filename string, dirname string, ...) error
- func CreateAccess(ctx context.Context, source *pb.FSAccess, opts CreateAccessOptions) error
- func CreateDir(ctx context.Context, sourceID string, dirname string, opts CreateDirOptions) error
- func DeleteAccess(ctx context.Context, sourceID string, opts DeleteAccessOptions) error
- func DeleteFile(ctx context.Context, sourceID string, filename string, opts DeleteFileOptions) error
- func GetAccess(ctx context.Context, sourceID string, opts GetAccessOptions) (*pb.FSAccess, error)
- func GetAccessList(ctx context.Context, opts GetAccessListOptions) ([]*pb.FSAccess, error)
- func GetFile(ctx context.Context, sourceID string, filename string, opts GetFileOptions) (*pb.File, error)
- func HTTPHandleCreateAccess(w http.ResponseWriter, r *http.Request)
- func HTTPHandleCreateFile(w http.ResponseWriter, r *http.Request)
- func HTTPHandleDeleteAccess(w http.ResponseWriter, r *http.Request)
- func HTTPHandleDeleteFile(w http.ResponseWriter, r *http.Request)
- func HTTPHandleDownloadFile(w http.ResponseWriter, r *http.Request)
- func HTTPHandleGetAccess(w http.ResponseWriter, r *http.Request)
- func HTTPHandleGetAccessList(w http.ResponseWriter, r *http.Request)
- func HTTPHandleGetFileAttributes(w http.ResponseWriter, r *http.Request)
- func HTTPHandleGetFileInfo(w http.ResponseWriter, r *http.Request)
- func HTTPHandleListDir(w http.ResponseWriter, r *http.Request)
- func HTTPHandlePatchFileTree(w http.ResponseWriter, r *http.Request)
- func HTTPHandleSetFileAttributes(w http.ResponseWriter, r *http.Request)
- func HTTPHandleUploadFile(w http.ResponseWriter, r *http.Request)
- func LimitReadCloser(readCloser io.ReadCloser, n int64) io.ReadCloser
- func Middleware(opts ...MiddlewareOption) mux.MiddlewareFunc
- func MoveFile(ctx context.Context, sourceID string, filename string, dirname string, ...) error
- func MuxRouter(middleware ...mux.MiddlewareFunc) http.Handler
- func NewAccessSQLManager(db *sql.DB, dialect string, tablePrefix string) (*accessSQLManager, error)
- func NewAccessServerHandler() pb.AccessManagerServer
- func NewClient(ctx context.Context, serviceType uint32) (pb.FilesClient, error)
- func NewFilesServerHandler() pb.FilesServer
- func NewSourcesServiceClient(ctx context.Context, serviceType uint32) (pb.AccessManagerClient, error)
- func NormalizePath(p string) string
- func ReadFileContent(ctx context.Context, sourceID string, filename string, opts ReadOptions) (io.ReadCloser, int64, error)
- func RenameFile(ctx context.Context, sourceID string, filename string, newName string, ...) error
- func SetFileAttributes(ctx context.Context, sourceID string, filename string, attrs Attributes, ...) error
- func Split(filename string) (string, string)
- func UnNormalizePath(p string) string
- func WriteFileContent(ctx context.Context, sourceID string, filename string, content io.Reader, ...) error
- type ACLHandler
- func (h *ACLHandler) CloseMultipartSession(ctx context.Context, accessID string, opts CloseMultipartSessionOptions) error
- func (h *ACLHandler) CopyFile(ctx context.Context, accessID string, filename string, dirname string, ...) error
- func (h *ACLHandler) CreateAccess(ctx context.Context, access *pb.FSAccess, opts CreateAccessOptions) error
- func (h *ACLHandler) CreateDir(ctx context.Context, accessID string, dirname string, opts CreateDirOptions) error
- func (h *ACLHandler) DeleteAccess(ctx context.Context, accessID string, _ DeleteAccessOptions) error
- func (h *ACLHandler) DeleteFile(ctx context.Context, accessID string, filename string, opts DeleteFileOptions) error
- func (h *ACLHandler) DeleteShares(ctx context.Context, shares []*pb.ShareInfo, _ DeleteSharesOptions) error
- func (h *ACLHandler) GetAccess(ctx context.Context, accessID string, opts GetAccessOptions) (*pb.FSAccess, error)
- func (h *ACLHandler) GetAccessList(ctx context.Context, _ GetAccessListOptions) ([]*pb.FSAccess, error)
- func (h *ACLHandler) GetFileAttributes(ctx context.Context, accessID string, filename string, names []string, ...) (Attributes, error)
- func (h *ACLHandler) GetFileInfo(ctx context.Context, accessID string, filename string, opts GetFileOptions) (*pb.File, error)
- func (h *ACLHandler) GetShares(ctx context.Context, accessID string, _ GetSharesOptions) ([]*pb.UserRole, error)
- func (h *ACLHandler) ListDir(ctx context.Context, accessID string, dirname string, opts ListDirOptions) (*DirContent, error)
- func (h *ACLHandler) MoveFile(ctx context.Context, accessID string, filename string, dirname string, ...) error
- func (h *ACLHandler) OpenMultipartSession(ctx context.Context, accessID string, filename string, ...) (string, error)
- func (h *ACLHandler) ReadFileContent(ctx context.Context, accessID string, filename string, opts ReadOptions) (io.ReadCloser, int64, error)
- func (h *ACLHandler) RenameFile(ctx context.Context, accessID string, filename string, newName string, ...) error
- func (h *ACLHandler) SetFileAttributes(ctx context.Context, accessID string, filename string, attrs Attributes, ...) error
- func (h *ACLHandler) Share(ctx context.Context, shares []*pb.ShareInfo, _ ShareOptions) error
- func (h *ACLHandler) WriteFileContent(ctx context.Context, accessID string, filename string, content io.Reader, ...) error
- func (h *ACLHandler) WriteFilePart(ctx context.Context, accessID string, content io.Reader, size int64, ...) (int64, error)
- type AccessManager
- type AddContentPartOptions
- type Attribute
- type Attributes
- type AttributesHolder
- func (h *AttributesHolder) AddReadPermissions(_ *pb.AccessActionRelation)
- func (h *AttributesHolder) GetAttributes() (Attributes, error)
- func (h *AttributesHolder) GetPermissions() (*pb.AccessActionRelation, bool, error)
- func (h *AttributesHolder) SetEncodedPermissions(_ string) error
- func (h *AttributesHolder) SetPermissions(_ *pb.AccessActionRelation) error
- type BaseHandler
- func (h *BaseHandler) CloseMultipartSession(ctx context.Context, sessionId string, opts CloseMultipartSessionOptions) error
- func (h *BaseHandler) CopyFile(ctx context.Context, sourceID string, filename string, dirname string, ...) error
- func (h *BaseHandler) CreateAccess(ctx context.Context, source *pb.FSAccess, opts CreateAccessOptions) error
- func (h *BaseHandler) CreateDir(ctx context.Context, sourceID string, dirname string, opts CreateDirOptions) error
- func (h *BaseHandler) DeleteAccess(ctx context.Context, sourceID string, opts DeleteAccessOptions) error
- func (h *BaseHandler) DeleteFile(ctx context.Context, sourceID string, filename string, opts DeleteFileOptions) error
- func (h *BaseHandler) DeleteShares(ctx context.Context, shares []*pb.ShareInfo, opts DeleteSharesOptions) error
- func (h *BaseHandler) GetAccess(ctx context.Context, sourceID string, opts GetAccessOptions) (*pb.FSAccess, error)
- func (h *BaseHandler) GetAccessList(ctx context.Context, opts GetAccessListOptions) ([]*pb.FSAccess, error)
- func (h *BaseHandler) GetFileAttributes(ctx context.Context, sourceID string, filename string, names []string, ...) (Attributes, error)
- func (h *BaseHandler) GetFileInfo(ctx context.Context, sourceID string, filename string, opts GetFileOptions) (*pb.File, error)
- func (h *BaseHandler) GetShares(ctx context.Context, accessID string, opts GetSharesOptions) ([]*pb.UserRole, error)
- func (h *BaseHandler) ListDir(ctx context.Context, sourceID string, dirname string, opts ListDirOptions) (*DirContent, error)
- func (h *BaseHandler) MoveFile(ctx context.Context, sourceID string, filename string, dirname string, ...) error
- func (h *BaseHandler) OpenMultipartSession(ctx context.Context, sourceID string, filename string, ...) (string, error)
- func (h *BaseHandler) ReadFileContent(ctx context.Context, sourceID string, filename string, opts ReadOptions) (io.ReadCloser, int64, error)
- func (h *BaseHandler) RenameFile(ctx context.Context, sourceID string, filename string, newName string, ...) error
- func (h *BaseHandler) SetFileAttributes(ctx context.Context, sourceID string, filename string, attrs Attributes, ...) error
- func (h *BaseHandler) Share(ctx context.Context, shares []*pb.ShareInfo, opts ShareOptions) error
- func (h *BaseHandler) WriteFileContent(ctx context.Context, sourceID string, filename string, content io.Reader, ...) error
- func (h *BaseHandler) WriteFilePart(ctx context.Context, sessionID string, content io.Reader, size int64, ...) (int64, error)
- type ClientProvider
- type CloseMultipartSessionOptions
- type CloseMultipartWriteSessionRequest
- type CloseMultipartWriteSessionResponse
- type ContentPartInfo
- type ContentRange
- type CopyFileOptions
- type CreateAccessOptions
- type CreateDirOptions
- type CustomRouter
- type DefaultClientProvider
- type DefaultSourcesServiceClientProvider
- type DefaultTransfersServiceClientProvider
- type DeleteAccessOptions
- type DeleteFileOptions
- type DeleteSharesOptions
- type DirContent
- type DiskUsage
- type EncryptionHandler
- func (h *EncryptionHandler) ReadFileContent(ctx context.Context, sourceID string, filename string, opts ReadOptions) (io.ReadCloser, int64, error)
- func (h *EncryptionHandler) WriteFileContent(ctx context.Context, accessID string, filename string, content io.Reader, ...) error
- func (h *EncryptionHandler) WriteFilePart(ctx context.Context, sessionID string, content io.Reader, size int64, ...) (int64, error)
- type ExecHandler
- func (h *ExecHandler) CloseMultipartSession(_ context.Context, _ string, _ CloseMultipartSessionOptions) error
- func (h *ExecHandler) CopyFile(ctx context.Context, accessID string, filename string, dirname string, ...) error
- func (h *ExecHandler) CreateAccess(ctx context.Context, source *pb.FSAccess, _ CreateAccessOptions) error
- func (h *ExecHandler) CreateDir(ctx context.Context, accessID string, dirname string, _ CreateDirOptions) error
- func (h *ExecHandler) DeleteAccess(ctx context.Context, accessID string, _ DeleteAccessOptions) error
- func (h *ExecHandler) DeleteFile(ctx context.Context, accessID string, filename string, opts DeleteFileOptions) error
- func (h *ExecHandler) GetAccess(ctx context.Context, accessID string, _ GetAccessOptions) (*pb.FSAccess, error)
- func (h *ExecHandler) GetFileAttributes(ctx context.Context, accessID string, filename string, names []string, ...) (Attributes, error)
- func (h *ExecHandler) GetFileInfo(ctx context.Context, accessID string, filename string, opts GetFileOptions) (*pb.File, error)
- func (h *ExecHandler) ListDir(ctx context.Context, accessID string, dirname string, opts ListDirOptions) (*DirContent, error)
- func (h *ExecHandler) MoveFile(ctx context.Context, accessID string, filename string, dirname string, ...) error
- func (h *ExecHandler) OpenMultipartSession(_ context.Context, _ string, _ string, _ MultipartSessionInfo, ...) (string, error)
- func (h *ExecHandler) ReadFileContent(ctx context.Context, accessID string, filename string, opts ReadOptions) (io.ReadCloser, int64, error)
- func (h *ExecHandler) RenameFile(ctx context.Context, accessID string, filename string, newName string, ...) error
- func (h *ExecHandler) SetFileAttributes(ctx context.Context, accessID string, filename string, attrs Attributes, ...) error
- func (h *ExecHandler) WriteFileContent(ctx context.Context, accessID string, filename string, content io.Reader, ...) error
- func (h *ExecHandler) WriteFilePart(_ context.Context, _ string, _ io.Reader, _ int64, _ ContentPartInfo, ...) (int64, error)
- type FS
- type FSProvider
- type FileLocation
- type GetAccessListOptions
- type GetAccessOptions
- type GetFSAccessOptions
- type GetFileAttributesOptions
- type GetFileOptions
- type GetSharesOptions
- type Handler
- type HandlerOption
- type ListDirOptions
- type MiddlewareOption
- type MoveFileOptions
- type MultipartSessionInfo
- type OpenMultipartSessionOptions
- type OpenMultipartSessionRequest
- type OpenMultipartSessionResponse
- type ParamsHandler
- func (h *ParamsHandler) CloseMultipartSession(ctx context.Context, sessionID string, opts CloseMultipartSessionOptions) error
- func (h *ParamsHandler) CopyFile(ctx context.Context, sourceID string, filename string, dirname string, ...) error
- func (h *ParamsHandler) CreateAccess(ctx context.Context, source *pb.FSAccess, opts CreateAccessOptions) error
- func (h *ParamsHandler) CreateDir(ctx context.Context, sourceID string, dirname string, opts CreateDirOptions) error
- func (h *ParamsHandler) DeleteAccess(ctx context.Context, sourceID string, opts DeleteAccessOptions) error
- func (h *ParamsHandler) DeleteFile(ctx context.Context, sourceID string, filename string, opts DeleteFileOptions) error
- func (h *ParamsHandler) GetAccess(ctx context.Context, sourceID string, opts GetAccessOptions) (*pb.FSAccess, error)
- func (h *ParamsHandler) GetFileAttributes(ctx context.Context, sourceID string, filename string, names []string, ...) (Attributes, error)
- func (h *ParamsHandler) GetFileInfo(ctx context.Context, sourceID string, filename string, opts GetFileOptions) (*pb.File, error)
- func (h *ParamsHandler) ListDir(ctx context.Context, sourceID string, dirname string, opts ListDirOptions) (*DirContent, error)
- func (h *ParamsHandler) MoveFile(ctx context.Context, sourceID string, filename string, dirname string, ...) error
- func (h *ParamsHandler) OpenMultipartSession(ctx context.Context, sourceID string, filename string, ...) (string, error)
- func (h *ParamsHandler) ReadFileContent(ctx context.Context, sourceID string, filename string, opts ReadOptions) (io.ReadCloser, int64, error)
- func (h *ParamsHandler) RenameFile(ctx context.Context, sourceID string, filename string, newName string, ...) error
- func (h *ParamsHandler) SetFileAttributes(ctx context.Context, sourceID string, filename string, attrs Attributes, ...) error
- func (h *ParamsHandler) WriteFileContent(ctx context.Context, sourceID string, filename string, content io.Reader, ...) error
- func (h *ParamsHandler) WriteFilePart(ctx context.Context, sessionID string, content io.Reader, size int64, ...) (int64, error)
- type ReadOptions
- type ReadRequest
- type ReadResponse
- type RenameFileOptions
- type RouteOption
- type RouteProviderFunc
- type Router
- type RouterProvideFunc
- type RouterProvider
- type ServiceClientHandler
- func (h *ServiceClientHandler) CloseMultipartSession(ctx context.Context, sessionId string, _ CloseMultipartSessionOptions) error
- func (h *ServiceClientHandler) CopyFile(ctx context.Context, accessID string, filename string, dirname string, ...) error
- func (h *ServiceClientHandler) CreateAccess(ctx context.Context, source *pb.FSAccess, _ CreateAccessOptions) error
- func (h *ServiceClientHandler) CreateDir(ctx context.Context, accessID string, dirname string, _ CreateDirOptions) error
- func (h *ServiceClientHandler) DeleteAccess(ctx context.Context, accessID string, _ DeleteAccessOptions) error
- func (h *ServiceClientHandler) DeleteFile(ctx context.Context, accessID string, filename string, _ DeleteFileOptions) error
- func (h *ServiceClientHandler) GetAccess(ctx context.Context, accessID string, _ GetAccessOptions) (*pb.FSAccess, error)
- func (h *ServiceClientHandler) GetAccessList(ctx context.Context, _ GetAccessListOptions) ([]*pb.FSAccess, error)
- func (h *ServiceClientHandler) GetFileAttributes(ctx context.Context, accessID string, filename string, names []string, ...) (Attributes, error)
- func (h *ServiceClientHandler) GetFileInfo(ctx context.Context, accessID string, filename string, opts GetFileOptions) (*pb.File, error)
- func (h *ServiceClientHandler) ListDir(ctx context.Context, accessID string, dirname string, _ ListDirOptions) (*DirContent, error)
- func (h *ServiceClientHandler) MoveFile(ctx context.Context, accessID string, filename string, dirname string, ...) error
- func (h *ServiceClientHandler) OpenMultipartSession(ctx context.Context, accessID string, filename string, _ MultipartSessionInfo, ...) (string, error)
- func (h *ServiceClientHandler) ReadFileContent(ctx context.Context, accessID string, filename string, opts ReadOptions) (io.ReadCloser, int64, error)
- func (h *ServiceClientHandler) RenameFile(ctx context.Context, accessID string, filename string, newName string, ...) error
- func (h *ServiceClientHandler) SetFileAttributes(ctx context.Context, accessID string, filename string, attrs Attributes, ...) error
- func (h *ServiceClientHandler) WriteFileContent(ctx context.Context, accessID string, filename string, content io.Reader, ...) error
- func (h *ServiceClientHandler) WriteFilePart(ctx context.Context, sessionID string, content io.Reader, size int64, ...) (int64, error)
- type SetFileAttributesOptions
- type ShareOptions
- type SourcesServiceClientProvider
- type TransferClient
- type TransfersServiceClientProvider
- type TreePatchInfo
- type WriteFilePartOptions
- type WriteFilePartRequest
- type WriteOptions
- type WritePartResponse
- type WriteRequest
- type WriteResponse
Constants ¶
View Source
const ( SchemeFS = "files" SchemeRef = "ref" )
View Source
const ( AttrPrefix = "store-" AttrPermissions = AttrPrefix + "permissions" )
Variables ¶
This section is empty.
Functions ¶
func ContextWithAccessManager ¶
func ContextWithAccessManager(parent context.Context, manager AccessManager) context.Context
func ContextWithClientProvider ¶
func ContextWithClientProvider(parent context.Context, provider ClientProvider) context.Context
func ContextWithRouterProvider ¶
func ContextWithRouterProvider(parent context.Context, provider RouterProvider) context.Context
func ContextWithSourcesServiceClientProvider ¶
func ContextWithSourcesServiceClientProvider(parent context.Context, provider SourcesServiceClientProvider) context.Context
func ContextWithTransfersServiceClientProvider ¶
func ContextWithTransfersServiceClientProvider(parent context.Context, provider TransfersServiceClientProvider) context.Context
func CreateAccess ¶
func DeleteAccess ¶
func DeleteAccess(ctx context.Context, sourceID string, opts DeleteAccessOptions) error
func DeleteFile ¶
func GetAccessList ¶
func HTTPHandleCreateAccess ¶
func HTTPHandleCreateAccess(w http.ResponseWriter, r *http.Request)
func HTTPHandleCreateFile ¶
func HTTPHandleCreateFile(w http.ResponseWriter, r *http.Request)
func HTTPHandleDeleteAccess ¶
func HTTPHandleDeleteAccess(w http.ResponseWriter, r *http.Request)
func HTTPHandleDeleteFile ¶
func HTTPHandleDeleteFile(w http.ResponseWriter, r *http.Request)
func HTTPHandleDownloadFile ¶
func HTTPHandleDownloadFile(w http.ResponseWriter, r *http.Request)
func HTTPHandleGetAccess ¶
func HTTPHandleGetAccess(w http.ResponseWriter, r *http.Request)
func HTTPHandleGetAccessList ¶
func HTTPHandleGetAccessList(w http.ResponseWriter, r *http.Request)
func HTTPHandleGetFileAttributes ¶
func HTTPHandleGetFileAttributes(w http.ResponseWriter, r *http.Request)
func HTTPHandleGetFileInfo ¶
func HTTPHandleGetFileInfo(w http.ResponseWriter, r *http.Request)
func HTTPHandleListDir ¶
func HTTPHandleListDir(w http.ResponseWriter, r *http.Request)
func HTTPHandlePatchFileTree ¶
func HTTPHandlePatchFileTree(w http.ResponseWriter, r *http.Request)
func HTTPHandleSetFileAttributes ¶
func HTTPHandleSetFileAttributes(w http.ResponseWriter, r *http.Request)
func HTTPHandleUploadFile ¶
func HTTPHandleUploadFile(w http.ResponseWriter, r *http.Request)
func LimitReadCloser ¶
func LimitReadCloser(readCloser io.ReadCloser, n int64) io.ReadCloser
func Middleware ¶
func Middleware(opts ...MiddlewareOption) mux.MiddlewareFunc
func NewAccessSQLManager ¶
func NewAccessServerHandler ¶
func NewAccessServerHandler() pb.AccessManagerServer
func NewFilesServerHandler ¶
func NewFilesServerHandler() pb.FilesServer
func NewSourcesServiceClient ¶
func NewSourcesServiceClient(ctx context.Context, serviceType uint32) (pb.AccessManagerClient, error)
NewSourcesServiceClient is a source service client constructor
func NormalizePath ¶
func ReadFileContent ¶
func ReadFileContent(ctx context.Context, sourceID string, filename string, opts ReadOptions) (io.ReadCloser, int64, error)
func RenameFile ¶
func SetFileAttributes ¶
func SetFileAttributes(ctx context.Context, sourceID string, filename string, attrs Attributes, opts SetFileAttributesOptions) error
func UnNormalizePath ¶
Types ¶
type ACLHandler ¶
type ACLHandler struct {
BaseHandler
}
func (*ACLHandler) CloseMultipartSession ¶
func (h *ACLHandler) CloseMultipartSession(ctx context.Context, accessID string, opts CloseMultipartSessionOptions) error
func (*ACLHandler) CopyFile ¶
func (h *ACLHandler) CopyFile(ctx context.Context, accessID string, filename string, dirname string, opts CopyFileOptions) error
func (*ACLHandler) CreateAccess ¶
func (h *ACLHandler) CreateAccess(ctx context.Context, access *pb.FSAccess, opts CreateAccessOptions) error
func (*ACLHandler) CreateDir ¶
func (h *ACLHandler) CreateDir(ctx context.Context, accessID string, dirname string, opts CreateDirOptions) error
func (*ACLHandler) DeleteAccess ¶
func (h *ACLHandler) DeleteAccess(ctx context.Context, accessID string, _ DeleteAccessOptions) error
func (*ACLHandler) DeleteFile ¶
func (h *ACLHandler) DeleteFile(ctx context.Context, accessID string, filename string, opts DeleteFileOptions) error
func (*ACLHandler) DeleteShares ¶
func (h *ACLHandler) DeleteShares(ctx context.Context, shares []*pb.ShareInfo, _ DeleteSharesOptions) error
DeleteShares checks if the requester user is a sharer of the resource for each share info passed. Then we want to make sure the request user has the roles he wants to delete from other users
func (*ACLHandler) GetAccess ¶
func (h *ACLHandler) GetAccess(ctx context.Context, accessID string, opts GetAccessOptions) (*pb.FSAccess, error)
func (*ACLHandler) GetAccessList ¶
func (h *ACLHandler) GetAccessList(ctx context.Context, _ GetAccessListOptions) ([]*pb.FSAccess, error)
func (*ACLHandler) GetFileAttributes ¶
func (h *ACLHandler) GetFileAttributes(ctx context.Context, accessID string, filename string, names []string, opts GetFileAttributesOptions) (Attributes, error)
func (*ACLHandler) GetFileInfo ¶
func (h *ACLHandler) GetFileInfo(ctx context.Context, accessID string, filename string, opts GetFileOptions) (*pb.File, error)
func (*ACLHandler) GetShares ¶
func (h *ACLHandler) GetShares(ctx context.Context, accessID string, _ GetSharesOptions) ([]*pb.UserRole, error)
func (*ACLHandler) ListDir ¶
func (h *ACLHandler) ListDir(ctx context.Context, accessID string, dirname string, opts ListDirOptions) (*DirContent, error)
func (*ACLHandler) MoveFile ¶
func (h *ACLHandler) MoveFile(ctx context.Context, accessID string, filename string, dirname string, opts MoveFileOptions) error
func (*ACLHandler) OpenMultipartSession ¶
func (h *ACLHandler) OpenMultipartSession(ctx context.Context, accessID string, filename string, info MultipartSessionInfo, opts OpenMultipartSessionOptions) (string, error)
func (*ACLHandler) ReadFileContent ¶
func (h *ACLHandler) ReadFileContent(ctx context.Context, accessID string, filename string, opts ReadOptions) (io.ReadCloser, int64, error)
func (*ACLHandler) RenameFile ¶
func (h *ACLHandler) RenameFile(ctx context.Context, accessID string, filename string, newName string, opts RenameFileOptions) error
func (*ACLHandler) SetFileAttributes ¶
func (h *ACLHandler) SetFileAttributes(ctx context.Context, accessID string, filename string, attrs Attributes, opts SetFileAttributesOptions) error
func (*ACLHandler) Share ¶
func (h *ACLHandler) Share(ctx context.Context, shares []*pb.ShareInfo, _ ShareOptions) error
Share checks if the requester user is a sharer of the resource for each share info passed. Then we want to make sure the request user has the roles he wants to share to other users
func (*ACLHandler) WriteFileContent ¶
func (h *ACLHandler) WriteFileContent(ctx context.Context, accessID string, filename string, content io.Reader, size int64, opts WriteOptions) error
func (*ACLHandler) WriteFilePart ¶
func (h *ACLHandler) WriteFilePart(ctx context.Context, accessID string, content io.Reader, size int64, info ContentPartInfo, opts WriteFilePartOptions) (int64, error)
type AccessManager ¶
type AccessManager interface { Save(ctx context.Context, access *pb.FSAccess) (string, error) Get(ctx context.Context, accessID string) (*pb.FSAccess, error) GetResolved(ctx context.Context, accessID string) (*pb.FSAccess, error) Delete(ctx context.Context, accessID string) error }
func NewSourcesManagerServiceClient ¶
func NewSourcesManagerServiceClient(serviceType uint32) AccessManager
type AddContentPartOptions ¶
type AddContentPartOptions struct{}
type Attributes ¶
func GetFileAttributes ¶
func GetFileAttributes(ctx context.Context, sourceID string, filename string, name []string, opts GetFileAttributesOptions) (Attributes, error)
type AttributesHolder ¶
type AttributesHolder struct { Attributes Attributes // contains filtered or unexported fields }
func (*AttributesHolder) AddReadPermissions ¶
func (h *AttributesHolder) AddReadPermissions(_ *pb.AccessActionRelation)
func (*AttributesHolder) GetAttributes ¶
func (h *AttributesHolder) GetAttributes() (Attributes, error)
func (*AttributesHolder) GetPermissions ¶
func (h *AttributesHolder) GetPermissions() (*pb.AccessActionRelation, bool, error)
func (*AttributesHolder) SetEncodedPermissions ¶
func (h *AttributesHolder) SetEncodedPermissions(_ string) error
func (*AttributesHolder) SetPermissions ¶
func (h *AttributesHolder) SetPermissions(_ *pb.AccessActionRelation) error
type BaseHandler ¶
type BaseHandler struct {
// contains filtered or unexported fields
}
func (*BaseHandler) CloseMultipartSession ¶
func (h *BaseHandler) CloseMultipartSession(ctx context.Context, sessionId string, opts CloseMultipartSessionOptions) error
func (*BaseHandler) CopyFile ¶
func (h *BaseHandler) CopyFile(ctx context.Context, sourceID string, filename string, dirname string, opts CopyFileOptions) error
func (*BaseHandler) CreateAccess ¶
func (h *BaseHandler) CreateAccess(ctx context.Context, source *pb.FSAccess, opts CreateAccessOptions) error
func (*BaseHandler) CreateDir ¶
func (h *BaseHandler) CreateDir(ctx context.Context, sourceID string, dirname string, opts CreateDirOptions) error
func (*BaseHandler) DeleteAccess ¶
func (h *BaseHandler) DeleteAccess(ctx context.Context, sourceID string, opts DeleteAccessOptions) error
func (*BaseHandler) DeleteFile ¶
func (h *BaseHandler) DeleteFile(ctx context.Context, sourceID string, filename string, opts DeleteFileOptions) error
func (*BaseHandler) DeleteShares ¶
func (h *BaseHandler) DeleteShares(ctx context.Context, shares []*pb.ShareInfo, opts DeleteSharesOptions) error
func (*BaseHandler) GetAccess ¶
func (h *BaseHandler) GetAccess(ctx context.Context, sourceID string, opts GetAccessOptions) (*pb.FSAccess, error)
func (*BaseHandler) GetAccessList ¶
func (h *BaseHandler) GetAccessList(ctx context.Context, opts GetAccessListOptions) ([]*pb.FSAccess, error)
func (*BaseHandler) GetFileAttributes ¶
func (h *BaseHandler) GetFileAttributes(ctx context.Context, sourceID string, filename string, names []string, opts GetFileAttributesOptions) (Attributes, error)
func (*BaseHandler) GetFileInfo ¶
func (h *BaseHandler) GetFileInfo(ctx context.Context, sourceID string, filename string, opts GetFileOptions) (*pb.File, error)
func (*BaseHandler) GetShares ¶
func (h *BaseHandler) GetShares(ctx context.Context, accessID string, opts GetSharesOptions) ([]*pb.UserRole, error)
func (*BaseHandler) ListDir ¶
func (h *BaseHandler) ListDir(ctx context.Context, sourceID string, dirname string, opts ListDirOptions) (*DirContent, error)
func (*BaseHandler) MoveFile ¶
func (h *BaseHandler) MoveFile(ctx context.Context, sourceID string, filename string, dirname string, opts MoveFileOptions) error
func (*BaseHandler) OpenMultipartSession ¶
func (h *BaseHandler) OpenMultipartSession(ctx context.Context, sourceID string, filename string, info MultipartSessionInfo, opts OpenMultipartSessionOptions) (string, error)
func (*BaseHandler) ReadFileContent ¶
func (h *BaseHandler) ReadFileContent(ctx context.Context, sourceID string, filename string, opts ReadOptions) (io.ReadCloser, int64, error)
func (*BaseHandler) RenameFile ¶
func (h *BaseHandler) RenameFile(ctx context.Context, sourceID string, filename string, newName string, opts RenameFileOptions) error
func (*BaseHandler) SetFileAttributes ¶
func (h *BaseHandler) SetFileAttributes(ctx context.Context, sourceID string, filename string, attrs Attributes, opts SetFileAttributesOptions) error
func (*BaseHandler) Share ¶
func (h *BaseHandler) Share(ctx context.Context, shares []*pb.ShareInfo, opts ShareOptions) error
func (*BaseHandler) WriteFileContent ¶
func (h *BaseHandler) WriteFileContent(ctx context.Context, sourceID string, filename string, content io.Reader, size int64, opts WriteOptions) error
func (*BaseHandler) WriteFilePart ¶
func (h *BaseHandler) WriteFilePart(ctx context.Context, sessionID string, content io.Reader, size int64, info ContentPartInfo, opts WriteFilePartOptions) (int64, error)
type ClientProvider ¶
type ClientProvider interface {
GetClient(ctx context.Context, serviceType uint32) (pb.FilesClient, error)
}
func GetClientProvider ¶
func GetClientProvider(ctx context.Context) ClientProvider
type CloseMultipartSessionOptions ¶
type CloseMultipartSessionOptions struct{}
type CloseMultipartWriteSessionRequest ¶
type CloseMultipartWriteSessionRequest struct {
SessionId string
}
type CloseMultipartWriteSessionResponse ¶
type CloseMultipartWriteSessionResponse struct{}
type ContentPartInfo ¶
type ContentRange ¶
type CopyFileOptions ¶
type CopyFileOptions struct{}
type CreateAccessOptions ¶
type CreateAccessOptions struct{}
type CreateDirOptions ¶
type CreateDirOptions struct{}
type CustomRouter ¶
type CustomRouter struct {
// contains filtered or unexported fields
}
func NewCustomRouter ¶
func NewCustomRouter(exec Handler, opts ...HandlerOption) *CustomRouter
func (*CustomRouter) GetHandler ¶
func (r *CustomRouter) GetHandler(opts ...RouteOption) Handler
type DefaultClientProvider ¶
func (*DefaultClientProvider) GetClient ¶
func (p *DefaultClientProvider) GetClient(ctx context.Context, serviceType uint32) (pb.FilesClient, error)
type DefaultSourcesServiceClientProvider ¶
type DefaultSourcesServiceClientProvider struct { sync.RWMutex // contains filtered or unexported fields }
func (*DefaultSourcesServiceClientProvider) GetClient ¶
func (p *DefaultSourcesServiceClientProvider) GetClient(ctx context.Context, serviceType uint32) (pb.AccessManagerClient, error)
type DefaultTransfersServiceClientProvider ¶
type DefaultTransfersServiceClientProvider struct { sync.RWMutex // contains filtered or unexported fields }
func (*DefaultTransfersServiceClientProvider) GetClient ¶
func (p *DefaultTransfersServiceClientProvider) GetClient(ctx context.Context, serviceType uint32) (TransferClient, error)
type DeleteAccessOptions ¶
type DeleteAccessOptions struct{}
type DeleteFileOptions ¶
type DeleteFileOptions struct {
Recursive bool `json:"recursive,omitempty"`
}
type DeleteSharesOptions ¶
type DeleteSharesOptions struct{}
type DirContent ¶
type DirContent struct { Files []*pb.File `json:"files,omitempty"` Total int `json:"total"` Offset int `json:"offset"` }
func ListDir ¶
func ListDir(ctx context.Context, sourceID string, dirname string, opts ListDirOptions) (*DirContent, error)
type EncryptionHandler ¶
type EncryptionHandler struct {
BaseHandler
}
func (*EncryptionHandler) ReadFileContent ¶
func (h *EncryptionHandler) ReadFileContent(ctx context.Context, sourceID string, filename string, opts ReadOptions) (io.ReadCloser, int64, error)
func (*EncryptionHandler) WriteFileContent ¶
func (h *EncryptionHandler) WriteFileContent(ctx context.Context, accessID string, filename string, content io.Reader, size int64, opts WriteOptions) error
func (*EncryptionHandler) WriteFilePart ¶
func (h *EncryptionHandler) WriteFilePart(ctx context.Context, sessionID string, content io.Reader, size int64, info ContentPartInfo, opts WriteFilePartOptions) (int64, error)
type ExecHandler ¶
type ExecHandler struct {
BaseHandler
}
func (*ExecHandler) CloseMultipartSession ¶
func (h *ExecHandler) CloseMultipartSession(_ context.Context, _ string, _ CloseMultipartSessionOptions) error
func (*ExecHandler) CopyFile ¶
func (h *ExecHandler) CopyFile(ctx context.Context, accessID string, filename string, dirname string, _ CopyFileOptions) error
func (*ExecHandler) CreateAccess ¶
func (h *ExecHandler) CreateAccess(ctx context.Context, source *pb.FSAccess, _ CreateAccessOptions) error
func (*ExecHandler) CreateDir ¶
func (h *ExecHandler) CreateDir(ctx context.Context, accessID string, dirname string, _ CreateDirOptions) error
func (*ExecHandler) DeleteAccess ¶
func (h *ExecHandler) DeleteAccess(ctx context.Context, accessID string, _ DeleteAccessOptions) error
func (*ExecHandler) DeleteFile ¶
func (h *ExecHandler) DeleteFile(ctx context.Context, accessID string, filename string, opts DeleteFileOptions) error
func (*ExecHandler) GetAccess ¶
func (h *ExecHandler) GetAccess(ctx context.Context, accessID string, _ GetAccessOptions) (*pb.FSAccess, error)
func (*ExecHandler) GetFileAttributes ¶
func (h *ExecHandler) GetFileAttributes(ctx context.Context, accessID string, filename string, names []string, _ GetFileAttributesOptions) (Attributes, error)
func (*ExecHandler) GetFileInfo ¶
func (h *ExecHandler) GetFileInfo(ctx context.Context, accessID string, filename string, opts GetFileOptions) (*pb.File, error)
func (*ExecHandler) ListDir ¶
func (h *ExecHandler) ListDir(ctx context.Context, accessID string, dirname string, opts ListDirOptions) (*DirContent, error)
func (*ExecHandler) MoveFile ¶
func (h *ExecHandler) MoveFile(ctx context.Context, accessID string, filename string, dirname string, _ MoveFileOptions) error
func (*ExecHandler) OpenMultipartSession ¶
func (h *ExecHandler) OpenMultipartSession(_ context.Context, _ string, _ string, _ MultipartSessionInfo, _ OpenMultipartSessionOptions) (string, error)
func (*ExecHandler) ReadFileContent ¶
func (h *ExecHandler) ReadFileContent(ctx context.Context, accessID string, filename string, opts ReadOptions) (io.ReadCloser, int64, error)
func (*ExecHandler) RenameFile ¶
func (h *ExecHandler) RenameFile(ctx context.Context, accessID string, filename string, newName string, _ RenameFileOptions) error
func (*ExecHandler) SetFileAttributes ¶
func (h *ExecHandler) SetFileAttributes(ctx context.Context, accessID string, filename string, attrs Attributes, _ SetFileAttributesOptions) error
func (*ExecHandler) WriteFileContent ¶
func (h *ExecHandler) WriteFileContent(ctx context.Context, accessID string, filename string, content io.Reader, _ int64, opts WriteOptions) error
func (*ExecHandler) WriteFilePart ¶
func (h *ExecHandler) WriteFilePart(_ context.Context, _ string, _ io.Reader, _ int64, _ ContentPartInfo, _ WriteFilePartOptions) (int64, error)
type FS ¶
type FS interface { Mkdir(ctx context.Context, dirname string) error Ls(ctx context.Context, dirname string, offset int, count int) (*DirContent, error) Write(ctx context.Context, filename string, content io.Reader, append bool) error Read(ctx context.Context, filename string, offset int64, count int64) (io.ReadCloser, int64, error) Info(ctx context.Context, filename string, withAttrs bool) (*pb.File, error) SetAttributes(ctx context.Context, filename string, attrs Attributes) error GetAttributes(ctx context.Context, filename string, names ...string) (Attributes, error) Rename(ctx context.Context, filename string, newName string) error Move(ctx context.Context, filename string, dirname string) error Copy(ctx context.Context, filename string, dirname string) error DeleteFile(ctx context.Context, filename string, recursive bool) error GetAccess() *pb.FSAccess }
type FileLocation ¶
type GetAccessListOptions ¶
type GetAccessListOptions struct{}
type GetAccessOptions ¶
type GetAccessOptions struct {
Resolved bool `json:"resolved,omitempty"`
}
type GetFSAccessOptions ¶
type GetFSAccessOptions struct {
Resolved bool `json:"resolved,omitempty"`
}
type GetFileAttributesOptions ¶
type GetFileAttributesOptions struct{}
type GetFileOptions ¶
type GetFileOptions struct {
WithAttrs bool `json:"with_attrs,omitempty"`
}
type GetSharesOptions ¶
type GetSharesOptions struct{}
type Handler ¶
type Handler interface { CreateAccess(ctx context.Context, access *pb.FSAccess, opts CreateAccessOptions) error GetAccessList(ctx context.Context, opts GetAccessListOptions) ([]*pb.FSAccess, error) GetAccess(ctx context.Context, accessID string, opts GetAccessOptions) (*pb.FSAccess, error) DeleteAccess(ctx context.Context, accessID string, opts DeleteAccessOptions) error CreateDir(ctx context.Context, accessID string, dirname string, opts CreateDirOptions) error ListDir(ctx context.Context, accessID string, dirname string, opts ListDirOptions) (*DirContent, error) WriteFileContent(ctx context.Context, accessID string, filename string, content io.Reader, size int64, opts WriteOptions) error ReadFileContent(ctx context.Context, accessID string, filename string, opts ReadOptions) (io.ReadCloser, int64, error) GetFileInfo(ctx context.Context, accessID string, filename string, opts GetFileOptions) (*pb.File, error) DeleteFile(ctx context.Context, accessID string, filename string, opts DeleteFileOptions) error SetFileAttributes(ctx context.Context, accessID string, filename string, attrs Attributes, opts SetFileAttributesOptions) error GetFileAttributes(ctx context.Context, accessID string, filename string, names []string, opts GetFileAttributesOptions) (Attributes, error) RenameFile(ctx context.Context, accessID string, filename string, newName string, opts RenameFileOptions) error MoveFile(ctx context.Context, accessID string, filename string, dirname string, opts MoveFileOptions) error CopyFile(ctx context.Context, accessID string, filename string, dirname string, opts CopyFileOptions) error OpenMultipartSession(ctx context.Context, accessID string, filename string, info MultipartSessionInfo, opts OpenMultipartSessionOptions) (string, error) WriteFilePart(ctx context.Context, accessID string, content io.Reader, size int64, info ContentPartInfo, opts WriteFilePartOptions) (int64, error) CloseMultipartSession(ctx context.Context, sessionID string, opts CloseMultipartSessionOptions) error }
func GetRouteHandler ¶
func GetRouteHandler(ctx context.Context, opt ...RouteOption) Handler
func NewHandlerServiceClient ¶
type HandlerOption ¶
type HandlerOption func(*objectsHandlersOptions)
func WithDefaultParamsHandler ¶
func WithDefaultParamsHandler() HandlerOption
func WithDefaultPolicyHandler ¶
func WithDefaultPolicyHandler() HandlerOption
type ListDirOptions ¶
type MiddlewareOption ¶
type MiddlewareOption func(options *middlewareRouteOptions)
func MiddlewareWithRouterProvider ¶
func MiddlewareWithRouterProvider(provider RouterProvider) MiddlewareOption
func MiddlewareWithSourceManager ¶
func MiddlewareWithSourceManager(manager AccessManager) MiddlewareOption
type MoveFileOptions ¶
type MoveFileOptions struct{}
type MultipartSessionInfo ¶
type MultipartSessionInfo struct{}
type OpenMultipartSessionOptions ¶
type OpenMultipartSessionOptions struct{}
type OpenMultipartSessionResponse ¶
type OpenMultipartSessionResponse struct {
SessionId string
}
type ParamsHandler ¶
type ParamsHandler struct {
BaseHandler
}
func (*ParamsHandler) CloseMultipartSession ¶
func (h *ParamsHandler) CloseMultipartSession(ctx context.Context, sessionID string, opts CloseMultipartSessionOptions) error
func (*ParamsHandler) CopyFile ¶
func (h *ParamsHandler) CopyFile(ctx context.Context, sourceID string, filename string, dirname string, opts CopyFileOptions) error
func (*ParamsHandler) CreateAccess ¶
func (h *ParamsHandler) CreateAccess(ctx context.Context, source *pb.FSAccess, opts CreateAccessOptions) error
func (*ParamsHandler) CreateDir ¶
func (h *ParamsHandler) CreateDir(ctx context.Context, sourceID string, dirname string, opts CreateDirOptions) error
func (*ParamsHandler) DeleteAccess ¶
func (h *ParamsHandler) DeleteAccess(ctx context.Context, sourceID string, opts DeleteAccessOptions) error
func (*ParamsHandler) DeleteFile ¶
func (h *ParamsHandler) DeleteFile(ctx context.Context, sourceID string, filename string, opts DeleteFileOptions) error
func (*ParamsHandler) GetAccess ¶
func (h *ParamsHandler) GetAccess(ctx context.Context, sourceID string, opts GetAccessOptions) (*pb.FSAccess, error)
func (*ParamsHandler) GetFileAttributes ¶
func (h *ParamsHandler) GetFileAttributes(ctx context.Context, sourceID string, filename string, names []string, opts GetFileAttributesOptions) (Attributes, error)
func (*ParamsHandler) GetFileInfo ¶
func (h *ParamsHandler) GetFileInfo(ctx context.Context, sourceID string, filename string, opts GetFileOptions) (*pb.File, error)
func (*ParamsHandler) ListDir ¶
func (h *ParamsHandler) ListDir(ctx context.Context, sourceID string, dirname string, opts ListDirOptions) (*DirContent, error)
func (*ParamsHandler) MoveFile ¶
func (h *ParamsHandler) MoveFile(ctx context.Context, sourceID string, filename string, dirname string, opts MoveFileOptions) error
func (*ParamsHandler) OpenMultipartSession ¶
func (h *ParamsHandler) OpenMultipartSession(ctx context.Context, sourceID string, filename string, info MultipartSessionInfo, opts OpenMultipartSessionOptions) (string, error)
func (*ParamsHandler) ReadFileContent ¶
func (h *ParamsHandler) ReadFileContent(ctx context.Context, sourceID string, filename string, opts ReadOptions) (io.ReadCloser, int64, error)
func (*ParamsHandler) RenameFile ¶
func (h *ParamsHandler) RenameFile(ctx context.Context, sourceID string, filename string, newName string, opts RenameFileOptions) error
func (*ParamsHandler) SetFileAttributes ¶
func (h *ParamsHandler) SetFileAttributes(ctx context.Context, sourceID string, filename string, attrs Attributes, opts SetFileAttributesOptions) error
func (*ParamsHandler) WriteFileContent ¶
func (h *ParamsHandler) WriteFileContent(ctx context.Context, sourceID string, filename string, content io.Reader, size int64, opts WriteOptions) error
func (*ParamsHandler) WriteFilePart ¶
func (h *ParamsHandler) WriteFilePart(ctx context.Context, sessionID string, content io.Reader, size int64, info ContentPartInfo, opts WriteFilePartOptions) (int64, error)
type ReadOptions ¶
type ReadOptions struct {
Range ContentRange `json:"range,omitempty"`
}
type ReadRequest ¶
type ReadResponse ¶
type ReadResponse struct { Data io.ReadCloser Length int64 }
type RenameFileOptions ¶
type RenameFileOptions struct{}
type RouteOption ¶
type RouteOption func(*routesOptions)
type RouteProviderFunc ¶
type RouteProviderFunc func(opts ...RouteOption) Handler
func (RouteProviderFunc) GetHandler ¶
func (f RouteProviderFunc) GetHandler(opts ...RouteOption) Handler
type Router ¶
type Router interface { // GetHandler returns a sequence of handler GetHandler(opts ...RouteOption) Handler }
func DefaultFilesRouter ¶
func DefaultFilesRouter() Router
type RouterProvideFunc ¶
type RouterProvider ¶
type ServiceClientHandler ¶
type ServiceClientHandler struct { BaseHandler // contains filtered or unexported fields }
func (*ServiceClientHandler) CloseMultipartSession ¶
func (h *ServiceClientHandler) CloseMultipartSession(ctx context.Context, sessionId string, _ CloseMultipartSessionOptions) error
func (*ServiceClientHandler) CopyFile ¶
func (h *ServiceClientHandler) CopyFile(ctx context.Context, accessID string, filename string, dirname string, _ CopyFileOptions) error
func (*ServiceClientHandler) CreateAccess ¶
func (h *ServiceClientHandler) CreateAccess(ctx context.Context, source *pb.FSAccess, _ CreateAccessOptions) error
func (*ServiceClientHandler) CreateDir ¶
func (h *ServiceClientHandler) CreateDir(ctx context.Context, accessID string, dirname string, _ CreateDirOptions) error
func (*ServiceClientHandler) DeleteAccess ¶
func (h *ServiceClientHandler) DeleteAccess(ctx context.Context, accessID string, _ DeleteAccessOptions) error
func (*ServiceClientHandler) DeleteFile ¶
func (h *ServiceClientHandler) DeleteFile(ctx context.Context, accessID string, filename string, _ DeleteFileOptions) error
func (*ServiceClientHandler) GetAccess ¶
func (h *ServiceClientHandler) GetAccess(ctx context.Context, accessID string, _ GetAccessOptions) (*pb.FSAccess, error)
func (*ServiceClientHandler) GetAccessList ¶
func (h *ServiceClientHandler) GetAccessList(ctx context.Context, _ GetAccessListOptions) ([]*pb.FSAccess, error)
func (*ServiceClientHandler) GetFileAttributes ¶
func (h *ServiceClientHandler) GetFileAttributes(ctx context.Context, accessID string, filename string, names []string, _ GetFileAttributesOptions) (Attributes, error)
func (*ServiceClientHandler) GetFileInfo ¶
func (h *ServiceClientHandler) GetFileInfo(ctx context.Context, accessID string, filename string, opts GetFileOptions) (*pb.File, error)
func (*ServiceClientHandler) ListDir ¶
func (h *ServiceClientHandler) ListDir(ctx context.Context, accessID string, dirname string, _ ListDirOptions) (*DirContent, error)
func (*ServiceClientHandler) MoveFile ¶
func (h *ServiceClientHandler) MoveFile(ctx context.Context, accessID string, filename string, dirname string, _ MoveFileOptions) error
func (*ServiceClientHandler) OpenMultipartSession ¶
func (h *ServiceClientHandler) OpenMultipartSession(ctx context.Context, accessID string, filename string, _ MultipartSessionInfo, _ OpenMultipartSessionOptions) (string, error)
func (*ServiceClientHandler) ReadFileContent ¶
func (h *ServiceClientHandler) ReadFileContent(ctx context.Context, accessID string, filename string, opts ReadOptions) (io.ReadCloser, int64, error)
func (*ServiceClientHandler) RenameFile ¶
func (h *ServiceClientHandler) RenameFile(ctx context.Context, accessID string, filename string, newName string, _ RenameFileOptions) error
func (*ServiceClientHandler) SetFileAttributes ¶
func (h *ServiceClientHandler) SetFileAttributes(ctx context.Context, accessID string, filename string, attrs Attributes, _ SetFileAttributesOptions) error
func (*ServiceClientHandler) WriteFileContent ¶
func (h *ServiceClientHandler) WriteFileContent(ctx context.Context, accessID string, filename string, content io.Reader, size int64, opts WriteOptions) error
func (*ServiceClientHandler) WriteFilePart ¶
func (h *ServiceClientHandler) WriteFilePart(ctx context.Context, sessionID string, content io.Reader, size int64, _ ContentPartInfo, _ WriteFilePartOptions) (int64, error)
type SetFileAttributesOptions ¶
type SetFileAttributesOptions struct{}
type ShareOptions ¶
type ShareOptions struct{}
type SourcesServiceClientProvider ¶
type SourcesServiceClientProvider interface {
GetClient(ctx context.Context, serviceType uint32) (pb.AccessManagerClient, error)
}
func GetSourcesServiceClientProvider ¶
func GetSourcesServiceClientProvider(ctx context.Context) SourcesServiceClientProvider
type TransferClient ¶
type TransferClient interface { ReadFile(ctx context.Context, request *ReadRequest) (*ReadResponse, error) WriteFile(ctx context.Context, request *WriteRequest) (*WriteResponse, error) OpenFileMultipartWriteSession(ctx context.Context, request *OpenMultipartSessionRequest) (*OpenMultipartSessionResponse, error) WriteFilePart(ctx context.Context, request *WriteFilePartRequest) (*WritePartResponse, error) CloseFileMultipartWriteSession(ctx context.Context, request *CloseMultipartWriteSessionRequest) (*CloseMultipartWriteSessionResponse, error) }
func NewTransfersServiceClient ¶
func NewTransfersServiceClient(ctx context.Context, serviceType uint32) (TransferClient, error)
NewTransfersServiceClient is a source service client constructor
type TransfersServiceClientProvider ¶
type TransfersServiceClientProvider interface {
GetClient(ctx context.Context, serviceType uint32) (TransferClient, error)
}
func GetTransfersServiceClientProvider ¶
func GetTransfersServiceClientProvider(ctx context.Context) TransfersServiceClientProvider
type TreePatchInfo ¶
type WriteFilePartOptions ¶
type WriteFilePartOptions struct{}
type WriteFilePartRequest ¶
type WriteOptions ¶
type WritePartResponse ¶
type WritePartResponse struct {
Written int64
}
type WriteRequest ¶
type WriteResponse ¶
type WriteResponse struct {
Written int64
}
Source Files ¶
- access-client.go
- access-grpc-client.go
- access-grpc-handler.go
- access-sql.go
- access.go
- attributes.go
- client.go
- configs.go
- consts.go
- context.go
- files.go
- fs.go
- futils.go
- handler-acl.go
- handler-base.go
- handler-client.go
- handler-encryption.go
- handler-exec.go
- handler-params.go
- handler-server.go
- handler.go
- http.go
- io.go
- router-custom.go
- router.go
- transfer-client.go
Click to show internal directories.
Click to hide internal directories.