Documentation ¶
Index ¶
- Constants
- Variables
- type CheckErrorResponse
- type IRODSConnection
- func (conn *IRODSConnection) Commit() error
- func (conn *IRODSConnection) Connect() error
- func (conn *IRODSConnection) Disconnect() error
- func (conn *IRODSConnection) GetAccount() *types.IRODSAccount
- func (conn *IRODSConnection) GetClientSignature() string
- func (conn *IRODSConnection) GetCreationTime() time.Time
- func (conn *IRODSConnection) GetGeneratedPasswordForPAMAuth() string
- func (conn *IRODSConnection) GetLastSuccessfulAccess() time.Time
- func (conn *IRODSConnection) GetMetrics() *metrics.IRODSMetrics
- func (conn *IRODSConnection) GetVersion() *types.IRODSVersion
- func (conn *IRODSConnection) IsConnected() bool
- func (conn *IRODSConnection) IsTransactionDirty() bool
- func (conn *IRODSConnection) Lock()
- func (conn *IRODSConnection) PoorMansRollback() error
- func (conn *IRODSConnection) PostprocessMessage(msg *message.IRODSMessage) error
- func (conn *IRODSConnection) PostprocessXML(in []byte) ([]byte, error)
- func (conn *IRODSConnection) PreprocessMessage(msg *message.IRODSMessage, forPassword bool) error
- func (conn *IRODSConnection) PreprocessXML(in []byte) ([]byte, error)
- func (conn *IRODSConnection) PreprocessXMLForPassword(in []byte) ([]byte, error)
- func (conn *IRODSConnection) RawBind(socket net.Conn)
- func (conn *IRODSConnection) ReadMessage(bsBuffer []byte) (*message.IRODSMessage, error)
- func (conn *IRODSConnection) ReadMessageWithTrackerCallBack(bsBuffer []byte, callback common.TrackerCallBack) (*message.IRODSMessage, error)
- func (conn *IRODSConnection) Recv(buffer []byte, size int) (int, error)
- func (conn *IRODSConnection) RecvToWriter(writer io.Writer, size int) (int, error)
- func (conn *IRODSConnection) RecvWithTrackerCallBack(buffer []byte, size int, callback common.TrackerCallBack) (int, error)
- func (conn *IRODSConnection) Request(request Request, response Response, bsBuffer []byte) error
- func (conn *IRODSConnection) RequestAndCheck(request Request, response CheckErrorResponse, bsBuffer []byte) error
- func (conn *IRODSConnection) RequestAndCheckForPassword(request Request, response CheckErrorResponse, bsBuffer []byte) error
- func (conn *IRODSConnection) RequestAndCheckWithTrackerCallBack(request Request, response CheckErrorResponse, bsBuffer []byte, ...) error
- func (conn *IRODSConnection) RequestAsyncWithTrackerCallBack(rrChan chan RequestResponsePair) chan RequestResponsePair
- func (conn *IRODSConnection) RequestForPassword(request Request, response Response, bsBuffer []byte) error
- func (conn *IRODSConnection) RequestWithTrackerCallBack(request Request, response Response, bsBuffer []byte, ...) error
- func (conn *IRODSConnection) RequestWithoutResponse(request Request) error
- func (conn *IRODSConnection) RequestWithoutResponseNoXML(request Request) error
- func (conn *IRODSConnection) Rollback() error
- func (conn *IRODSConnection) Send(buffer []byte, size int) error
- func (conn *IRODSConnection) SendFromReader(src io.Reader, size int) error
- func (conn *IRODSConnection) SendMessage(msg *message.IRODSMessage) error
- func (conn *IRODSConnection) SendMessageWithTrackerCallBack(msg *message.IRODSMessage, callback common.TrackerCallBack) error
- func (conn *IRODSConnection) SendWithTrackerCallBack(buffer []byte, size int, callback common.TrackerCallBack) error
- func (conn *IRODSConnection) SetTCPBufferSize(bufferSize int)
- func (conn *IRODSConnection) SetTransactionDirty(dirtyTransaction bool)
- func (conn *IRODSConnection) SupportParallelUpload() bool
- func (conn *IRODSConnection) Unlock()
- type Request
- type RequestResponsePair
- type Response
Constants ¶
const (
TCPBufferSizeDefault int = 4 * 1024 * 1024
)
Variables ¶
var ErrInvalidUTF8 = xerrors.Errorf("invalid utf-8 character")
ErrInvalidUTF8 is returned if an invalid utf-8 character is found.
Functions ¶
This section is empty.
Types ¶
type CheckErrorResponse ¶ added in v0.4.4
CheckErrorResponse is a Response on which CheckError can be called.
type IRODSConnection ¶
type IRODSConnection struct {
// contains filtered or unexported fields
}
IRODSConnection connects to iRODS
func NewIRODSConnection ¶
func NewIRODSConnection(account *types.IRODSAccount, requestTimeout time.Duration, applicationName string) *IRODSConnection
NewIRODSConnection create a IRODSConnection
func NewIRODSConnectionWithMetrics ¶ added in v0.9.7
func NewIRODSConnectionWithMetrics(account *types.IRODSAccount, requestTimeout time.Duration, applicationName string, metrics *metrics.IRODSMetrics) *IRODSConnection
NewIRODSConnectionWithMetrics create a IRODSConnection
func (*IRODSConnection) Commit ¶ added in v0.4.4
func (conn *IRODSConnection) Commit() error
Commit a transaction. This is useful in combination with the NO_COMMIT_FLAG. Usage is limited to privileged accounts.
func (*IRODSConnection) Connect ¶
func (conn *IRODSConnection) Connect() error
Connect connects to iRODS
func (*IRODSConnection) Disconnect ¶
func (conn *IRODSConnection) Disconnect() error
Disconnect disconnects
func (*IRODSConnection) GetAccount ¶ added in v0.6.0
func (conn *IRODSConnection) GetAccount() *types.IRODSAccount
GetAccount returns iRODSAccount
func (*IRODSConnection) GetClientSignature ¶ added in v0.10.0
func (conn *IRODSConnection) GetClientSignature() string
GetClientSignature returns client signature to be used in password obfuscation
func (*IRODSConnection) GetCreationTime ¶ added in v0.6.0
func (conn *IRODSConnection) GetCreationTime() time.Time
GetCreationTime returns creation time
func (*IRODSConnection) GetGeneratedPasswordForPAMAuth ¶ added in v0.4.4
func (conn *IRODSConnection) GetGeneratedPasswordForPAMAuth() string
GetGeneratedPasswordForPAMAuth returns generated Password For PAM Auth
func (*IRODSConnection) GetLastSuccessfulAccess ¶ added in v0.5.6
func (conn *IRODSConnection) GetLastSuccessfulAccess() time.Time
GetLastSuccessfulAccess returns last successful access time
func (*IRODSConnection) GetMetrics ¶ added in v0.9.7
func (conn *IRODSConnection) GetMetrics() *metrics.IRODSMetrics
GetMetrics returns metrics
func (*IRODSConnection) GetVersion ¶
func (conn *IRODSConnection) GetVersion() *types.IRODSVersion
GetVersion returns iRODS version
func (*IRODSConnection) IsConnected ¶
func (conn *IRODSConnection) IsConnected() bool
IsConnected returns if the connection is live
func (*IRODSConnection) IsTransactionDirty ¶ added in v0.12.6
func (conn *IRODSConnection) IsTransactionDirty() bool
IsTransactionDirty returns true if transaction is dirty
func (*IRODSConnection) Lock ¶ added in v0.9.6
func (conn *IRODSConnection) Lock()
Lock locks connection
func (*IRODSConnection) PoorMansRollback ¶ added in v0.4.4
func (conn *IRODSConnection) PoorMansRollback() error
PoorMansRollback rolls back a transaction as a nonprivileged account, bypassing API limitations. A nonprivileged account cannot have staged operations, so rollback is always a no-op. The usage for this function, is that rolling back the current database transaction still will start a new one, so that future queries will see all changes that where made up to calling this function.
func (*IRODSConnection) PostprocessMessage ¶ added in v0.4.4
func (conn *IRODSConnection) PostprocessMessage(msg *message.IRODSMessage) error
PostprocessMessage prepares a message that is received from irods for XML parsing.
func (*IRODSConnection) PostprocessXML ¶ added in v0.4.4
func (conn *IRODSConnection) PostprocessXML(in []byte) ([]byte, error)
PostprocessXML translates IRODS XML into valid XML. We fix the invalid encoding of ` as ".
func (*IRODSConnection) PreprocessMessage ¶ added in v0.4.4
func (conn *IRODSConnection) PreprocessMessage(msg *message.IRODSMessage, forPassword bool) error
PreprocessMessage modifies a request message to use irods dialect for XML.
func (*IRODSConnection) PreprocessXML ¶ added in v0.4.4
func (conn *IRODSConnection) PreprocessXML(in []byte) ([]byte, error)
PreprocessXML translates output of xml.Marshal into XML that IRODS understands.
func (*IRODSConnection) PreprocessXMLForPassword ¶ added in v0.10.0
func (conn *IRODSConnection) PreprocessXMLForPassword(in []byte) ([]byte, error)
PreprocessXMLForPassword translates output of xml.Marshal into XML that IRODS understands.
func (*IRODSConnection) RawBind ¶ added in v0.4.5
func (conn *IRODSConnection) RawBind(socket net.Conn)
RawBind binds an IRODSConnection to a raw net.Conn socket - to be used for e.g. a proxy server setup
func (*IRODSConnection) ReadMessage ¶
func (conn *IRODSConnection) ReadMessage(bsBuffer []byte) (*message.IRODSMessage, error)
ReadMessage reads data from the given socket and returns IRODSMessage if bsBuffer is given, bs data will be written directly to the bsBuffer if not given, a new buffer will be allocated.
func (*IRODSConnection) ReadMessageWithTrackerCallBack ¶ added in v0.10.8
func (conn *IRODSConnection) ReadMessageWithTrackerCallBack(bsBuffer []byte, callback common.TrackerCallBack) (*message.IRODSMessage, error)
func (*IRODSConnection) Recv ¶
func (conn *IRODSConnection) Recv(buffer []byte, size int) (int, error)
Recv receives a message
func (*IRODSConnection) RecvToWriter ¶ added in v0.11.0
RecvToWriter receives a message to Writer
func (*IRODSConnection) RecvWithTrackerCallBack ¶ added in v0.10.8
func (conn *IRODSConnection) RecvWithTrackerCallBack(buffer []byte, size int, callback common.TrackerCallBack) (int, error)
Recv receives a message
func (*IRODSConnection) Request ¶ added in v0.4.4
func (conn *IRODSConnection) Request(request Request, response Response, bsBuffer []byte) error
Request sends a request and expects a response. bsBuffer is optional
func (*IRODSConnection) RequestAndCheck ¶ added in v0.4.4
func (conn *IRODSConnection) RequestAndCheck(request Request, response CheckErrorResponse, bsBuffer []byte) error
RequestAndCheck sends a request and expects a CheckErrorResponse, on which the error is already checked.
func (*IRODSConnection) RequestAndCheckForPassword ¶ added in v0.10.0
func (conn *IRODSConnection) RequestAndCheckForPassword(request Request, response CheckErrorResponse, bsBuffer []byte) error
RequestAndCheckForPassword sends a request and expects a CheckErrorResponse, on which the error is already checked. Only escape '&'
func (*IRODSConnection) RequestAndCheckWithTrackerCallBack ¶ added in v0.10.8
func (conn *IRODSConnection) RequestAndCheckWithTrackerCallBack(request Request, response CheckErrorResponse, bsBuffer []byte, reqCallback common.TrackerCallBack, resCallback common.TrackerCallBack) error
RequestAndCheckWithCallBack sends a request and expects a CheckErrorResponse, on which the error is already checked.
func (*IRODSConnection) RequestAsyncWithTrackerCallBack ¶ added in v0.11.4
func (conn *IRODSConnection) RequestAsyncWithTrackerCallBack(rrChan chan RequestResponsePair) chan RequestResponsePair
RequestAsyncWithTrackerCallBack sends multiple requests and expects responses.
func (*IRODSConnection) RequestForPassword ¶ added in v0.10.0
func (conn *IRODSConnection) RequestForPassword(request Request, response Response, bsBuffer []byte) error
RequestForPassword sends a request and expects a response. XML escape only for '&' bsBuffer is optional
func (*IRODSConnection) RequestWithTrackerCallBack ¶ added in v0.10.8
func (conn *IRODSConnection) RequestWithTrackerCallBack(request Request, response Response, bsBuffer []byte, reqCallback common.TrackerCallBack, resCallback common.TrackerCallBack) error
RequestWithTrackerCallBack sends a request and expects a response. bsBuffer is optional
func (*IRODSConnection) RequestWithoutResponse ¶ added in v0.9.0
func (conn *IRODSConnection) RequestWithoutResponse(request Request) error
RequestWithoutResponse sends a request but does not wait for a response.
func (*IRODSConnection) RequestWithoutResponseNoXML ¶ added in v0.9.5
func (conn *IRODSConnection) RequestWithoutResponseNoXML(request Request) error
RequestWithoutResponseNoXML sends a request but does not wait for a response.
func (*IRODSConnection) Rollback ¶ added in v0.4.4
func (conn *IRODSConnection) Rollback() error
Rollback a transaction. This is useful in combination with the NO_COMMIT_FLAG. It can also be used to clear the current database transaction if there are no staged operations, just to refresh the view on the database for future queries. Usage is limited to privileged accounts.
func (*IRODSConnection) Send ¶
func (conn *IRODSConnection) Send(buffer []byte, size int) error
Send sends data
func (*IRODSConnection) SendFromReader ¶ added in v0.11.0
func (conn *IRODSConnection) SendFromReader(src io.Reader, size int) error
SendFromReader sends data from Reader
func (*IRODSConnection) SendMessage ¶
func (conn *IRODSConnection) SendMessage(msg *message.IRODSMessage) error
SendMessage makes the message into bytes
func (*IRODSConnection) SendMessageWithTrackerCallBack ¶ added in v0.10.8
func (conn *IRODSConnection) SendMessageWithTrackerCallBack(msg *message.IRODSMessage, callback common.TrackerCallBack) error
SendMessageWithTrackerCallBack makes the message into bytes
func (*IRODSConnection) SendWithTrackerCallBack ¶ added in v0.10.8
func (conn *IRODSConnection) SendWithTrackerCallBack(buffer []byte, size int, callback common.TrackerCallBack) error
SendWithTrackerCallBack sends data
func (*IRODSConnection) SetTCPBufferSize ¶ added in v0.11.0
func (conn *IRODSConnection) SetTCPBufferSize(bufferSize int)
SetTCPBufferSize sets TCP Buffer Size
func (*IRODSConnection) SetTransactionDirty ¶ added in v0.12.6
func (conn *IRODSConnection) SetTransactionDirty(dirtyTransaction bool)
SetTransactionDirty sets if transaction is dirty
func (*IRODSConnection) SupportParallelUpload ¶ added in v0.10.11
func (conn *IRODSConnection) SupportParallelUpload() bool
SupportParallelUpload checks if the server supports parallel upload available from 4.2.9
func (*IRODSConnection) Unlock ¶ added in v0.9.6
func (conn *IRODSConnection) Unlock()
Unlock unlocks connection
type Request ¶ added in v0.4.4
type Request interface {
GetMessage() (*message.IRODSMessage, error)
}
Request is an interface for calling iRODS RPC.
type RequestResponsePair ¶ added in v0.11.4
type RequestResponsePair struct { Request Request Response Response BsBuffer []byte // can be null RequestCallback common.TrackerCallBack // can be null ResponseCallback common.TrackerCallBack // can be null Error error }
RequestResponsePair is a structure that wraps Request, Response, and other parameters for making iRODS RPC call.
type Response ¶ added in v0.4.4
type Response interface {
FromMessage(*message.IRODSMessage) error
}
Response is an interface for response of iRODS RPC Call.