types

package
v0.14.5 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: BSD-3-Clause Imports: 14 Imported by: 21

Documentation

Index

Constants

View Source
const (
	// PamTTLDefault is a default value for Pam TTL
	PamTTLDefault       int    = 1
	UsernameRegexString string = "^((\\w|[-.@])+)$"
)

Variables

This section is empty.

Functions

func GetChecksumDigestSize added in v0.14.0

func GetChecksumDigestSize(checksumAlgorithm ChecksumAlgorithm) int

GetChecksumDigestSize returns checksum digest size

func GetIRODSErrorCode added in v0.5.1

func GetIRODSErrorCode(err error) common.ErrorCode

GetIRODSErrorCode returns iRODS error code if the error is iRODSError

func IsAuthError added in v0.12.7

func IsAuthError(err error) bool

IsAuthError evaluates if the given error is authentication failure

func IsCollectionNotEmptyError added in v0.5.10

func IsCollectionNotEmptyError(err error) bool

IsCollectionNotEmptyError evaluates if the given error is collection not empty error

func IsConnectionConfigError added in v0.12.7

func IsConnectionConfigError(err error) bool

IsConnectionConfigError evaluates if the given error is connection config error

func IsConnectionError added in v0.12.7

func IsConnectionError(err error) bool

IsConnectionError evaluates if the given error is connection error

func IsConnectionPoolFullError added in v0.12.7

func IsConnectionPoolFullError(err error) bool

IsConnectionPoolFullError evaluates if the given error is connection full error

func IsFileAlreadyExistError added in v0.12.15

func IsFileAlreadyExistError(err error) bool

IsFileAlreadyExistError checks if the given error is FileAlreadyExistError

func IsFileNotFoundError

func IsFileNotFoundError(err error) bool

IsFileNotFoundError checks if the given error is FileNotFoundError

func IsIRODSError added in v0.5.1

func IsIRODSError(err error) bool

IsIRODSError checks if the given error is IRODSError

func IsPermanantFailure added in v0.12.17

func IsPermanantFailure(err error) bool

IsPermanantFailure returns if given error is permanant failure

func IsResourceServerConnectionConfigError added in v0.14.0

func IsResourceServerConnectionConfigError(err error) bool

IsResourceServerConnectionConfigError evaluates if the given error is resource server connection config error

func IsTicketNotFoundError added in v0.12.14

func IsTicketNotFoundError(err error) bool

IsTicketNotFoundError checks if the given error is TicketNotFoundError

func IsUserNotFoundError added in v0.12.14

func IsUserNotFoundError(err error) bool

IsUserNotFoundError checks if the given error is UserNotFoundError

func NewAuthError added in v0.12.7

func NewAuthError(config *IRODSAccount) error

NewAuthError creates an error for auth

func NewCollectionNotEmptyError added in v0.5.10

func NewCollectionNotEmptyError(p string) error

NewCollectionNotEmptyError creates an error for collection not empty

func NewConnectionConfigError added in v0.12.7

func NewConnectionConfigError(config *IRODSAccount) error

NewConnectionConfigError creates a connection config error

func NewConnectionError added in v0.12.7

func NewConnectionError() error

NewConnectionError creates an error for connection poll full

func NewConnectionPoolFullError added in v0.12.7

func NewConnectionPoolFullError(requested int, max int) error

NewConnectionPoolFullError creates an error for connection poll full

func NewFileAlreadyExistError added in v0.12.15

func NewFileAlreadyExistError(p string) error

NewFileAlreadyExistError creates an error for file already exist

func NewFileNotFoundError

func NewFileNotFoundError(p string) error

NewFileNotFoundError creates an error for file not found

func NewResourceServerConnectionConfigError added in v0.14.0

func NewResourceServerConnectionConfigError(config *IRODSRedirectionInfo) error

NewResourceServerConnectionConfigError creates a resource server connection config error

func NewTicketNotFoundError added in v0.12.14

func NewTicketNotFoundError(ticket string) error

NewTicketNotFoundError creates an error for ticket not found

func NewUserNotFoundError added in v0.12.14

func NewUserNotFoundError(name string) error

NewUserNotFoundError creates an error for user not found

Types

type AuthError added in v0.12.14

type AuthError struct {
	Config *IRODSAccount
}

AuthError contains auth error information

func (*AuthError) Error added in v0.12.14

func (err *AuthError) Error() string

Error returns error message

func (*AuthError) Is added in v0.12.14

func (err *AuthError) Is(other error) bool

Is tests type of error

func (*AuthError) ToString added in v0.12.14

func (err *AuthError) ToString() string

ToString stringifies the object

type AuthScheme

type AuthScheme string

AuthScheme defines Authentication Scheme

const (
	// AuthSchemeNative uses Native authentication scheme
	AuthSchemeNative AuthScheme = "native"
	// AuthSchemeGSI uses GSI authentication scheme
	AuthSchemeGSI AuthScheme = "gsi"
	// AuthSchemePAM uses PAM authentication scheme
	AuthSchemePAM AuthScheme = "pam"
	// AuthSchemeUnknown is unknown scheme
	AuthSchemeUnknown AuthScheme = ""
)

func GetAuthScheme

func GetAuthScheme(authScheme string) AuthScheme

GetAuthScheme returns AuthScheme value from string

type CSNegotiationPolicy

type CSNegotiationPolicy string

CSNegotiationPolicy defines Negotiation result

const (
	// CSNegotiationFailure presents negotiation is failed
	CSNegotiationFailure CSNegotiationPolicy = "CS_NEG_FAILURE"
	// CSNegotiationUseTCP uses Plain TCP connection
	CSNegotiationUseTCP CSNegotiationPolicy = "CS_NEG_USE_TCP"
	// CSNegotiationUseSSL uses SSL connection
	CSNegotiationUseSSL CSNegotiationPolicy = "CS_NEG_USE_SSL"
)

func GetCSNegotiationPolicy

func GetCSNegotiationPolicy(policy string) (CSNegotiationPolicy, error)

GetCSNegotiationPolicy returns CSNegotiationPolicy value from string

func PerformCSNegotiation

