Documentation ¶
Index ¶
- Constants
- func GetIRODSErrorCode(err error) common.ErrorCode
- func IsCollectionNotEmptyError(err error) bool
- func IsFileNotFoundError(err error) bool
- func IsIRODSError(err error) bool
- type AuthScheme
- type CSNegotiationPolicy
- type CSNegotiationRequire
- type CollectionIOMetrics
- type CollectionNotEmptyError
- type ColumnType
- type DataObjectIOMetrics
- type FileNotFoundError
- type FileOpenFlag
- type FileOpenMode
- func (mode *FileOpenMode) GetFlag() int
- func (mode *FileOpenMode) GetFlagSeekToEnd() (int, bool)
- func (mode *FileOpenMode) IsOpeningExisting() bool
- func (mode *FileOpenMode) IsRead() bool
- func (mode *FileOpenMode) IsReadOnly() bool
- func (mode *FileOpenMode) IsWrite() bool
- func (mode *FileOpenMode) IsWriteOnly() bool
- func (mode *FileOpenMode) SeekToEnd() bool
- type IRODSAccess
- type IRODSAccessLevelType
- type IRODSAccount
- func CreateIRODSAccount(host string, port int, user string, zone string, authScheme AuthScheme, ...) (*IRODSAccount, error)
- func CreateIRODSAccountForTicket(host string, port int, user string, zone string, authScheme AuthScheme, ...) (*IRODSAccount, error)
- func CreateIRODSAccountFromYAML(yamlBytes []byte) (*IRODSAccount, error)
- func CreateIRODSProxyAccount(host string, port int, clientUser string, clientZone string, proxyUser string, ...) (*IRODSAccount, error)
- func (account *IRODSAccount) MaskSensitiveData() *IRODSAccount
- func (account *IRODSAccount) SetCSNegotiation(requireNegotiation bool, requirePolicy CSNegotiationRequire)
- func (account *IRODSAccount) SetSSLConfiguration(sslConf *IRODSSSLConfig)
- func (account *IRODSAccount) UseProxyAccess() bool
- func (account *IRODSAccount) UseTicket() bool
- type IRODSCollection
- type IRODSColumn
- type IRODSDataObject
- type IRODSError
- type IRODSFileHandle
- type IRODSMeta
- type IRODSMetaCollection
- type IRODSMetaItemType
- type IRODSQuota
- type IRODSReplica
- type IRODSResource
- type IRODSSSLConfig
- type IRODSTicket
- type IRODSTicketForAnonymousAccess
- type IRODSUser
- type IRODSUserType
- type IRODSVersion
- type IRODSZone
- type ObjectType
- type TicketType
- type TransferMetrics
- type Whence
Constants ¶
const ( // PamTTLDefault is a default value for Pam TTL PamTTLDefault int = 1 )
Variables ¶
This section is empty.
Functions ¶
func GetIRODSErrorCode ¶ added in v0.5.1
GetIRODSErrorCode returns iRODS error code if the error is iRODSError
func IsCollectionNotEmptyError ¶ added in v0.5.10
IsCollectionNotEmptyError evaluates if the given error is CollectionNotEmptyError
func IsFileNotFoundError ¶
IsFileNotFoundError evaluates if the given error is FileNotFoundError
func IsIRODSError ¶ added in v0.5.1
IsIRODSError checks if the given error is IRODSError
Types ¶
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" )
func GetAuthScheme ¶
func GetAuthScheme(authScheme string) (AuthScheme, error)
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 CollectionIOMetrics ¶ added in v0.5.11
type CollectionIOMetrics struct { Stat uint64 List uint64 Delete uint64 Create uint64 Rename uint64 Meta uint64 }
CollectionIOMetrics - represents collection IO for access
type CollectionNotEmptyError ¶ added in v0.5.10
type CollectionNotEmptyError struct {
// contains filtered or unexported fields
}
CollectionNotEmptyError ...
func NewCollectionNotEmptyError ¶ added in v0.5.10
func NewCollectionNotEmptyError(message string) *CollectionNotEmptyError
NewCollectionNotEmptyError creates CollectionNotEmptyError struct
func NewCollectionNotEmptyErrorf ¶ added in v0.5.10
func NewCollectionNotEmptyErrorf(format string, v ...interface{}) *CollectionNotEmptyError
NewCollectionNotEmptyErrorf creates CollectionNotEmptyError struct
func (*CollectionNotEmptyError) Error ¶ added in v0.5.10
func (e *CollectionNotEmptyError) Error() string
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 DataObjectIOMetrics ¶ added in v0.5.11
type DataObjectIOMetrics struct { Stat uint64 Read uint64 Write uint64 Delete uint64 Create uint64 Rename uint64 Meta uint64 }
DataObjectIOMetrics - represents data object IO for access
type FileNotFoundError ¶
type FileNotFoundError struct {
// contains filtered or unexported fields
}
FileNotFoundError ...
func NewFileNotFoundError ¶
func NewFileNotFoundError(message string) *FileNotFoundError
NewFileNotFoundError creates FileNotFoundError struct
func NewFileNotFoundErrorf ¶
func NewFileNotFoundErrorf(format string, v ...interface{}) *FileNotFoundError
NewFileNotFoundErrorf creates FileNotFoundError struct
func (*FileNotFoundError) Error ¶
func (e *FileNotFoundError) Error() string
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 ( // IRODSAccessLevelOwner is for owner access IRODSAccessLevelOwner IRODSAccessLevelType = "own" // IRODSAccessLevelWrite is for write access IRODSAccessLevelWrite IRODSAccessLevelType = "modify object" // IRODSAccessLevelRead is for read access IRODSAccessLevelRead IRODSAccessLevelType = "read object" // IRODSAccessLevelNone is for no access IRODSAccessLevelNone 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 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) MaskSensitiveData ¶
func (account *IRODSAccount) MaskSensitiveData() *IRODSAccount
MaskSensitiveData returns IRODSAccount object with sensitive data masked
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
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 // Attributes has attributes //Attributes 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
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) 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 IRODSMeta ¶
type IRODSMeta struct { AVUID int64 // is ignored on metadata operations (set, add, mod, rm) Name string Value string Units string }
IRODSMeta contains irods metadata
type IRODSMetaCollection ¶
type IRODSMetaCollection struct {
Path string
}
IRODSMetaCollection contains irods data object information
func (*IRODSMetaCollection) ToString ¶
func (meta *IRODSMetaCollection) 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 IRODSQuota ¶ added in v0.4.5
IRODSQuota describes a resource quota
func (*IRODSQuota) ToString ¶ added in v0.4.5
func (q *IRODSQuota) ToString() string
ToString stringifies the object
type IRODSReplica ¶
type IRODSReplica struct { Number int64 // Owner has the owner's name Owner string // CheckSum has the checksum of the file CheckSum string 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 EncryptionKeySize int EncryptionAlgorithm string SaltSize int HashRounds int }
IRODSSSLConfig contains irods ssl configuration
func CreateIRODSSSLConfig ¶
func CreateIRODSSSLConfig(caCertFile string, keySize int, algorithm string, saltSize int, hashRounds int) (*IRODSSSLConfig, error)
CreateIRODSSSLConfig creates IRODSSSLConfig
func (*IRODSSSLConfig) ReadCACert ¶
func (config *IRODSSSLConfig) ReadCACert() ([]byte, error)
ReadCACert returns CA Cert data
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 // ObjectType is type of object ObjectType ObjectType // Path is path to the object Path string // ExpireTime is time that the ticket expires ExpireTime 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) 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 // ExpireTime is time that the ticket expires ExpireTime 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
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 ObjectType ¶ added in v0.7.0
type ObjectType string
const ( // ObjectTypeDataObject is for DataObject ObjectTypeDataObject ObjectType = "data-object" // ObjectTypeCollection is for Collection ObjectTypeCollection ObjectType = "collection" )
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 TransferMetrics ¶ added in v0.5.11
type TransferMetrics struct { BytesReceived uint64 BytesSent uint64 CollectionIO CollectionIOMetrics DataObjectIO DataObjectIOMetrics }
TransferMetrics - represents bytes transferred for access