Documentation ¶
Index ¶
- func CheckPasswordHash(password, hash string) bool
- func ConvertFileToBase64(file Content)
- func CreateUserAndAddedToken(MONGOCONNSTRINGEV *mongo.Database, collection string, datauser User) interface{}
- func DecodeBase64String(data string) string
- func DeleteArticle(mongoconn *mongo.Database, collection string, articleData Article) interface{}
- func GCFCreateUserWToken(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFDeleteArticle(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFHandler(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFLoadOneArticle(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFLoginHandler(PASETOPRIVATEKEYENV, MONGOCONNSTRINGENV, dbname, collectionname string, ...) string
- func GCFPostArticle(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFReturnStruct(DataStuct any) string
- func GCFSearchByAuthor(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFSearchByCategory(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFSearchByTags(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFSearchByTitle(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFUpdateArticle(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GenerateArticleID(randomizer int) string
- func GetArticleByLastDate(MONGOCONNSTRINGENV, dbname, collectionname string) string
- func HashPassword(password string) (string, error)
- func IsPasswordValid(MONGOSTRING *mongo.Database, collection string, userdata User) bool
- func IsUsernameExists(MONGOSTRING, dbname string, datauser User) bool
- func PostArticle(mongoconn *mongo.Database, collection string, articleData Article) interface{}
- func SetConnection(MONGOCONNSTRINGENV, dbname string) *mongo.Database
- func UpdateArticle(mongoconn *mongo.Database, collection string, articleData Article) interface{}
- type Article
- func GetArticle(mongoconn *mongo.Database, collection string) []Article
- func GetByAuthor(mongoconn *mongo.Database, collection string, articleData Article) Article
- func GetByLastDate(mongoconn *mongo.Database, collection string, articleData Article) Article
- func GetOneArticle(mongoconn *mongo.Database, collection string, articleData Article) Article
- func LoadArticle(mongoconn *mongo.Database, collection string, articleData Article) Article
- func LoadByArticleID(mongoconn *mongo.Database, collection string, articleData Article) Article
- func SearchByAuthor(mongoconn *mongo.Database, collection string, searchBy Article) Article
- func SearchByCategory(mongoconn *mongo.Database, collection string, searchBy Article) Article
- func SearchByTags(mongoconn *mongo.Database, collection string, searchBy Article) Article
- func SearchByTitle(mongoconn *mongo.Database, collection string, searchBy Article) Article
- type ArticleInfo
- type Content
- type Credential
- type RegisterInfo
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPasswordHash ¶
func ConvertFileToBase64 ¶ added in v1.0.7
func ConvertFileToBase64(file Content)
func CreateUserAndAddedToken ¶ added in v1.0.3
func DecodeBase64String ¶ added in v1.0.7
func DeleteArticle ¶ added in v1.0.4
func GCFCreateUserWToken ¶ added in v1.0.6
func GCFDeleteArticle ¶ added in v1.0.4
func GCFHandler ¶ added in v1.0.1
func GCFLoadOneArticle ¶ added in v1.0.7
func GCFLoginHandler ¶ added in v1.0.7
func GCFPostArticle ¶ added in v1.0.3
func GCFReturnStruct ¶
func GCFSearchByAuthor ¶ added in v1.0.4
func GCFSearchByCategory ¶ added in v1.0.4
func GCFSearchByTags ¶ added in v1.0.4
func GCFSearchByTitle ¶ added in v1.0.4
func GCFUpdateArticle ¶ added in v1.0.4
func GenerateArticleID ¶ added in v1.1.4
func GetArticleByLastDate ¶ added in v1.0.8
func HashPassword ¶
func IsPasswordValid ¶
func IsUsernameExists ¶ added in v1.1.3
func PostArticle ¶ added in v1.0.3
func SetConnection ¶
Types ¶
type Article ¶
type Article struct { ID string `json:"article_id,omitempty" bson:"article_id,omitempty"` Author string `json:"author" bson:"author"` Title string `json:"title" bson:"title"` Category string `json:"category" bson:"category"` Tags string `json:"tags" bson:"tags"` Content Content `json:"content" bson:"content"` Date time.Time `json:"date" bson:"date"` }
func GetArticle ¶ added in v1.0.1
func GetByAuthor ¶ added in v1.0.8
func GetByLastDate ¶ added in v1.0.4
func GetOneArticle ¶ added in v1.0.4
func LoadArticle ¶ added in v1.0.7
func LoadByArticleID ¶ added in v1.1.4
func SearchByAuthor ¶ added in v1.0.4
func SearchByCategory ¶ added in v1.0.4
func SearchByTags ¶ added in v1.0.4
type ArticleInfo ¶ added in v1.1.4
type ArticleInfo struct { Message string `json:"message,omitempty" bson:"message,omitempty"` Author string `json:"author" bson:"author"` Title string `json:"title" bson:"title"` Category string `json:"category" bson:"category"` Tags string `json:"tags" bson:"tags"` Content []Content `json:"content" bson:"content"` Date string `json:"date" bson:"date"` }
type Credential ¶
type RegisterInfo ¶ added in v1.1.3
type RegisterInfo struct { Message string `json:"message,omitempty" bson:"message,omitempty"` Status bool `json:"status" bson:"status"` Fullname string `json:"fullname" bson:"fullname"` Username string `json:"username" bson:"username"` Password string `json:"password" bson:"password"` JournalStatus string `json:"journal_bool" bson:"journal_bool"` Role string `json:"role,omitempty" bson:"role,omitempty"` NoHP string `json:"no_hp,omitempty" bson:"no_hp,omitempty"` }
type User ¶
type User struct { Fullname string `json:"fullname" bson:"fullname"` Username string `json:"username" bson:"username"` Password string `json:"password" bson:"password"` NoHP string `json:"no_hp,omitempty" bson:"no_hp,omitempty"` JournalStatus string `json:"journal_bool" bson:"journal_bool"` Token string `json:"token,omitempty" bson:"token,omitempty"` Role string `json:"role,omitempty" bson:"role,omitempty"` }
func GetAllUser ¶ added in v1.0.3
Click to show internal directories.
Click to hide internal directories.