func PerformCSNegotiation(clientRequest CSNegotiationRequire, serverRequest CSNegotiationRequire) CSNegotiationPolicy

PerformCSNegotiation performs CSNegotiation and returns the policy determined

type CSNegotiationRequire

type CSNegotiationRequire string

CSNegotiationRequire defines Negotiation request

const (
	// CSNegotiationRequireTCP requires Plain TCP connection
	CSNegotiationRequireTCP CSNegotiationRequire = "CS_NEG_REFUSE"
	// CSNegotiationRequireSSL requires SSL connection
	CSNegotiationRequireSSL CSNegotiationRequire = "CS_NEG_REQUIRE"
	// CSNegotiationDontCare requires any of TCP or SSL connection
	CSNegotiationDontCare CSNegotiationRequire = "CS_NEG_DONT_CARE"
)

func GetCSNegotiationRequire

func GetCSNegotiationRequire(require string) (CSNegotiationRequire, error)

GetCSNegotiationRequire returns CSNegotiationRequire value from string

type ChecksumAlgorithm added in v0.12.6

type ChecksumAlgorithm string

ChecksumAlgorithm determines checksum algorithm

const (
	// ChecksumAlgorithmSHA1 is for SHA1
	ChecksumAlgorithmSHA1 ChecksumAlgorithm = "SHA-1"
	// ChecksumAlgorithmSHA256 is for SHA256
	ChecksumAlgorithmSHA256 ChecksumAlgorithm = "SHA-256"
	// ChecksumAlgorithmSHA512 is for SHA512
	ChecksumAlgorithmSHA512 ChecksumAlgorithm = "SHA-512"
	// ChecksumAlgorithmADLER32 is for ADLER32
	ChecksumAlgorithmADLER32 ChecksumAlgorithm = "ADLER-32"
	// ChecksumAlgorithmMD5 is for MD5
	ChecksumAlgorithmMD5 ChecksumAlgorithm = "MD5"
	// ChecksumAlgorithmUnknown is for unknown algorithm
	ChecksumAlgorithmUnknown ChecksumAlgorithm = ""
)

func GetChecksumAlgorithm added in v0.14.0

func GetChecksumAlgorithm(checksumAlgorithm string) ChecksumAlgorithm

GetChecksumAlgorithm returns checksum algorithm from string

func ParseIRODSChecksum added in v0.12.10

func ParseIRODSChecksum(checksumString string) (ChecksumAlgorithm, []byte, error)

ParseIRODSChecksum parses iRODS checksum string

type CollectionNotEmptyError added in v0.5.10

type CollectionNotEmptyError struct {
	Path string
}

CollectionNotEmptyError contains collection not empty error information

func (*CollectionNotEmptyError) Error added in v0.5.10

func (err *CollectionNotEmptyError) Error() string

Error returns error message

func (*CollectionNotEmptyError) Is added in v0.12.14

func (err *CollectionNotEmptyError) Is(other error) bool

Is tests type of error

func (*CollectionNotEmptyError) ToString added in v0.12.14

func (err *CollectionNotEmptyError) ToString() string

ToString stringifies the object

type ColumnType

type ColumnType string

ColumnType is a type of iRODS Column

const (
	// ColumnTypeInteger is for integer column
	ColumnTypeInteger ColumnType = "Integer"
	// ColumnTypeString is for string column
	ColumnTypeString ColumnType = "String"
	// ColumnTypeDateTime is for datetime column
	ColumnTypeDateTime ColumnType = "DateTime"
)

type ConnectionConfigError added in v0.12.14

type ConnectionConfigError struct {
	Config *IRODSAccount
}

ConnectionConfigError contains connection config error information

func (*ConnectionConfigError) Error added in v0.12.14

func (err *ConnectionConfigError) Error() string

Error returns error message

func (*ConnectionConfigError) Is added in v0.12.14

func (err *ConnectionConfigError) Is(other error) bool

Is tests type of error

func (*ConnectionConfigError) ToString added in v0.12.14

func (err *ConnectionConfigError) ToString() string

ToString stringifies the object

type ConnectionError added in v0.12.14

type ConnectionError struct {
}

ConnectionError contains connection error information

func (*ConnectionError) Error added in v0.12.14

func (err *ConnectionError) Error() string

Error returns error message

func (*ConnectionError) Is added in v0.12.14

func (err *ConnectionError) Is(other error) bool

Is tests type of error

func (*ConnectionError) ToString added in v0.12.14

func (err *ConnectionError) ToString() string

ToString stringifies the object

type ConnectionPoolFullError added in v0.12.14

type ConnectionPoolFullError struct {
	Occupied int
	Max      int
}

ConnectionPoolFullError contains connection pool full error information

func (*ConnectionPoolFullError) Error added in v0.12.14

func (err *ConnectionPoolFullError) Error() string

Error returns error message

func (*ConnectionPoolFullError) Is added in v0.12.14

func (err *ConnectionPoolFullError) Is(other error) bool

Is tests type of error

func (*ConnectionPoolFullError) ToString added in v0.12.14

func (err *ConnectionPoolFullError) ToString() string

ToString stringifies the object

type DataObjectLockCommand added in v0.12.8

type DataObjectLockCommand string

DataObjectLockCommand is a type for data object lock command

const (
	// DataObjectLockCommandSetLock is for set lock command
	DataObjectLockCommandSetLock DataObjectLockCommand = "setLockCmd"
	// DataObjectLockCommandSetLockWait is for set lock wait command
	DataObjectLockCommandSetLockWait DataObjectLockCommand = "setLockWaitCmd"
	// DataObjectLockCommandGetLock is for get lock command
	DataObjectLockCommandGetLock DataObjectLockCommand = "getLockCmd"
)

type DataObjectLockType added in v0.12.8

type DataObjectLockType string

DataObjectLockType is a type for data object lock type

const (
	// DataObjectLockTypeRead is for read lock
	DataObjectLockTypeRead DataObjectLockType = "readLockType"
	// DataObjectLockTypeWrite is for write lock
	DataObjectLockTypeWrite DataObjectLockType = "writeLockType"
	// DataObjectLockTypeWrite is for write lock
	DataObjectLockTypeUnlock DataObjectLockType = "unlockType"
)

