Documentation ¶
Index ¶
Constants ¶
View Source
const (
COST = 14
)
Variables ¶
This section is empty.
Functions ¶
func HashPassword ¶
Types ¶
type Admin ¶
type Admin struct { ID primitive.ObjectID `json:"id" bson:"_id,omitempty"` Email string `json:"email" bson:"email,omitempty"` FirstName string `json:"firstName" bson:"firstName,omitempty"` LastName string `json:"lastName" bson:"lastName,omitempty"` PasswordHash string `json:"passwordHash" bson:"passwordHash,omitempty"` Version int `json:"version" bson:"version,omitempty"` }
func NewAdmin ¶
func NewAdmin(input *CreateAdminInput) (*Admin, error)
type CreateAdminInput ¶
type ErrorResponse ¶
type ErrorResponse struct { Status int `json:"status"` Message string `json:"message"` Errors []string `json:"errors"` }
func GenerateErrorResponse ¶
func GenerateErrorResponse(status int, message string, errorMessages []string) *ErrorResponse
type NewAdminResponse ¶
type NewAdminResponse struct {
ID string `json:"id"`
}
type NextPrevContent ¶
type Pagination ¶
type PaginationInput ¶
type Response ¶
type Response struct { Status int `json:"status"` Message string `json:"message"` Content interface{} `json:"content"` }
func GenerateResponse ¶
func NewNextPrevResponse ¶
func NewNextPrevResponse(status int, count int64, message, next, prev string, results interface{}) *Response
NewNextPrevResponse will create http paginated response based on next and prev
func NewResponse ¶
NewResponse is the Response struct factory function.
Click to show internal directories.
Click to hide internal directories.