Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Address ¶
type Address struct { StreetAddressLine1 string `json:"streetAddress1" bson:"street_address_1,omitempty"` StreetAddressLine2 string `json:"streetAddress2" bson:"street_address_2,omitempty"` PostalCode string `json:"postalCode" bson:"postal_code,omitempty"` Province string `json:"province" bson:"province,omitempty"` Country Country State State City City }
Address is the address of a user
type City ¶
type City struct { Name string `json:"name" bson:"name,omitempty"` Code string `json:"code" bson:"code,omitempty"` }
City struct
type Contact ¶
type Contact struct { LineNumber string `json:"linenumber" bson:"line_number,omitempty"` CountryCode string `json:"countrycode" bson:"country_code,omitempty"` AreaCode string `json:"areacode" bson:"areacode,omitempty"` Prefix string `json:"prefix" bson:"prefix,omitempty"` }
Contact is the data structure for storing contact information such as phone numbers (Contact)
type Country ¶
type Country struct { Name string `json:"name" bson:"name,omitempty"` Code string `json:"code" bson:"code,omitempty"` }
Country struct
type Language ¶
type Language struct { Name string `json:"name" bson:"name,omitempty"` Code string `json:"code" bson:"code,omitempty"` }
Language is the name of a user's language spoken
type Register ¶
type Register struct { UserName string `json:"username"` Password string `json:"password"` FirstName string `json:"firstname"` LastName string `json:"lastname"` EmailAddress string `json:"emailAddress"` Gender string `json:"gender"` Status string `json:"status"` BirthDate time.Time `json:"birthdate"` }
Register ...
type State ¶
type State struct { Name string `json:"name" bson:"name,omitempty"` Code string `json:"code" bson:"code,omitempty"` }
State struct
type User ¶
type User struct { ID bson.ObjectId `json:"id" bson:"_id,omitempty"` Name string `json:"name" bson:"name,omitempty"` Username string `json:"username" bson:"username,omitempty"` Password string `json:"password" bson:"password,omitempty"` Firstname string `json:"firstname" bson:"firstname,omitempty"` Lastname string `json:"lastname" bson:"lastname,omitempty"` Middlename string `json:"middlename" bson:"middlename,omitempty"` Status string `json:"status" bson:"status,omitempty"` Type string `json:"account_type" bson:"account_type,omitempty"` EmailAddress string `json:"emailaddress" bson:"email_address,omitempty"` Gender string `json:"gender" bson:"gender,omitempty"` BirthDate time.Time `json:"birthdate" bson:"birthdate,omitempty"` DateJoined time.Time `json:"datejoined" bson:"datejoined,omitempty"` MobilePhoneNumber Contact `json:"mobile_phone_number" bson:"mobile_phone_number,omitempty"` BillingAddress Address `json:"billingAddress" bson:"billing_address,omitempty"` MailingAddress Address `json:"mailingAddress" bson:"mailing_address,omitempty"` Languages []Language `json:"languages" bson:"languages,omitempty"` }
User is a user object that has datatypes for the user domain (User)
func UserFromContext ¶
UserFromContext gets user from context
func UserMustFromContext ¶
UserMustFromContext gets user from context. if can't make panic
func (*User) IsCredentialsVerified ¶
IsCredentialsVerified matches given password with user's password
func (*User) NewContext ¶
NewContext ...
Click to show internal directories.
Click to hide internal directories.