func (DataObjectLockType) GetFileOpenMode added in v0.12.8

func (t DataObjectLockType) GetFileOpenMode() FileOpenMode

GetFileOpenMode returns FileOpenMode

type DataType added in v0.9.4

type DataType string

DataType is a type for data type

const (
	GENERIC_DT                      DataType = "generic"
	TEXT_DT                         DataType = "text"
	ASCII_TEXT_DT                   DataType = "ascii text"                   // *.txt
	ASCII_COMPRESSED_LEMPEL_ZIV_DT  DataType = "ascii compressed Lempel-Ziv"  // *.z, *.zip, *.gz
	ASCII_COMPRESSED_HUFFMAN_DT     DataType = "ascii compressed Huffman"     // *.z, *.zip, *.gz
	EBCDIC_TEXT_DT                  DataType = "ebcdic text"                  // *.txt
	EBCDIC_COMPRESSED_LEMPEL_ZIV_DT DataType = "ebcdic compressed Lempel-Ziv" // *.z, *.zip, *.gz
	EBCDIC_COMPRESSED_HUFFMAN_DT    DataType = "ebcdic compressed Huffman"    // *.z, *.zip, *.gz
	IMAGE_DT                        DataType = "image"
	TIFF_IMAGE_DT                   DataType = "tiff image"     // *.tif, *.tiff
	UUENCODED_TIFF_DT               DataType = "uuencoded tiff" // *.uu
	GIF_IMAGE_DT                    DataType = "gif image"      // *.gif
	JPEG_IMAGE_DT                   DataType = "jpeg image"     // *.jpeg, *.jpg
	PBM_IMAGE_DT                    DataType = "pbm image"      // *.pbm
	FIG_IMAGE_DT                    DataType = "fig image"      // *.fig
	FITS_IMAGE_DT                   DataType = "FITS image"     // *.fits, *.fit
	DICOM_IMAGE_DT                  DataType = "DICOM image"    // *.IMA, *.ima
	PRINT_FORMAT_DT                 DataType = "print-format"
	LATEX_FORMAT_DT                 DataType = "LaTeX format"      // *.tex
	TROFF_FORMAT_DT                 DataType = "Troff format"      // *.trf, *.trof
	POSTSCRIPT_FORMAT_DT            DataType = "Postscript format" // *.ps
	DVI_FORMAT_DT                   DataType = "DVI format"        // *.dvi
	WORD_FORMAT_DT                  DataType = "Word format"       // *.doc, *.rtf
	PROGRAM_CODE_DT                 DataType = "program code"
	SQL_SCRIPT_DT                   DataType = "SQL script"          // *.sql
	C_CODE_DT                       DataType = "C code"              // *.c
	C_INCLUDE_FILE_DT               DataType = "C include file"      // *.c
	FORTRAN_CODE_DT                 DataType = "fortran code"        // *.f
	OBJECT_CODE_DT                  DataType = "object code"         // *.o
	LIBRARY_CODE_DT                 DataType = "library code"        // *.a
	DATA_FILE_DT                    DataType = "data file"           // *.dat
	HTML_FILE_DT                    DataType = "html"                // *.htm, *.html
	SGML_FILE_DT                    DataType = "SGML File"           // *.sgm, *.sgml
	WAVE_AUDIO_DT                   DataType = "Wave Audio"          // *.wav
	TAR_FILE_DT                     DataType = "tar file"            // *.tar
	COMPRESSED_TAR_FILE_DT          DataType = "compressed tar file" // *.tz, *.tgz, *.zip
	JAVA_CODE_DT                    DataType = "java code"           // *.jav, *.java
	PERL_SCRIPT_DT                  DataType = "perl script"         // *.pl
	TCL_SCRIPT_DT                   DataType = "tcl script"          // *.tcl
	LINK_CODE_DT                    DataType = "link code"           // *.o
	SHADOW_OBJECT_DT                DataType = "shadow object"
	DATABASE_SHADOW_OBJECT_DT       DataType = "database shadow object"
	DIRECTORY_SHADOW_OBJECT_DT      DataType = "directory shadow object"
	DATABASE_DT                     DataType = "database"
	STREAMS_DT                      DataType = "streams"
	AUDIO_STREAMS_DT                DataType = "audio streams"
	REAL_AUDIO_DT                   DataType = "realAudio" // *.ra
	VIDEO_STREAMS_DT                DataType = "video streams"
	REAL_VIDEO_DT                   DataType = "realVideo"                     // *.rv
	MPEG_DT                         DataType = "MPEG"                          // *.mpeg, *.mpg
	AVI_DT                          DataType = "AVI"                           // *.avi
	PNG_DT                          DataType = "PNG-Portable Network Graphics" // *.png
	MP3_DT                          DataType = "MP3 - MPEG Audio"              // *.mp3, *.mpa
	WMV_DT                          DataType = "WMV-Windows Media Video"       // *.wmv
	BMP_DT                          DataType = "BMP -Bit Map"                  // *.bmp
	CSS_DT                          DataType = "CSS-Cascading Style Sheet"
	XML_DT                          DataType = "xml" // *.xml
	SLIDE_DT                        DataType = "Slide"
	POWER_POINT_SLIDE_DT            DataType = "Power Point Slide" // *.ppt
	SPREAD_SHEET_DT                 DataType = "Spread Sheet"
	EXCEL_SPREAD_SHEET_DT           DataType = "Excel Spread Sheet" // *.xls
	DOCUMENT_DT                     DataType = "Document"
	MSWORD_DOCUMENT_DT              DataType = "MSWord Document" // *.doc, *.rtf
	PDF_DOCUMENT_DT                 DataType = "PDF Document"    // *.pdf
	EXECUTABLE_DT                   DataType = "Executable"
	NT_EXECUTABLE_DT                DataType = "NT Executable"
	SOLARIS_EXECUTABLE_DT           DataType = "Solaris Executable"
	AIX_EXECUTABLE_DT               DataType = "AIX Executable"
	MAC_EXECUTABLE_DT               DataType = "Mac Executable"
	MAC_OSX_EXECURABLE_DT           DataType = "Mac OSX Executable"
	CRAY_EXECUTABLE_DT              DataType = "Cray Executable"
	SGI_EXECUTABLE_DT               DataType = "SGI Executable"
	DLL_DT                          DataType = "DLL"
	NT_DLL_DT                       DataType = "NT DLL"
	SOLARIS_DLL_DT                  DataType = "Solaris DLL"
	AIX_DLL_DT                      DataType = "AIX DLL"
	MAC_DLL_DT                      DataType = "Mac DLL"
	CRAY_DLL_DT                     DataType = "Cray DLL"
	SGI_DLL_DT                      DataType = "SGI DLL"
	MOVIE_DT                        DataType = "Movie"
	MPEG_MOVIE_DT                   DataType = "MPEG Movie"      // *.mpeg, *.mpg
	MPEG3_MOVIE_DT                  DataType = "MPEG 3 Movie"    // *.mpeg, *.mpg
	QUICKTIME_MOVIE_DT              DataType = "Quicktime Movie" // *.mov
	COMPRESSED_FILE_DT              DataType = "compressed file"
	COMPRESSED_MMCIF_FILE_DT        DataType = "compressed mmCIF file" // *.cif, *.mmcif
	COMPRESSED_PDB_FILE_DT          DataType = "compressed PDB file"   // *.pdb
	BINARY_FILE_DT                  DataType = "binary file"
	URL_DT                          DataType = "URL" // *.htm, *.html
	NSF_AWARD_ABSTRACTS_DT          DataType = "NSF Award Abstracts"
	EMAIL_DT                        DataType = "email"
	ORB_DATA_DT                     DataType = "orb data"
	DATASCOPE_DATA_DT               DataType = "datascope data"
	DICOM_HEADER_DT                 DataType = "DICOM header"
	XML_SCHEMA_DT                   DataType = "XML Schema" // *.xsd
	TAR_BUNDLE_DT                   DataType = "tar bundle"
	DATABASE_OBJECT_DT              DataType = "database object"
	MSO_DT                          DataType = "mso"
	GZIP_TAR_DT                     DataType = "gzipTar"   // *.tar.gz
	BZIP2_TAR_DT                    DataType = "bzip2Tar"  // *.tar.bz2
	GZIP_FILE_DT                    DataType = "gzipFile"  // *.gz
	BZIP2_FILE_DT                   DataType = "bzip2File" // *.bz2
	ZIP_FILE_DT                     DataType = "zipFile"   // *.zip
	GZIP_TAR_BUNDLE_DT              DataType = "gzipTar bundle"
	BZIP2_TAR_BUNDLE_DT             DataType = "bzip2Tar bundle"
	ZIP_FILE_BUNDLE_DT              DataType = "zipFile bundle"
	MSSO_FILE_DT                    DataType = "msso file"
)

