Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct {
ID string `gorm:"primary_key;unique_index" json:"id"`
UserID uint `gorm:"index" json:"-"`
Name string `form:"name" query:"name" json:"name" binding:"required"`
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 {
ID string `gorm:"primary_key;unique_index" json:"id"`
UserID uint `gorm:"index" json:"-"`
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 {
Error string `json:"error"`
ErrorCode int `json:"errorCode"`
ErrorDescription string `json:"errorDescription"`
}
Error Model
The Error contains error relevant information.
swagger:model Error
type Message ¶
type Message struct {
ID uint `gorm:"AUTO_INCREMENT;primary_key;index" json:"id"`
ApplicationID string `json:"appid"`
Message string `form:"message" query:"message" json:"message" binding:"required"`
Title string `form:"title" query:"title" json:"title" binding:"required"`
Priority int `form:"priority" query:"priority" json:"priority"`
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 {
ID uint `json:"id"`
Name string `binding:"required" json:"name" query:"name" form:"name"`
Pass string `json:"pass,omitempty" form:"pass" query:"pass"`
Admin bool `json:"admin" form:"admin" query:"admin"`
}
UserExternal Model
The User holds information about the credentials and other stuff.
swagger:model User
Source Files
¶
- application.go
- client.go
- error.go
- message.go
- user.go
- version.go