client

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2022 License: BSD-3-Clause Imports: 12 Imported by: 1

Documentation

Index

Constants

View Source
const (
	FileRWLengthMax int32 = 1024 * 1024 * 2 // 2MB
)

Variables

This section is empty.

Functions

This section is empty.

Types

type PoolServiceClient

type PoolServiceClient struct {
	// contains filtered or unexported fields
}

PoolServiceClient is a struct that holds connection information

func NewPoolServiceClient

func NewPoolServiceClient(poolHost string, operationTimeout time.Duration) *PoolServiceClient

NewPoolServiceClient creates a new pool service client

func (*PoolServiceClient) Close

func (client *PoolServiceClient) Close(handle *PoolServiceFileHandle) error

Close closes iRODS data object handle

func (*PoolServiceClient) Connect

func (client *PoolServiceClient) Connect() error

Disconnect connects to pool service

func (*PoolServiceClient) CreateFile

func (client *PoolServiceClient) CreateFile(session *PoolServiceSession, path string, resource string, mode string) (*PoolServiceFileHandle, error)

CreateFile creates a new iRODS data object

func (*PoolServiceClient) Disconnect

func (client *PoolServiceClient) Disconnect()

Disconnect disconnects connection from pool service

func (*PoolServiceClient) ExistsDir

func (client *PoolServiceClient) ExistsDir(session *PoolServiceSession, path string) bool

ExistsDir checks existence of Dir

func (*PoolServiceClient) ExistsFile

func (client *PoolServiceClient) ExistsFile(session *PoolServiceSession, path string) bool

ExistsFile checks existence of File

func (*PoolServiceClient) Flush

func (client *PoolServiceClient) Flush(handle *PoolServiceFileHandle) error

Flush flushes iRODS data object handle

func (*PoolServiceClient) GetOffset

func (client *PoolServiceClient) GetOffset(handle *PoolServiceFileHandle) int64

GetOffset returns current offset

func (*PoolServiceClient) List

func (client *PoolServiceClient) List(session *PoolServiceSession, path string) ([]*irodsclient_fs.Entry, error)

List lists iRODS collection entries

func (*PoolServiceClient) ListDirACLs added in v0.1.9

func (client *PoolServiceClient) ListDirACLs(session *PoolServiceSession, path string) ([]*irodsclient_types.IRODSAccess, error)

ListDirACLs lists iRODS collection ACLs

func (*PoolServiceClient) ListFileACLs added in v0.1.9

func (client *PoolServiceClient) ListFileACLs(session *PoolServiceSession, path string) ([]*irodsclient_types.IRODSAccess, error)

ListFileACLs lists iRODS data object ACLs

func (*PoolServiceClient) ListUserGroups added in v0.1.9

func (client *PoolServiceClient) ListUserGroups(session *PoolServiceSession, user string) ([]*irodsclient_types.IRODSUser, error)

ListUserGroups lists iRODS Groups that a user belongs to

func (*PoolServiceClient) Login

func (client *PoolServiceClient) Login(account *irodsclient_types.IRODSAccount, applicationName string, clientID string) (*PoolServiceSession, error)

Login logins to iRODS service using account info

func (*PoolServiceClient) Logout

func (client *PoolServiceClient) Logout(session *PoolServiceSession) error

Logout logouts from iRODS service

func (*PoolServiceClient) MakeDir

func (client *PoolServiceClient) MakeDir(session *PoolServiceSession, path string, recurse bool) error

MakeDir creates a new iRODS collection

func (*PoolServiceClient) OpenFile

func (client *PoolServiceClient) OpenFile(session *PoolServiceSession, path string, resource string, mode string) (*PoolServiceFileHandle, error)

OpenFile opens iRODS data object

func (*PoolServiceClient) ReadAt

func (client *PoolServiceClient) ReadAt(handle *PoolServiceFileHandle, offset int64, length int32) ([]byte, error)

ReadAt reads iRODS data object

func (*PoolServiceClient) RemoveDir

func (client *PoolServiceClient) RemoveDir(session *PoolServiceSession, path string, recurse bool, force bool) error

RemoveDir removes iRODS collection

func (*PoolServiceClient) RemoveFile

func (client *PoolServiceClient) RemoveFile(session *PoolServiceSession, path string, force bool) error

RemoveFile removes iRODS data object

func (*PoolServiceClient) RenameDirToDir

func (client *PoolServiceClient) RenameDirToDir(session *PoolServiceSession, srcPath string, destPath string) error

RenameDirToDir renames iRODS collection

func (*PoolServiceClient) RenameFileToFile

func (client *PoolServiceClient) RenameFileToFile(session *PoolServiceSession, srcPath string, destPath string) error

RenameFileToFile renames iRODS data object

func (*PoolServiceClient) Stat

func (client *PoolServiceClient) Stat(session *PoolServiceSession, path string) (*irodsclient_fs.Entry, error)

Stat stats iRODS entry

func (*PoolServiceClient) TruncateFile

func (client *PoolServiceClient) TruncateFile(session *PoolServiceSession, path string, size int64) error

TruncateFile truncates iRODS data object

func (*PoolServiceClient) WriteAt

func (client *PoolServiceClient) WriteAt(handle *PoolServiceFileHandle, offset int64, data []byte) error

WriteAt writes iRODS data object

type PoolServiceFileHandle

type PoolServiceFileHandle struct {
	SessionID    string
	Entry        *irodsclient_fs.Entry
	OpenMode     string
	FileHandleID string
}

func (*PoolServiceFileHandle) IsReadMode

func (handle *PoolServiceFileHandle) IsReadMode() bool

IsReadMode returns true if file is opened with read mode

func (*PoolServiceFileHandle) IsWriteMode

func (handle *PoolServiceFileHandle) IsWriteMode() bool

IsWriteMode returns true if file is opened with write mode

type PoolServiceSession

type PoolServiceSession struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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