type EncryptionAlgorithm added in v0.14.0

type EncryptionAlgorithm string

EncryptionAlgorithm determines encryption algorithm

const (
	// EncryptionAlgorithmAES256CBC is for AES-256-CBC
	EncryptionAlgorithmAES256CBC EncryptionAlgorithm = "AES-256-CBC"
	// EncryptionAlgorithmAES256CTR is for AES-256-CTR
	EncryptionAlgorithmAES256CTR EncryptionAlgorithm = "AES-256-CTR"
	// EncryptionAlgorithmAES256CFB is for AES-256-CFB
	EncryptionAlgorithmAES256CFB EncryptionAlgorithm = "AES-256-CFB"
	// EncryptionAlgorithmAES256OFB is for AES-256-OFB
	EncryptionAlgorithmAES256OFB EncryptionAlgorithm = "AES-256-OFB"
	// EncryptionAlgorithmDES256CBC is for DES-256-CBC
	EncryptionAlgorithmDES256CBC EncryptionAlgorithm = "DES-256-CBC"
	// EncryptionAlgorithmDES256CTR is for DES-256-CTR
	EncryptionAlgorithmDES256CTR EncryptionAlgorithm = "DES-256-CTR"
	// EncryptionAlgorithmDES256CFB is for DES-256-CFB
	EncryptionAlgorithmDES256CFB EncryptionAlgorithm = "DES-256-CFB"
	// EncryptionAlgorithmDES256OFB is for DES-256-OFB
	EncryptionAlgorithmDES256OFB EncryptionAlgorithm = "DES-256-OFB"
	// EncryptionAlgorithmUnknown is for unknown algorithm
	EncryptionAlgorithmUnknown EncryptionAlgorithm = ""
)

func GetEncryptionAlgorithm added in v0.14.0

func GetEncryptionAlgorithm(encryptionAlgorithm string) EncryptionAlgorithm

GetEncryptionAlgorithm returns encryption algorithm from string

type FileAlreadyExistError added in v0.12.15

type FileAlreadyExistError struct {
	Path string
}

FileAlreadyExistError contains file already exist error information

func (*FileAlreadyExistError) Error added in v0.12.15

func (err *FileAlreadyExistError) Error() string

Error returns error message

func (*FileAlreadyExistError) Is added in v0.12.15

func (err *FileAlreadyExistError) Is(other error) bool

Is tests type of error

func (*FileAlreadyExistError) ToString added in v0.12.15

func (err *FileAlreadyExistError) ToString() string

ToString stringifies the object

type FileNotFoundError

type FileNotFoundError struct {
	Path string
}

FileNotFoundError contains file not found error information

func (*FileNotFoundError) Error

func (err *FileNotFoundError) Error() string

Error returns error message

func (*FileNotFoundError) Is added in v0.12.14

func (err *FileNotFoundError) Is(other error) bool

Is tests type of error

func (*FileNotFoundError) ToString added in v0.12.14

func (err *FileNotFoundError) ToString() string

ToString stringifies the object

type FileOpenFlag

type FileOpenFlag int

FileOpenFlag is internally used value, derived from FileOpenMode

