service

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2021 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentLinkService

type AgentLinkService interface {
	RegisterAgent(in *vo.AgentLink, out *vo.AgentLink) error
	UnregisterAgent(id string, in *vo.AgentLink, out *vo.AgentLink) error
	FetchMessage(id string, in *vo.AgentLink, out *vo.AgentLink) error
	DispatchMessage(id string, in *vo.AgentLink, out *vo.AgentLink) error
}

AgentLinkService aka AgentLinkManager

type AgentLinkServiceImpl

type AgentLinkServiceImpl struct {
	markup.Component `id:"agent-link-service"  initMethod:"Init"`

	AgentPortMin int `inject:"${gie.agent.port.min}"`
	AgentPortMax int `inject:"${gie.agent.port.max}"`
	// contains filtered or unexported fields
}

func (*AgentLinkServiceImpl) DispatchMessage

func (inst *AgentLinkServiceImpl) DispatchMessage(id string, in *vo.AgentLink, out *vo.AgentLink) error

func (*AgentLinkServiceImpl) FetchMessage

func (inst *AgentLinkServiceImpl) FetchMessage(id string, in *vo.AgentLink, out *vo.AgentLink) error

func (*AgentLinkServiceImpl) Init

func (inst *AgentLinkServiceImpl) Init() error

func (*AgentLinkServiceImpl) RegisterAgent

func (inst *AgentLinkServiceImpl) RegisterAgent(in *vo.AgentLink, out *vo.AgentLink) error

func (*AgentLinkServiceImpl) UnregisterAgent

func (inst *AgentLinkServiceImpl) UnregisterAgent(id string, in *vo.AgentLink, out *vo.AgentLink) error

type ApplicationUpdateService

type ApplicationUpdateService interface {
}

type ApplicationUpdateServiceImpl

type ApplicationUpdateServiceImpl struct {
	markup.Component `id:"application-update-service" initMethod:"Init"`

	Env context.Environment `inject:"#env"`
}

func (*ApplicationUpdateServiceImpl) Init

func (inst *ApplicationUpdateServiceImpl) Init() error

type CommandService

type CommandService interface {
	Execute(ctx context.Context, o1 *dto.Command, o2 *dto.Command) error
}

CommandService ...

type CommandServiceImpl

type CommandServiceImpl struct {
	markup.Component `id:"command-service"`

	ClientFactory cli.ClientFactory `inject:"#cli-client-factory"`
	VFS           VFSService        `inject:"#vfs-service"`
	Tasks         TaskService       `inject:"#task-service"`
}

CommandServiceImpl ...

func (*CommandServiceImpl) Execute

func (inst *CommandServiceImpl) Execute(ctx context.Context, o1 *dto.Command, o2 *dto.Command) error

Execute ...

type ContentTypeFinder

type ContentTypeFinder interface {
	// return '.xxx'
	GetFileNameSuffix(filename string) string

	FindContentType(suffix string) (string, error)
}

type ContentTypeService

type ContentTypeService interface {
	NewFinder() ContentTypeFinder
}

type ContentTypeServiceImpl

type ContentTypeServiceImpl struct {
	markup.Component `id:"content-type-service" initMethod:"Init"`

	Context application.Context `inject:"context"`
	// contains filtered or unexported fields
}

func (*ContentTypeServiceImpl) Init

func (inst *ContentTypeServiceImpl) Init() error

func (*ContentTypeServiceImpl) NewFinder

func (inst *ContentTypeServiceImpl) NewFinder() ContentTypeFinder

type DBAService

type DBAService interface {
	StartMigration() error
	StartBackup() error
	StopBackup() error
	GetStatus(o *vo.DBA) error
}

type DBAServiceProxy

type DBAServiceProxy struct {
	markup.Component `id:"dba-service"  initMethod:"Init" `

	Context  application.Context `inject:"context"`
	Selector string              `inject:"${dba.service.selector}"`
	// contains filtered or unexported fields
}

factory

func (*DBAServiceProxy) GetStatus

func (inst *DBAServiceProxy) GetStatus(o *vo.DBA) error

func (*DBAServiceProxy) Init

func (inst *DBAServiceProxy) Init() error

func (*DBAServiceProxy) StartBackup

func (inst *DBAServiceProxy) StartBackup() error

func (*DBAServiceProxy) StartMigration added in v0.0.9

func (inst *DBAServiceProxy) StartMigration() error

func (*DBAServiceProxy) StopBackup

func (inst *DBAServiceProxy) StopBackup() error

type FileSystemService

type FileSystemService interface {
	QueryRoots(param *dto.Dir, result *dto.Dir) error
	QueryDir(param *dto.Dir, result *dto.Dir) error
	QueryFile(param *dto.File, result *dto.File) error
}

FileSystemService ...

type FileSystemServiceImpl

type FileSystemServiceImpl struct {
	markup.Component `id:"filesystem-service"`

	VFS   VFSService         `inject:"#vfs-service"`
	Types ContentTypeService `inject:"#content-type-service"`
}

FileSystemServiceImpl ...

func (*FileSystemServiceImpl) QueryDir

func (inst *FileSystemServiceImpl) QueryDir(param *dto.Dir, result *dto.Dir) error

QueryDir ...

func (*FileSystemServiceImpl) QueryFile

func (inst *FileSystemServiceImpl) QueryFile(param *dto.File, result *dto.File) error

QueryFile ...

func (*FileSystemServiceImpl) QueryRoots

func (inst *FileSystemServiceImpl) QueryRoots(param *dto.Dir, result *dto.Dir) error

QueryRoots ...

type GuiService

type GuiService struct {
	markup.Component `id:"gui-service" initMethod:"Init"`

	ClientFactory cli.ClientFactory `inject:"#cli-client-factory"`

	Port int `inject:"${server.port}"`
}

