Documentation
¶
Index ¶
- Variables
- func Init()
- type FullTextSearch
- type PostgreSQL
- func (p PostgreSQL) Clean() error
- func (p PostgreSQL) Create(titleKeywords, contentKeywords string, id uint64) error
- func (p PostgreSQL) Delete(id uint64) error
- func (p PostgreSQL) Index() error
- func (p PostgreSQL) Init() error
- func (p PostgreSQL) New(db *gorm.DB) FullTextSearch
- func (p PostgreSQL) ReIndex() error
- func (p PostgreSQL) Search(keywords string, offset, limit int) (arr []*model.Note, count int64)
- type SQLite
- func (s SQLite) Clean() error
- func (s SQLite) Create(titleKeywords, contentKeywords string, id uint64) error
- func (s SQLite) Delete(id uint64) error
- func (s SQLite) Index() error
- func (s SQLite) Init() error
- func (s SQLite) New(db *gorm.DB) FullTextSearch
- func (s SQLite) ReIndex() error
- func (s SQLite) Search(keywords string, offset, limit int) (arr []*model.Note, count int64)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Note = ¬eSrv{} Input = &inputSrv{mux: &sync.RWMutex{}} )
Functions ¶
Types ¶
type FullTextSearch ¶
type FullTextSearch interface { New(db *gorm.DB) FullTextSearch Init() error Index() error ReIndex() error Clean() error Search(keywords string, offset, limit int) ([]*model.Note, int64) Create(titleKeywords, contentKeywords string, id uint64) error Delete(id uint64) error }
FullTextSearch interface
var Search FullTextSearch = &SQLite{}
type PostgreSQL ¶
type PostgreSQL struct {
// contains filtered or unexported fields
}
func (PostgreSQL) Clean ¶
func (p PostgreSQL) Clean() error
func (PostgreSQL) Create ¶
func (p PostgreSQL) Create(titleKeywords, contentKeywords string, id uint64) error
func (PostgreSQL) Delete ¶
func (p PostgreSQL) Delete(id uint64) error
func (PostgreSQL) Index ¶
func (p PostgreSQL) Index() error
func (PostgreSQL) Init ¶
func (p PostgreSQL) Init() error
func (PostgreSQL) New ¶
func (p PostgreSQL) New(db *gorm.DB) FullTextSearch
func (PostgreSQL) ReIndex ¶
func (p PostgreSQL) ReIndex() error
Click to show internal directories.
Click to hide internal directories.