Tweak dal connection location for easier FE work
Default it to the empty geolocation JSON.
This commit is contained in:
@@ -7,8 +7,8 @@ import (
|
||||
|
||||
type (
|
||||
Geometry struct {
|
||||
Type string `json:"type"`
|
||||
Coordinates [2]float64 `json:"coordinates"`
|
||||
Type string `json:"type"`
|
||||
Coordinates []float64 `json:"coordinates"`
|
||||
}
|
||||
|
||||
Properties struct {
|
||||
@@ -21,7 +21,7 @@ type (
|
||||
}
|
||||
)
|
||||
|
||||
func Parse(ss []string) (m *Full, err error) {
|
||||
func Parse(ss []string) (m Full, err error) {
|
||||
if len(ss) == 0 {
|
||||
return
|
||||
}
|
||||
|
||||
Generated
+1
-1
@@ -353,7 +353,7 @@ type (
|
||||
Name string `db:"name"`
|
||||
Handle string `db:"handle"`
|
||||
Type string `db:"type"`
|
||||
Location *geolocation.Full `db:"location"`
|
||||
Location geolocation.Full `db:"location"`
|
||||
Ownership string `db:"ownership"`
|
||||
SensitivityLevel uint64 `db:"sensitivity_level"`
|
||||
Config systemType.ConnectionConfig `db:"config"`
|
||||
|
||||
@@ -13,7 +13,7 @@ dal_connection: schema.#Resource & {
|
||||
// omitting isPrimary and replacing with a special type
|
||||
type: { goType: "string" }
|
||||
|
||||
location: { goType: "*geolocation.Full" }
|
||||
location: { goType: "geolocation.Full" }
|
||||
ownership: {}
|
||||
sensitivity_level: { goType: "uint64" }
|
||||
|
||||
|
||||
+2
-2
@@ -868,7 +868,7 @@ endpoints:
|
||||
title: type
|
||||
|
||||
- name: location
|
||||
type: "*geolocation.Full"
|
||||
type: "geolocation.Full"
|
||||
required: true
|
||||
title: location
|
||||
parser: geolocation.Parse
|
||||
@@ -916,7 +916,7 @@ endpoints:
|
||||
title: type
|
||||
|
||||
- name: location
|
||||
type: "*geolocation.Full"
|
||||
type: "geolocation.Full"
|
||||
required: true
|
||||
title: location
|
||||
parser: geolocation.Parse
|
||||
|
||||
@@ -161,7 +161,6 @@ func (ctrl DalConnection) federatedNodeToConnection(f *federationTypes.Node) *ty
|
||||
Name: f.Name,
|
||||
Handle: h,
|
||||
Type: federationTypes.NodeResourceType,
|
||||
Location: nil,
|
||||
Ownership: f.Contact,
|
||||
|
||||
Config: types.ConnectionConfig{
|
||||
|
||||
@@ -76,7 +76,7 @@ type (
|
||||
// Location POST parameter
|
||||
//
|
||||
// location
|
||||
Location *geolocation.Full
|
||||
Location geolocation.Full
|
||||
|
||||
// Ownership POST parameter
|
||||
//
|
||||
@@ -123,7 +123,7 @@ type (
|
||||
// Location POST parameter
|
||||
//
|
||||
// location
|
||||
Location *geolocation.Full
|
||||
Location geolocation.Full
|
||||
|
||||
// Ownership POST parameter
|
||||
//
|
||||
@@ -279,7 +279,7 @@ func (r DalConnectionCreate) GetType() string {
|
||||
}
|
||||
|
||||
// Auditable returns all auditable/loggable parameters
|
||||
func (r DalConnectionCreate) GetLocation() *geolocation.Full {
|
||||
func (r DalConnectionCreate) GetLocation() geolocation.Full {
|
||||
return r.Location
|
||||
}
|
||||
|
||||
@@ -520,7 +520,7 @@ func (r DalConnectionUpdate) GetType() string {
|
||||
}
|
||||
|
||||
// Auditable returns all auditable/loggable parameters
|
||||
func (r DalConnectionUpdate) GetLocation() *geolocation.Full {
|
||||
func (r DalConnectionUpdate) GetLocation() geolocation.Full {
|
||||
return r.Location
|
||||
}
|
||||
|
||||
|
||||
@@ -20,9 +20,9 @@ type (
|
||||
|
||||
Type string `json:"type"`
|
||||
|
||||
Location *geolocation.Full `json:"location,omitempty"`
|
||||
Ownership string `json:"ownership"`
|
||||
SensitivityLevel uint64 `json:"sensitivityLevel,string"`
|
||||
Location geolocation.Full `json:"location"`
|
||||
Ownership string `json:"ownership"`
|
||||
SensitivityLevel uint64 `json:"sensitivityLevel,string"`
|
||||
|
||||
Config ConnectionConfig `json:"config"`
|
||||
Capabilities ConnectionCapabilities `json:"capabilities"`
|
||||
|
||||
Reference in New Issue
Block a user