Communicating with the GUI

To populate the user interface, we need to define a data model and load some test data. Within the code for this book, there is a client package that contains a data model and some test data to simulate an email server. We will use that package by importing it into the Go files for this project using the github.com/PacktPublishing/Hands-On-GUI-Application-Development-in-Go/client package. We won't cover the details of the package in this chapter, but we will reference its defined client.EmailServer and client.EmailMessage types. The email message definition is as follows—the field names will be useful when loading email details in the UI:

type EmailMessage struct {
Subject, Content string
To, From Email
Date time.Time
}
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.12.50