const (
	// O_RDONLY is for read
	O_RDONLY FileOpenFlag = 0
	// O_WRONLY is for write
	O_WRONLY FileOpenFlag = 1
	// O_RDWR is for read and write
	O_RDWR FileOpenFlag = 2
	// O_APPEND is for append (moving the file pointer to the file end)
	O_APPEND FileOpenFlag = 1024
	// O_CREAT is for creating a file if not exists
	O_CREAT FileOpenFlag = 64
	// O_EXCL ...
	O_EXCL FileOpenFlag = 128
	// O_TRUNC is for truncating content
	O_TRUNC FileOpenFlag = 512
)

type FileOpenMode

type FileOpenMode string

FileOpenMode determines file open mode

const (
	// FileOpenModeReadOnly is for read
	FileOpenModeReadOnly FileOpenMode = "r"
	// FileOpenModeReadWrite is for read and write
	FileOpenModeReadWrite FileOpenMode = "r+"
	// FileOpenModeWriteOnly is for write
	FileOpenModeWriteOnly FileOpenMode = "w"
	// FileOpenModeWriteTruncate is for write, but truncates the file
	FileOpenModeWriteTruncate FileOpenMode = "w+"
	// FileOpenModeAppend is for write, not trucate, but appends from the file end
	FileOpenModeAppend FileOpenMode = "a"
	// FileOpenModeReadAppend is for read and write, but appends from the file end
	FileOpenModeReadAppend FileOpenMode = "a+"
)

func (FileOpenMode) GetFlag added in v0.7.6

func (mode FileOpenMode) GetFlag() int

GetFlag returns file open flag

func (FileOpenMode) GetFlagSeekToEnd added in v0.7.6

func (mode FileOpenMode) GetFlagSeekToEnd() (int, bool)

GetFlagSeekToEnd returns file open flag and returns true if file pointer moves to the file end

func (FileOpenMode) IsOpeningExisting added in v0.7.6

func (mode FileOpenMode) IsOpeningExisting() bool

IsOpeningExisting returns true if the file open mode is for opening existing file

func (FileOpenMode) IsRead added in v0.7.6

func (mode FileOpenMode) IsRead() bool

IsRead returns true if the file open mode is for read

func (FileOpenMode) IsReadOnly added in v0.7.6

func (mode FileOpenMode) IsReadOnly() bool

IsReadOnly returns true if the file open mode is for read-only

func (FileOpenMode) IsWrite added in v0.7.6

func (mode FileOpenMode) IsWrite() bool

IsWrite returns true if the file open mode is for write

func (FileOpenMode) IsWriteOnly added in v0.7.6

func (mode FileOpenMode) IsWriteOnly() bool

IsWriteOnly returns true if the file open mode is for write-only

func (FileOpenMode) SeekToEnd added in v0.7.6

func (mode FileOpenMode) SeekToEnd() bool

SeekToEnd returns if the mode needs seeking to end

type IRODSAccess

type IRODSAccess struct {
	Path        string
	UserName    string
	UserZone    string
	UserType    IRODSUserType
	AccessLevel IRODSAccessLevelType
}

IRODSAccess contains irods access information

func (*IRODSAccess) ToString

func (access *IRODSAccess) ToString() string

ToString stringifies the object

type IRODSAccessLevelType added in v0.3.0

type IRODSAccessLevelType string

IRODSAccessLevelType is a type for access level

const (
	// IRODSAccessLevelNull is for null access
	IRODSAccessLevelNull IRODSAccessLevelType = "null"
	// IRODSAccessLevelExecute is for execute access
	IRODSAccessLevelExecute IRODSAccessLevelType = "execute"
	// IRODSAccessLevelReadAnnotation is for read annotation access
	IRODSAccessLevelReadAnnotation IRODSAccessLevelType = "read_annotation"
	// IRODSAccessLevelReadSystemMetadata is for read system metadata access
	IRODSAccessLevelReadSystemMetadata IRODSAccessLevelType = "read_system_metadata"
	// IRODSAccessLevelReadMetadata is for read metadata access
	IRODSAccessLevelReadMetadata IRODSAccessLevelType = "read_metadata"
	// IRODSAccessLevelReadObject is for read object access
	IRODSAccessLevelReadObject IRODSAccessLevelType = "read_object"
	// IRODSAccessLevelWriteAnnotation is for write annotation access
	IRODSAccessLevelWriteAnnotation IRODSAccessLevelType = "write_annotation"
	// IRODSAccessLevelCreateMetadata is for create metadata access
	IRODSAccessLevelCreateMetadata IRODSAccessLevelType = "create_metadata"
	// IRODSAccessLevelModifyMetadata is for modify metadata access
	IRODSAccessLevelModifyMetadata IRODSAccessLevelType = "modify_metadata"
	// IRODSAccessLevelDeleteMetadata is for delete metadata access
	IRODSAccessLevelDeleteMetadata IRODSAccessLevelType = "delete_metadata"
	// IRODSAccessLevelAdministerObject is for administer object access
	IRODSAccessLevelAdministerObject IRODSAccessLevelType = "administer_object"
	// IRODSAccessLevelCreateObject is for create object access
	IRODSAccessLevelCreateObject IRODSAccessLevelType = "create_object"
	// IRODSAccessLevelModifyObject is for modify object access
	IRODSAccessLevelModifyObject IRODSAccessLevelType = "modify_object"
	// IRODSAccessLevelDeleteObject is for delete object access
	IRODSAccessLevelDeleteObject IRODSAccessLevelType = "delete_object"
	// IRODSAccessLevelCreateToken is for create token access
	IRODSAccessLevelCreateToken IRODSAccessLevelType = "create_token"
	// IRODSAccessLevelDeleteToken is for delete token access
	IRODSAccessLevelDeleteToken IRODSAccessLevelType = "delete_token"
	// IRODSAccessLevelCurate is for curate access
	IRODSAccessLevelCurate IRODSAccessLevelType = "curate"
	// IRODSAccessLevelOwner is for owner access
	IRODSAccessLevelOwner IRODSAccessLevelType = "own"
)

func GetIRODSAccessLevelType added in v0.14.3

func GetIRODSAccessLevelType(accessLevelType string) IRODSAccessLevelType

func (IRODSAccessLevelType) ChmodString added in v0.4.5

func (accessType IRODSAccessLevelType) ChmodString() string

