Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var QueryParams url.Values
QueryParams ...
Functions ¶
This section is empty.
Types ¶
type AnonSession ¶
type AnonSession struct {
ID string `jsonapi:"primary,session"`
}
AnonSession anon session data
func (AnonSession) JSONAPILinks ¶
func (sess AnonSession) JSONAPILinks() *jsonapi.Links
JSONAPILinks links for the session json
func (AnonSession) JSONAPIMeta ¶
func (sess AnonSession) JSONAPIMeta() *jsonapi.Meta
JSONAPIMeta links for the session json
type AuthSession ¶
type AuthSession struct { ID string `jsonapi:"primary,session"` // User *User `jsonapi:"relation,user"` User *models.User `jsonapi:"relation,user"` }
AuthSession authenticated user session data
func (AuthSession) JSONAPILinks ¶
func (sess AuthSession) JSONAPILinks() *jsonapi.Links
JSONAPILinks links for the session json
func (AuthSession) JSONAPIMeta ¶
func (sess AuthSession) JSONAPIMeta() *jsonapi.Meta
JSONAPIMeta links for the authed session json
type User ¶
type User struct { ID int `jsonapi:"primary,user" gorm:"primary_key"` FirstName string `jsonapi:"attr,first_name" json:"first_name"` LastName string `jsonapi:"attr,last_name" json:"last_name"` Email string `jsonapi:"attr,email" valid:"email"` LastSigninAt time.Time `jsonapi:"attr,last_signin_at,iso8601"` CreatedAt time.Time `jsonapi:"attr,created_at,iso8601"` UpdatedAt time.Time `jsonapi:"attr,updated_at,iso8601"` Source string `jsonapi:"attr,source,omitempty" gorm:"-" sql:"-"` Token string `jsonapi:"attr,token,omitempty" gorm:"-" sql:"-"` URL string `gorm:"-" sql:"-" jsonapi:"attr,url,omitempty"` Roles pq.StringArray `jsonapi:"attr,roles"` CompanyID int `jsonapi:"attr,company_id,omitempty" json:"company_id"` Company *models.Company `jsonapi:"relation,company,omitempty" gorm:"save_associations:false"` models.User }
User user data structure for admin
Click to show internal directories.
Click to hide internal directories.