service

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2023 License: MIT Imports: 8 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAppModule added in v0.0.7

func GetAppModule() application.Module

GetAppModule ...

func SetAppModule added in v0.0.7

func SetAppModule(m application.Module)

SetAppModule ...

Types

type AboutService added in v0.0.7

type AboutService interface {
	GetInfo(ctx context.Context) (*vo.About, error)
}

AboutService ...

type AppDataService

type AppDataService interface {
	GetAppDataDirectory() string

	GetSQLiteDBFile() string

	GetMainRepositoryPath() string

	GetBackupDirectory() string

	Ready() bool

	Setup() error
}

AppDataService ...

type AppIconService

type AppIconService interface {
}

AppIconService ... [这个接口已经弃用]

type CheckUpdateService added in v0.0.14

type CheckUpdateService interface {

	// 检查更新的版本
	Check(ctx context.Context, o *vo.AboutCheckUpdate) error

	// 忽略指定的版本
	Ignore(ctx context.Context, o *vo.AboutCheckUpdate) error
}

CheckUpdateService 检查更新 WPM 版本

type ContentTypeService added in v0.0.14

type ContentTypeService interface {

	// 根据文件名(或路径)查询对应的mime类型
	GetContentType(name string) (string, error)
}

ContentTypeService ...

type DatabaseBackupService added in v0.0.15

type DatabaseBackupService interface {
	Export(c context.Context, o *dto.Backup) (*dto.Backup, error)

	Import(c context.Context, o *dto.Backup) (*dto.Backup, error)

	ListAll(c context.Context) ([]*dto.Backup, error)
}

DatabaseBackupService ...

type ExampleService

type ExampleService interface {
	Find(ctx context.Context, id dxo.ExampleID) (*dto.Example, error)

	ListAll(ctx context.Context) ([]*dto.Example, error)

	Insert(ctx context.Context, o *dto.Example) (*dto.Example, error)
	Update(ctx context.Context, id dxo.ExampleID, o *dto.Example) (*dto.Example, error)
	Remove(ctx context.Context, id dxo.ExampleID) error
}

ExampleService ...

type ExecutableImportService

type ExecutableImportService interface {
	Save(ctx context.Context, o *vo.ExecutableImport) (*vo.ExecutableImport, error)
	Locate(ctx context.Context, o *vo.ExecutableImport) (*vo.ExecutableImport, error)
}

ExecutableImportService ...

type ExecutableService

type ExecutableService interface {
	Find(ctx context.Context, id dxo.ExecutableID) (*dto.Executable, error)
	FindByPath(ctx context.Context, path string) (*dto.Executable, error)

	ListAll(ctx context.Context) ([]*dto.Executable, error)

	Insert(ctx context.Context, o *dto.Executable) (*dto.Executable, error)
	Update(ctx context.Context, id dxo.ExecutableID, o *dto.Executable) (*dto.Executable, error)
	Remove(ctx context.Context, id dxo.ExecutableID) error
}

ExecutableService ...

type FileQueryService added in v0.0.7

type FileQueryService interface {
	Query(ctx context.Context, q *vo.FileQuery) (*vo.FileQuery, error)
}

FileQueryService ...

type FileSystemService added in v0.0.12

type FileSystemService interface {
	FS() afs.FS

	Path(path string) afs.Path
}

FileSystemService ...

type IntentHandlerService

type IntentHandlerService interface {
	HandleIntent(i *dto.Intent) error
}

IntentHandlerService ...

type IntentService

type IntentService interface {
	Run(ctx context.Context, o *dto.Intent) (*dto.Intent, error)
}

IntentService ...

type IntentTemplateService

type IntentTemplateService interface {
	Find(ctx context.Context, id dxo.IntentTemplateID) (*dto.IntentTemplate, error)

	ListAll(ctx context.Context) ([]*dto.IntentTemplate, error)

	Insert(ctx context.Context, o *dto.IntentTemplate) (*dto.IntentTemplate, error)

	Update(ctx context.Context, id dxo.IntentTemplateID, o *dto.IntentTemplate) (*dto.IntentTemplate, error)

	Remove(ctx context.Context, id dxo.IntentTemplateID) error
}

IntentTemplateService ...

type LocalRepositoryFinder

type LocalRepositoryFinder interface {
	Search(ctx context.Context, path string, depthLimit int) ([]*dto.LocalRepository, error)
	Locate(ctx context.Context, path string) (*dto.LocalRepository, error)
}

LocalRepositoryFinder 。。。

type LocalRepositoryOptions added in v0.0.12

type LocalRepositoryOptions struct {
	WithFileState bool
	WithGitStatus bool
	WithProjects  bool
	All           bool
}

LocalRepositoryOptions ...

type LocalRepositoryStateLoader

type LocalRepositoryStateLoader interface {
	LoadState(ctx context.Context, repo *dto.LocalRepository) error
}

LocalRepositoryStateLoader 。。。

type MainRepositoryService

type MainRepositoryService interface {
	GetInfo(ctx context.Context) (*dto.MainRepository, error)

	GetRepository(ctx context.Context) (store.Repository, error)
}

MainRepositoryService ...

type MediaOptions added in v0.0.14

