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) 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 SystemService
Constants ¶
View Source
const ( FileUnitB = "B" FileUnitKB = "KB" FileUnitMB = "MB" FileUnitGB = "GB" )
Variables ¶
View Source
var ProviderSet = wire.NewSet( NewConfigurationService, NewSystemService, NewFileService, )
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, 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) 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 NewFileSaver ¶ added in v1.0.15
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 *data.Data, logger log.Logger) *FileService
func (*FileService) UploadFile ¶ added in v1.0.15
func (s *FileService) UploadFile(ctx khttp.Context) 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)
Click to show internal directories.
Click to hide internal directories.