I am writing a Google App Engine Golang application. I want to have a struct
with private variables that can only be set through proper functions, for example:
type Foo struct {
bar string
}
func (f *Foo) SetBar(b string) {
f.bar = "BAR: "+b
}
I want to be able to save this data in the datastore. However, it looks like datastore does not save private variables.
How can I store private variables in datastore?