github.com/cyverse/go-irodsclient@v0.13.2/irods/message/auth_request.go (about) 1 package message 2 3 import ( 4 "github.com/cyverse/go-irodsclient/irods/common" 5 ) 6 7 // IRODSMessageAuthRequest stores authentication request 8 type IRODSMessageAuthRequest struct { 9 // empty structure 10 } 11 12 // NewIRODSMessageAuthRequest creates a IRODSMessageAuthRequest message 13 func NewIRODSMessageAuthRequest() *IRODSMessageAuthRequest { 14 return &IRODSMessageAuthRequest{} 15 } 16 17 // GetMessage builds a message 18 func (msg *IRODSMessageAuthRequest) GetMessage() (*IRODSMessage, error) { 19 msgHeader := IRODSMessageHeader{ 20 Type: RODS_MESSAGE_API_REQ_TYPE, 21 MessageLen: 0, 22 ErrorLen: 0, 23 BsLen: 0, 24 IntInfo: int32(common.AUTH_REQUEST_AN), 25 } 26 27 return &IRODSMessage{ 28 Header: &msgHeader, 29 Body: nil, 30 }, nil 31 } 32 33 // FromMessage returns struct from IRODSMessage 34 func (msg *IRODSMessageAuthRequest) FromMessage(msgIn *IRODSMessage) error { 35 return nil 36 }