Documentation ¶
Index ¶
- type Account
- type AdminTag
- type AdminUser
- type BalanceLimit
- type Business
- type BusinessData
- type BusinessESRecord
- type FindAdminTagResult
- type FindBusinessResult
- type FindTagResult
- type FindUserResult
- type Journal
- type LoginInfo
- type LostPassword
- type MatchedTags
- type Posting
- type RegisterData
- type SearchCriteria
- type Tag
- type TagESRecord
- type TagField
- type TradingRegisterData
- type TradingUpdateData
- type Transaction
- type UpdateAccountData
- type User
- type UserAction
- type UserActionSearchCriteria
- type UserESRecord
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdminTag ¶
type AdminTag struct { ID primitive.ObjectID `json:"_id,omitempty" bson:"_id,omitempty"` CreatedAt time.Time `json:"createdAt,omitempty" bson:"createdAt,omitempty"` UpdatedAt time.Time `json:"updatedAt,omitempty" bson:"updatedAt,omitempty"` DeletedAt time.Time `json:"deletedAt,omitempty" bson:"deletedAt,omitempty"` Name string `json:"name,omitempty" bson:"name,omitempty"` }
AdminTag is the model representation of an admin tag in the data model.
type AdminUser ¶
type AdminUser struct { ID primitive.ObjectID `json:"_id,omitempty" bson:"_id,omitempty"` CreatedAt time.Time `json:"createdAt,omitempty" bson:"createdAt,omitempty"` UpdatedAt time.Time `json:"updatedAt,omitempty" bson:"updatedAt,omitempty"` DeletedAt time.Time `json:"deletedAt,omitempty" bson:"deletedAt,omitempty"` Email string `json:"email,omitempty" bson:"email,omitempty"` Name string `json:"name,omitempty" bson:"name,omitempty"` Password string `json:"password,omitempty" bson:"password,omitempty"` Roles []string `json:"roles,omitempty" bson:"roles,omitempty"` CurrentLoginIP string `json:"currentLoginIP,omitempty" bson:"currentLoginIP,omitempty"` CurrentLoginDate time.Time `json:"currentLoginDate,omitempty" bson:"currentLoginDate,omitempty"` LastLoginIP string `json:"lastLoginIP,omitempty" bson:"lastLoginIP,omitempty"` LastLoginDate time.Time `json:"lastLoginDate,omitempty" bson:"lastLoginDate,omitempty"` }
AdminUser is the model representation of an admin user in the data model.
type BalanceLimit ¶
type Business ¶
type Business struct { ID primitive.ObjectID `json:"_id,omitempty" bson:"_id,omitempty"` CreatedAt time.Time `json:"createdAt,omitempty" bson:"createdAt,omitempty"` UpdatedAt time.Time `json:"updatedAt,omitempty" bson:"updatedAt,omitempty"` DeletedAt time.Time `json:"deletedAt,omitempty" bson:"deletedAt,omitempty"` BusinessName string `json:"businessName,omitempty" bson:"businessName,omitempty"` BusinessPhone string `json:"businessPhone,omitempty" bson:"businessPhone,omitempty"` IncType string `json:"incType,omitempty" bson:"incType,omitempty"` CompanyNumber string `json:"companyNumber,omitempty" bson:"companyNumber,omitempty"` Website string `json:"website,omitempty" bson:"website,omitempty"` Turnover int `json:"turnover,omitempty" bson:"turnover,omitempty"` Offers []*TagField `json:"offers,omitempty" bson:"offers,omitempty"` Wants []*TagField `json:"wants,omitempty" bson:"wants,omitempty"` Description string `json:"description,omitempty" bson:"description,omitempty"` LocationAddress string `json:"locationAddress,omitempty" bson:"locationAddress,omitempty"` LocationCity string `json:"locationCity,omitempty" bson:"locationCity,omitempty"` LocationRegion string `json:"locationRegion,omitempty" bson:"locationRegion,omitempty"` LocationPostalCode string `json:"locationPostalCode,omitempty" bson:"locationPostalCode,omitempty"` LocationCountry string `json:"locationCountry,omitempty" bson:"locationCountry,omitempty"` Status string `json:"status,omitempty" bson:"status,omitempty"` AdminTags []string `json:"adminTags,omitempty" bson:"adminTags,omitempty"` // Timestamp when trading status applied MemberStartedAt time.Time `json:"memberStartedAt,omitempty" bson:"memberStartedAt,omitempty"` }
Business is the model representation of a business in the data model.
type BusinessData ¶
type BusinessData struct { ID primitive.ObjectID BusinessName string IncType string CompanyNumber string BusinessPhone string Website string Turnover int Offers []*TagField Wants []*TagField OffersAdded []string OffersRemoved []string WantsAdded []string WantsRemoved []string Description string LocationAddress string LocationCity string LocationRegion string LocationPostalCode string LocationCountry string Status string AdminTags []string }
type BusinessESRecord ¶
type BusinessESRecord struct { BusinessID string `json:"businessID,omitempty"` BusinessName string `json:"businessName,omitempty"` Offers []*TagField `json:"offers,omitempty"` Wants []*TagField `json:"wants,omitempty"` LocationCity string `json:"locationCity,omitempty"` LocationCountry string `json:"locationCountry,omitempty"` Status string `json:"status,omitempty"` AdminTags []string `json:"adminTags,omitempty"` }
BusinessESRecord is the data that will store into the elastic search.
type FindAdminTagResult ¶
type FindBusinessResult ¶
type FindTagResult ¶
type FindUserResult ¶
type Journal ¶
type Journal struct { gorm.Model // Journal has many postings, JournalID is the foreign key Postings []Posting TransactionID string `gorm:"type:varchar(27);not null;default:''"` InitiatedBy uint `gorm:"type:int;not null;default:0"` FromID uint `gorm:"type:int;not null;default:0"` FromEmail string `gorm:"type:varchar(120);not null;default:''"` FromBusinessName string `gorm:"type:varchar(120);not null;default:''"` ToID uint `gorm:"type:int;not null;default:0"` ToEmail string `gorm:"type:varchar(120);not null;default:''"` ToBusinessName string `gorm:"type:varchar(120);not null;default:''"` Amount float64 `gorm:"not null;default:0"` Description string `gorm:"type:varchar(510);not null;default:''"` Type string `gorm:"type:varchar(31);not null;default:'transfer'"` Status string `gorm:"type:varchar(31);not null;default:''"` CancellationReason string `gorm:"type:varchar(510);not null;default:''"` }
type LoginInfo ¶
type LoginInfo struct { CurrentLoginIP string `json:"currentLoginIP,omitempty" bson:"currentLoginIP,omitempty"` CurrentLoginDate time.Time `json:"currentLoginDate,omitempty" bson:"currentLoginDate,omitempty"` LastLoginIP string `json:"lastLoginIP,omitempty" bson:"lastLoginIP,omitempty"` LastLoginDate time.Time `json:"lastLoginDate,omitempty" bson:"lastLoginDate,omitempty"` }
LoginInfo is shared by user and admin user model.
type LostPassword ¶
type LostPassword struct { ID primitive.ObjectID `json:"_id,omitempty" bson:"_id,omitempty"` CreatedAt time.Time `json:"createdAt,omitempty" bson:"createdAt,omitempty"` Email string `json:"email,omitempty" bson:"email,omitempty"` Token string `json:"token,omitempty" bson:"token,omitempty"` TokenUsed bool `json:"tokenUsed,omitempty" bson:"tokenUsed,omitempty"` }
LostPassword is the model representation of a lost password in the data model.
type MatchedTags ¶
type RegisterData ¶
type SearchCriteria ¶
type SearchCriteria struct { TagType string Tags []*TagField CreatedOnOrAfter time.Time Statuses []string // accepted", "pending", rejected", "tradingPending", "tradingAccepted", "tradingRejected" BusinessName string LocationCountry string LocationCity string ShowUserFavoritesOnly bool FavoriteBusinesses []primitive.ObjectID AdminTag string }
type Tag ¶
type Tag struct { ID primitive.ObjectID `json:"_id,omitempty" bson:"_id,omitempty"` CreatedAt time.Time `json:"createdAt,omitempty" bson:"createdAt,omitempty"` UpdatedAt time.Time `json:"updatedAt,omitempty" bson:"updatedAt,omitempty"` DeletedAt time.Time `json:"deletedAt,omitempty" bson:"deletedAt,omitempty"` Name string `json:"name,omitempty" bson:"name,omitempty"` OfferAddedAt time.Time `json:"offerAddedAt,omitempty" bson:"offerAddedAt,omitempty"` WantAddedAt time.Time `json:"wantAddedAt,omitempty" bson:"wantAddedAt,omitempty"` }
Tag is the model representation of a tag in the data model.
type TagESRecord ¶
type TradingRegisterData ¶
type TradingRegisterData struct { // Business BusinessName string IncType string CompanyNumber string BusinessPhone string Website string Turnover int Description string LocationAddress string LocationCity string LocationRegion string LocationPostalCode string LocationCountry string // User FirstName string LastName string Telephone string // Terms Authorised string // Recaptcha RecaptchaSitekey string }
func (*TradingRegisterData) Validate ¶
func (t *TradingRegisterData) Validate() []string
type TradingUpdateData ¶
type TradingUpdateData struct { // Business BusinessName string IncType string CompanyNumber string BusinessPhone string Website string Turnover int Description string LocationAddress string LocationCity string LocationRegion string LocationPostalCode string LocationCountry string // User FirstName string LastName string Telephone string // Recaptcha RecaptchaSitekey string }
func (*TradingUpdateData) Validate ¶
func (t *TradingUpdateData) Validate() []string
type Transaction ¶
type UpdateAccountData ¶
type UpdateAccountData struct { User *User Business *BusinessData Balance *BalanceLimit CurrentPassword string ConfirmPassword string }
type User ¶
type User struct { ID primitive.ObjectID `json:"_id,omitempty" bson:"_id,omitempty"` CreatedAt time.Time `json:"createdAt,omitempty" bson:"createdAt,omitempty"` UpdatedAt time.Time `json:"updatedAt,omitempty" bson:"updatedAt,omitempty"` DeletedAt time.Time `json:"deletedAt,omitempty" bson:"deletedAt,omitempty"` FirstName string `json:"firstName,omitempty" bson:"firstName,omitempty"` LastName string `json:"lastName,omitempty" bson:"lastName,omitempty"` Email string `json:"email,omitempty" bson:"email,omitempty"` Password string `json:"password,omitempty" bson:"password,omitempty"` Telephone string `json:"telephone,omitempty" bson:"telephone,omitempty"` CompanyID primitive.ObjectID `json:"companyID,omitempty" bson:"companyID,omitempty"` CurrentLoginIP string `json:"currentLoginIP,omitempty" bson:"currentLoginIP,omitempty"` CurrentLoginDate time.Time `json:"currentLoginDate,omitempty" bson:"currentLoginDate,omitempty"` LastLoginIP string `json:"lastLoginIP,omitempty" bson:"lastLoginIP,omitempty"` LastLoginDate time.Time `json:"lastLoginDate,omitempty" bson:"lastLoginDate,omitempty"` LoginAttempts int `json:"loginAttempts,omitempty" bson:"loginAttempts,omitempty"` LastLoginFailDate time.Time `json:"lastLoginFailDate,omitempty" bson:"lastLoginFailDate,omitempty"` ShowRecentMatchedTags bool `json:"showRecentMatchedTags,omitempty" bson:"showRecentMatchedTags,omitempty"` FavoriteBusinesses []primitive.ObjectID `json:"favoriteBusinesses,omitempty" bson:"favoriteBusinesses,omitempty"` DailyNotification bool `json:"dailyNotification,omitempty" bson:"dailyNotification,omitempty"` LastNotificationSentDate time.Time `json:"lastNotificationSentDate,omitempty" bson:"lastNotificationSentDate,omitempty"` }
User is the model representation of an user in the data model.
type UserAction ¶
type UserAction struct { ID primitive.ObjectID `json:"_id,omitempty" bson:"_id,omitempty"` CreatedAt time.Time `json:"createdAt,omitempty" bson:"createdAt,omitempty"` UpdatedAt time.Time `json:"updatedAt,omitempty" bson:"updatedAt,omitempty"` DeletedAt time.Time `json:"deletedAt,omitempty" bson:"deletedAt,omitempty"` UserID primitive.ObjectID `json:"userID,omitempty" bson:"userID,omitempty"` Email string `json:"email,omitempty" bson:"email,omitempty"` Action string `json:"action,omitempty" bson:"action,omitempty"` ActionDetails string `json:"actionDetails,omitempty" bson:"actionDetails,omitempty"` Category string `json:"category,omitempty" bson:"category,omitempty"` }
UserAction is the model representation of an user action in the data model.
Click to show internal directories.
Click to hide internal directories.