diff options
Diffstat (limited to 'pkg/model')
-rw-r--r-- | pkg/model/echo.go | 8 | ||||
-rw-r--r-- | pkg/model/file.go | 6 | ||||
-rw-r--r-- | pkg/model/message.go | 18 | ||||
-rw-r--r-- | pkg/model/point.go | 8 |
4 files changed, 20 insertions, 20 deletions
diff --git a/pkg/model/echo.go b/pkg/model/echo.go index 5f642da..21dcda6 100644 --- a/pkg/model/echo.go +++ b/pkg/model/echo.go @@ -6,10 +6,10 @@ import ( ) type Echo struct { - Name string - Description string - Count int - Messages []string + Name string `json:"name"` + Description string `json:"description"` + Count int `json:"count"` + Messages []string `json:"messages,omitempty"` } func (e *Echo) Format() string { diff --git a/pkg/model/file.go b/pkg/model/file.go index d87f581..b19461b 100644 --- a/pkg/model/file.go +++ b/pkg/model/file.go @@ -1,7 +1,7 @@ package model type File struct { - Name string - Size int64 - FullName string + Name string `json:"name"` + Size int64 `json:"size"` + FullName string `json:"full_name"` } diff --git a/pkg/model/message.go b/pkg/model/message.go index 3d15c46..3753419 100644 --- a/pkg/model/message.go +++ b/pkg/model/message.go @@ -8,15 +8,15 @@ import ( ) type Message struct { - ID string - RepTo string - EchoArea string - Date time.Time - From string - Addr string - MsgTo string - Subject string - Message string + ID string `json:"id"` + RepTo string `json:"rep_to"` + EchoArea string `json:"echo_area"` + Date time.Time `json:"date"` + From string `json:"from"` + Addr string `json:"addr"` + MsgTo string `json:"msg_to"` + Subject string `json:"subject"` + Message string `json:"message"` } func (m *Message) Bundle() string { diff --git a/pkg/model/point.go b/pkg/model/point.go index 02e9d43..3975ed9 100644 --- a/pkg/model/point.go +++ b/pkg/model/point.go @@ -7,8 +7,8 @@ func init() { } type Point struct { - Username string - Email string - Password []byte - AuthString string + Username string `json:"username"` + Email string `json:"email"` + Password []byte `json:"-"` + AuthString string `json:"auth_string"` } |