12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- package events
- import (
- "encoding/json"
- )
- type EventsResponse struct {
- Page int `json:"_page"`
- Links struct {
- Self struct {
- Href string `json:"href"`
- } `json:"self"`
- Next struct {
- Href string `json:"href"`
- } `json:"next"`
- } `json:"_links"`
- Embedded struct{
- Events []Event `json:"events"`
- } `json:"_embedded"`
- }
- //type Events []Event
- type Event struct {
- Id string `json:"id"`
- Type string `json:"type"`
- EntityId int `json:"entity_id"`
- EntityType string `json:"entity_type"`
- CreatedBy int64 `json:"created_by"`
- CreatedAt int64 `json:"created_at"`
- ValueAfter []Value `json:"value_after"`
- ValueBefore []Value `json:"value_before,omitempty"`
- AccountId int `json:"account_id"`
- Embedded struct {
- } `json:"_embedded"`
- }
- func (e Event) String() string {
- bts, _ := json.MarshalIndent(e, "", "\t")
- return string(bts)
- }
|