Client Model The Client holds information about a device which can receive notifications (and other stuff). swagger:model Client
| 8 | // |
| 9 | // swagger:model Client |
| 10 | type Client struct { |
| 11 | // The client id. |
| 12 | // |
| 13 | // read only: true |
| 14 | // required: true |
| 15 | // example: 5 |
| 16 | ID uint `gorm:"primaryKey;autoIncrement" json:"id"` |
| 17 | // The client token. Can be used as `clientToken`. See Authentication. |
| 18 | // |
| 19 | // read only: true |
| 20 | // required: true |
| 21 | // example: CWH0wZ5r0Mbac.r |
| 22 | Token string `gorm:"type:varchar(180);uniqueIndex:uix_clients_token" json:"token"` |
| 23 | UserID uint `gorm:"index" json:"-"` |
| 24 | // The client name. This is how the client should be displayed to the user. |
| 25 | // |
| 26 | // required: true |
| 27 | // example: Android Phone |
| 28 | Name string `gorm:"type:text" form:"name" query:"name" json:"name" binding:"required"` |
| 29 | // The last time the client token was used. |
| 30 | // |
| 31 | // read only: true |
| 32 | // example: 2019-01-01T00:00:00Z |
| 33 | LastUsed *time.Time `json:"lastUsed"` |
| 34 | } |
nothing calls this directly
no outgoing calls
no test coverage detected