catalog

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDocumentTypeService

func NewDocumentTypeService(
	docTypeRepo port.DocumentTypeRepository,
	templateRepo port.TemplateRepository,
) cataloguc.DocumentTypeUseCase

NewDocumentTypeService creates a new document type service.

func NewFolderService

func NewFolderService(folderRepo port.FolderRepository) cataloguc.FolderUseCase

NewFolderService creates a new folder service.

func NewTagService

func NewTagService(tagRepo port.TagRepository) cataloguc.TagUseCase

NewTagService creates a new tag service.

Types

type DocumentTypeService

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

DocumentTypeService implements document type business logic.

func (*DocumentTypeService) CreateDocumentType

CreateDocumentType creates a new document type.

func (*DocumentTypeService) DeleteDocumentType

DeleteDocumentType attempts to delete a document type. Global types (from SYS tenant) cannot be deleted by other tenants.

func (*DocumentTypeService) GetDocumentType

func (s *DocumentTypeService) GetDocumentType(ctx context.Context, id string) (*entity.DocumentType, error)

GetDocumentType retrieves a document type by ID.

func (*DocumentTypeService) GetDocumentTypeByCode

func (s *DocumentTypeService) GetDocumentTypeByCode(ctx context.Context, tenantID, code string) (*entity.DocumentType, error)

GetDocumentTypeByCode retrieves a document type by code within a tenant. For non-SYS tenants, also checks global (SYS tenant) types.

func (*DocumentTypeService) ListDocumentTypes

func (s *DocumentTypeService) ListDocumentTypes(ctx context.Context, tenantID string, filters port.DocumentTypeFilters) ([]*entity.DocumentType, int64, error)

ListDocumentTypes lists all document types for a tenant with pagination.

func (*DocumentTypeService) ListDocumentTypesWithCount

func (s *DocumentTypeService) ListDocumentTypesWithCount(ctx context.Context, tenantID string, filters port.DocumentTypeFilters) ([]*entity.DocumentTypeListItem, int64, error)

ListDocumentTypesWithCount lists document types with template usage count. For non-SYS tenants, includes global (SYS tenant) types with priority for own types.

func (*DocumentTypeService) UpdateDocumentType

UpdateDocumentType updates a document type's details (name and description only). Global types (from SYS tenant) cannot be modified by other tenants.

type FolderService

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

FolderService implements folder business logic.

func (*FolderService) CreateFolder

CreateFolder creates a new folder.

func (*FolderService) DeleteFolder

func (s *FolderService) DeleteFolder(ctx context.Context, id string) error

DeleteFolder deletes a folder.

func (*FolderService) GetFolder

func (s *FolderService) GetFolder(ctx context.Context, id string) (*entity.Folder, error)

GetFolder retrieves a folder by ID.

func (*FolderService) GetFolderPath

func (s *FolderService) GetFolderPath(ctx context.Context, id string) ([]*entity.Folder, error)

GetFolderPath retrieves the full path of a folder from root.

func (*FolderService) GetFolderTree

func (s *FolderService) GetFolderTree(ctx context.Context, workspaceID string) ([]*entity.FolderTree, error)

GetFolderTree retrieves the complete folder tree for a workspace.

func (*FolderService) GetFolderWithCounts

func (s *FolderService) GetFolderWithCounts(ctx context.Context, id string) (*entity.FolderWithCounts, error)

GetFolderWithCounts retrieves a folder by ID including item counts.

func (*FolderService) ListChildFolders

func (s *FolderService) ListChildFolders(ctx context.Context, workspaceID string, parentID *string) ([]*entity.Folder, error)

ListChildFolders lists all child folders of a parent.

func (*FolderService) ListFolders

func (s *FolderService) ListFolders(ctx context.Context, workspaceID string) ([]*entity.Folder, error)

ListFolders lists all folders in a workspace.

func (*FolderService) ListFoldersWithCounts

func (s *FolderService) ListFoldersWithCounts(ctx context.Context, workspaceID string) ([]*entity.FolderWithCounts, error)

ListFoldersWithCounts lists all folders in a workspace including item counts.

func (*FolderService) ListRootFolders

func (s *FolderService) ListRootFolders(ctx context.Context, workspaceID string) ([]*entity.Folder, error)

ListRootFolders lists all root folders in a workspace.

func (*FolderService) MoveFolder

MoveFolder moves a folder to a new parent.

func (*FolderService) UpdateFolder

UpdateFolder updates a folder's details.

type TagService

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

TagService implements tag business logic.

func (*TagService) CreateTag

func (s *TagService) CreateTag(ctx context.Context, cmd cataloguc.CreateTagCommand) (*entity.Tag, error)

CreateTag creates a new tag.

func (*TagService) DeleteTag

func (s *TagService) DeleteTag(ctx context.Context, id string) error

DeleteTag deletes a tag.

func (*TagService) FindTagByName

func (s *TagService) FindTagByName(ctx context.Context, workspaceID, name string) (*entity.Tag, error)

FindTagByName finds a tag by name within a workspace.

func (*TagService) GetTag

func (s *TagService) GetTag(ctx context.Context, id string) (*entity.Tag, error)

GetTag retrieves a tag by ID.

func (*TagService) ListTags

func (s *TagService) ListTags(ctx context.Context, workspaceID string) ([]*entity.Tag, error)

ListTags lists all tags in a workspace.

func (*TagService) ListTagsWithCount

func (s *TagService) ListTagsWithCount(ctx context.Context, workspaceID string) ([]*entity.TagWithCount, error)

ListTagsWithCount lists all tags with their template counts.

func (*TagService) UpdateTag

func (s *TagService) UpdateTag(ctx context.Context, cmd cataloguc.UpdateTagCommand) (*entity.Tag, error)

UpdateTag updates a tag's details.

Jump to

Keyboard shortcuts

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