Documentation
¶
Index ¶
- Constants
- Variables
- type ConfigurationService
- func (s *ConfigurationService) GetConfig(ctx context.Context, req *pb.RegisterConfigReq) (*pb.RegisterConfigReq, error)
- func (s *ConfigurationService) GetConfigList(ctx context.Context, req *pb.GetConfigListReq) (*pb.GetConfigListResp, error)
- func (s *ConfigurationService) GetConfigPath(ctx context.Context, req *pb.Req) (*pb.GetConfigPathResp, error)
- func (s *ConfigurationService) GetConnectionConfig(ctx context.Context, in *emptypb.Empty) (*pb.ServerConnectionConfig, error)
- func (s *ConfigurationService) GetNameSpaceList(ctx context.Context, req *pb.Req) (*pb.GetNameSpaceListResp, error)
- func (s *ConfigurationService) PostSaveConfig(ctx context.Context, req *pb.RegisterConfigReq) (*pb.Result, error)
- func (s *ConfigurationService) RegisterConfig(ctx context.Context, req *pb.RegisterConfigReq) (*pb.RegisterConfigReq, error)
- type File
- type FileSaver
- type FileService
- type ProductService
- func (p *ProductService) CheckProductDepend(ctx context.Context, in *pb.CheckProductDependReq) (*emptypb.Empty, error)
- func (p *ProductService) InstallProduct(ctx context.Context, in *pb.InstallProductReq) (*emptypb.Empty, error)
- func (p *ProductService) ListProduct(ctx context.Context, in *pb.ListProductRequest) (*pb.ListProductReply, error)
- func (p *ProductService) ProductDependsPut(ctx context.Context, in *pb.ProductDependPutReq) (*emptypb.Empty, error)
- func (p *ProductService) ServerServicesList(ctx context.Context, in *pb.ListServerServicesReq) (*pb.ListServerServicesRes, error)
- func (p *ProductService) ServiceInit(ctx context.Context, in *pb.InitReq) (*emptypb.Empty, error)
- func (p *ProductService) ServiceInstall(ctx context.Context, in *pb.ServicesIntallReq) (*emptypb.Empty, error)
- func (p *ProductService) ServiceUninstall(ctx context.Context, in *pb.ServiceUninstallReq) (*emptypb.Empty, error)
- func (p *ProductService) ServiceUpdate(ctx context.Context, in *pb.ServicesUpdateReq) (*emptypb.Empty, error)
- func (p *ProductService) VersionList(ctx context.Context, in *pb.VersionListReq) (*pb.VersionListRes, error)
- func (p *ProductService) VersionRevert(ctx context.Context, in *pb.VersionRevertReq) (*emptypb.Empty, error)
- type ServerService
- func (s *ServerService) CreatDir(ctx context.Context, in *pb.CreateDirReq) (*emptypb.Empty, error)
- func (s *ServerService) CreateServer(ctx context.Context, req *pb.CreateServerRequest) (*emptypb.Empty, error)
- func (s *ServerService) GetNginxData(ctx context.Context, in *pb.GetNginxDataReq) (*pb.GetNginxDataRes, error)
- func (s *ServerService) InstallServerComponent(ctx context.Context, req *pb.InstallServerComponentRequest) (*emptypb.Empty, error)
- func (s *ServerService) InstallServerComponentExist(ctx context.Context, in *pb.InstallExistedServerComponentRequest) (*emptypb.Empty, error)
- func (s *ServerService) ListBackup(ctx context.Context, in *pb.ListBackupInfoReq) (*pb.ListBackupInfoRes, error)
- func (s *ServerService) ListServer(ctx context.Context, req *pb.ListServerRequest) (*pb.ListServerReply, error)
- func (s *ServerService) ListServerComponent(ctx context.Context, req *pb.ListServerComponentRequest) (*pb.ListServerComponentReply, error)
- func (s *ServerService) ListServerDirs(ctx context.Context, in *pb.ListDirReq) (*pb.ListDirRes, error)
- func (s *ServerService) RestartServerComponent(ctx context.Context, req *pb.StopServerComponentRequest) (*emptypb.Empty, error)
- func (s *ServerService) StartServerComponent(ctx context.Context, req *pb.StartServerComponentRequest) (*emptypb.Empty, error)
- func (s *ServerService) StopServerComponent(ctx context.Context, req *pb.StopServerComponentRequest) (*emptypb.Empty, error)
- func (s *ServerService) UFWStatus(ctx context.Context, in *pb.UFWReq) (*pb.UFWRes, error)
- func (s *ServerService) UninstallSystemComponent(ctx context.Context, in *pb.SystemComponentUninstall) (*emptypb.Empty, error)
- func (s *ServerService) UpdateNginxData(ctx context.Context, in *pb.UpdateNginxDataReq) (*emptypb.Empty, error)
- func (s *ServerService) UpdateServer(ctx context.Context, req *pb.UpdateServerRequest) (*emptypb.Empty, error)
- func (s *ServerService) UploadServerFile(ctx context.Context, in *pb.UploadFileReq) (*emptypb.Empty, error)
- type SystemService
- type WebSSHService
Constants ¶
View Source
const ( FileUnitB = "B" FileUnitKB = "KB" FileUnitMB = "MB" FileUnitGB = "GB" )
Variables ¶
View Source
var ProviderSet = wire.NewSet( NewConfigurationService, NewSystemService, NewFileService, NewProductService, NewServerService, NewWebSSHService, )
ProviderSet is service providers.
Functions ¶
This section is empty.
Types ¶
type ConfigurationService ¶
type ConfigurationService struct { pb.UnimplementedConfigurationServer // contains filtered or unexported fields }
func NewConfigurationService ¶
func NewConfigurationService(config *biz.ConfigUseCase, serverUseCASE *biz.ServerUsecase, logger log.Logger) *ConfigurationService
func (*ConfigurationService) GetConfig ¶
func (s *ConfigurationService) GetConfig(ctx context.Context, req *pb.RegisterConfigReq) (*pb.RegisterConfigReq, error)
func (*ConfigurationService) GetConfigList ¶
func (s *ConfigurationService) GetConfigList(ctx context.Context, req *pb.GetConfigListReq) (*pb.GetConfigListResp, error)
func (*ConfigurationService) GetConfigPath ¶
func (s *ConfigurationService) GetConfigPath(ctx context.Context, req *pb.Req) (*pb.GetConfigPathResp, error)
func (*ConfigurationService) GetConnectionConfig ¶ added in v1.0.55
func (s *ConfigurationService) GetConnectionConfig(ctx context.Context, in *emptypb.Empty) (*pb.ServerConnectionConfig, error)
func (*ConfigurationService) GetNameSpaceList ¶
func (s *ConfigurationService) GetNameSpaceList(ctx context.Context, req *pb.Req) (*pb.GetNameSpaceListResp, error)
func (*ConfigurationService) PostSaveConfig ¶
func (s *ConfigurationService) PostSaveConfig(ctx context.Context, req *pb.RegisterConfigReq) (*pb.Result, error)
PostSaveConfig @Author
// 发布保存。 // 如果有新增或删除的配置,保存完后,目前:还需要应用方重启动重新注册。TODO:hot update。 // 程序自己去找本地配置定义与远端配置的变更。 // 先get应用,判断是否存在配置,如果存在,判断schema是否为空 //(是,则该应用是第一次注册,没有schema,则不清空其formData(配置内容)) //(否,则该应用非第一次注册,则会替换原来的formData配置内容)
@Date 14:40 2023-07-03
func (*ConfigurationService) RegisterConfig ¶
func (s *ConfigurationService) RegisterConfig(ctx context.Context, req *pb.RegisterConfigReq) (*pb.RegisterConfigReq, error)
type FileSaver ¶ added in v1.0.15
type FileSaver interface { SaveFile(file io.Reader, fileName string) (code string, err error) ReadFile(fileName string) error }
func NewOssFileSaver ¶ added in v1.0.55
func NewOssFileSaver(client *minio.Client) FileSaver
type FileService ¶ added in v1.0.15
type FileService struct {
// contains filtered or unexported fields
}
func NewFileService ¶ added in v1.0.15
func NewFileService(data db.DataRepo, logger log.Logger) *FileService
func (*FileService) UploadFile ¶ added in v1.0.15
func (s *FileService) UploadFile(ctx khttp.Context) error
func (*FileService) UploadLocalFile ¶ added in v1.0.55
func (s *FileService) UploadLocalFile(ctx khttp.Context) error
type ProductService ¶ added in v1.0.55
type ProductService struct { pb.UnimplementedServiceServer // contains filtered or unexported fields }
func NewProductService ¶ added in v1.0.55
func NewProductService(serviceUsecase *biz.ServerServiceUseCase, serverRepo biz.ServerRepo, serverUseCase *biz.ServerUsecase, logger *zap.Logger) *ProductService
func (*ProductService) CheckProductDepend ¶ added in v1.0.55
func (p *ProductService) CheckProductDepend(ctx context.Context, in *pb.CheckProductDependReq) (*emptypb.Empty, error)
func (*ProductService) InstallProduct ¶ added in v1.0.55
func (p *ProductService) InstallProduct(ctx context.Context, in *pb.InstallProductReq) (*emptypb.Empty, error)
func (*ProductService) ListProduct ¶ added in v1.0.55
func (p *ProductService) ListProduct(ctx context.Context, in *pb.ListProductRequest) (*pb.ListProductReply, error)
func (*ProductService) ProductDependsPut ¶ added in v1.0.55
func (p *ProductService) ProductDependsPut(ctx context.Context, in *pb.ProductDependPutReq) (*emptypb.Empty, error)
func (*ProductService) ServerServicesList ¶ added in v1.0.55
func (p *ProductService) ServerServicesList(ctx context.Context, in *pb.ListServerServicesReq) (*pb.ListServerServicesRes, error)
func (*ProductService) ServiceInit ¶ added in v1.0.55
func (*ProductService) ServiceInstall ¶ added in v1.0.55
func (p *ProductService) ServiceInstall(ctx context.Context, in *pb.ServicesIntallReq) (*emptypb.Empty, error)
func (*ProductService) ServiceUninstall ¶ added in v1.0.55
func (p *ProductService) ServiceUninstall(ctx context.Context, in *pb.ServiceUninstallReq) (*emptypb.Empty, error)
func (*ProductService) ServiceUpdate ¶ added in v1.0.55
func (p *ProductService) ServiceUpdate(ctx context.Context, in *pb.ServicesUpdateReq) (*emptypb.Empty, error)
func (*ProductService) VersionList ¶ added in v1.0.55
func (p *ProductService) VersionList(ctx context.Context, in *pb.VersionListReq) (*pb.VersionListRes, error)
func (*ProductService) VersionRevert ¶ added in v1.0.55
func (p *ProductService) VersionRevert(ctx context.Context, in *pb.VersionRevertReq) (*emptypb.Empty, error)
type ServerService ¶ added in v1.0.55
type ServerService struct { pb.UnimplementedServerServer // contains filtered or unexported fields }
func NewServerService ¶ added in v1.0.55
func NewServerService(serverUsecase *biz.ServerUsecase, backup *biz.BackupBiz) *ServerService
func (*ServerService) CreatDir ¶ added in v1.0.55
func (s *ServerService) CreatDir(ctx context.Context, in *pb.CreateDirReq) (*emptypb.Empty, error)
func (*ServerService) CreateServer ¶ added in v1.0.55
func (s *ServerService) CreateServer(ctx context.Context, req *pb.CreateServerRequest) (*emptypb.Empty, error)
func (*ServerService) GetNginxData ¶ added in v1.0.55
func (s *ServerService) GetNginxData(ctx context.Context, in *pb.GetNginxDataReq) (*pb.GetNginxDataRes, error)
func (*ServerService) InstallServerComponent ¶ added in v1.0.55
func (s *ServerService) InstallServerComponent(ctx context.Context, req *pb.InstallServerComponentRequest) (*emptypb.Empty, error)
func (*ServerService) InstallServerComponentExist ¶ added in v1.0.55
func (s *ServerService) InstallServerComponentExist(ctx context.Context, in *pb.InstallExistedServerComponentRequest) (*emptypb.Empty, error)
func (*ServerService) ListBackup ¶ added in v1.0.55
func (s *ServerService) ListBackup(ctx context.Context, in *pb.ListBackupInfoReq) (*pb.ListBackupInfoRes, error)
func (*ServerService) ListServer ¶ added in v1.0.55
func (s *ServerService) ListServer(ctx context.Context, req *pb.ListServerRequest) (*pb.ListServerReply, error)
func (*ServerService) ListServerComponent ¶ added in v1.0.55
func (s *ServerService) ListServerComponent(ctx context.Context, req *pb.ListServerComponentRequest) (*pb.ListServerComponentReply, error)
func (*ServerService) ListServerDirs ¶ added in v1.0.55
func (s *ServerService) ListServerDirs(ctx context.Context, in *pb.ListDirReq) (*pb.ListDirRes, error)
func (*ServerService) RestartServerComponent ¶ added in v1.0.55
func (s *ServerService) RestartServerComponent(ctx context.Context, req *pb.StopServerComponentRequest) (*emptypb.Empty, error)
func (*ServerService) StartServerComponent ¶ added in v1.0.55
func (s *ServerService) StartServerComponent(ctx context.Context, req *pb.StartServerComponentRequest) (*emptypb.Empty, error)
func (*ServerService) StopServerComponent ¶ added in v1.0.55
func (s *ServerService) StopServerComponent(ctx context.Context, req *pb.StopServerComponentRequest) (*emptypb.Empty, error)
func (*ServerService) UninstallSystemComponent ¶ added in v1.0.55
func (s *ServerService) UninstallSystemComponent(ctx context.Context, in *pb.SystemComponentUninstall) (*emptypb.Empty, error)
func (*ServerService) UpdateNginxData ¶ added in v1.0.55
func (s *ServerService) UpdateNginxData(ctx context.Context, in *pb.UpdateNginxDataReq) (*emptypb.Empty, error)
func (*ServerService) UpdateServer ¶ added in v1.0.55
func (s *ServerService) UpdateServer(ctx context.Context, req *pb.UpdateServerRequest) (*emptypb.Empty, error)
func (*ServerService) UploadServerFile ¶ added in v1.0.55
func (s *ServerService) UploadServerFile(ctx context.Context, in *pb.UploadFileReq) (*emptypb.Empty, error)
type SystemService ¶ added in v1.0.9
type SystemService struct { pb.UnimplementedSystemServer // contains filtered or unexported fields }
func NewSystemService ¶ added in v1.0.9
func NewSystemService(auth auth.AuthRepo) *SystemService
func (*SystemService) SystemLogin ¶ added in v1.0.9
func (s *SystemService) SystemLogin(ctx context.Context, req *pb.SystemLoginReq) (*pb.SystemLoginResp, error)
type WebSSHService ¶ added in v1.0.55
type WebSSHService struct {
// contains filtered or unexported fields
}
func NewWebSSHService ¶ added in v1.0.55
func NewWebSSHService(logger *zap.Logger, serverUseCase *biz.ServerUsecase) *WebSSHService
func (*WebSSHService) HandleWebsocket ¶ added in v1.0.55
func (s *WebSSHService) HandleWebsocket(ctx khttp.Context) error
Click to show internal directories.
Click to hide internal directories.