Documentation ¶
Index ¶
Constants ¶
View Source
const ( OrderAscending = "asc" OrderDescending = "desc" )
View Source
const (
ModuleName = "mail"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ModulePayload ¶
type ModulePayload struct { RequestId string `json:"request_id"` UserId string `json:"user_id"` Action string `json:"action"` //other fields that are required for module Link string `json:"link"` Links []string `json:"links"` Email string `json:"username"` Phone string `json:"phone"` FirstName string `json:"first_name"` LastName string `json:"last_name"` }
type ModuleRequest ¶
type ModuleRequest struct { ID string `db:"id" structs:"id"` UserID int64 `db:"user_id" structs:"user_id"` Module string `db:"module" structs:"module"` Payload string `db:"payload" structs:"payload"` CreatedAt time.Time `db:"created_at" structs:"created_at"` RequestStatus string `db:"request_status" structs:"request_status"` Error string `db:"error" structs:"error"` }
type Permission ¶
type Permission struct { RequestId string `json:"request_id" db:"request_id" structs:"request_id"` MailId string `json:"mail_id" db:"mail_id" structs:"mail_id"` Link string `json:"link" db:"link" structs:"link"` CreatedAt time.Time `json:"created_at" db:"created_at" structs:"created_at"` UpdatedAt time.Time `json:"updated_at" db:"updated_at" structs:"-"` *User `structs:",omitempty"` }
type Permissions ¶
type Permissions interface { New() Permissions Upsert(permission Permission) error Delete() error Select() ([]Permission, error) Get() (*Permission, error) FilterByMailIds(mailIds ...string) Permissions FilterByGreaterTime(time time.Time) Permissions FilterByLowerTime(time time.Time) Permissions FilterByLinks(links ...string) Permissions WithUsers() Permissions FilterByUserIds(userIds ...int64) Permissions Count() Permissions CountWithUsers() Permissions GetTotalCount() (int64, error) Page(pageParams pgdb.OffsetPageParams) Permissions }
type Response ¶
type Response struct { ID string `json:"id" db:"id" structs:"id"` Status string `json:"status" db:"status" structs:"status"` Error string `json:"error" db:"error" structs:"error"` Payload json.RawMessage `json:"payload" db:"payload" structs:"payload"` CreatedAt string `json:"created_at" db:"created_at" structs:"-"` }
type UnverifiedPayload ¶
type UnverifiedPayload struct { Action string `json:"action"` Users []UnverifiedUser `json:"users"` }
type UnverifiedUser ¶
type UnverifiedUser struct { CreatedAt time.Time `json:"created_at"` Module string `json:"module"` Submodule string `json:"submodule"` ModuleId string `json:"module_id"` Email *string `json:"email,omitempty"` Name *string `json:"name,omitempty"` Phone *string `json:"phone,omitempty"` Username *string `json:"username,omitempty"` }
type User ¶
type User struct { Id *int64 `json:"-" db:"id" structs:"id,omitempty"` Email string `json:"email" db:"email" structs:"email"` Name string `json:"name" db:"name" structs:"name"` MailId string `json:"mail_id" db:"mail_id" structs:"mail_id"` CreatedAt time.Time `json:"created_at" db:"created_at" structs:"-"` UpdatedAt time.Time `json:"updated_at" db:"updated_at" structs:"-"` Submodule *string `json:"-" db:"-" structs:"-"` }
type Users ¶
type Users interface { New() Users Upsert(user User) error Delete() error Select() ([]User, error) Get() (*User, error) FilterById(id *int64) Users FilterByMailIds(emailIds ...string) Users FilterByLowerTime(time time.Time) Users SearchBy(search string) Users Count() Users GetTotalCount() (int64, error) Page(pageParams pgdb.OffsetPageParams) Users }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.