Documentation
¶
Index ¶
- Variables
- func AddFollow(follower_id int64, followee_id int64) error
- func AddGoogleUser(google_id string, username string, full_name string, email string) (*model.User, error)
- func AddNote(user_id int64, title string, description string, is_template bool, ...) (*model.Note, error)
- func AddNoteTag(user_id int64, note_id int64, tag_id int64) error
- func AddTag(tag_name string) (*model.Tag, error)
- func AddUser(username string, full_name string, email string, password string) (*model.User, error)
- func BeanTransaction(seller_id int64, buyer_id int64, bean int64) error
- func BuyNote(user_id int64, note_id int64) (*model.Note, error)
- func CheckUserBuyNote(user_id int64, note_id int64) bool
- func DeleteFollow(follower_id int64, followee_id int64) error
- func DeleteNote(user_id int64, note_id int64) error
- func DeleteNoteTag(user_id int64, note_id int64, tag_id int64) error
- func DeleteSave(user_id int64, note_id int64) error
- func EditNote(user_id int64, note_id int64, form EditNoteInput) error
- func EditPassword(account_id int64, form EditPasswordInput) error
- func EditProfile(account_id int64, form EditAccountInput) error
- func FindCourse(course_id int64) (*model.Course, error)
- func FindPrivateProfile(account_id int64) (*model.User, int64, int64, int64, error)
- func FindPublicProfile(account_id int64) (*model.User, int64, int64, int64, error)
- func FindSales(note_id int64) (int64, int64, error)
- func FindSchool(school_id int64) (*model.School, error)
- func FindSchoolCourse(school_id int64) ([]*model.Course, error)
- func FindSchools() ([]*model.School, error)
- func FindTag(tag_id int64) (*model.Tag, error)
- func FindTags() ([]*model.Tag, error)
- func Fitz(filepath string, file multipart.File) error
- func GetFollow(follower_id int64, followee_id int64) (bool, error)
- func GetMyNote(user_id int64, note_id int64) (bool, error)
- func GetNoteById(note_id int64) (*model.Note, error)
- func GetNoteByIdWithCourse(note_id int64) (*model.Note, error)
- func GetNoteSavedCnt(note_id int64) (int64, error)
- func GetNoteTag(note_id int64) (*[]model.NoteTag, error)
- func GetNotes(filter string, offset int64) ([]model.Note, int64, error)
- func GetNotesByCourse(course_id int64, filter string, offset int64) ([]model.Note, int64, error)
- func GetNotesByUserId(user_id int64, filter string, offset int64) ([]model.Note, int64, error)
- func GetOwnLibraryNotes(user_id int64, filter string, offset int64) ([]model.Download, int64, error)
- func GetOwnSavedNotes(user_id int64, filter string, offset int64) ([]model.Saved, int64, error)
- func GetOwnUploadedNotes(user_id int64, filter string, offset int64) ([]model.Note, int64, error)
- func GetSave(user_id int64, note_id int64) (bool, error)
- func GetTagsByBatch(tagIds *[]int64) (*[]model.Tag, error)
- func GetUserNameByUserId(user_id int64) (string, error)
- func GetUserNoteById(user_id int64, note_id int64) (*model.Note, error)
- func SaveNote(user_id int64, note_id int64) error
- func SavedNote(user_id int64, note_id int64) (bool, error)
- func SignedFileUrl(filePath string) (string, error)
- func UpdateGoodnotesFilename(note_id int64, filename string) error
- func UpdateNotabilityFilename(note_id int64, filename string) error
- func UpdateNoteViewCnt(note_id int64, view_cnt int64) error
- func UpdatePdfFilename(note_id int64, pdf_filename string, preview_filename string) error
- func UpdatePreviewFilename(note_id int64, preview_filename string) error
- func UploadFile(filePath string, file multipart.File) error
- func UploadImg(filePath string, img io.Reader) error
- func VerifyGoogleLogin(google_id string) (*model.User, error)
- func VerifyIdToken(idToken string) (*oauth2.Tokeninfo, error)
- func VerifyLogin(username string, password string) (*model.User, error)
- type EditAccountInput
- type EditNoteInput
- type EditPasswordInput
- type Follow_Member_Detail
- type NoteOutput
- type SearchCourseOutput
- type SearchNoteOutput
- type SearchSchoolOutput
- type SearchTagOutput
- type SearchUserOutput
Constants ¶
This section is empty.
Variables ¶
View Source
var PrivateProfileFields = []string{"user_id", "username", "full_name", "description", "status", "bean", "password", "google_id"}
View Source
var PublicProfileFields = []string{"user_id", "username", "description", "status", "bean"}
Functions ¶
func AddGoogleUser ¶
func CheckUserBuyNote ¶
func DeleteFollow ¶
func DeleteNote ¶
func DeleteSave ¶
func EditPassword ¶
func EditPassword(account_id int64, form EditPasswordInput) error
func EditProfile ¶
func EditProfile(account_id int64, form EditAccountInput) error
func FindPrivateProfile ¶
func FindPublicProfile ¶
func FindSchools ¶
func GetNoteSavedCnt ¶
func GetNotesByCourse ¶
string type: all-popular, notability-popular, goodnotes-popular, all-recent, notability-recent, goodnotes-recent
func GetNotesByUserId ¶
string type: all-popular, notability-popular, goodnotes-popular, all-recent, notability-recent, goodnotes-recent
func GetOwnLibraryNotes ¶
func GetOwnLibraryNotes(user_id int64, filter string, offset int64) ([]model.Download, int64, error)
uploaded/saved/library string type: all, notability, goodnotes
func GetOwnSavedNotes ¶
uploaded/saved/library string type: all, notability, goodnotes
func GetOwnUploadedNotes ¶
uploaded/saved/library string type: all, notability, goodnotes
func GetUserNameByUserId ¶
func SignedFileUrl ¶
func UpdateGoodnotesFilename ¶
func UpdateNoteViewCnt ¶
func UpdatePdfFilename ¶
func UpdatePreviewFilename ¶
Types ¶
type EditAccountInput ¶
type EditNoteInput ¶
type EditPasswordInput ¶
type Follow_Member_Detail ¶
type Follow_Member_Detail struct {
Account_id int64 `json:"account_id"`
Username string `json:"username"`
Full_name string `json:"full_name"`
}
func GetFollowers ¶
func GetFollowers(followee_id int64) ([]*Follow_Member_Detail, error)
func GetFollowing ¶
func GetFollowing(follower_id int64) ([]*Follow_Member_Detail, error)
type NoteOutput ¶
type NoteOutput struct {
Note_ID int64 `json:"note_id"`
ID int64 `json:"user_id"`
Username string `json:"username"`
Title string `json:"title"`
Preview_filename string `json:"preview_filename"`
Goodnotes_filename string `json:"goodnotes_filename"`
Notability_filename string `json:"notability_filename"`
View_cnt int64 `json:"view_cnt"`
CreatedAt time.Time `json:"created_at"`
}
func GetNotesByTag ¶
string type: all-popular, notability-popular, goodnotes-popular, all-recent, notability-recent, goodnotes-recent
type SearchCourseOutput ¶
type SearchCourseOutput struct {
ID int64 `json:"course_id"`
Course_no string `json:"course_no"`
Course_name string `json:"course_name"`
School_name string `json:"school_name"`
School_ID int64 `json:"school_id"`
Note_cnt int64 `json:"note_cnt"`
Last_updated_time time.Time `json:"last_updated_time"`
}
func SearchCourse ¶
type SearchNoteOutput ¶
type SearchNoteOutput struct {
ID int64 `json:"note_id"`
User_id int64 `json:"user_id"`
Username string `json:"username"`
Title string `json:"title"`
View_cnt int64 `json:"view_cnt"`
Preview_filename string `json:"preview_filename"`
Goodnotes_filename string `json:"goodnotes_filename"`
Notability_filename string `json:"notability_filename"`
CreatedAt time.Time `json:"created_at"`
}
func SearchNote ¶
func SearchNote(q string, offset int, limit int, note_type string) ([]SearchNoteOutput, int64, error)
LIKE: title note_type: all, notability, goodnotes
func SearchTemplate ¶
func SearchTemplate(q string, offset int, limit int, note_type string) ([]SearchNoteOutput, int64, error)
LIKE: title note_type: all, notability, goodnotes
type SearchSchoolOutput ¶
type SearchSchoolOutput struct {
ID int64 `json:"school_id"`
School_name string `json:"school_name"`
}
func SearchSchool ¶
type SearchTagOutput ¶
type SearchUserOutput ¶
func SearchUser ¶
Click to show internal directories.
Click to hide internal directories.