controller

package
v0.0.0-...-2b71c33 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 18, 2023 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFollow

func AddFollow(c *gin.Context)

POST /api/account/{account_id}/follow

func AddNote

func AddNote(c *gin.Context)

Create Note and add tags

func AddNoteTag

func AddNoteTag(c *gin.Context)

func AddTag

func AddTag(c *gin.Context)

Create Tag

func BuyNote

func BuyNote(c *gin.Context)

Buy Note

func DeleteFollow

func DeleteFollow(c *gin.Context)

DELETE /api/account/{account_id}/follow

func DeleteNote

func DeleteNote(c *gin.Context)

Delete Note

func DeleteNoteTag

func DeleteNoteTag(c *gin.Context)

func DeleteSave

func DeleteSave(c *gin.Context)

Cancel Save

func EditNote

func EditNote(c *gin.Context)

Edit Note

func EditPassword

func EditPassword(c *gin.Context)

PUT /api/account/{account_id}/pass_hash

func EditProfile

func EditProfile(c *gin.Context)

PATCH /api/account

func GetCourse

func GetCourse(c *gin.Context)

GET Course

func GetFollow

func GetFollow(c *gin.Context)

func GetFollowers

func GetFollowers(c *gin.Context)

func GetFollowing

func GetFollowing(c *gin.Context)

func GetHotNote

func GetHotNote(c *gin.Context)

func GetNote

func GetNote(c *gin.Context)

func GetNoteByCourse

func GetNoteByCourse(c *gin.Context)

func GetNoteByTag

func GetNoteByTag(c *gin.Context)

func GetNoteFile

func GetNoteFile(c *gin.Context)

func GetNoteSales

func GetNoteSales(c *gin.Context)

GET Note Sales

func GetNoteTag

func GetNoteTag(c *gin.Context)

func GetNotesByUserIdPublic

func GetNotesByUserIdPublic(c *gin.Context)

func GetOwnNotes

func GetOwnNotes(c *gin.Context)

func GetPreviewFile

func GetPreviewFile(c *gin.Context)

func GetPrivateProfile

func GetPrivateProfile(c *gin.Context)

GET /api/account

func GetPublicProfile

func GetPublicProfile(c *gin.Context)

GET /api/account/{account_id}/profile

func GetSchool

func GetSchool(c *gin.Context)

GET School

func GetSchoolCourse

func GetSchoolCourse(c *gin.Context)

GET School's Course

func GetSchools

func GetSchools(c *gin.Context)

GET Schools

func GetTag

func GetTag(c *gin.Context)

GET Tag

func GetTags

func GetTags(c *gin.Context)

GET Tags

func GoogleLogin

func GoogleLogin(c *gin.Context)

func IsNoteSaved

func IsNoteSaved(c *gin.Context)

Is Note Saved

func Login

func Login(c *gin.Context)

Login

func Register

func Register(c *gin.Context)

Register

func SaveNote

func SaveNote(c *gin.Context)

Save Note

func Search(c *gin.Context)

q any string note_type: all, notability, goodnotes filter: people, tags, schools, courses, notes, templates

func UploadGoodnotes

func UploadGoodnotes(c *gin.Context)

Upload Goodnotes File

func UploadNotability

func UploadNotability(c *gin.Context)

Upload Notability File

func UploadPdf

func UploadPdf(c *gin.Context)

Upload PDF File

func UploadPreview

func UploadPreview(c *gin.Context)

Upload Preview File

Types

type AddAccountInput

type AddAccountInput struct {
	Username  string `json:"username" binding:"required"`
	Full_name string `json:"full_name" binding:"required"`
	Email     string `json:"email" binding:"required"`
	Password  string `json:"password" binding:"required"`
}

type AddFollowInput

type AddFollowInput struct {
	Followee_id int64 `json:"account_id" binding:"required"`
}

type AddNoteInput

type AddNoteInput struct {
	Title       string `json:"title" binding:"required"`
	Description string `json:"description" binding:"required"`
	Is_template *bool  `json:"is_template" binding:"required"`
	Course_id   *int64 `json:"course_id"`
	Bean        *int   `json:"bean" binding:"required"`
}

type AddTagInput

type AddTagInput struct {
	Tag_name string `json:"tag_name" binding:"required"`
}

type CourseResult

type CourseResult struct {
	School_id         int64     `json:"school_id"`
	Course_id         int64     `json:"course_id"`
	Course_name       string    `json:"course_name"`
	Course_no         string    `json:"course_no"`
	Note_cnt          int64     `json:"note_cnt"`
	Last_updated_time time.Time `json:"last_updated_time"`
}

type GoogleLoginInput

type GoogleLoginInput struct {
	GoogleToken string `json:"google_token" binding:"required"`
	Name        string `json:"name" binding:"required"`
}

type LazyNoteOutput

type LazyNoteOutput 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"`
	Saved_cnt        int64     `json:"saved_cnt"`
	Note_type        string    `json:"note_type"`
	Preview_filename string    `json:"preview_filename"`
	Preview_url      string    `json:"preview_url"`
	CreatedAt        time.Time `json:"created_at"`
}

type LoginInput

type LoginInput struct {
	Username string `json:"username" binding:"required"`
	Password string `json:"password" binding:"required"`
}

type NoteBrief

type NoteBrief struct {
	Note_ID          int64     `json:"note_id"`
	Account_ID       int64     `json:"user_id"`
	Username         string    `json:"username"`
	Title            string    `json:"title"`
	View_cnt         int64     `json:"view_cnt"`
	Saved_cnt        int64     `json:"saved_cnt"`
	Note_type        string    `json:"note_type"`
	Preview_filename string    `json:"preview_filename"`
	Preview_url      string    `json:"preview_url"`
	CreatedAt        time.Time `json:"created_at"`
}

type NoteOutput

type NoteOutput struct {
	ID                  int64     `json:"note_id"`
	Account_id          int64     `json:"account_id"`
	Username            string    `json:"username"`
	Title               string    `json:"title"`
	Description         string    `json:"description"`
	View_cnt            int64     `json:"view_cnt"`
	Saved_cnt           int64     `json:"saved_cnt"`
	Course_id           int64     `json:"course_id"`
	Course_name         string    `json:"course_name"`
	Course_no           string    `json:"course_no"`
	School_id           int64     `json:"school_id"`
	School_name         string    `json:"school_name"`
	Is_template         bool      `json:"is_template"`
	Note_type           string    `json:"note_type"`
	Bean                int       `json:"bean"`
	Pdf_filename        string    `json:"pdf_filename"`
	Preview_filename    string    `json:"preview_filename"`
	Preview_url         string    `json:"preview_url"`
	Goodnotes_filename  string    `json:"goodnotes_filename"`
	Notability_filename string    `json:"notability_filename"`
	CreatedAt           time.Time `json:"created_at"`
}

type SchoolResult

type SchoolResult struct {
	School_id   int64  `json:"school_id"`
	School_name string `json:"school_name"`
}

type TagInfo

type TagInfo struct {
	ID   int64  `json:"id"`
	Name string `json:"name"`
}

type TagResult

type TagResult struct {
	Tag_id   int64  `json:"tag_id"`
	Tag_name string `json:"tag_name"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL