Documentation ¶
Index ¶
- Constants
- Variables
- func CheckError(err error)
- func DeleteHTTPRequest(url string)
- func FeedPDFContent(filePath string, userId int64, bookId int64, title string, author string, ...)
- func GetForgotPassword(c *gin.Context)
- func GetJSON(url string, target interface{}) error
- func GetJSONPassPayload(url string, payload []byte) []byte
- func GetSignOut(c *gin.Context)
- func PostJSON(url string, message []byte)
- func PutJSON(url string, message []byte)
- func RandSeq(n int64) string
- func SendBookCover(c *gin.Context)
- func StartServer()
- type BMESDoc
- type BookDataStruct
- type BookDetailHighlight
- type BookDetailHighlightAttachmentContent
- type BookDetailHighlightFields
- type BookDetailHighlightResult
- type BookDetailHits
- type BookDetailHitsHits
- type BookDetailMatchPhrase
- type BookDetailPayloadStruct
- type BookDetailQuery
- type BookDetailResultStruct
- type BookDetailSource
- type BookInfoHits
- type BookInfoHitsHits
- type BookInfoPayloadStruct
- type BookInfoQuery
- type BookInfoResultStruct
- type BookInfoStruct
- type BookMetadataEditStruct
- type BookSearchResult
- type BookStruct
- type BookStructList
- type BooksList
- type CollectionBooks
- type CurrentPageDataStruct
- type DeleteHighlightIdStruct
- type EPUBHighlightStruct
- type Env
- func (e *Env) ConfirmEmail(c *gin.Context)
- func (e *Env) DeleteBook(c *gin.Context)
- func (e *Env) DeleteCollection(c *gin.Context)
- func (e *Env) DeletePDFHighlight(c *gin.Context)
- func (e *Env) EditBook(c *gin.Context)
- func (e *Env) GetAddCollection(c *gin.Context)
- func (e *Env) GetAutocomplete(c *gin.Context)
- func (e *Env) GetBookMetaData(c *gin.Context)
- func (e *Env) GetCollection(c *gin.Context)
- func (e *Env) GetCollections(c *gin.Context)
- func (e *Env) GetEPUBCurrentPage(c *gin.Context)
- func (e *Env) GetHomePage(c *gin.Context)
- func (e *Env) GetPDFHighlights(c *gin.Context)
- func (e *Env) GetPagination(c *gin.Context)
- func (e *Env) GetResetPassword(c *gin.Context)
- func (e *Env) GetSettings(c *gin.Context)
- func (e *Env) GetSignIn(c *gin.Context)
- func (e *Env) GetSignUp(c *gin.Context)
- func (e *Env) PostForgotPassword(c *gin.Context)
- func (e *Env) PostNewCollection(c *gin.Context)
- func (e *Env) PostPDFHighlight(c *gin.Context)
- func (e *Env) PostPDFHighlightColor(c *gin.Context)
- func (e *Env) PostPDFHighlightComment(c *gin.Context)
- func (e *Env) PostResetPassword(c *gin.Context)
- func (e *Env) PostSettings(c *gin.Context)
- func (e *Env) PostSignIn(c *gin.Context)
- func (e *Env) PostSignUp(c *gin.Context)
- func (e *Env) SaveEPUBHighlight(c *gin.Context)
- func (e *Env) SendBook(c *gin.Context)
- func (e *Env) SendEPUBFragment(c *gin.Context)
- func (e *Env) SendEPUBFragmentFromId(c *gin.Context)
- func (e *Env) SendNewToken(c *gin.Context)
- func (e *Env) UploadBook(c *gin.Context)
- type GetBookMetadataStruct
- type GetPDFHighlightColorComment
- type GetPDFHighlightDetail
- type HrefDataStruct
- type MultiMatchQuery
- type OPFItem
- type OPFItemRef
- type OPFManifest
- type OPFMetadata
- type OPFMetadataStruct
- type OPFSpine
- type PDFHighlightColor
- type PDFHighlightComment
- type PDFHighlightStruct
- type PDFHighlightsStruct
- type PostCollection
- type PostSettingsStruct
- type QuoteStruct
- type XMLContainerStruct
- type XMLRootFile
- type XMLRootFiles
Constants ¶
View Source
const ( PORT_DEFAULT = "8080" PORT_ENV = "LIBREREAD_PORT" ENABLE_ES_ENV = "LIBREREAD_ELASTICSEARCH" ENABLE_ES_DEFAULT = "0" ESPATH_ENV = "LIBREREAD_ES_PATH" ESPATH_DEFAULT = "http://localhost:9200" REDISPATH_ENV = "LIBREREAD_REDIS_PATH" REDISPATH_DEFAULT = "localhost:6379" ASSETPATH_ENV = "LIBREREAD_ASSET_PATH" ASSETPATH_DEFAULT = "." DOMAIN_ADDRESS_ENV = "LIBREREAD_DOMAIN_ADDRESS" DOMAIN_ADDRESS_DEFAULT = "" SMTP_SERVER_ENV = "LIBREREAD_SMTP_SERVER" SMTP_SERVER_DEFAULT = "" SMTP_PORT_ENV = "LIBREREAD_SMTP_PORT" SMTP_PORT_DEFAULT = "" SMTP_ADDRESS_ENV = "LIBREREAD_SMTP_ADDRESS" SMTP_ADDRESS_DEFAULT = "" SMTP_PASSWORD_ENV = "LIBREREAD_SMTP_PASSWORD" SMTP_PASSWORD_DEFAULT = "" )
Variables ¶
View Source
var ( EnableES = ENABLE_ES_DEFAULT ESPath = ESPATH_DEFAULT RedisPath = REDISPATH_DEFAULT ServerPort = PORT_DEFAULT AssetPath = ASSETPATH_DEFAULT DomainAddress = DOMAIN_ADDRESS_DEFAULT SMTPServer = SMTP_SERVER_DEFAULT SMTPPort = SMTP_PORT_DEFAULT SMTPAddress = SMTP_ADDRESS_DEFAULT SMTPPassword = SMTP_PASSWORD_DEFAULT )
Functions ¶
func CheckError ¶
func CheckError(err error)
func DeleteHTTPRequest ¶
func DeleteHTTPRequest(url string)
func FeedPDFContent ¶
func GetForgotPassword ¶
func GetJSONPassPayload ¶
func GetSignOut ¶
func SendBookCover ¶
func StartServer ¶ added in v1.1.0
func StartServer()
Types ¶
type BookDataStruct ¶
type BookDetailHighlight ¶
type BookDetailHighlight struct {
Fields BookDetailHighlightFields `json:"fields"`
}
type BookDetailHighlightFields ¶
type BookDetailHighlightFields struct {
AttachmentContent BookDetailHighlightAttachmentContent `json:"attachment.content"`
}
type BookDetailHighlightResult ¶
type BookDetailHighlightResult struct {
AttachmentContent []string `json:"attachment.content"`
}
type BookDetailHits ¶
type BookDetailHits struct {
Hits []BookDetailHitsHits `json:"hits"`
}
type BookDetailHitsHits ¶
type BookDetailHitsHits struct { Source BookDetailSource `json:"_source"` Highlight BookDetailHighlightResult `json:"highlight"` }
type BookDetailMatchPhrase ¶
type BookDetailMatchPhrase struct {
AttachmentContent string `json:"attachment.content"`
}
type BookDetailPayloadStruct ¶
type BookDetailPayloadStruct struct { Source []string `json:"_source"` Query BookDetailQuery `json:"query"` Highlight BookDetailHighlight `json:"highlight"` }
type BookDetailQuery ¶
type BookDetailQuery struct {
MatchPhrase BookDetailMatchPhrase `json:"match_phrase"`
}
type BookDetailResultStruct ¶
type BookDetailResultStruct struct {
Hits BookDetailHits `json:"hits"`
}
type BookDetailSource ¶
type BookInfoHits ¶
type BookInfoHits struct {
Hits []BookInfoHitsHits `json:"hits"`
}
type BookInfoHitsHits ¶
type BookInfoHitsHits struct {
Source BookInfoStruct `json:"_source"`
}
type BookInfoPayloadStruct ¶
type BookInfoPayloadStruct struct { Source []string `json:"_source"` Query BookInfoQuery `json:"query"` }
type BookInfoQuery ¶
type BookInfoQuery struct {
MultiMatch MultiMatchQuery `json:"multi_match"`
}
type BookInfoResultStruct ¶
type BookInfoResultStruct struct {
Hits BookInfoHits `json:"hits"`
}
type BookInfoStruct ¶
type BookMetadataEditStruct ¶
type BookMetadataEditStruct struct {
Doc BMESDoc `json:"doc"`
}
type BookSearchResult ¶
type BookSearchResult struct { BookInfo []BookInfoStruct `json:"book_info"` BookDetail []BookDetailHitsHits `json:"book_detail"` }
struct for wrapping book search result
type BookStruct ¶
type BookStructList ¶
type BookStructList []BookStruct
type CollectionBooks ¶
type CurrentPageDataStruct ¶
type DeleteHighlightIdStruct ¶
type DeleteHighlightIdStruct struct {
Id string `json:"id"`
}
type EPUBHighlightStruct ¶
type Env ¶
func (*Env) ConfirmEmail ¶
func (*Env) DeleteBook ¶
func (*Env) DeleteCollection ¶
func (*Env) DeletePDFHighlight ¶
func (*Env) GetAddCollection ¶
func (*Env) GetAutocomplete ¶
func (*Env) GetBookMetaData ¶
func (*Env) GetCollection ¶
func (*Env) GetCollections ¶
func (*Env) GetEPUBCurrentPage ¶
func (*Env) GetHomePage ¶
func (*Env) GetPDFHighlights ¶
func (*Env) GetPagination ¶
func (*Env) GetResetPassword ¶
func (*Env) GetSettings ¶
func (*Env) PostForgotPassword ¶
func (*Env) PostNewCollection ¶
func (*Env) PostPDFHighlight ¶
func (*Env) PostPDFHighlightColor ¶
func (*Env) PostPDFHighlightComment ¶
func (*Env) PostResetPassword ¶
func (*Env) PostSettings ¶
func (*Env) PostSignIn ¶
func (*Env) PostSignUp ¶
func (*Env) SaveEPUBHighlight ¶
func (*Env) SendEPUBFragment ¶
func (*Env) SendEPUBFragmentFromId ¶
func (*Env) SendNewToken ¶
func (*Env) UploadBook ¶
type GetBookMetadataStruct ¶
type GetPDFHighlightDetail ¶
type HrefDataStruct ¶
type MultiMatchQuery ¶
type OPFItemRef ¶
type OPFItemRef struct {
IdRef []string `xml:"idref,attr"`
}
type OPFManifest ¶
type OPFManifest struct {
Item OPFItem `xml:"item"`
}
type OPFMetadata ¶
type OPFMetadataStruct ¶
type OPFMetadataStruct struct { Metadata OPFMetadata `xml:"metadata"` Spine OPFSpine `xml:"spine"` Manifest OPFManifest `xml:"manifest"` }
type OPFSpine ¶
type OPFSpine struct {
ItemRef OPFItemRef `xml:"itemref"`
}
type PDFHighlightColor ¶
type PDFHighlightComment ¶
type PDFHighlightStruct ¶
type PDFHighlightStruct struct { PageIndex []string `json:"pageIndex" binding:"required"` DivIndex []string `json:"divIndex" binding:"required"` HTMLContent []string `json:"htmlContent" binding:"required"` FileName string `json:"fileName" binding:"required"` HighlightColor string `json:"highlightColor" binding:"required"` }
type PDFHighlightsStruct ¶
type PDFHighlightsStruct struct { Color []GetPDFHighlightColorComment `json:"color"` Detail []GetPDFHighlightDetail `json:"detail"` }
type PostCollection ¶
type PostSettingsStruct ¶
type QuoteStruct ¶
type QuoteStruct struct { Author string `json:"author" binding:"required"` AuthorURL string `json:"authorURL" binding:"required"` FromBook string `json:"fromBook" binding:"required"` FromBookURL string `json:"fromBookURL" binding:"required"` Image string `json:"image" binding:"required"` Quote string `json:"quote" binding:"required"` }
type XMLContainerStruct ¶
type XMLContainerStruct struct {
RootFiles XMLRootFiles `xml:"rootfiles"`
}
type XMLRootFile ¶
type XMLRootFile struct {
FullPath string `xml:"full-path,attr"`
}
type XMLRootFiles ¶
type XMLRootFiles struct {
RootFile XMLRootFile `xml:"rootfile"`
}
Click to show internal directories.
Click to hide internal directories.