dao

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dao added in v0.4.1

type Dao struct {
	// contains filtered or unexported fields
}

Dao data manipulation layer for frontend

func New added in v0.4.1

func New(db *gorm.DB) *Dao

New return a pointer of a Dao instance

func (*Dao) GetKnowledgeBySlug added in v0.4.1

func (d *Dao) GetKnowledgeBySlug(kType, kSlug string) (*model.Knowledge, error)

GetKnowledgeBySlug get knowledge by knowledge slug and type

func (*Dao) GetKnowledgeItemContentBySymbol added in v0.4.1

func (d *Dao) GetKnowledgeItemContentBySymbol(kiSymbol string) (*KnowledgeItemContentResult, error)

GetKnowledgeItemContentBySymbol get knowledge item content by knowledge item symbol

func (*Dao) GetKnowledgeItemList added in v0.4.1

func (d *Dao) GetKnowledgeItemList(knowledgeID uint64) ([]*KnowledgeItemResult, error)

GetKnowledgeItemList get knowledge item list

func (*Dao) GetKnowledgeList added in v0.4.1

func (d *Dao) GetKnowledgeList() ([]*KnowledgeResult, error)

GetKnowledgeList get knowledge list

type KnowledgeItemContentResult

type KnowledgeItemContentResult struct {
	Symbol  uint64
	Title   string
	Content string
}

KnowledgeItemContentResult knowledge content

type KnowledgeItemResult

type KnowledgeItemResult struct {
	ID             uint64
	Symbol         uint64
	Title          string
	ContentVersion uint64
	ParentID       uint64
	Level          uint64
	Index          int64
}

KnowledgeItemResult knowledge info for item

type KnowledgeResult

type KnowledgeResult struct {
	ID            uint64
	Name          string
	Slug          string
	Type          string
	Description   string
	CoverImageURL string
	UpdatedTime   time.Time
}

KnowledgeResult knowledge info for list

Jump to

Keyboard shortcuts

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