update(readme)
This commit is contained in:
1 parent
a54239f971
commit
4a779eef9f
5 files changed
+46
-37
No files matched your search
@@ -1,6 +1,8 @@
|
||||
package cfg
|
||||
|
||||
import (
|
||||
"github.com/integration-system/isp-lib/config/schema"
|
||||
"github.com/integration-system/isp-lib/structure"
|
||||
"time"
|
||||
)
|
||||
|
||||
@@ -20,3 +22,23 @@ type Config struct {
|
||||
UpdatedAt time.Time
|
||||
Data map[string]interface{}
|
||||
}
|
||||
|
||||
type Connection struct {
|
||||
LibVersion string
|
||||
Version string
|
||||
Address structure.AddressConfiguration
|
||||
Endpoints []structure.EndpointConfig `json:",omitempty"`
|
||||
EstablishedAt time.Time
|
||||
}
|
||||
|
||||
type ModuleInfo struct {
|
||||
Id int32
|
||||
Name string
|
||||
Active bool
|
||||
CreatedAt time.Time
|
||||
LastConnectedAt time.Time
|
||||
LastDisconnectedAt time.Time
|
||||
Configs []Config `json:",omitempty"`
|
||||
ConfigSchema *schema.Schema `json:",omitempty"`
|
||||
Status []Connection `json:",omitempty"`
|
||||
}
|
||||
+2
-3
@@ -2,7 +2,6 @@ package cfg
|
||||
|
||||
import (
|
||||
"github.com/integration-system/isp-lib/http"
|
||||
"isp-config-service/domain"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -31,8 +30,8 @@ func (c *configClient) ReceiveConfig(gateHost, instanceUuid string) {
|
||||
c.gateHost = scheme + gateHost
|
||||
}
|
||||
|
||||
func (c *configClient) GetAvailableConfigs() ([]domain.ModuleInfo, error) {
|
||||
response := make([]domain.ModuleInfo, 0)
|
||||
func (c *configClient) GetAvailableConfigs() ([]ModuleInfo, error) {
|
||||
response := make([]ModuleInfo, 0)
|
||||
if err := c.client.Invoke("POST", c.gateHost+getAvailableConfigs, c.headers, nil, &response); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user