ChmodString returns the string for update access control messages.

type IRODSAccount

type IRODSAccount struct {
	AuthenticationScheme    AuthScheme
	ClientServerNegotiation bool
	CSNegotiationPolicy     CSNegotiationRequire
	Host                    string
	Port                    int
	ClientUser              string
	ClientZone              string
	ProxyUser               string
	ProxyZone               string
	Password                string
	Ticket                  string
	DefaultResource         string
	PamTTL                  int
	PamToken                string
	SSLConfiguration        *IRODSSSLConfig
}

IRODSAccount contains irods login information

func CreateIRODSAccount

func CreateIRODSAccount(host string, port int, user string, zone string,
	authScheme AuthScheme, password string, defaultResource string) (*IRODSAccount, error)

CreateIRODSAccount creates IRODSAccount

func CreateIRODSAccountForTicket added in v0.5.1

func CreateIRODSAccountForTicket(host string, port int, user string, zone string,
	authScheme AuthScheme, password string, ticket string, defaultResource string) (*IRODSAccount, error)

CreateIRODSAccountForTicket creates IRODSAccount

func CreateIRODSAccountFromYAML

func CreateIRODSAccountFromYAML(yamlBytes []byte) (*IRODSAccount, error)

CreateIRODSAccountFromYAML creates IRODSAccount from YAML

func CreateIRODSProxyAccount

func CreateIRODSProxyAccount(host string, port int, clientUser string, clientZone string,
	proxyUser string, proxyZone string,
	authScheme AuthScheme, password string, defaultResource string) (*IRODSAccount, error)

CreateIRODSProxyAccount creates IRODSAccount for proxy access

func (*IRODSAccount) FixAuthConfiguration added in v0.12.10

func (account *IRODSAccount) FixAuthConfiguration()

func (*IRODSAccount) GetRedacted added in v0.12.14

func (account *IRODSAccount) GetRedacted() *IRODSAccount

func (*IRODSAccount) SetCSNegotiation added in v0.7.3

func (account *IRODSAccount) SetCSNegotiation(requireNegotiation bool, requirePolicy CSNegotiationRequire)

SetCSNegotiation sets CSNegotiation policy

func (*IRODSAccount) SetSSLConfiguration

func (account *IRODSAccount) SetSSLConfiguration(sslConf *IRODSSSLConfig)

SetSSLConfiguration sets SSL Configuration

func (*IRODSAccount) UseProxyAccess

func (account *IRODSAccount) UseProxyAccess() bool

UseProxyAccess returns whether it uses proxy access or not

func (*IRODSAccount) UseTicket added in v0.5.1

func (account *IRODSAccount) UseTicket() bool

UseTicket returns whether it uses ticket for access control

func (*IRODSAccount) Validate added in v0.10.1

func (account *IRODSAccount) Validate() error

Validate validates iRODS account

type IRODSChecksum added in v0.12.6

type IRODSChecksum struct {
	IRODSChecksumString string
	Algorithm           ChecksumAlgorithm
	Checksum            []byte
}

IRODSChecksum contains data object hash information

func CreateIRODSChecksum added in v0.12.10

func CreateIRODSChecksum(checksumString string) (*IRODSChecksum, error)

CreateIRODSChecksum creates IRODSChecksum from checksum string

func (*IRODSChecksum) ToString added in v0.12.6

func (checksum *IRODSChecksum) ToString() string

ToString stringifies the object

type IRODSCollection

type IRODSCollection struct {
	ID int64
	// Path has an absolute path to the collection
	Path string
	// Name has only the name part of the path
	Name string
	// Owner has the owner's name
	Owner string
	// CreateTime has creation time
	CreateTime time.Time
	// ModifyTime has last modified time
	ModifyTime time.Time
}

IRODSCollection contains irods collection information

func (*IRODSCollection) ToString

func (coll *IRODSCollection) ToString() string

ToString stringifies the object

type IRODSColumn

type IRODSColumn struct {
	Type    ColumnType
	ICatKey string
	ICatID  int
}

IRODSColumn is a struct holding a column

type IRODSDataObject

type IRODSDataObject struct {
	ID           int64
	CollectionID int64
	// Path has an absolute path to the data object
	Path string
	// Name has only the name part of the path
	Name string
	// Size has the file size
	Size int64
	// DataType has the type of the file,
	DataType string
	// Replicas has replication information
	Replicas []*IRODSReplica
}

IRODSDataObject contains irods data object information

func (*IRODSDataObject) ToString

func (obj *IRODSDataObject) ToString() string

ToString stringifies the object

type IRODSError added in v0.5.1

type IRODSError struct {
	Code              common.ErrorCode
	Message           string
	ContextualMessage string
}

IRODSError contains irods error information

func NewIRODSError added in v0.5.1

func NewIRODSError(code common.ErrorCode) *IRODSError

NewIRODSError creates a new IRODSError

func NewIRODSErrorWithString added in v0.5.1

func NewIRODSErrorWithString(code common.ErrorCode, message string) *IRODSError

NewIRODSErrorWithString creates a new IRODSError with message

func (*IRODSError) Error added in v0.5.1

func (err *IRODSError) Error() string

Error returns error message

func (*IRODSError) GetCode added in v0.5.1

func (err *IRODSError) GetCode() common.ErrorCode

GetCode returns error code

func (*IRODSError) Is added in v0.12.14

func (err *IRODSError) Is(other error) bool

Is tests type of error

func (*IRODSError) ToString added in v0.5.1

func (err *IRODSError) ToString() string

ToString stringifies the object

type IRODSFileHandle

type IRODSFileHandle struct {
	FileDescriptor int
	// Path has an absolute path to the data object
	Path     string
	OpenMode FileOpenMode
	Resource string
	Oper     common.OperationType
}

IRODSFileHandle contains file handle

func (*IRODSFileHandle) ToString

func (handle *IRODSFileHandle) ToString() string

ToString stringifies the object

type IRODSFileLockHandle added in v0.12.8

type IRODSFileLockHandle struct {
	FileDescriptor int
	// Path has an absolute path to the data object
	Path     string
	OpenMode FileOpenMode
	Type     DataObjectLockType
	Command  DataObjectLockCommand
}

