github.com/cyverse/go-irodsclient@v0.13.2/irods/message/disconnect.go (about)

     1  package message
     2  
     3  const (
     4  	// RODS_MESSAGE_DISCONNECT_TYPE is a message type for disconnecting
     5  	RODS_MESSAGE_DISCONNECT_TYPE MessageType = "RODS_DISCONNECT"
     6  )
     7  
     8  // IRODSMessageDisconnect stores disconnect request
     9  type IRODSMessageDisconnect struct {
    10  	// empty structure
    11  }
    12  
    13  // NewIRODSMessageDisconnect creates a IRODSMessageAuthRequest message
    14  func NewIRODSMessageDisconnect() *IRODSMessageDisconnect {
    15  	return &IRODSMessageDisconnect{}
    16  }
    17  
    18  // GetMessage builds a message
    19  func (msg *IRODSMessageDisconnect) GetMessage() (*IRODSMessage, error) {
    20  	msgHeader := IRODSMessageHeader{
    21  		Type:       RODS_MESSAGE_DISCONNECT_TYPE,
    22  		MessageLen: 0,
    23  		ErrorLen:   0,
    24  		BsLen:      0,
    25  		IntInfo:    0,
    26  	}
    27  
    28  	return &IRODSMessage{
    29  		Header: &msgHeader,
    30  		Body:   nil,
    31  	}, nil
    32  }
    33  
    34  // FromMessage returns struct from IRODSMessage
    35  func (msg *IRODSMessageDisconnect) FromMessage(msgIn *IRODSMessage) error {
    36  	return nil
    37  }