Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateFaker ¶
func GenerateNewAccessToken ¶
Types ¶
type BlogFaker ¶
type BlogFaker struct { ID string `json:"id" bson:"_id,omitempty"` Title string `json:"title" bson:"title" faker:"name"` Content string `json:"content" bson:"content" faker:"word"` Author *UserFaker `json:"author" bson:"author"` CreatedAt time.Time `json:"createdAt" bson:"createdAt"` UpdatedAt time.Time `json:"updatedAt" bson:"updatedAt"` }
type TokenMetadata ¶
func CheckToken ¶
func CheckToken(r *http.Request) (*TokenMetadata, error)
func ExtractTokenMetadata ¶
func ExtractTokenMetadata(r *http.Request) (*TokenMetadata, error)
type UserFaker ¶
type UserFaker struct { ID string `json:"id" bson:"_id,omitempty"` Username string `json:"username" bson:"username" faker:"username"` Email string `json:"email" bson:"email" faker:"email"` Password string `json:"password" bson:"password" faker:"password"` CreatedAt time.Time `json:"createdAt" bson:"createdAt"` UpdatedAt *time.Time `json:"updatedAt" bson:"updatedAt"` }
Click to show internal directories.
Click to hide internal directories.