func (*GuiService) Init

func (inst *GuiService) Init() error

type InnerAgentLinkManager

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

type InnerMimeTypesFinder

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

type MockDBAService

type MockDBAService struct {
	markup.Component `id:"mock-dba-service"`
	// contains filtered or unexported fields
}

mock

func (*MockDBAService) GetStatus

func (inst *MockDBAService) GetStatus(o *vo.DBA) error

func (*MockDBAService) StartBackup

func (inst *MockDBAService) StartBackup() error

func (*MockDBAService) StartMigration added in v0.0.9

func (inst *MockDBAService) StartMigration() error

func (*MockDBAService) StopBackup

func (inst *MockDBAService) StopBackup() error

type PlanService

type PlanService interface {
}

PlanService 是gie系统中的计划管理器

type RepositoryService

type RepositoryService interface {
	CloneRepository(o1 *dto.RepositoryClone, o2 *dto.RepositoryClone) error
	ImportRepository(o1 *dto.RepositoryImport, o2 *dto.RepositoryImport) error
	InitRepository(o1 *dto.RepositoryInit, o2 *dto.RepositoryInit) error

	Insert(o *dto.Repository) (*dto.Repository, error)
	GetAll() ([]*dto.Repository, error)
	GetOne(id string) (*dto.Repository, error)
	Update(id string, o *dto.Repository) (*dto.Repository, error)
	Delete(id string) error
}

RepositoryService 是 GIE 的仓库管理器

type RepositoryServiceImpl

type RepositoryServiceImpl struct {
	markup.Component `id:"repository-service"`

	Dao dao.RepositoryDAO `inject:"#repository-dao"`
}

func (*RepositoryServiceImpl) CloneRepository

func (inst *RepositoryServiceImpl) CloneRepository(o1 *dto.RepositoryClone, o2 *dto.RepositoryClone) error

func (*RepositoryServiceImpl) Delete

func (inst *RepositoryServiceImpl) Delete(id string) error

func (*RepositoryServiceImpl) GetAll

func (inst *RepositoryServiceImpl) GetAll() ([]*dto.Repository, error)

func (*RepositoryServiceImpl) GetOne

func (inst *RepositoryServiceImpl) GetOne(id string) (*dto.Repository, error)

func (*RepositoryServiceImpl) ImportRepository

func (inst *RepositoryServiceImpl) ImportRepository(o1 *dto.RepositoryImport, o2 *dto.RepositoryImport) error

func (*RepositoryServiceImpl) InitRepository

func (inst *RepositoryServiceImpl) InitRepository(o1 *dto.RepositoryInit, o2 *dto.RepositoryInit) error

InitRepository ...

func (*RepositoryServiceImpl) Insert

func (inst *RepositoryServiceImpl) Insert(o *dto.Repository) (*dto.Repository, error)

func (*RepositoryServiceImpl) Update

func (inst *RepositoryServiceImpl) Update(id string, o *dto.Repository) (*dto.Repository, error)

type StarAPI added in v0.0.9

type StarAPI interface {
	GetURI() string
	GetType() string

	Execute(invoking *StarInvoking) error
	Post(tx, rx interface{}) error
	Get(id string, rx interface{}) error
	Put(id string, tx, rx interface{}) error
	Delete(id string) error
}

type StarAgentService added in v0.0.9

type StarAgentService interface {
	GetAPI(selector string) (StarAPI, error)
}

type StarInvoking added in v0.0.9

type StarInvoking struct {
	BaseURL string
	Method  string
	Type    string
	ID      string

	Status  int
	Message string

	TxBody interface{}
	RxBody interface{}
}

type TaskHolder

type TaskHolder interface {
	io.Closer

	UpdateState(state task.State, status task.Status)
	HandleError(err error)

	GetID() string
	Cancel() error
	Error() error
	IsCancelling() bool

	GetTask() *dto.Task
	GetController() task.Controller
	GetReporter() task.ProgressReporter
}

TaskHolder 是用来控制任务的接口

type TaskService

type TaskService interface {
	Insert(o *dto.Task) (*dto.Task, error)
	GetAll() ([]*dto.Task, error)
	GetOne(id string) (*dto.Task, error)
	Update(id string, o *dto.Task) (*dto.Task, error)
	Delete(id string) error
	GetTaskHolder(id string) (TaskHolder, error)
}

TaskService 用来管理gie系统中的任务

type VFSService

type VFSService interface {
	Load(str string, result *dto.Dir) error
	LoadURI(uri lang.URI, result *dto.Dir) error
	ResolveURI(s string) (lang.URI, error)
	ResolvePath(s string) (fs.Path, error)
}

VFSService ...

type VFSServiceImpl

type VFSServiceImpl struct {
	markup.Component `id:"vfs-service" initMethod:"Init"`

	Handlers []vfs.Handler `inject:".vfs-handler"`
	Context  vfs.Context   `inject:"#vfs-context"`
}

VFSServiceImpl ...

func (*VFSServiceImpl) Init

func (inst *VFSServiceImpl) Init() error

Init ...

func (*VFSServiceImpl) Load

func (inst *VFSServiceImpl) Load(str string, res *dto.Dir) error

Load ...

func (*VFSServiceImpl) LoadURI

func (inst *VFSServiceImpl) LoadURI(uri lang.URI, res *dto.Dir) error

LoadURI ...

func (*VFSServiceImpl) ResolvePath

func (inst *VFSServiceImpl) ResolvePath(s string) (fs.Path, error)

func (*VFSServiceImpl) ResolveURI

func (inst *VFSServiceImpl) ResolveURI(s string) (lang.URI, error)

Directories

Path Synopsis
impl
vfs

Jump to

Keyboard shortcuts

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