catalogue

package
v1.3.4-beta Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Group

type Group struct {
	Uuid   string
	Name   string
	Parent string
	Depth  int
	// contains filtered or unexported fields
}

func (*Group) ResetDepth

func (g *Group) ResetDepth(d int)

func (*Group) SubId

func (g *Group) SubId() []string

type Groups

type Groups []*Group

func (Groups) Len

func (g Groups) Len() int

func (Groups) Less

func (g Groups) Less(i, j int) bool

func (Groups) Swap

func (g Groups) Swap(i, j int)

type ICatalogueModule

type ICatalogueModule interface {
	// Search 搜索目录
	Search(ctx context.Context, keyword string) ([]*catalogue_dto.Item, error)
	// Create 创建目录
	Create(ctx context.Context, input *catalogue_dto.CreateCatalogue) error
	// Edit 编辑目录
	Edit(ctx context.Context, id string, input *catalogue_dto.EditCatalogue) error

	Get(ctx context.Context, id string) (*catalogue_dto.Catalogue, error)
	// Delete 删除目录
	Delete(ctx context.Context, id string) error
	// Services 关键字筛选服务列表
	Services(ctx context.Context, keyword string) ([]*catalogue_dto.ServiceItem, error)
	// ServiceDetail 服务详情
	ServiceDetail(ctx context.Context, sid string) (*catalogue_dto.ServiceDetail, error)
	// Subscribe 订阅服务
	Subscribe(ctx context.Context, subscribeInfo *catalogue_dto.SubscribeService) error
	Sort(ctx context.Context, sorts []*catalogue_dto.SortItem) error
}

type IExportCatalogueModule

type IExportCatalogueModule interface {
	system.IExportModule[catalogue_dto.ExportCatalogue]
}

type Root

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

func NewRoot

func NewRoot(list []*catalogue.Catalogue) *Root

func (*Root) GetParents

func (r *Root) GetParents(uuid string) []string

func (*Root) GetSub

func (r *Root) GetSub(uuid string) []string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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