Documentation ¶
Index ¶
- Constants
- type DeviceToken
- type DeviceTokenDto
- type DeviceTokenQueryParams
- type Notification
- type NotificationDto
- type NotificationMeta
- type NotificationQueryParams
- type NotificationSends
- type Template
- type TemplateData
- type TemplateDataDTO
- type TemplateDto
- type TemplateLanguage
- type TemplateQueryParams
- type User
Constants ¶
View Source
const ( DeviceOsAndroid = "ANDROID" DeviceOsIOS = "IOS" )
View Source
const ( NotificationTypeEmail = "email" NotificationTypeFCM = "fcm" NotificationTypeApp = "app" )
View Source
const ( TemplateLangID = "id" TemplateLangEN = "en" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeviceToken ¶
type DeviceToken struct { ID common.ID UserId string Token string OsName string CreatedAt time.Time UpdatedAt time.Time }
func NewDeviceToken ¶
func NewDeviceToken(x DeviceTokenDto, finds ...*DeviceToken) *DeviceToken
func (*DeviceToken) Validate ¶
func (x *DeviceToken) Validate() (err *multierror.Error)
type DeviceTokenDto ¶
type DeviceTokenQueryParams ¶
type DeviceTokenQueryParams struct {
UserId string
}
type Notification ¶
type Notification struct { ID common.ID UserId string Type string Data string CreatedAt time.Time UpdatedAt time.Time }
func NewNotification ¶
func NewNotification(x NotificationDto, finds ...*Notification) *Notification
func (*Notification) GetData ¶
func (x *Notification) GetData() (data interface{})
func (*Notification) SetData ¶
func (x *Notification) SetData(data interface{})
func (*Notification) Validate ¶
func (x *Notification) Validate() (err *multierror.Error)
type NotificationDto ¶
type NotificationMeta ¶
type NotificationMeta struct { Data []*Notification Total int Page int PerPage int }
type NotificationQueryParams ¶
type NotificationSends ¶
type NotificationSends struct { UserId string TemplateName string Data string Services []string PathEmail string }
func (*NotificationSends) GetData ¶
func (x *NotificationSends) GetData() (result map[string]string)
type Template ¶
type Template struct { ID common.ID Name string Data string CreatedAt time.Time UpdatedAt time.Time }
func NewTemplate ¶
func NewTemplate(x TemplateDto, finds ...*Template) *Template
func (*Template) GetTemplateData ¶
func (x *Template) GetTemplateData(data interface{}, lang string) (result TemplateData)
func (*Template) GetTemplateMaps ¶
type TemplateData ¶
type TemplateDataDTO ¶
type TemplateDataDTO struct { Title TemplateLanguage `json:"title"` Body TemplateLanguage `json:"body"` }
type TemplateDto ¶
type TemplateLanguage ¶
type TemplateQueryParams ¶
type TemplateQueryParams struct {
Search string
}
Click to show internal directories.
Click to hide internal directories.