service

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service interface {
	CreateResource(ctx context.Context, req domain.Resource) (int64, error)
	FindResourceById(ctx context.Context, fields []string, id int64) (domain.Resource, error)
	ListResource(ctx context.Context, fields []string, modelUid string, offset, limit int64) ([]domain.Resource,
		int64, error)
	CountByModelUid(ctx context.Context, modelUid string) (int64, error)
	// ListResourceByIds 资源关联关系调用,查询关联数据
	ListResourceByIds(ctx context.Context, fields []string, ids []int64) ([]domain.Resource, error)
	// ListExcludeAndFilterResourceByIds 排序以及过滤
	ListExcludeAndFilterResourceByIds(ctx context.Context, fields []string, modelUid string, offset, limit int64,
		ids []int64, filter domain.Condition) ([]domain.Resource, int64, error)
	DeleteResource(ctx context.Context, id int64) (int64, error)
	// CountByModelUids 聚合查看模型下的数量
	CountByModelUids(ctx context.Context, modelUids []string) (map[string]int, error)
	Search(ctx context.Context, text string) ([]domain.SearchResource, error)

	FindSecureData(ctx context.Context, id int64, fieldUid string) (string, error)
	UpdateResource(ctx context.Context, resource domain.Resource) (int64, error)
}

func NewService

func NewService(repo repository.ResourceRepository) Service

Jump to

Keyboard shortcuts

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