Documentation ¶
Index ¶
Constants ¶
const GEO_JSON_TYPE_POINT = "Point"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Address ¶
type Address struct { Id primitive.ObjectID `json:"id" bson:"_id,omitempty"` Line1 string `json:"line1,omitempty" bson:"line1,omitempty"` Line2 string `json:"line2,omitempty" bson:"line2,omitempty"` City string `json:"city,omitempty" bson:"city,omitempty"` State string `json:"state,omitempty" bson:"state,omitempty"` Zip string `json:"zip,omitempty" bson:"zip,omitempty"` CreatedAt time.Time `json:"created_at,omitempty" bson:"created_at,omitempty"` UpdatedAt time.Time `json:"updated_at,omitempty" bson:"updated_at,omitempty"` }
Address class or struct definition
func (*Address) ExportArrayPrivate ¶
exportarrayprivate is saveable
func (*Address) ExportArrayPublic ¶
public does not have the passwords and anything sensitive / secure / private, also dates are ints
type EmailTemplate ¶
type EmailTemplate struct { Id primitive.ObjectID `json:"id" bson:"_id,omitempty"` Name string `json:"name,omitempty" bson:"name,omitempty"` Language string `json:"language,omitempty" bson:"language,omitempty"` Subject string `json:"subject,omitempty" bson:"subject,omitempty"` TemplateHTML string `json:"template_html,omitempty" bson:"template_html,omitempty"` TemplateText string `json:"template_text,omitempty" bson:"template_text,omitempty"` CreatedAt time.Time `json:"created_at,omitempty" bson:"created_at,omitempty"` UpdatedAt time.Time `json:"updated_at,omitempty" bson:"updated_at,omitempty"` }
EmailTemplate class or struct definition
func (*EmailTemplate) ExportArrayPrivate ¶
func (r *EmailTemplate) ExportArrayPrivate() map[string]interface{}
exportarrayprivate is saveable
func (*EmailTemplate) ExportArrayPublic ¶
func (r *EmailTemplate) ExportArrayPublic() map[string]interface{}
public does not have the passwords and anything sensitive / secure / private, also dates are ints
func (*EmailTemplate) Save ¶
func (r *EmailTemplate) Save(mapStore map[string]interface{}) (*EmailTemplate, error)
EmailTemplate class Save function
type GeoJson ¶
type GeoJson struct { Type string `json:"type,omitempty" bson:"type,omitempty"` Coordinates []float64 `json:"coordinates,omitempty" bson:"coordinates,omitempty"` }
thanks http://icchan.github.io/2014/10/18/geospatial-querying-with-go-and-mongodb/
type LoginLog ¶
type LoginLog struct { Id primitive.ObjectID `json:"id" bson:"_id,omitempty"` UserId primitive.ObjectID `json:"user_id,omitempty" bson:"user_id,omitempty"` Username string `json:"username,omitempty" bson:"username,omitempty"` Email string `json:"email,omitempty" bson:"email,omitempty"` Version string `json:"version,omitempty" bson:"version,omitempty"` ApplicationType string `json:"application_type,omitempty" bson:"application_type,omitempty"` Expiry time.Time `json:"expiry,omitempty" bson:"expiry,omitempty"` IsValid bool `json:"is_valid" bson:"is_valid"` InvalidReason string `json:"invalid_reason,omitempty" bson:"invalid_reason,omitempty"` Secret string `json:"secret,omitempty" bson:"secret,omitempty"` LoggedOutAt time.Time `json:"logged_out_at,omitempty" bson:"logged_out_at,omitempty"` CreatedAt time.Time `json:"created_at,omitempty" bson:"created_at,omitempty"` UpdatedAt time.Time `json:"updated_at,omitempty" bson:"updated_at,omitempty"` }
LoginLog class or struct definition
func (*LoginLog) ExportArrayPrivate ¶
exportarrayprivate is saveable
func (*LoginLog) ExportArrayPublic ¶
public does not have the passwords and anything sensitive / secure / private, also dates are ints
type Translation ¶
type Translation struct { Id primitive.ObjectID `json:"id" bson:"_id,omitempty"` Name string `json:"name,omitempty" bson:"name,omitempty"` Language string `json:"language,omitempty" bson:"language,omitempty"` Translation string `json:"translation,omitempty" bson:"translation,omitempty"` CreatedAt time.Time `json:"created_at,omitempty" bson:"created_at,omitempty"` UpdatedAt time.Time `json:"updated_at,omitempty" bson:"updated_at,omitempty"` }
Translation class or struct definition
func (*Translation) ExportArrayPrivate ¶
func (r *Translation) ExportArrayPrivate() map[string]interface{}
exportarrayprivate is saveable
func (*Translation) ExportArrayPublic ¶
func (r *Translation) ExportArrayPublic() map[string]interface{}
public does not have the passwords and anything sensitive / secure / private, also dates are ints
func (*Translation) Save ¶
func (r *Translation) Save(mapStore map[string]interface{}) (*Translation, error)
Translation class Save function
type User ¶
type User struct { Id primitive.ObjectID `json:"id" bson:"_id,omitempty"` Username string `json:"username,omitempty" bson:"username,omitempty"` Email string `json:"email,omitempty" bson:"email,omitempty"` PasswordHash string `json:"password_hash,omitempty" bson:"password_hash,omitempty"` PasswordSalt string `json:"password_salt,omitempty" bson:"password_salt,omitempty"` PasswordTemporaryHash string `json:"password_temporary_hash,omitempty" bson:"password_temporary_hash,omitempty"` PasswordTemporaryExpiry time.Time `json:"password_temporary_expiry,omitempty" bson:"password_temporary_expiry,omitempty"` IsEmailValidated bool `json:"is_email_validated" bson:"is_email_validated"` ValidationSecret string `json:"validation_secret,omitempty" bson:"validation_secret,omitempty"` LoginCount int `json:"login_count,omitempty" bson:"login_count,omitempty"` Name string `json:"name,omitempty" bson:"name,omitempty"` Bio string `json:"bio,omitempty" bson:"bio,omitempty"` Town string `json:"town,omitempty" bson:"town,omitempty"` Website string `json:"website,omitempty" bson:"website,omitempty"` Phone string `json:"phone,omitempty" bson:"phone,omitempty"` Gender string `json:"gender,omitempty" bson:"gender,omitempty"` // M or F Latitude float64 `json:"latitude,omitempty" bson:"latitude,omitempty"` // -90 to +90 Longitude float64 `json:"longitude,omitempty" bson:"longitude,omitempty"` // -180 to 180 Location GeoJson `json:"location,omitempty" bson:"location,omitempty"` IsBlocked bool `json:"is_blocked" bson:"is_blocked"` Access string `json:"access,omitempty" bson:"access,omitempty"` // C for customer Language string `json:"language,omitempty" bson:"language,omitempty"` CreatedAt time.Time `json:"created_at,omitempty" bson:"created_at,omitempty"` UpdatedAt time.Time `json:"updated_at,omitempty" bson:"updated_at,omitempty"` }
User class or struct definition
func (*User) ExportArrayPrivate ¶
exportarrayprivate is saveable
func (*User) ExportArrayPublic ¶
public does not have the passwords and anything sensitive / secure / private, also dates are ints