type MediaOptions struct {
	All           bool
	WithFileState bool
}

MediaOptions ...

type MediaService

type MediaService interface {
	Find(ctx context.Context, id dxo.MediaID, opt *MediaOptions) (*dto.Media, error)

	FindByIDs(ctx context.Context, ids []dxo.MediaID, opt *MediaOptions) ([]*dto.Media, error)

	FindByPath(ctx context.Context, path string, opt *MediaOptions) (*dto.Media, error)

	PrepareForDownload(ctx context.Context, me *dto.Media) (*dto.Media, error)

	ListAll(ctx context.Context, opt *MediaOptions) ([]*dto.Media, error)

	ImportPresets(ctx context.Context) error

	Insert(ctx context.Context, o *dto.Media) (*dto.Media, error)
	Update(ctx context.Context, id dxo.MediaID, o *dto.Media) (*dto.Media, error)
	Remove(ctx context.Context, id dxo.MediaID) error
}

MediaService ...

type PlatformProvider

type PlatformProvider interface {
	Accept(p *dto.Platform) bool
	GetProfile(p *dto.Profile) error
}

PlatformProvider ...

type PlatformProviderRegistration

type PlatformProviderRegistration struct {
	Provider PlatformProvider
}

PlatformProviderRegistration ...

type PlatformProviderRegistry

type PlatformProviderRegistry interface {
	GetRegistration() *PlatformProviderRegistration
}

PlatformProviderRegistry ...

type PlatformService

type PlatformService interface {
	GetPlatform() (*dto.Platform, error)
	GetProvider() (PlatformProvider, error)
}

PlatformService ...

type ProfileService

type ProfileService interface {
	GetProfile() (*dto.Profile, error)
}

ProfileService ...

type ProjectImportService

type ProjectImportService interface {
	Find(ctx context.Context, o *vo.ProjectImport) (*vo.ProjectImport, error)
	FindOrLocate(ctx context.Context, o *vo.ProjectImport) (*vo.ProjectImport, error)
	Locate(ctx context.Context, o *vo.ProjectImport) (*vo.ProjectImport, error)
	Save(ctx context.Context, o *vo.ProjectImport) (*vo.ProjectImport, error)
}

ProjectImportService ...

type ProjectOptions added in v0.0.14

type ProjectOptions struct {
	All bool

	WithFileState bool
	WithGitStatus bool
}

ProjectOptions ...

type ProjectService

type ProjectService interface {
	Find(ctx context.Context, id dxo.ProjectID, options *ProjectOptions) (*dto.Project, error)
	FindByOwnerRepository(ctx context.Context, id dxo.LocalRepositoryID, options *ProjectOptions) ([]*dto.Project, error)
	ListAll(ctx context.Context, options *ProjectOptions) ([]*dto.Project, error)
	ListByIds(ctx context.Context, ids []dxo.ProjectID, options *ProjectOptions) ([]*dto.Project, error)

	Insert(ctx context.Context, o *dto.Project) (*dto.Project, error)
	Update(ctx context.Context, id dxo.ProjectID, o *dto.Project) (*dto.Project, error)
	Remove(ctx context.Context, id dxo.ProjectID) error
}

ProjectService ...

type ProjectTypeImportService added in v0.0.14

type ProjectTypeImportService interface {
	ImportTypesFromPreset(ctx context.Context) error
}

ProjectTypeImportService ...

type ProjectTypeService added in v0.0.14

type ProjectTypeService interface {
	Find(ctx context.Context, id dxo.ProjectTypeID) (*dto.ProjectType, error)

	ListAll(ctx context.Context) ([]*dto.ProjectType, error)

	Insert(ctx context.Context, o *dto.ProjectType) (*dto.ProjectType, error)
	Update(ctx context.Context, id dxo.ProjectTypeID, o *dto.ProjectType) (*dto.ProjectType, error)
	Remove(ctx context.Context, id dxo.ProjectTypeID) error

	// LocateProject: 如果没有给出有效的参数 path,那么就用 o.FullPath 代替
	LocateProject(ctx context.Context, o *dto.Project, path string) error
}

ProjectTypeService ...

type RemoteRepositoryService

RemoteRepositoryService ...

type RepositoryImportService

type RepositoryImportService interface {
	Find(ctx context.Context, o *vo.RepositoryImport) (*vo.RepositoryImport, error)
	Locate(ctx context.Context, o *vo.RepositoryImport) (*vo.RepositoryImport, error)
	FindOrLocate(ctx context.Context, o *vo.RepositoryImport) (*vo.RepositoryImport, error)
	Save(ctx context.Context, o *vo.RepositoryImport) (*vo.RepositoryImport, error)
}

RepositoryImportService ...

type SettingService added in v0.0.14

type SettingService interface {
	ListAll() map[string]string

	PutString(name, value string)
	GetString(name, defaultValue string) string

	PutSettings(o *dto.Settings) error
	GetSettings() (*dto.Settings, error)
}

SettingService ...

type UUIDGenService

type UUIDGenService interface {
	GenerateUUID(seed string) dxo.UUID
}

UUIDGenService ...

Jump to

Keyboard shortcuts

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