IRODSFileLockHandle contains file lock handle

func (*IRODSFileLockHandle) ToString added in v0.12.8

func (handle *IRODSFileLockHandle) ToString() string

ToString stringifies the object

type IRODSFileOpenRedirectionHandle added in v0.14.0

type IRODSFileOpenRedirectionHandle struct {
	FileDescriptor int
	// Path has an absolute path to the data object
	Path            string
	Resource        string
	Threads         int
	CheckSum        string
	RedirectionInfo *IRODSRedirectionInfo
}

IRODSFileOpenRedirectionHandle contains file open redirection handle

func (*IRODSFileOpenRedirectionHandle) ToString added in v0.14.0

func (info *IRODSFileOpenRedirectionHandle) ToString() string

ToString stringifies the object

type IRODSMeta

type IRODSMeta struct {
	AVUID int64 // is ignored on metadata operations (set, add, mod, rm)
	Name  string
	Value string
	Units string
	// CreateTime has creation time
	CreateTime time.Time
	// ModifyTime has last modified time
	ModifyTime time.Time
}

IRODSMeta contains irods metadata

func (*IRODSMeta) ToString

func (meta *IRODSMeta) ToString() string

ToString stringifies the object

type IRODSMetaItemType added in v0.2.0

type IRODSMetaItemType string

IRODSMetaItemType describes a type to set metadata on

const (
	// IRODSDataObjectMetaItemType is a type for data object meta
	IRODSDataObjectMetaItemType IRODSMetaItemType = "-d"
	// IRODSCollectionMetaItemType is a type for collection meta
	IRODSCollectionMetaItemType IRODSMetaItemType = "-C"
	// IRODSResourceMetaItemType is a type for resource meta
	IRODSResourceMetaItemType IRODSMetaItemType = "-R"
	// IRODSUserMetaItemType is a type for user meta
	IRODSUserMetaItemType IRODSMetaItemType = "-u"
)

func GetIRODSMetaItemType added in v0.2.0

func GetIRODSMetaItemType(data interface{}) (IRODSMetaItemType, error)

GetIRODSMetaItemType gets the irods metadata item type from an object.

type IRODSProcess added in v0.9.7

type IRODSProcess struct {
	ID            int64
	StartTime     time.Time
	ProxyUser     string
	ProxyZone     string
	ClientUser    string
	ClientZone    string
	ClientAddress string
	ServerAddress string
	ClientProgram string
}

IRODSProcess contains irods process information

func (*IRODSProcess) ToString added in v0.9.7

func (obj *IRODSProcess) ToString() string

ToString stringifies the object

type IRODSQuota added in v0.4.5

type IRODSQuota struct {
	RescName string
	Limit    int64
}

IRODSQuota describes a resource quota

func (*IRODSQuota) ToString added in v0.4.5

func (q *IRODSQuota) ToString() string

ToString stringifies the object

type IRODSRedirectionInfo added in v0.14.0

type IRODSRedirectionInfo struct {
	Port         int
	Cookie       int
	ServerSocket int
	WindowSize   int
	Host         string
}

IRODSRedirectionInfo contains redirection info

func (*IRODSRedirectionInfo) ToString added in v0.14.0

func (info *IRODSRedirectionInfo) ToString() string

ToString stringifies the object

func (*IRODSRedirectionInfo) Validate added in v0.14.0

func (info *IRODSRedirectionInfo) Validate() error

Validate validates redirection info

type IRODSReplica

type IRODSReplica struct {
	Number int64

	// Owner has the owner's name
	Owner string

	Checksum     *IRODSChecksum
	Status       string
	ResourceName string

	// Path has an absolute path to the data object
	Path              string
	ResourceHierarchy string

	// CreateTime has creation time
	CreateTime time.Time
	// ModifyTime has last modified time
	ModifyTime time.Time
}

IRODSReplica contains irods data object replication information

func (*IRODSReplica) ToString

func (obj *IRODSReplica) ToString() string

ToString stringifies the object

type IRODSResource added in v0.4.0

type IRODSResource struct {
	RescID   int64
	Name     string
	Zone     string
	Type     string
	Class    string
	Location string

	// Path has the path string of the resource
	Path string

	// Context has the context string
	Context string

	// CreateTime has creation time
	CreateTime time.Time
	// ModifyTime has last modified time
	ModifyTime time.Time
}

IRODSResource describes a resource host

func (*IRODSResource) ToString added in v0.4.0

func (res *IRODSResource) ToString() string

ToString stringifies the object

type IRODSSSLConfig

type IRODSSSLConfig struct {
	CACertificateFile   string
	CACertificatePath   string
	EncryptionKeySize   int
	EncryptionAlgorithm string
	SaltSize            int
	HashRounds          int
}

IRODSSSLConfig contains irods ssl configuration

func CreateIRODSSSLConfig

func CreateIRODSSSLConfig(caCertFile string, caCertPath string, keySize int, algorithm string, saltSize int,
	hashRounds int) (*IRODSSSLConfig, error)

CreateIRODSSSLConfig creates IRODSSSLConfig

func (*IRODSSSLConfig) LoadCACert added in v0.14.1

func (config *IRODSSSLConfig) LoadCACert() (*x509.CertPool, error)

LoadCACert loads CA Cert

type IRODSTicket added in v0.7.0

type IRODSTicket struct {
	ID int64
	// Name is ticket string
	Name string
	// Type is access type
	Type TicketType
	// Owner has the owner's name
	Owner string
	// OwnerZone has the owner's zone
	OwnerZone string
	// ObjectType is type of object
	ObjectType ObjectType
	// Path is path to the object
	Path string
	// ExpirationTime is time that the ticket expires
	ExpirationTime time.Time
	// UsesLimit is an access limit
	UsesLimit int64
	// UsesCount is an access count
	UsesCount int64
	// WriteFileLimit is a write file limit
	WriteFileLimit int64
	// WriteFileCount is a write file count
	WriteFileCount int64
	// WriteByteLimit is a write byte limit
	WriteByteLimit int64
	// WriteByteCount is a write byte count
	WriteByteCount int64
}

