Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct { // The application id. // // read only: true // required: true // example: 5 ID uint `gorm:"primary_key;unique_index;AUTO_INCREMENT" json:"id"` // The application token. Can be used as `appToken`. See Authentication. // // read only: true // required: true // example: AWH0wZ5r0Mbac.r Token string `gorm:"unique_index" json:"token"` UserID uint `gorm:"index" json:"-"` // The application name. This is how the application should be displayed to the user. // // required: true // example: Backup Server Name string `form:"name" query:"name" json:"name" binding:"required"` // The description of the application. // // required: true // example: Backup server for the interwebs Description string `form:"description" query:"description" json:"description"` Messages []Message `json:"-"` }
Application Model
The Application holds information about an app which can send notifications.
swagger:model Application
type Client ¶
type Client struct { // The client id. // // read only: true // required: true // example: 5 ID uint `gorm:"primary_key;unique_index;AUTO_INCREMENT" json:"id"` // The client token. Can be used as `clientToken`. See Authentication. // // read only: true // required: true // example: CWH0wZ5r0Mbac.r Token string `gorm:"unique_index" json:"token"` UserID uint `gorm:"index" json:"-"` // The client name. This is how the client should be displayed to the user. // // required: true // example: Android Phone Name string `form:"name" query:"name" json:"name" binding:"required"` }
Client Model
The Client holds information about a device which can receive notifications (and other stuff).
swagger:model Client
type Error ¶
type Error struct { // The general error message // // required: true // example: Unauthorized Error string `json:"error"` // The http error code. // // required: true // example: 401 ErrorCode int `json:"errorCode"` // The http error code. // // required: true // example: you need to provide a valid access token or user credentials to access this api ErrorDescription string `json:"errorDescription"` }
Error Model
The Error contains error relevant information.
swagger:model Error
type Message ¶
type Message struct { // The message id. // // read only: true // required: true // example: 25 ID uint `gorm:"AUTO_INCREMENT;primary_key;index" json:"id"` // The application id that send this message. // // read only: true // required: true // example: 5 ApplicationID uint `json:"appid"` // The actual message. // // required: true // example: Backup was successfully finished. Message string `form:"message" query:"message" json:"message" binding:"required"` // The title of the message. // // required: true // example: Backup Title string `form:"title" query:"title" json:"title" binding:"required"` // The priority of the message. // // example: 2 Priority int `form:"priority" query:"priority" json:"priority"` // The date the message was created. // // read only: true // required: true // example: 2018-02-27T19:36:10.5045044+01:00 Date time.Time `json:"date"` }
Message Model
The Message holds information about a message which was sent by an Application.
swagger:model Message
type User ¶
type User struct { ID uint `gorm:"primary_key;unique_index;AUTO_INCREMENT"` Name string `gorm:"unique_index"` Pass []byte Admin bool Applications []Application Clients []Client }
The User holds information about the credentials of a user and its application and client tokens.
type UserExternal ¶
type UserExternal struct { // The user id. // // read only: true // required: true // example: 25 ID uint `json:"id"` // The user name. For login. // // required: true // example: unicorn Name string `binding:"required" json:"name" query:"name" form:"name"` // If the user is an administrator. // // example: true Admin bool `json:"admin" form:"admin" query:"admin"` }
UserExternal Model
The User holds information about permission and other stuff.
swagger:model User
type UserExternalPass ¶ added in v1.0.3
type UserExternalPass struct { // The user password. For login. // // required: true // example: nrocinu Pass string `json:"pass,omitempty" form:"pass" query:"pass" binding:"required"` }
UserExternalPass Model
The Password for updating the user.
swagger:model UserPass
type UserExternalWithPass ¶ added in v1.0.3
type UserExternalWithPass struct { UserExternal UserExternalPass }
UserExternalWithPass Model
The UserWithPass holds information about the credentials and other stuff.
swagger:model UserWithPass
type VersionInfo ¶
type VersionInfo struct { // The current version. // // required: true // example: 5.2.6 Version string `json:"version"` // The git commit hash on which this binary was built. // // required: true // example: ae9512b6b6feea56a110d59a3353ea3b9c293864 Commit string `json:"commit"` // The date on which this binary was built. // // required: true // example: 2018-02-27T19:36:10.5045044+01:00 BuildDate string `json:"buildDate"` }
VersionInfo Model
swagger:model VersionInfo