环境依赖检测

dev
truthhun 1 year ago
parent 6136a5a4f7
commit ef507be4ec

@ -701,6 +701,142 @@ func (m *Settings) GetSecurity() *ConfigSecurity {
return nil
}
type EnvDependent struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
IsInstalled bool `protobuf:"varint,3,opt,name=is_installed,json=isInstalled,proto3" json:"is_installed,omitempty"`
Error string `protobuf:"bytes,4,opt,name=error,proto3" json:"error,omitempty"`
CheckedAt *time.Time `protobuf:"bytes,5,opt,name=checked_at,json=checkedAt,proto3,stdtime" json:"checked_at,omitempty"`
Cmd string `protobuf:"bytes,6,opt,name=cmd,proto3" json:"cmd,omitempty"`
IsRequired bool `protobuf:"varint,7,opt,name=is_required,json=isRequired,proto3" json:"is_required,omitempty"`
}
func (m *EnvDependent) Reset() { *m = EnvDependent{} }
func (m *EnvDependent) String() string { return proto.CompactTextString(m) }
func (*EnvDependent) ProtoMessage() {}
func (*EnvDependent) Descriptor() ([]byte, []int) {
return fileDescriptor_321614cd6c9c1b8a, []int{8}
}
func (m *EnvDependent) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *EnvDependent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_EnvDependent.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *EnvDependent) XXX_Merge(src proto.Message) {
xxx_messageInfo_EnvDependent.Merge(m, src)
}
func (m *EnvDependent) XXX_Size() int {
return m.Size()
}
func (m *EnvDependent) XXX_DiscardUnknown() {
xxx_messageInfo_EnvDependent.DiscardUnknown(m)
}
var xxx_messageInfo_EnvDependent proto.InternalMessageInfo
func (m *EnvDependent) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *EnvDependent) GetDescription() string {
if m != nil {
return m.Description
}
return ""
}
func (m *EnvDependent) GetIsInstalled() bool {
if m != nil {
return m.IsInstalled
}
return false
}
func (m *EnvDependent) GetError() string {
if m != nil {
return m.Error
}
return ""
}
func (m *EnvDependent) GetCheckedAt() *time.Time {
if m != nil {
return m.CheckedAt
}
return nil
}
func (m *EnvDependent) GetCmd() string {
if m != nil {
return m.Cmd
}
return ""
}
func (m *EnvDependent) GetIsRequired() bool {
if m != nil {
return m.IsRequired
}
return false
}
type Envs struct {
Envs []*EnvDependent `protobuf:"bytes,1,rep,name=envs,proto3" json:"envs,omitempty"`
}
func (m *Envs) Reset() { *m = Envs{} }
func (m *Envs) String() string { return proto.CompactTextString(m) }
func (*Envs) ProtoMessage() {}
func (*Envs) Descriptor() ([]byte, []int) {
return fileDescriptor_321614cd6c9c1b8a, []int{9}
}
func (m *Envs) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Envs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Envs.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *Envs) XXX_Merge(src proto.Message) {
xxx_messageInfo_Envs.Merge(m, src)
}
func (m *Envs) XXX_Size() int {
return m.Size()
}
func (m *Envs) XXX_DiscardUnknown() {
xxx_messageInfo_Envs.DiscardUnknown(m)
}
var xxx_messageInfo_Envs proto.InternalMessageInfo
func (m *Envs) GetEnvs() []*EnvDependent {
if m != nil {
return m.Envs
}
return nil
}
type Stats struct {
UserCount int64 `protobuf:"varint,1,opt,name=user_count,json=userCount,proto3" json:"user_count,omitempty"`
DocumentCount int64 `protobuf:"varint,2,opt,name=document_count,json=documentCount,proto3" json:"document_count,omitempty"`
@ -720,7 +856,7 @@ func (m *Stats) Reset() { *m = Stats{} }
func (m *Stats) String() string { return proto.CompactTextString(m) }
func (*Stats) ProtoMessage() {}
func (*Stats) Descriptor() ([]byte, []int) {
return fileDescriptor_321614cd6c9c1b8a, []int{8}
return fileDescriptor_321614cd6c9c1b8a, []int{10}
}
func (m *Stats) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@ -842,95 +978,106 @@ func init() {
proto.RegisterType((*ConfigFooter)(nil), "api.v1.ConfigFooter")
proto.RegisterType((*ConfigSecurity)(nil), "api.v1.ConfigSecurity")
proto.RegisterType((*Settings)(nil), "api.v1.Settings")
proto.RegisterType((*EnvDependent)(nil), "api.v1.EnvDependent")
proto.RegisterType((*Envs)(nil), "api.v1.Envs")
proto.RegisterType((*Stats)(nil), "api.v1.Stats")
}
func init() { proto.RegisterFile("api/v1/config.proto", fileDescriptor_321614cd6c9c1b8a) }
var fileDescriptor_321614cd6c9c1b8a = []byte{
// 1300 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x56, 0x4f, 0x6f, 0x1b, 0x45,
0x14, 0xef, 0xda, 0xb1, 0x63, 0x8f, 0x13, 0x3b, 0x99, 0xfc, 0xa9, 0xe3, 0x96, 0x34, 0x2c, 0x02,
0xd2, 0x0a, 0xd9, 0xc4, 0xfc, 0x39, 0xc0, 0xa1, 0x4a, 0x03, 0x05, 0xa4, 0x1e, 0xca, 0xa4, 0x15,
0x7f, 0x2e, 0xab, 0xf1, 0xee, 0x78, 0x3d, 0xea, 0xee, 0xce, 0x32, 0x33, 0x9b, 0xd6, 0x3d, 0x72,
0xe2, 0x58, 0x09, 0x89, 0x03, 0x5f, 0x01, 0xf1, 0x15, 0x38, 0x73, 0xac, 0xc4, 0x85, 0x1b, 0xa8,
0x85, 0xef, 0x81, 0xe6, 0xcd, 0xec, 0x26, 0x76, 0x15, 0x89, 0xdb, 0xbc, 0xdf, 0xfb, 0xbd, 0x37,
0xf3, 0xde, 0xfb, 0xed, 0xcc, 0xa2, 0x2d, 0x9a, 0xf3, 0xd1, 0xd9, 0xd1, 0x28, 0x14, 0xd9, 0x94,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xa5, 0xf9, 0xa5, 0xe9, 0x2e, 0x2b, 0xfe, 0x2a, 0xe4, 0xdd, 0x1c,
0xf4, 0xaa, 0xbc, 0x36, 0xd1, 0x9d, 0x0f, 0x7e, 0x7f, 0xb1, 0xef, 0x3d, 0x7f, 0xb1, 0xef, 0xfd,
0xfd, 0x62, 0xdf, 0x7b, 0xf6, 0x72, 0xff, 0xca, 0xf3, 0x97, 0xfb, 0x57, 0xfe, 0x7c, 0xb9, 0x7f,
0x05, 0xb9, 0x5f, 0xd5, 0xfb, 0xde, 0xb7, 0x9b, 0xa9, 0x90, 0x2c, 0x12, 0xa1, 0x8b, 0xfd, 0xf8,
0xec, 0x68, 0xd2, 0x84, 0xfc, 0xef, 0xfd, 0x17, 0x00, 0x00, 0xff, 0xff, 0x9f, 0x7c, 0x6e, 0x03,
0xe5, 0x0a, 0x00, 0x00,
// 1448 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x57, 0xcd, 0x6e, 0x1b, 0xb7,
0x16, 0xce, 0x48, 0x96, 0x2c, 0x51, 0xb2, 0x6c, 0xd3, 0x3f, 0x91, 0x95, 0x5c, 0xc7, 0x99, 0x8b,
0x7b, 0xaf, 0x13, 0x5c, 0x58, 0xb1, 0xfb, 0xb3, 0x68, 0x17, 0x81, 0xe3, 0x38, 0x69, 0x80, 0x2c,
0xd2, 0x71, 0x82, 0xfe, 0x6c, 0x06, 0xd4, 0x0c, 0x2d, 0x11, 0x9e, 0x21, 0x27, 0x24, 0x47, 0x89,
0xb2, 0xec, 0xaa, 0xcb, 0x00, 0x05, 0xba, 0xe8, 0x2b, 0xf4, 0x1d, 0xba, 0xee, 0x32, 0x40, 0x37,
0xdd, 0xb5, 0x48, 0xda, 0x07, 0x28, 0xd0, 0x07, 0x28, 0x78, 0xc8, 0x19, 0x4b, 0x32, 0x0c, 0x64,
0x37, 0xe7, 0x3b, 0xdf, 0x39, 0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 0xf7, 0xfb, 0xdb, 0x6d, 0xef, 0xf5, 0xbb, 0xed, 0x2b, 0x6f, 0xde, 0x6d, 0x5f,
0xf9, 0xf5, 0xdd, 0xf6, 0x15, 0xe4, 0xfe, 0x0b, 0x9e, 0x78, 0x5f, 0xaf, 0xa6, 0x42, 0xd2, 0x58,
0x44, 0x2e, 0xf6, 0xd3, 0xf1, 0xfe, 0xa0, 0x0e, 0xf9, 0x3f, 0xf8, 0x27, 0x00, 0x00, 0xff, 0xff,
0x4e, 0x87, 0x05, 0x7e, 0x52, 0x0c, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@ -953,6 +1100,8 @@ type ConfigAPIClient interface {
ListConfig(ctx context.Context, in *ListConfigRequest, opts ...grpc.CallOption) (*Configs, error)
// 获取系统配置
GetStats(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*Stats, error)
// 获取系统环境依赖检测
GetEnvs(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*Envs, error)
// 更新站点地图
UpdateSitemap(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
}
@ -1001,6 +1150,15 @@ func (c *configAPIClient) GetStats(ctx context.Context, in *emptypb.Empty, opts
return out, nil
}
func (c *configAPIClient) GetEnvs(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*Envs, error) {
out := new(Envs)
err := c.cc.Invoke(ctx, "/api.v1.ConfigAPI/GetEnvs", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *configAPIClient) UpdateSitemap(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/api.v1.ConfigAPI/UpdateSitemap", in, out, opts...)
@ -1020,6 +1178,8 @@ type ConfigAPIServer interface {
ListConfig(context.Context, *ListConfigRequest) (*Configs, error)
// 获取系统配置
GetStats(context.Context, *emptypb.Empty) (*Stats, error)
// 获取系统环境依赖检测
GetEnvs(context.Context, *emptypb.Empty) (*Envs, error)
// 更新站点地图
UpdateSitemap(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
}
@ -1040,6 +1200,9 @@ func (*UnimplementedConfigAPIServer) ListConfig(ctx context.Context, req *ListCo
func (*UnimplementedConfigAPIServer) GetStats(ctx context.Context, req *emptypb.Empty) (*Stats, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetStats not implemented")
}
func (*UnimplementedConfigAPIServer) GetEnvs(ctx context.Context, req *emptypb.Empty) (*Envs, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetEnvs not implemented")
}
func (*UnimplementedConfigAPIServer) UpdateSitemap(ctx context.Context, req *emptypb.Empty) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateSitemap not implemented")
}
@ -1120,6 +1283,24 @@ func _ConfigAPI_GetStats_Handler(srv interface{}, ctx context.Context, dec func(
return interceptor(ctx, in, info, handler)
}
func _ConfigAPI_GetEnvs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(emptypb.Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ConfigAPIServer).GetEnvs(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.v1.ConfigAPI/GetEnvs",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ConfigAPIServer).GetEnvs(ctx, req.(*emptypb.Empty))
}
return interceptor(ctx, in, info, handler)
}
func _ConfigAPI_UpdateSitemap_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(emptypb.Empty)
if err := dec(in); err != nil {
@ -1158,6 +1339,10 @@ var _ConfigAPI_serviceDesc = grpc.ServiceDesc{
MethodName: "GetStats",
Handler: _ConfigAPI_GetStats_Handler,
},
{
MethodName: "GetEnvs",
Handler: _ConfigAPI_GetEnvs_Handler,
},
{
MethodName: "UpdateSitemap",
Handler: _ConfigAPI_UpdateSitemap_Handler,
@ -1721,6 +1906,124 @@ func (m *Settings) MarshalToSizedBuffer(dAtA []byte) (int, error) {
return len(dAtA) - i, nil
}
func (m *EnvDependent) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *EnvDependent) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *EnvDependent) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.IsRequired {
i--
if m.IsRequired {
dAtA[i] = 1
} else {
dAtA[i] = 0
}
i--
dAtA[i] = 0x38
}
if len(m.Cmd) > 0 {
i -= len(m.Cmd)
copy(dAtA[i:], m.Cmd)
i = encodeVarintConfig(dAtA, i, uint64(len(m.Cmd)))
i--
dAtA[i] = 0x32
}
if m.CheckedAt != nil {
n6, err6 := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.CheckedAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(*m.CheckedAt):])
if err6 != nil {
return 0, err6
}
i -= n6
i = encodeVarintConfig(dAtA, i, uint64(n6))
i--
dAtA[i] = 0x2a
}
if len(m.Error) > 0 {
i -= len(m.Error)
copy(dAtA[i:], m.Error)
i = encodeVarintConfig(dAtA, i, uint64(len(m.Error)))
i--
dAtA[i] = 0x22
}
if m.IsInstalled {
i--
if m.IsInstalled {
dAtA[i] = 1
} else {
dAtA[i] = 0
}
i--
dAtA[i] = 0x18
}
if len(m.Description) > 0 {
i -= len(m.Description)
copy(dAtA[i:], m.Description)
i = encodeVarintConfig(dAtA, i, uint64(len(m.Description)))
i--
dAtA[i] = 0x12
}
if len(m.Name) > 0 {
i -= len(m.Name)
copy(dAtA[i:], m.Name)
i = encodeVarintConfig(dAtA, i, uint64(len(m.Name)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *Envs) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *Envs) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Envs) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Envs) > 0 {
for iNdEx := len(m.Envs) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.Envs[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintConfig(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0xa
}
}
return len(dAtA) - i, nil
}
func (m *Stats) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
@ -2076,6 +2379,56 @@ func (m *Settings) Size() (n int) {
return n
}
func (m *EnvDependent) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Name)
if l > 0 {
n += 1 + l + sovConfig(uint64(l))
}
l = len(m.Description)
if l > 0 {
n += 1 + l + sovConfig(uint64(l))
}
if m.IsInstalled {
n += 2
}
l = len(m.Error)
if l > 0 {
n += 1 + l + sovConfig(uint64(l))
}
if m.CheckedAt != nil {
l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.CheckedAt)
n += 1 + l + sovConfig(uint64(l))
}
l = len(m.Cmd)
if l > 0 {
n += 1 + l + sovConfig(uint64(l))
}
if m.IsRequired {
n += 2
}
return n
}
func (m *Envs) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if len(m.Envs) > 0 {
for _, e := range m.Envs {
l = e.Size()
n += 1 + l + sovConfig(uint64(l))
}
}
return n
}
func (m *Stats) Size() (n int) {
if m == nil {
return 0
@ -3895,6 +4248,344 @@ func (m *Settings) Unmarshal(dAtA []byte) error {
}
return nil
}
func (m *EnvDependent) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowConfig
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: EnvDependent: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: EnvDependent: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowConfig
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthConfig
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthConfig
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Name = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowConfig
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthConfig
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthConfig
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Description = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field IsInstalled", wireType)
}
var v int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowConfig
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
m.IsInstalled = bool(v != 0)
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowConfig
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthConfig
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthConfig
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Error = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 5:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field CheckedAt", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowConfig
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthConfig
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthConfig
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.CheckedAt == nil {
m.CheckedAt = new(time.Time)
}
if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(m.CheckedAt, dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 6:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Cmd", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowConfig
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthConfig
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthConfig
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Cmd = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 7:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field IsRequired", wireType)
}
var v int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowConfig
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
m.IsRequired = bool(v != 0)
default:
iNdEx = preIndex
skippy, err := skipConfig(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthConfig
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Envs) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowConfig
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: Envs: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Envs: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Envs", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowConfig
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthConfig
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthConfig
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Envs = append(m.Envs, &EnvDependent{})
if err := m.Envs[len(m.Envs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipConfig(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthConfig
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Stats) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0

@ -140,6 +140,24 @@ func local_request_ConfigAPI_GetStats_0(ctx context.Context, marshaler runtime.M
}
func request_ConfigAPI_GetEnvs_0(ctx context.Context, marshaler runtime.Marshaler, client ConfigAPIClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq emptypb.Empty
var metadata runtime.ServerMetadata
msg, err := client.GetEnvs(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_ConfigAPI_GetEnvs_0(ctx context.Context, marshaler runtime.Marshaler, server ConfigAPIServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq emptypb.Empty
var metadata runtime.ServerMetadata
msg, err := server.GetEnvs(ctx, &protoReq)
return msg, metadata, err
}
func request_ConfigAPI_UpdateSitemap_0(ctx context.Context, marshaler runtime.Marshaler, client ConfigAPIClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq emptypb.Empty
var metadata runtime.ServerMetadata
@ -256,6 +274,29 @@ func RegisterConfigAPIHandlerServer(ctx context.Context, mux *runtime.ServeMux,
})
mux.Handle("GET", pattern_ConfigAPI_GetEnvs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_ConfigAPI_GetEnvs_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_ConfigAPI_GetEnvs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("PUT", pattern_ConfigAPI_UpdateSitemap_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
@ -400,6 +441,26 @@ func RegisterConfigAPIHandlerClient(ctx context.Context, mux *runtime.ServeMux,
})
mux.Handle("GET", pattern_ConfigAPI_GetEnvs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_ConfigAPI_GetEnvs_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_ConfigAPI_GetEnvs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("PUT", pattern_ConfigAPI_UpdateSitemap_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
@ -432,6 +493,8 @@ var (
pattern_ConfigAPI_GetStats_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "stats"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_ConfigAPI_GetEnvs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "envs"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_ConfigAPI_UpdateSitemap_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "sitemap"}, "", runtime.AssumeColonVerbOpt(true)))
)
@ -444,5 +507,7 @@ var (
forward_ConfigAPI_GetStats_0 = runtime.ForwardResponseMessage
forward_ConfigAPI_GetEnvs_0 = runtime.ForwardResponseMessage
forward_ConfigAPI_UpdateSitemap_0 = runtime.ForwardResponseMessage
)

@ -84,6 +84,19 @@ message Settings {
// ConfigCaptcha captcha = 4;
}
message EnvDependent {
string name = 1; //
string description = 2; //
bool is_installed = 3; //
string error = 4; //
google.protobuf.Timestamp checked_at = 5
[ (gogoproto.stdtime) = true ]; //
string cmd = 6; //
bool is_required = 7; //
}
message Envs { repeated EnvDependent envs = 1; }
message Stats {
int64 user_count = 1;
int64 document_count = 2;
@ -129,6 +142,13 @@ service ConfigAPI {
};
}
//
rpc GetEnvs(google.protobuf.Empty) returns (Envs) {
option (google.api.http) = {
get : "/api/v1/envs"
};
}
//
rpc UpdateSitemap(google.protobuf.Empty) returns (google.protobuf.Empty) {
option (google.api.http) = {

@ -5,6 +5,7 @@ import (
"fmt"
"runtime"
"strings"
"time"
pb "moredoc/api/v1"
"moredoc/middleware/auth"
@ -173,7 +174,6 @@ func (s *ConfigAPIService) GetStats(ctx context.Context, req *emptypb.Empty) (re
res.FriendlinkCount, _ = s.dbModel.CountFriendlink()
res.ReportCount, _ = s.dbModel.CountReport()
}
return
}
@ -192,3 +192,60 @@ func (s *ConfigAPIService) UpdateSitemap(ctx context.Context, req *emptypb.Empty
return &emptypb.Empty{}, nil
}
func (s *ConfigAPIService) GetEnvs(ctx context.Context, req *emptypb.Empty) (res *pb.Envs, err error) {
res = &pb.Envs{}
_, errPermission := s.checkPermission(ctx)
if errPermission != nil {
return
}
envs := []*pb.EnvDependent{
{
Name: "LibreOffice",
Description: "LibreOffice是由文档基金会开发的自由及开放源代码的办公套件。魔豆文库用于将office等文档转为pdf。",
Cmd: "soffice",
IsRequired: true,
},
{
Name: "Calibre",
Description: "calibre是一个自由开源的电子书软件套装。魔豆文库用于将epub、mobi等电子书转为pdf。",
Cmd: "ebook-convert",
IsRequired: true,
},
{
// mupdf
Name: "MuPDF",
Description: "MuPDF是一款以C语言编写的自由及开放源代码软件库是PDF和XPS解析和渲染引擎。魔豆文库用于将PDF转为svg、png等图片。",
Cmd: "mutool",
IsRequired: true,
},
{
Name: "SVGO",
Description: "SVGO 是一个基于 Node.js 的工具,用于优化 SVG 矢量图形文件。魔豆文库用于压缩svg图片大小。",
Cmd: "svgo",
IsRequired: false,
},
{
Name: "PM2",
Description: "PM2是JavaScript运行时Node.js的进程管理器。用于做魔豆文库的系统守护进程。Windows下建议使用PM2。",
Cmd: "pm2",
IsRequired: false,
}, {
Name: "Supervisor",
Description: "Supervisor是一个客户端/服务器系统用于监视进程状态当进程不再运行时自动重启它们。用于做魔豆文库的系统守护进程。Linux下建议使用Supervisor。",
Cmd: "supervisorctl",
IsRequired: false,
},
}
for i := 0; i < len(envs); i++ {
now := time.Now()
err := util.CheckCommandExists(envs[i].Cmd)
envs[i].IsInstalled = err == nil
envs[i].CheckedAt = &now
if err != nil {
envs[i].Error = err.Error()
}
}
res.Envs = envs
return
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -65,6 +65,7 @@ func getPermissions() (permissions []Permission) {
{Title: "查看系统信息", Description: "", Method: "GRPC", Path: "/api.v1.ConfigAPI/GetStats"},
{Title: "更新文档全文索引", Description: "", Method: "GRPC", Path: "/api.v1.DocumentAPI/UpdateDocumentIndexes"},
{Title: "更新站点地图sitemap", Description: "", Method: "GRPC", Path: "/api.v1.ConfigAPI/UpdateSitemap"},
{Title: "获取环境依赖检测", Description: "", Method: "GRPC", Path: "/api.v1.ConfigAPI/GetEnvs"},
}
return
}

@ -7,6 +7,7 @@ import (
"image"
"io"
"os"
"os/exec"
"path/filepath"
"regexp"
"strings"
@ -173,3 +174,9 @@ func IsValidEmail(email string) (yes bool) {
reg := regexp.MustCompile(pattern)
return reg.MatchString(email)
}
// CheckCommandExists 验证命令是否存在
func CheckCommandExists(command string) error {
_, err := exec.LookPath(command)
return err
}

@ -37,3 +37,10 @@ export const getStats = () => {
method: 'get',
})
}
export const getEnvs = () => {
return service({
url: '/api/v1/envs',
method: 'get',
})
}

@ -2,7 +2,7 @@
<div class="page-admin-dashboard">
<el-card shadow="never">
<div slot="header">数据统计</div>
<el-descriptions class="margin-top" :column="2" border>
<el-descriptions class="margin-top" :column="3" border>
<el-descriptions-item>
<template slot="label">
<i class="el-icon-tickets"></i>
@ -54,6 +54,61 @@
</el-descriptions-item>
</el-descriptions>
</el-card>
<el-card shadow="never" class="mgt-20px">
<div slot="header">
<span>环境依赖</span>
<a
href="https://www.bookstack.cn/read/moredoc/install.md"
target="_blank"
>
<el-button
style="float: right; padding: 3px 0"
icon="el-icon-refresh"
type="text"
>
依赖安装教程</el-button
>
</a>
</div>
<el-table
:data="envs"
style="width: 100%"
empty-text="您暂无权限查看环境依赖情况"
>
<el-table-column prop="name" label="名称" width="100"> </el-table-column
><el-table-column prop="is_required" label="是否必需" width="100">
<template slot-scope="scope">
<el-tag v-if="scope.row.is_required" effect="danger" size="small"
>必需安装</el-tag
>
<el-tag effect="info" size="small" v-else></el-tag>
</template>
</el-table-column>
<el-table-column prop="is_installed" label="安装" width="100">
<template slot-scope="scope">
<el-tag v-if="scope.row.is_installed" effect="success" size="small"
>已安装</el-tag
>
<el-tag effect="warning" size="small" v-else></el-tag>
</template>
</el-table-column>
<el-table-column prop="description" min-width="200" label="用途">
</el-table-column>
<el-table-column prop="error" label="错误" min-width="100">
<template slot-scope="scope">
<span v-if="scope.row.error" effect="danger" size="small">{{
scope.row.error
}}</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column prop="checked_at" width="180" label="检测">
<template slot-scope="scope">
{{ formatDatetime(scope.row.checked_at) }}
</template>
</el-table-column>
</el-table>
</el-card>
<el-card shadow="never" class="mgt-20px">
<div slot="header">
<span>系统信息</span>
@ -160,7 +215,7 @@
</template>
<script>
import { getStats, updateSitemap } from '~/api/config'
import { getStats, getEnvs, updateSitemap } from '~/api/config'
import { formatDatetime } from '~/utils/utils'
export default {
@ -189,6 +244,7 @@ export default {
hash: '-',
build_at: '',
},
envs: [],
loading: false,
}
},
@ -198,7 +254,7 @@ export default {
},
},
created() {
this.getStats()
Promise.all([this.getStats(), this.getEnvs()])
},
methods: {
formatDatetime,
@ -211,6 +267,12 @@ export default {
}
}
},
async getEnvs() {
const res = await getEnvs()
if (res.status === 200) {
this.envs = res.data.envs
}
},
async updateSitemap() {
this.loading = true
const res = await updateSitemap()

Loading…
Cancel
Save