IRODSTicket contains irods ticket information

func (*IRODSTicket) IsReadWrite added in v0.12.19

func (ticket *IRODSTicket) IsReadWrite() bool

IsReadWrite returns true if the ticket is TicketTypeWrite

func (*IRODSTicket) ToString added in v0.7.0

func (ticket *IRODSTicket) ToString() string

ToString stringifies the object

type IRODSTicketForAnonymousAccess added in v0.7.0

type IRODSTicketForAnonymousAccess struct {
	ID int64
	// Name is ticket string
	Name string
	// Type is access type
	Type TicketType
	// Path is path to the object
	Path string
	// ExpirationTime is time that the ticket expires
	ExpirationTime time.Time
}

IRODSTicketForAnonymousAccess contains minimal irods ticket information for anonymous access

func (*IRODSTicketForAnonymousAccess) ToString added in v0.7.0

func (ticket *IRODSTicketForAnonymousAccess) ToString() string

ToString stringifies the object

type IRODSUser

type IRODSUser struct {
	ID   int64
	Name string
	Zone string
	Type IRODSUserType
}

IRODSUser contains irods user information

func (*IRODSUser) IsAdminGroup added in v0.12.19

func (user *IRODSUser) IsAdminGroup() bool

IsAdminGroup returns true if type is IRODSUserGroupAdmin

func (*IRODSUser) IsAdminUser added in v0.12.19

func (user *IRODSUser) IsAdminUser() bool

IsAdminUser returns true if type is IRODSUserRodsAdmin

func (*IRODSUser) IsGroup added in v0.12.19

func (user *IRODSUser) IsGroup() bool

IsGroup returns true if type is IRODSUserRodsGroup

func (*IRODSUser) IsUser added in v0.12.19

func (user *IRODSUser) IsUser() bool

IsUser returns true if type is IRODSUserRodsUser

func (*IRODSUser) ToString

func (user *IRODSUser) ToString() string

ToString stringifies the object

type IRODSUserType added in v0.3.0

type IRODSUserType string

IRODSUserType is a type of iRODS User

const (
	// IRODSUserRodsGroup is for a group
	IRODSUserRodsGroup IRODSUserType = "rodsgroup"
	// IRODSUserRodsUser is for a user
	IRODSUserRodsUser IRODSUserType = "rodsuser"
	// IRODSUserRodsAdmin is for an admin user
	IRODSUserRodsAdmin IRODSUserType = "rodsadmin"
	// IRODSUserGroupAdmin is for an admin group
	IRODSUserGroupAdmin IRODSUserType = "groupadmin"
)

type IRODSVersion

type IRODSVersion struct {
	ReleaseVersion string // e.g., "rods4.2.8"
	APIVersion     string
	ReconnectPort  int
	ReconnectAddr  string
	Cookie         int
}

IRODSVersion contains irods version information

func (*IRODSVersion) GetReleaseVersion added in v0.5.2

func (ver *IRODSVersion) GetReleaseVersion() (int, int, int)

GetReleaseVersion returns version parts (major, minor, patch)

func (*IRODSVersion) HasHigherVersionThan added in v0.5.2

func (ver *IRODSVersion) HasHigherVersionThan(major int, minor int, patch int) bool

HasHigherVersionThan returns if given version is higher or equal than current version

type IRODSZone

type IRODSZone struct {
	ID   string
	Name string
	Type string
}

IRODSZone contains irods zone information

func (*IRODSZone) ToString

func (zone *IRODSZone) ToString() string

ToString stringifies the object

type ObjectType added in v0.7.0

type ObjectType string
const (
	// ObjectTypeDataObject is for DataObject
	ObjectTypeDataObject ObjectType = "data"
	// ObjectTypeCollection is for Collection
	ObjectTypeCollection ObjectType = "collection"
)

type ResourceServerConnectionConfigError added in v0.14.0

type ResourceServerConnectionConfigError struct {
	Config *IRODSRedirectionInfo
}

ResourceServerConnectionConfigError contains resource server connection config error information

func (*ResourceServerConnectionConfigError) Error added in v0.14.0

Error returns error message

func (*ResourceServerConnectionConfigError) Is added in v0.14.0

Is tests type of error

func (*ResourceServerConnectionConfigError) ToString added in v0.14.0

ToString stringifies the object

type TicketNotFoundError added in v0.12.14

type TicketNotFoundError struct {
	Ticket string
}

TicketNotFoundError contains ticket not found error information

func (*TicketNotFoundError) Error added in v0.12.14

func (err *TicketNotFoundError) Error() string

Error returns error message

func (*TicketNotFoundError) Is added in v0.12.14

func (err *TicketNotFoundError) Is(other error) bool

Is tests type of error

func (*TicketNotFoundError) ToString added in v0.12.14

func (err *TicketNotFoundError) ToString() string

ToString stringifies the object

type TicketType added in v0.7.0

type TicketType string

TicketType determines ticket access type

const (
	// TicketTypeRead is for read
	TicketTypeRead TicketType = "read"
	// TicketTypeWrite is for write
	TicketTypeWrite TicketType = "write"
)

type TransferDataBlock added in v0.12.11

type TransferDataBlock struct {
	Offset int64
	Length int64
}

TransferDataBlock is a struct that maintains transfer data block info.

type UserNotFoundError added in v0.12.14

type UserNotFoundError struct {
	Name string
}

UserNotFoundError contains user/group not found error information

func (*UserNotFoundError) Error added in v0.12.14

func (err *UserNotFoundError) Error() string

Error returns error message

func (*UserNotFoundError) Is added in v0.12.14

func (err *UserNotFoundError) Is(other error) bool

Is tests type of error

func (*UserNotFoundError) ToString added in v0.12.14

func (err *UserNotFoundError) ToString() string

ToString stringifies the object

type Whence

type Whence int

Whence determines where to start counting the offset

const (
	// SeekSet means offset starts from file start
	SeekSet Whence = 0
	// SeekCur means offset starts from current offset
	SeekCur Whence = 1
	// SeekEnd means offset starts from file end
	SeekEnd Whence = 2
)

Jump to

Keyboard shortcuts

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