Documentation ¶
Index ¶
Constants ¶
View Source
const ModuleName = "unverified"
Variables ¶
This section is empty.
Functions ¶
func GetOffsetLinks ¶
func GetOffsetLinks(r *http.Request, p pgdb.OffsetPageParams, s SortParams) *resources.Links
Types ¶
type ModulePayload ¶
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 SortParams ¶
type SortParams struct {
Param string `page:"sort" default:"created_at"`
}
type User ¶
type User struct { Id int64 `json:"-" db:"id" structs:"-"` Username *string `json:"username" db:"username" structs:"username,omitempty"` Phone *string `json:"phone" db:"phone" structs:"phone,omitempty"` Email *string `json:"email" db:"email" structs:"email,omitempty"` Name *string `json:"name" db:"name" structs:"name,omitempty"` Module string `json:"module" db:"module" structs:"module"` Submodule string `json:"submodule" db:"submodule" structs:"submodule"` ModuleId string `json:"module_id" db:"module_id" structs:"module_id"` CreatedAt time.Time `json:"created_at" db:"created_at" structs:"-"` }
type Users ¶
type Users interface { New() Users Upsert(user User) error Delete() error Select() ([]User, error) Get() (*User, error) WithGroupedModulesAndSubmodules(modules *string) Users WithGroupedSubmodules(username, module *string) Users FilterByModuleIds(moduleIds ...string) Users FilterByModules(modules ...string) Users SearchBy(search string) Users CountWithGroupedModules(modules *string) Users GetTotalCount() (int64, error) Page(pageParams pgdb.OffsetPageParams, sortParams SortParams) Users }
Click to show internal directories.
Click to hide internal directories.