Documentation ¶
Index ¶
- Variables
- func CheckModuleExists(module string) bool
- func GetConfig() models.Config
- func GetDecodedJWT(r *http.Request) jwt.MapClaims
- func GetGoogleCloudClient(ctx context.Context) (*storage.Client, error)
- func GetLang(r *http.Request) string
- func GetStrings(r *http.Request) map[string]string
- func GetSubdomain(r *http.Request) string
- func GetUserObjectID(r *http.Request) bson.ObjectId
- func HasPremiumFeatures(site models.Site, size float64) bool
- func InitGoogleCloud()
- func InitStripe()
- func IsAuthorized(site models.Site, user models.User) bool
- func NewJWT(user models.User, expire int) (string, error)
- func RemoveGoogleCloudPhotos(photos []models.Photo) error
- func RespondWithJSON(w http.ResponseWriter, code int, message string, payload interface{})
- func SendVerificationMail(email string, verification models.EmailVerification) error
- func UpdateFilename(fileID bson.ObjectId, filename string) error
- func UploadFile(file multipart.File, fileName string) (bson.ObjectId, error)
- type Response
Constants ¶
This section is empty.
Variables ¶
View Source
var StripeClient client.API
Functions ¶
func CheckModuleExists ¶
CheckModuleExists : loop through list of modules to check if it included
func GetDecodedJWT ¶
GetDecodedJWT Returns decoded JWT object
func GetGoogleCloudClient ¶
GetGoogleCloudClient : Return google cloud client
func GetSubdomain ¶
GetSubdomain : return subdomain of request
func GetUserObjectID ¶
GetUserObjectID : return id of jwt as type object id
func HasPremiumFeatures ¶
HasPremiumFeatures : i don't know
func InitGoogleCloud ¶
func InitGoogleCloud()
func InitStripe ¶
func InitStripe()
func IsAuthorized ¶
IsAuthorized : Check if a user is authorized to edit site
func RemoveGoogleCloudPhotos ¶
RemoveGoogleCloudPhotos : remove photos from google cloud to save space
func RespondWithJSON ¶
func RespondWithJSON(w http.ResponseWriter, code int, message string, payload interface{})
RespondWithJSON : Respond with JSON
func SendVerificationMail ¶
func SendVerificationMail(email string, verification models.EmailVerification) error
SendVerificationMail : send verification email to user
func UpdateFilename ¶
UpdateFilename : update filename of a file
Types ¶
Click to show internal directories.
Click to hide internal directories.