harbor run -t openthoughts/tasktrove-exp-rpt-stack-go-v4-stack-go-7129harbor download openthoughts/tasktrove-exp-rpt-stack-go-v4-stack-go-7129Task Description: Implement a Messaging Queue Client in Go
You are tasked with creating a messaging queue client that interacts with a messaging service based on the provided Go test code. The implementation should be placed in the /app/ directory and fulfill the following requirements:
Create a Queue struct:
Client: a pointer to the client that interacts with the messaging service.QueueName: a string that holds the name of the queue.Base64: a boolean to indicate if the message body should be encoded in Base64.Implement the NewClient function:
Implement the Send method for the Queue struct:
Send method should take a timestamp (in microseconds) and a byte array as parameters and send a message to the queue.Implement the Receive method for the Queue struct:
Receive method should take two channels as parameters (for receiving messages and errors).respChan channel while sending any errors through the errChan channel.Implement the Delete method for the Queue struct:
Delete method should take a receipt handle for the message and a channel for errors.Handle XML marshalling and unmarshalling:
Message struct with a MessageBody field (string) and ensure that it can be marshaled to and unmarshaled from XML.Ensure proper synchronization:
Upon completing these functionalities, run the provided tests in the /app/ directory to ensure that they pass successfully, indicating that your implementation is correct.
Important: declare your solution in package mns (the test file uses package mns, so the implementation must use the matching package name).