Documentation ¶
Index ¶
- 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) Lock()
- func (conn *IRODSConnection) PoorMansRollback() error
- func (conn *IRODSConnection) PostprocessMessage(msg *message.IRODSMessage) error
- func (conn *IRODSConnection) PostprocessXML(in []byte) (out []byte, err error)
- func (conn *IRODSConnection) PreprocessMessage(msg *message.IRODSMessage, forPassword bool) error
- func (conn *IRODSConnection) PreprocessXML(in []byte) (out []byte, err error)
- func (conn *IRODSConnection) PreprocessXMLForPassword(in []byte) (out []byte, err error)
- func (conn *IRODSConnection) RawBind(socket net.Conn)
- func (conn *IRODSConnection) ReadMessage(bsBuffer []byte) (*message.IRODSMessage, error)
- func (conn *IRODSConnection) Recv(buffer []byte, size int) (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) RequestForPassword(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) SendMessage(msg *message.IRODSMessage) error
- func (conn *IRODSConnection) Unlock()
- type Request
- type Response
Constants ¶
This section is empty.
Variables ¶
var ErrInvalidUTF8 = errors.New("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
A 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) 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) (out []byte, err 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) (out []byte, err 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) (out []byte, err 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) Recv ¶
func (conn *IRODSConnection) Recv(buffer []byte, size int) (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) 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) 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) SendMessage ¶
func (conn *IRODSConnection) SendMessage(msg *message.IRODSMessage) error
SendMessage makes the message into bytes
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)
}
A Request to send to irods.
type Response ¶ added in v0.4.4
type Response interface {
FromMessage(*message.IRODSMessage) error
}
A Response to retrieve from irods.