Documentation
¶
Index ¶
Constants ¶
View Source
const ( DividingLines = "\n---------------------------------------------------------------------------------------\n" LinkUpUserService = "" /* 580-byte string literal not displayed */ )
Variables ¶
Functions ¶
This section is empty.
Types ¶
type AuthData ¶
type AuthData struct {
// Email Address of the user
Email string `json:"email" validate:"required"`
// Password of the user
Password string `json:"password" validate:"required"`
}
AuthData Authorization data of the user
type Person ¶
type Person struct {
// Identification of the person
Id *int64 `db:"id" json:"id"`
// Identification of the user
UserId *int64 `db:"user_id" json:"userId"`
// First name
FirstName *string `db:"first_name" json:"firstName" validate:"required"`
// Last name
LastName *string `db:"last_name" json:"lastName" validate:"required"`
// Middle name
MiddleName *string `db:"middle_name" json:"middleName,omitempty"`
// Birth date
Birthday *time.Time `db:"birthday" json:"birthday,omitempty"`
// Age
Age *uint8 `db:"age" json:"age,omitempty"`
// Gender
Gender *string `db:"gender" json:"gender,omitempty" validate:"omitempty,oneof=M F"`
// Phone number
Phone *string `db:"phone_number" json:"phone,omitempty"`
// CreatedAt
CreatedAt *time.Time `db:"created_at" json:"createdAt"`
// UpdatedAt
UpdatedAt *time.Time `db:"updated_at" json:"updated,omitempty"`
}
Person entity stores information about a person
func (*Person) SetCreatedAt ¶
func (m *Person) SetCreatedAt()
func (*Person) SetUpdateAt ¶
func (m *Person) SetUpdateAt()
type PersonSearchForm ¶
type PersonSearchForm struct {
// Identification of the peron
Ids []int32 `json:"ids"`
// Identification of the users
UserIds []int32 `json:"userIds"`
// Last name of the person
LastNames []string `json:"lastNames"`
// First name of the person
FirstNames []string `json:"firstNames"`
// Middle name of the person
MiddleNames []string `json:"middleNames"`
}
PersonSearchForm search form
func (*PersonSearchForm) PrepareCondition ¶
func (f *PersonSearchForm) PrepareCondition() *gosql.Condition
type User ¶
type User struct {
// Id user identification
Id *int64 `db:"id" json:"id"`
// Password
Password *string `db:"password" json:"password,omitempty" validate:"omitempty,min=5,max=20" validate:"required_if=Password"`
// NewPassword New password
NewPassword *string `json:"newPassword,omitempty" validate:"omitempty,min=5,max=20" validate:"required_if=Password"`
// Email
Email *string `db:"email" json:"email" validate:"required,email"`
// CreatedAt
CreatedAt *time.Time `db:"created_at" json:"createdAt"`
// UpdatedAt
UpdatedAt *time.Time `db:"updated_at" json:"updated,omitempty"`
// Person stores info about the user
Person Person `db:"person" json:"person"`
}
User entity for authentication
func (*User) ClearSensitiveData ¶
func (*User) SetCreatedAt ¶
func (m *User) SetCreatedAt()
func (*User) SetUpdateAt ¶
func (m *User) SetUpdateAt()
func (*User) ValuesWithPerson ¶
func (m *User) ValuesWithPerson() []interface{}
type UserSearchForm ¶
type UserSearchForm struct {
// Identification of the users
Ids []int32 `json:"ids"`
// Name of the user
LastNames []string `json:"lastNames"`
// First name of the user
FirstNames []string `json:"firstNames"`
// Middle name of the user
MiddleNames []string `json:"middleNames"`
}
UserSearchForm user search form
func (*UserSearchForm) PrepareCondition ¶
func (f *UserSearchForm) PrepareCondition() *gosql.Condition
Click to show internal directories.
Click to hide internal directories.