diff --git a/api/cmd/cocsn-server/main.go b/api/cmd/cocsn-server/main.go deleted file mode 100644 index cd01f5991a8bba0e6ed4b4156d8a76dc16c9fc9c..0000000000000000000000000000000000000000 --- a/api/cmd/cocsn-server/main.go +++ /dev/null @@ -1,56 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package main - -import ( - "log" - "os" - - "code.fbi.h-da.de/cocsn/cocsn-api/api/restapi" - "code.fbi.h-da.de/cocsn/cocsn-api/api/restapi/operations" - "github.com/go-openapi/loads" - flags "github.com/jessevdk/go-flags" -) - -// This file was generated by the swagger tool. -// Make sure not to overwrite this file after you generated it because all your edits would be lost! - -func main() { - - swaggerSpec, err := loads.Embedded(restapi.SwaggerJSON, restapi.FlatSwaggerJSON) - if err != nil { - log.Fatalln(err) - } - - api := operations.NewCocsnAPI(swaggerSpec) - server := restapi.NewServer(api) - defer server.Shutdown() - - parser := flags.NewParser(server, flags.Default) - parser.ShortDescription = "cocsn" - parser.LongDescription = "This YANG module represents the CoCSN API" - server.ConfigureFlags() - for _, optsGroup := range api.CommandLineOptionsGroups { - _, err := parser.AddGroup(optsGroup.ShortDescription, optsGroup.LongDescription, optsGroup.Options) - if err != nil { - log.Fatalln(err) - } - } - - if _, err := parser.Parse(); err != nil { - code := 1 - if fe, ok := err.(*flags.Error); ok { - if fe.Type == flags.ErrHelp { - code = 0 - } - } - os.Exit(code) - } - - server.ConfigureAPI() - - if err := server.Serve(); err != nil { - log.Fatalln(err) - } - -} diff --git a/api/models/data.go b/api/models/data.go deleted file mode 100644 index 485d22058e2f94697da775bb7f527dc3d81c8be8..0000000000000000000000000000000000000000 --- a/api/models/data.go +++ /dev/null @@ -1,43 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// Data data -// -// swagger:model data -type Data struct { - - // This resource represents the combined configuration and state data resources that can be accessed by a client and cannot be created or deleted by the client. See RESTCONF RFC 8040 for further information. - IetfRestconfData interface{} `json:"ietf-restconf:data,omitempty"` -} - -// Validate validates this data -func (m *Data) Validate(formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *Data) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Data) UnmarshalBinary(b []byte) error { - var res Data - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/api/models/data_cocsn_interfaces.go b/api/models/data_cocsn_interfaces.go deleted file mode 100644 index c0e7e5928efa9ceeb4640be17422c639c6cdcc4f..0000000000000000000000000000000000000000 --- a/api/models/data_cocsn_interfaces.go +++ /dev/null @@ -1,244 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// DataCocsnInterfaces data cocsn interfaces -// -// swagger:model data_cocsn_interfaces -type DataCocsnInterfaces struct { - - // cocsn interfaces - CocsnInterfaces *DataCocsnInterfacesCocsnInterfaces `json:"cocsn:interfaces,omitempty"` -} - -// Validate validates this data cocsn interfaces -func (m *DataCocsnInterfaces) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCocsnInterfaces(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataCocsnInterfaces) validateCocsnInterfaces(formats strfmt.Registry) error { - - if swag.IsZero(m.CocsnInterfaces) { // not required - return nil - } - - if m.CocsnInterfaces != nil { - if err := m.CocsnInterfaces.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cocsn:interfaces") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DataCocsnInterfaces) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataCocsnInterfaces) UnmarshalBinary(b []byte) error { - var res DataCocsnInterfaces - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// DataCocsnInterfacesCocsnInterfaces (non-presence) -// -// swagger:model DataCocsnInterfacesCocsnInterfaces -type DataCocsnInterfacesCocsnInterfaces struct { - - // (list) - Interface []*DataCocsnInterfacesCocsnInterfacesInterfaceItems0 `json:"interface"` -} - -// Validate validates this data cocsn interfaces cocsn interfaces -func (m *DataCocsnInterfacesCocsnInterfaces) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateInterface(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataCocsnInterfacesCocsnInterfaces) validateInterface(formats strfmt.Registry) error { - - if swag.IsZero(m.Interface) { // not required - return nil - } - - for i := 0; i < len(m.Interface); i++ { - if swag.IsZero(m.Interface[i]) { // not required - continue - } - - if m.Interface[i] != nil { - if err := m.Interface[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cocsn:interfaces" + "." + "interface" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DataCocsnInterfacesCocsnInterfaces) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataCocsnInterfacesCocsnInterfaces) UnmarshalBinary(b []byte) error { - var res DataCocsnInterfacesCocsnInterfaces - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// DataCocsnInterfacesCocsnInterfacesInterfaceItems0 data cocsn interfaces cocsn interfaces interface items0 -// -// swagger:model DataCocsnInterfacesCocsnInterfacesInterfaceItems0 -type DataCocsnInterfacesCocsnInterfacesInterfaceItems0 struct { - - // addresses - Addresses []string `json:"addresses"` - - // Enable or disable the interface. Example value: true (leaf) - Enabled bool `json:"enabled,omitempty"` - - // Interface name. Example value: en0 (leaf) - Name string `json:"name,omitempty"` - - // Describes whether the interface is physically up or down (leaf) - // Enum: [up down] - OperStatus *string `json:"oper-status,omitempty"` - - // The interface's address at its protocol sub-layer. For - // example, for an 802.x interface, this object normally - // contains a Media Access Control (MAC) address. The - // interface's media-specific modules must define the bit - // and byte ordering and the format of the value of this - // object. For interfaces that do not have such an address - // (e.g., a serial line), this node is not present. (leaf) - PhysAddress string `json:"phys-address,omitempty"` -} - -// Validate validates this data cocsn interfaces cocsn interfaces interface items0 -func (m *DataCocsnInterfacesCocsnInterfacesInterfaceItems0) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateOperStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var dataCocsnInterfacesCocsnInterfacesInterfaceItems0TypeOperStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["up","down"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - dataCocsnInterfacesCocsnInterfacesInterfaceItems0TypeOperStatusPropEnum = append(dataCocsnInterfacesCocsnInterfacesInterfaceItems0TypeOperStatusPropEnum, v) - } -} - -const ( - - // DataCocsnInterfacesCocsnInterfacesInterfaceItems0OperStatusUp captures enum value "up" - DataCocsnInterfacesCocsnInterfacesInterfaceItems0OperStatusUp string = "up" - - // DataCocsnInterfacesCocsnInterfacesInterfaceItems0OperStatusDown captures enum value "down" - DataCocsnInterfacesCocsnInterfacesInterfaceItems0OperStatusDown string = "down" -) - -// prop value enum -func (m *DataCocsnInterfacesCocsnInterfacesInterfaceItems0) validateOperStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, dataCocsnInterfacesCocsnInterfacesInterfaceItems0TypeOperStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *DataCocsnInterfacesCocsnInterfacesInterfaceItems0) validateOperStatus(formats strfmt.Registry) error { - - if swag.IsZero(m.OperStatus) { // not required - return nil - } - - // value enum - if err := m.validateOperStatusEnum("oper-status", "body", *m.OperStatus); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DataCocsnInterfacesCocsnInterfacesInterfaceItems0) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataCocsnInterfacesCocsnInterfacesInterfaceItems0) UnmarshalBinary(b []byte) error { - var res DataCocsnInterfacesCocsnInterfacesInterfaceItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/api/models/data_cocsn_interfaces_interface_interface_name.go b/api/models/data_cocsn_interfaces_interface_interface_name.go deleted file mode 100644 index 8e89f2d300410f3cd0882c4d0328c8e08972a08b..0000000000000000000000000000000000000000 --- a/api/models/data_cocsn_interfaces_interface_interface_name.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// DataCocsnInterfacesInterfaceInterfaceName data cocsn interfaces interface interface name -// -// swagger:model data_cocsn_interfaces_interface_interface-name -type DataCocsnInterfacesInterfaceInterfaceName struct { - - // (list) - CocsnInterface []*DataCocsnInterfacesInterfaceInterfaceNameCocsnInterfaceItems0 `json:"cocsn:interface"` -} - -// Validate validates this data cocsn interfaces interface interface name -func (m *DataCocsnInterfacesInterfaceInterfaceName) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCocsnInterface(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataCocsnInterfacesInterfaceInterfaceName) validateCocsnInterface(formats strfmt.Registry) error { - - if swag.IsZero(m.CocsnInterface) { // not required - return nil - } - - for i := 0; i < len(m.CocsnInterface); i++ { - if swag.IsZero(m.CocsnInterface[i]) { // not required - continue - } - - if m.CocsnInterface[i] != nil { - if err := m.CocsnInterface[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cocsn:interface" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DataCocsnInterfacesInterfaceInterfaceName) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataCocsnInterfacesInterfaceInterfaceName) UnmarshalBinary(b []byte) error { - var res DataCocsnInterfacesInterfaceInterfaceName - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// DataCocsnInterfacesInterfaceInterfaceNameCocsnInterfaceItems0 data cocsn interfaces interface interface name cocsn interface items0 -// -// swagger:model DataCocsnInterfacesInterfaceInterfaceNameCocsnInterfaceItems0 -type DataCocsnInterfacesInterfaceInterfaceNameCocsnInterfaceItems0 struct { - - // addresses - Addresses []string `json:"addresses"` - - // Enable or disable the interface. Example value: true (leaf) - Enabled bool `json:"enabled,omitempty"` - - // Interface name. Example value: en0 (leaf) - Name string `json:"name,omitempty"` - - // Describes whether the interface is physically up or down (leaf) - // Enum: [up down] - OperStatus *string `json:"oper-status,omitempty"` - - // The interface's address at its protocol sub-layer. For - // example, for an 802.x interface, this object normally - // contains a Media Access Control (MAC) address. The - // interface's media-specific modules must define the bit - // and byte ordering and the format of the value of this - // object. For interfaces that do not have such an address - // (e.g., a serial line), this node is not present. (leaf) - PhysAddress string `json:"phys-address,omitempty"` -} - -// Validate validates this data cocsn interfaces interface interface name cocsn interface items0 -func (m *DataCocsnInterfacesInterfaceInterfaceNameCocsnInterfaceItems0) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateOperStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var dataCocsnInterfacesInterfaceInterfaceNameCocsnInterfaceItems0TypeOperStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["up","down"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - dataCocsnInterfacesInterfaceInterfaceNameCocsnInterfaceItems0TypeOperStatusPropEnum = append(dataCocsnInterfacesInterfaceInterfaceNameCocsnInterfaceItems0TypeOperStatusPropEnum, v) - } -} - -const ( - - // DataCocsnInterfacesInterfaceInterfaceNameCocsnInterfaceItems0OperStatusUp captures enum value "up" - DataCocsnInterfacesInterfaceInterfaceNameCocsnInterfaceItems0OperStatusUp string = "up" - - // DataCocsnInterfacesInterfaceInterfaceNameCocsnInterfaceItems0OperStatusDown captures enum value "down" - DataCocsnInterfacesInterfaceInterfaceNameCocsnInterfaceItems0OperStatusDown string = "down" -) - -// prop value enum -func (m *DataCocsnInterfacesInterfaceInterfaceNameCocsnInterfaceItems0) validateOperStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, dataCocsnInterfacesInterfaceInterfaceNameCocsnInterfaceItems0TypeOperStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *DataCocsnInterfacesInterfaceInterfaceNameCocsnInterfaceItems0) validateOperStatus(formats strfmt.Registry) error { - - if swag.IsZero(m.OperStatus) { // not required - return nil - } - - // value enum - if err := m.validateOperStatusEnum("oper-status", "body", *m.OperStatus); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DataCocsnInterfacesInterfaceInterfaceNameCocsnInterfaceItems0) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataCocsnInterfacesInterfaceInterfaceNameCocsnInterfaceItems0) UnmarshalBinary(b []byte) error { - var res DataCocsnInterfacesInterfaceInterfaceNameCocsnInterfaceItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/api/models/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id.go b/api/models/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id.go deleted file mode 100644 index ffd498564ff499af5dcc83c2ccf89f9b0d7313f4..0000000000000000000000000000000000000000 --- a/api/models/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id.go +++ /dev/null @@ -1,43 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesID data cocsn interfaces interface interface name addresses addresses id -// -// swagger:model data_cocsn_interfaces_interface_interface-name_addresses_addresses-id -type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesID struct { - - // cocsn addresses - CocsnAddresses []string `json:"cocsn:addresses"` -} - -// Validate validates this data cocsn interfaces interface interface name addresses addresses id -func (m *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesID) Validate(formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesID) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesID) UnmarshalBinary(b []byte) error { - var res DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesID - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/api/models/data_cocsn_interfaces_interface_interface_name_enabled.go b/api/models/data_cocsn_interfaces_interface_interface_name_enabled.go deleted file mode 100644 index b77ad50e8273331b57347909ef7b85a847805c6e..0000000000000000000000000000000000000000 --- a/api/models/data_cocsn_interfaces_interface_interface_name_enabled.go +++ /dev/null @@ -1,43 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// DataCocsnInterfacesInterfaceInterfaceNameEnabled data cocsn interfaces interface interface name enabled -// -// swagger:model data_cocsn_interfaces_interface_interface-name_enabled -type DataCocsnInterfacesInterfaceInterfaceNameEnabled struct { - - // Enable or disable the interface. Example value: true (leaf) - CocsnEnabled bool `json:"cocsn:enabled,omitempty"` -} - -// Validate validates this data cocsn interfaces interface interface name enabled -func (m *DataCocsnInterfacesInterfaceInterfaceNameEnabled) Validate(formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DataCocsnInterfacesInterfaceInterfaceNameEnabled) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataCocsnInterfacesInterfaceInterfaceNameEnabled) UnmarshalBinary(b []byte) error { - var res DataCocsnInterfacesInterfaceInterfaceNameEnabled - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/api/models/data_cocsn_interfaces_interface_interface_name_name.go b/api/models/data_cocsn_interfaces_interface_interface_name_name.go deleted file mode 100644 index aad7664ba0cb696ab3fc995dc2b82eb0affeff9f..0000000000000000000000000000000000000000 --- a/api/models/data_cocsn_interfaces_interface_interface_name_name.go +++ /dev/null @@ -1,43 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// DataCocsnInterfacesInterfaceInterfaceNameName data cocsn interfaces interface interface name name -// -// swagger:model data_cocsn_interfaces_interface_interface-name_name -type DataCocsnInterfacesInterfaceInterfaceNameName struct { - - // Interface name. Example value: en0 (leaf) - CocsnName string `json:"cocsn:name,omitempty"` -} - -// Validate validates this data cocsn interfaces interface interface name name -func (m *DataCocsnInterfacesInterfaceInterfaceNameName) Validate(formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DataCocsnInterfacesInterfaceInterfaceNameName) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataCocsnInterfacesInterfaceInterfaceNameName) UnmarshalBinary(b []byte) error { - var res DataCocsnInterfacesInterfaceInterfaceNameName - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/api/models/data_cocsn_interfaces_interface_interface_name_oper_status.go b/api/models/data_cocsn_interfaces_interface_interface_name_oper_status.go deleted file mode 100644 index 89b1dc7a3ff6ef249db7395e841c91d9d65c49e8..0000000000000000000000000000000000000000 --- a/api/models/data_cocsn_interfaces_interface_interface_name_oper_status.go +++ /dev/null @@ -1,100 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// DataCocsnInterfacesInterfaceInterfaceNameOperStatus data cocsn interfaces interface interface name oper status -// -// swagger:model data_cocsn_interfaces_interface_interface-name_oper-status -type DataCocsnInterfacesInterfaceInterfaceNameOperStatus struct { - - // Describes whether the interface is physically up or down (leaf) - // Enum: [up down] - CocsnOperStatus *string `json:"cocsn:oper-status,omitempty"` -} - -// Validate validates this data cocsn interfaces interface interface name oper status -func (m *DataCocsnInterfacesInterfaceInterfaceNameOperStatus) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCocsnOperStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var dataCocsnInterfacesInterfaceInterfaceNameOperStatusTypeCocsnOperStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["up","down"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - dataCocsnInterfacesInterfaceInterfaceNameOperStatusTypeCocsnOperStatusPropEnum = append(dataCocsnInterfacesInterfaceInterfaceNameOperStatusTypeCocsnOperStatusPropEnum, v) - } -} - -const ( - - // DataCocsnInterfacesInterfaceInterfaceNameOperStatusCocsnOperStatusUp captures enum value "up" - DataCocsnInterfacesInterfaceInterfaceNameOperStatusCocsnOperStatusUp string = "up" - - // DataCocsnInterfacesInterfaceInterfaceNameOperStatusCocsnOperStatusDown captures enum value "down" - DataCocsnInterfacesInterfaceInterfaceNameOperStatusCocsnOperStatusDown string = "down" -) - -// prop value enum -func (m *DataCocsnInterfacesInterfaceInterfaceNameOperStatus) validateCocsnOperStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, dataCocsnInterfacesInterfaceInterfaceNameOperStatusTypeCocsnOperStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *DataCocsnInterfacesInterfaceInterfaceNameOperStatus) validateCocsnOperStatus(formats strfmt.Registry) error { - - if swag.IsZero(m.CocsnOperStatus) { // not required - return nil - } - - // value enum - if err := m.validateCocsnOperStatusEnum("cocsn:oper-status", "body", *m.CocsnOperStatus); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DataCocsnInterfacesInterfaceInterfaceNameOperStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataCocsnInterfacesInterfaceInterfaceNameOperStatus) UnmarshalBinary(b []byte) error { - var res DataCocsnInterfacesInterfaceInterfaceNameOperStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/api/models/data_cocsn_interfaces_interface_interface_name_phys_address.go b/api/models/data_cocsn_interfaces_interface_interface_name_phys_address.go deleted file mode 100644 index d7c3257a23e3795ae0884254345d5299dc832d41..0000000000000000000000000000000000000000 --- a/api/models/data_cocsn_interfaces_interface_interface_name_phys_address.go +++ /dev/null @@ -1,49 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// DataCocsnInterfacesInterfaceInterfaceNamePhysAddress data cocsn interfaces interface interface name phys address -// -// swagger:model data_cocsn_interfaces_interface_interface-name_phys-address -type DataCocsnInterfacesInterfaceInterfaceNamePhysAddress struct { - - // The interface's address at its protocol sub-layer. For - // example, for an 802.x interface, this object normally - // contains a Media Access Control (MAC) address. The - // interface's media-specific modules must define the bit - // and byte ordering and the format of the value of this - // object. For interfaces that do not have such an address - // (e.g., a serial line), this node is not present. (leaf) - CocsnPhysAddress string `json:"cocsn:phys-address,omitempty"` -} - -// Validate validates this data cocsn interfaces interface interface name phys address -func (m *DataCocsnInterfacesInterfaceInterfaceNamePhysAddress) Validate(formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DataCocsnInterfacesInterfaceInterfaceNamePhysAddress) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataCocsnInterfacesInterfaceInterfaceNamePhysAddress) UnmarshalBinary(b []byte) error { - var res DataCocsnInterfacesInterfaceInterfaceNamePhysAddress - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/api/models/data_cocsn_interfaces_post.go b/api/models/data_cocsn_interfaces_post.go deleted file mode 100644 index 60413b2b4d888a8365958c81c0819503f2a5b4c3..0000000000000000000000000000000000000000 --- a/api/models/data_cocsn_interfaces_post.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// DataCocsnInterfacesPost data cocsn interfaces post -// -// swagger:model data_cocsn_interfaces-post -type DataCocsnInterfacesPost struct { - - // (list) - CocsnInterface []*DataCocsnInterfacesPostCocsnInterfaceItems0 `json:"cocsn:interface"` -} - -// Validate validates this data cocsn interfaces post -func (m *DataCocsnInterfacesPost) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCocsnInterface(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataCocsnInterfacesPost) validateCocsnInterface(formats strfmt.Registry) error { - - if swag.IsZero(m.CocsnInterface) { // not required - return nil - } - - for i := 0; i < len(m.CocsnInterface); i++ { - if swag.IsZero(m.CocsnInterface[i]) { // not required - continue - } - - if m.CocsnInterface[i] != nil { - if err := m.CocsnInterface[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cocsn:interface" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DataCocsnInterfacesPost) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataCocsnInterfacesPost) UnmarshalBinary(b []byte) error { - var res DataCocsnInterfacesPost - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// DataCocsnInterfacesPostCocsnInterfaceItems0 data cocsn interfaces post cocsn interface items0 -// -// swagger:model DataCocsnInterfacesPostCocsnInterfaceItems0 -type DataCocsnInterfacesPostCocsnInterfaceItems0 struct { - - // addresses - Addresses []string `json:"addresses"` - - // Enable or disable the interface. Example value: true (leaf) - Enabled bool `json:"enabled,omitempty"` - - // Interface name. Example value: en0 (leaf) - Name string `json:"name,omitempty"` - - // Describes whether the interface is physically up or down (leaf) - // Enum: [up down] - OperStatus *string `json:"oper-status,omitempty"` - - // The interface's address at its protocol sub-layer. For - // example, for an 802.x interface, this object normally - // contains a Media Access Control (MAC) address. The - // interface's media-specific modules must define the bit - // and byte ordering and the format of the value of this - // object. For interfaces that do not have such an address - // (e.g., a serial line), this node is not present. (leaf) - PhysAddress string `json:"phys-address,omitempty"` -} - -// Validate validates this data cocsn interfaces post cocsn interface items0 -func (m *DataCocsnInterfacesPostCocsnInterfaceItems0) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateOperStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var dataCocsnInterfacesPostCocsnInterfaceItems0TypeOperStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["up","down"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - dataCocsnInterfacesPostCocsnInterfaceItems0TypeOperStatusPropEnum = append(dataCocsnInterfacesPostCocsnInterfaceItems0TypeOperStatusPropEnum, v) - } -} - -const ( - - // DataCocsnInterfacesPostCocsnInterfaceItems0OperStatusUp captures enum value "up" - DataCocsnInterfacesPostCocsnInterfaceItems0OperStatusUp string = "up" - - // DataCocsnInterfacesPostCocsnInterfaceItems0OperStatusDown captures enum value "down" - DataCocsnInterfacesPostCocsnInterfaceItems0OperStatusDown string = "down" -) - -// prop value enum -func (m *DataCocsnInterfacesPostCocsnInterfaceItems0) validateOperStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, dataCocsnInterfacesPostCocsnInterfaceItems0TypeOperStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *DataCocsnInterfacesPostCocsnInterfaceItems0) validateOperStatus(formats strfmt.Registry) error { - - if swag.IsZero(m.OperStatus) { // not required - return nil - } - - // value enum - if err := m.validateOperStatusEnum("oper-status", "body", *m.OperStatus); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DataCocsnInterfacesPostCocsnInterfaceItems0) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataCocsnInterfacesPostCocsnInterfaceItems0) UnmarshalBinary(b []byte) error { - var res DataCocsnInterfacesPostCocsnInterfaceItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/api/models/data_cocsn_routes.go b/api/models/data_cocsn_routes.go deleted file mode 100644 index 4d494baf140f3d4e61c5c01cfd28472d7c1f9976..0000000000000000000000000000000000000000 --- a/api/models/data_cocsn_routes.go +++ /dev/null @@ -1,183 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// DataCocsnRoutes data cocsn routes -// -// swagger:model data_cocsn_routes -type DataCocsnRoutes struct { - - // cocsn routes - CocsnRoutes *DataCocsnRoutesCocsnRoutes `json:"cocsn:routes,omitempty"` -} - -// Validate validates this data cocsn routes -func (m *DataCocsnRoutes) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCocsnRoutes(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataCocsnRoutes) validateCocsnRoutes(formats strfmt.Registry) error { - - if swag.IsZero(m.CocsnRoutes) { // not required - return nil - } - - if m.CocsnRoutes != nil { - if err := m.CocsnRoutes.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cocsn:routes") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DataCocsnRoutes) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataCocsnRoutes) UnmarshalBinary(b []byte) error { - var res DataCocsnRoutes - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// DataCocsnRoutesCocsnRoutes (non-presence) -// -// swagger:model DataCocsnRoutesCocsnRoutes -type DataCocsnRoutesCocsnRoutes struct { - - // (list) - Route []*DataCocsnRoutesCocsnRoutesRouteItems0 `json:"route"` -} - -// Validate validates this data cocsn routes cocsn routes -func (m *DataCocsnRoutesCocsnRoutes) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRoute(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataCocsnRoutesCocsnRoutes) validateRoute(formats strfmt.Registry) error { - - if swag.IsZero(m.Route) { // not required - return nil - } - - for i := 0; i < len(m.Route); i++ { - if swag.IsZero(m.Route[i]) { // not required - continue - } - - if m.Route[i] != nil { - if err := m.Route[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cocsn:routes" + "." + "route" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DataCocsnRoutesCocsnRoutes) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataCocsnRoutesCocsnRoutes) UnmarshalBinary(b []byte) error { - var res DataCocsnRoutesCocsnRoutes - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// DataCocsnRoutesCocsnRoutesRouteItems0 data cocsn routes cocsn routes route items0 -// -// swagger:model DataCocsnRoutesCocsnRoutesRouteItems0 -type DataCocsnRoutesCocsnRoutesRouteItems0 struct { - - // Route destination. IP network (leaf) - Destination string `json:"destination,omitempty"` - - // Expiration timer of the route (leaf) - Expire string `json:"expire,omitempty"` - - // Flags of the route (leaf) - Flags string `json:"flags,omitempty"` - - // Route gateway. IP address or host name (leaf) - Gateway string `json:"gateway,omitempty"` - - // Interface used for the route (leaf) - Interface string `json:"interface,omitempty"` -} - -// Validate validates this data cocsn routes cocsn routes route items0 -func (m *DataCocsnRoutesCocsnRoutesRouteItems0) Validate(formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DataCocsnRoutesCocsnRoutesRouteItems0) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataCocsnRoutesCocsnRoutesRouteItems0) UnmarshalBinary(b []byte) error { - var res DataCocsnRoutesCocsnRoutesRouteItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/api/models/data_cocsn_routes_post.go b/api/models/data_cocsn_routes_post.go deleted file mode 100644 index 370e523bac76c8b1878a1958f7ed7615aee8bff0..0000000000000000000000000000000000000000 --- a/api/models/data_cocsn_routes_post.go +++ /dev/null @@ -1,124 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// DataCocsnRoutesPost data cocsn routes post -// -// swagger:model data_cocsn_routes-post -type DataCocsnRoutesPost struct { - - // (list) - CocsnRoute []*DataCocsnRoutesPostCocsnRouteItems0 `json:"cocsn:route"` -} - -// Validate validates this data cocsn routes post -func (m *DataCocsnRoutesPost) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCocsnRoute(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataCocsnRoutesPost) validateCocsnRoute(formats strfmt.Registry) error { - - if swag.IsZero(m.CocsnRoute) { // not required - return nil - } - - for i := 0; i < len(m.CocsnRoute); i++ { - if swag.IsZero(m.CocsnRoute[i]) { // not required - continue - } - - if m.CocsnRoute[i] != nil { - if err := m.CocsnRoute[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cocsn:route" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DataCocsnRoutesPost) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataCocsnRoutesPost) UnmarshalBinary(b []byte) error { - var res DataCocsnRoutesPost - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// DataCocsnRoutesPostCocsnRouteItems0 data cocsn routes post cocsn route items0 -// -// swagger:model DataCocsnRoutesPostCocsnRouteItems0 -type DataCocsnRoutesPostCocsnRouteItems0 struct { - - // Route destination. IP network (leaf) - Destination string `json:"destination,omitempty"` - - // Expiration timer of the route (leaf) - Expire string `json:"expire,omitempty"` - - // Flags of the route (leaf) - Flags string `json:"flags,omitempty"` - - // Route gateway. IP address or host name (leaf) - Gateway string `json:"gateway,omitempty"` - - // Interface used for the route (leaf) - Interface string `json:"interface,omitempty"` -} - -// Validate validates this data cocsn routes post cocsn route items0 -func (m *DataCocsnRoutesPostCocsnRouteItems0) Validate(formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DataCocsnRoutesPostCocsnRouteItems0) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataCocsnRoutesPostCocsnRouteItems0) UnmarshalBinary(b []byte) error { - var res DataCocsnRoutesPostCocsnRouteItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/api/models/data_cocsn_routes_route_route_destination.go b/api/models/data_cocsn_routes_route_route_destination.go deleted file mode 100644 index 8559ca7f4f812324445f85e7cbfc9e781844b54c..0000000000000000000000000000000000000000 --- a/api/models/data_cocsn_routes_route_route_destination.go +++ /dev/null @@ -1,124 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// DataCocsnRoutesRouteRouteDestination data cocsn routes route route destination -// -// swagger:model data_cocsn_routes_route_route-destination -type DataCocsnRoutesRouteRouteDestination struct { - - // (list) - CocsnRoute []*DataCocsnRoutesRouteRouteDestinationCocsnRouteItems0 `json:"cocsn:route"` -} - -// Validate validates this data cocsn routes route route destination -func (m *DataCocsnRoutesRouteRouteDestination) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCocsnRoute(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataCocsnRoutesRouteRouteDestination) validateCocsnRoute(formats strfmt.Registry) error { - - if swag.IsZero(m.CocsnRoute) { // not required - return nil - } - - for i := 0; i < len(m.CocsnRoute); i++ { - if swag.IsZero(m.CocsnRoute[i]) { // not required - continue - } - - if m.CocsnRoute[i] != nil { - if err := m.CocsnRoute[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cocsn:route" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DataCocsnRoutesRouteRouteDestination) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataCocsnRoutesRouteRouteDestination) UnmarshalBinary(b []byte) error { - var res DataCocsnRoutesRouteRouteDestination - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// DataCocsnRoutesRouteRouteDestinationCocsnRouteItems0 data cocsn routes route route destination cocsn route items0 -// -// swagger:model DataCocsnRoutesRouteRouteDestinationCocsnRouteItems0 -type DataCocsnRoutesRouteRouteDestinationCocsnRouteItems0 struct { - - // Route destination. IP network (leaf) - Destination string `json:"destination,omitempty"` - - // Expiration timer of the route (leaf) - Expire string `json:"expire,omitempty"` - - // Flags of the route (leaf) - Flags string `json:"flags,omitempty"` - - // Route gateway. IP address or host name (leaf) - Gateway string `json:"gateway,omitempty"` - - // Interface used for the route (leaf) - Interface string `json:"interface,omitempty"` -} - -// Validate validates this data cocsn routes route route destination cocsn route items0 -func (m *DataCocsnRoutesRouteRouteDestinationCocsnRouteItems0) Validate(formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DataCocsnRoutesRouteRouteDestinationCocsnRouteItems0) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataCocsnRoutesRouteRouteDestinationCocsnRouteItems0) UnmarshalBinary(b []byte) error { - var res DataCocsnRoutesRouteRouteDestinationCocsnRouteItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/api/models/data_cocsn_routes_route_route_destination_destination.go b/api/models/data_cocsn_routes_route_route_destination_destination.go deleted file mode 100644 index 413bcd192b5b5bc2d0181fcdab88524e0229fa79..0000000000000000000000000000000000000000 --- a/api/models/data_cocsn_routes_route_route_destination_destination.go +++ /dev/null @@ -1,43 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// DataCocsnRoutesRouteRouteDestinationDestination data cocsn routes route route destination destination -// -// swagger:model data_cocsn_routes_route_route-destination_destination -type DataCocsnRoutesRouteRouteDestinationDestination struct { - - // Route destination. IP network (leaf) - CocsnDestination string `json:"cocsn:destination,omitempty"` -} - -// Validate validates this data cocsn routes route route destination destination -func (m *DataCocsnRoutesRouteRouteDestinationDestination) Validate(formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DataCocsnRoutesRouteRouteDestinationDestination) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataCocsnRoutesRouteRouteDestinationDestination) UnmarshalBinary(b []byte) error { - var res DataCocsnRoutesRouteRouteDestinationDestination - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/api/models/data_cocsn_routes_route_route_destination_expire.go b/api/models/data_cocsn_routes_route_route_destination_expire.go deleted file mode 100644 index e3f6f5c6e152e0c944ca31b1b328826860efb189..0000000000000000000000000000000000000000 --- a/api/models/data_cocsn_routes_route_route_destination_expire.go +++ /dev/null @@ -1,43 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// DataCocsnRoutesRouteRouteDestinationExpire data cocsn routes route route destination expire -// -// swagger:model data_cocsn_routes_route_route-destination_expire -type DataCocsnRoutesRouteRouteDestinationExpire struct { - - // Expiration timer of the route (leaf) - CocsnExpire string `json:"cocsn:expire,omitempty"` -} - -// Validate validates this data cocsn routes route route destination expire -func (m *DataCocsnRoutesRouteRouteDestinationExpire) Validate(formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DataCocsnRoutesRouteRouteDestinationExpire) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataCocsnRoutesRouteRouteDestinationExpire) UnmarshalBinary(b []byte) error { - var res DataCocsnRoutesRouteRouteDestinationExpire - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/api/models/data_cocsn_routes_route_route_destination_flags.go b/api/models/data_cocsn_routes_route_route_destination_flags.go deleted file mode 100644 index f209b3cc753765707d286d95fe14166d8f573020..0000000000000000000000000000000000000000 --- a/api/models/data_cocsn_routes_route_route_destination_flags.go +++ /dev/null @@ -1,43 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// DataCocsnRoutesRouteRouteDestinationFlags data cocsn routes route route destination flags -// -// swagger:model data_cocsn_routes_route_route-destination_flags -type DataCocsnRoutesRouteRouteDestinationFlags struct { - - // Flags of the route (leaf) - CocsnFlags string `json:"cocsn:flags,omitempty"` -} - -// Validate validates this data cocsn routes route route destination flags -func (m *DataCocsnRoutesRouteRouteDestinationFlags) Validate(formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DataCocsnRoutesRouteRouteDestinationFlags) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataCocsnRoutesRouteRouteDestinationFlags) UnmarshalBinary(b []byte) error { - var res DataCocsnRoutesRouteRouteDestinationFlags - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/api/models/data_cocsn_routes_route_route_destination_gateway.go b/api/models/data_cocsn_routes_route_route_destination_gateway.go deleted file mode 100644 index df1bc2d83a36d97b8936801378bb5b71860f26b1..0000000000000000000000000000000000000000 --- a/api/models/data_cocsn_routes_route_route_destination_gateway.go +++ /dev/null @@ -1,43 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// DataCocsnRoutesRouteRouteDestinationGateway data cocsn routes route route destination gateway -// -// swagger:model data_cocsn_routes_route_route-destination_gateway -type DataCocsnRoutesRouteRouteDestinationGateway struct { - - // Route gateway. IP address or host name (leaf) - CocsnGateway string `json:"cocsn:gateway,omitempty"` -} - -// Validate validates this data cocsn routes route route destination gateway -func (m *DataCocsnRoutesRouteRouteDestinationGateway) Validate(formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DataCocsnRoutesRouteRouteDestinationGateway) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataCocsnRoutesRouteRouteDestinationGateway) UnmarshalBinary(b []byte) error { - var res DataCocsnRoutesRouteRouteDestinationGateway - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/api/models/data_cocsn_routes_route_route_destination_interface.go b/api/models/data_cocsn_routes_route_route_destination_interface.go deleted file mode 100644 index ea7be89498a6868163cd44fd82a29632e5ca233d..0000000000000000000000000000000000000000 --- a/api/models/data_cocsn_routes_route_route_destination_interface.go +++ /dev/null @@ -1,43 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// DataCocsnRoutesRouteRouteDestinationInterface data cocsn routes route route destination interface -// -// swagger:model data_cocsn_routes_route_route-destination_interface -type DataCocsnRoutesRouteRouteDestinationInterface struct { - - // Interface used for the route (leaf) - CocsnInterface string `json:"cocsn:interface,omitempty"` -} - -// Validate validates this data cocsn routes route route destination interface -func (m *DataCocsnRoutesRouteRouteDestinationInterface) Validate(formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DataCocsnRoutesRouteRouteDestinationInterface) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataCocsnRoutesRouteRouteDestinationInterface) UnmarshalBinary(b []byte) error { - var res DataCocsnRoutesRouteRouteDestinationInterface - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/api/models/data_post.go b/api/models/data_post.go deleted file mode 100644 index a1eea82e2ae6a6fd29f2cdb94115cb98011f0d99..0000000000000000000000000000000000000000 --- a/api/models/data_post.go +++ /dev/null @@ -1,379 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// DataPost data post -// -// swagger:model data-post -type DataPost struct { - - // cocsn interfaces - CocsnInterfaces *DataPostCocsnInterfaces `json:"cocsn:interfaces,omitempty"` - - // cocsn routes - CocsnRoutes *DataPostCocsnRoutes `json:"cocsn:routes,omitempty"` -} - -// Validate validates this data post -func (m *DataPost) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCocsnInterfaces(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCocsnRoutes(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataPost) validateCocsnInterfaces(formats strfmt.Registry) error { - - if swag.IsZero(m.CocsnInterfaces) { // not required - return nil - } - - if m.CocsnInterfaces != nil { - if err := m.CocsnInterfaces.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cocsn:interfaces") - } - return err - } - } - - return nil -} - -func (m *DataPost) validateCocsnRoutes(formats strfmt.Registry) error { - - if swag.IsZero(m.CocsnRoutes) { // not required - return nil - } - - if m.CocsnRoutes != nil { - if err := m.CocsnRoutes.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cocsn:routes") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DataPost) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataPost) UnmarshalBinary(b []byte) error { - var res DataPost - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// DataPostCocsnInterfaces (non-presence) -// -// swagger:model DataPostCocsnInterfaces -type DataPostCocsnInterfaces struct { - - // (list) - Interface []*DataPostCocsnInterfacesInterfaceItems0 `json:"interface"` -} - -// Validate validates this data post cocsn interfaces -func (m *DataPostCocsnInterfaces) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateInterface(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataPostCocsnInterfaces) validateInterface(formats strfmt.Registry) error { - - if swag.IsZero(m.Interface) { // not required - return nil - } - - for i := 0; i < len(m.Interface); i++ { - if swag.IsZero(m.Interface[i]) { // not required - continue - } - - if m.Interface[i] != nil { - if err := m.Interface[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cocsn:interfaces" + "." + "interface" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DataPostCocsnInterfaces) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataPostCocsnInterfaces) UnmarshalBinary(b []byte) error { - var res DataPostCocsnInterfaces - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// DataPostCocsnInterfacesInterfaceItems0 data post cocsn interfaces interface items0 -// -// swagger:model DataPostCocsnInterfacesInterfaceItems0 -type DataPostCocsnInterfacesInterfaceItems0 struct { - - // addresses - Addresses []string `json:"addresses"` - - // Enable or disable the interface. Example value: true (leaf) - Enabled bool `json:"enabled,omitempty"` - - // Interface name. Example value: en0 (leaf) - Name string `json:"name,omitempty"` - - // Describes whether the interface is physically up or down (leaf) - // Enum: [up down] - OperStatus *string `json:"oper-status,omitempty"` - - // The interface's address at its protocol sub-layer. For - // example, for an 802.x interface, this object normally - // contains a Media Access Control (MAC) address. The - // interface's media-specific modules must define the bit - // and byte ordering and the format of the value of this - // object. For interfaces that do not have such an address - // (e.g., a serial line), this node is not present. (leaf) - PhysAddress string `json:"phys-address,omitempty"` -} - -// Validate validates this data post cocsn interfaces interface items0 -func (m *DataPostCocsnInterfacesInterfaceItems0) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateOperStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var dataPostCocsnInterfacesInterfaceItems0TypeOperStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["up","down"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - dataPostCocsnInterfacesInterfaceItems0TypeOperStatusPropEnum = append(dataPostCocsnInterfacesInterfaceItems0TypeOperStatusPropEnum, v) - } -} - -const ( - - // DataPostCocsnInterfacesInterfaceItems0OperStatusUp captures enum value "up" - DataPostCocsnInterfacesInterfaceItems0OperStatusUp string = "up" - - // DataPostCocsnInterfacesInterfaceItems0OperStatusDown captures enum value "down" - DataPostCocsnInterfacesInterfaceItems0OperStatusDown string = "down" -) - -// prop value enum -func (m *DataPostCocsnInterfacesInterfaceItems0) validateOperStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, dataPostCocsnInterfacesInterfaceItems0TypeOperStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *DataPostCocsnInterfacesInterfaceItems0) validateOperStatus(formats strfmt.Registry) error { - - if swag.IsZero(m.OperStatus) { // not required - return nil - } - - // value enum - if err := m.validateOperStatusEnum("oper-status", "body", *m.OperStatus); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DataPostCocsnInterfacesInterfaceItems0) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataPostCocsnInterfacesInterfaceItems0) UnmarshalBinary(b []byte) error { - var res DataPostCocsnInterfacesInterfaceItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// DataPostCocsnRoutes (non-presence) -// -// swagger:model DataPostCocsnRoutes -type DataPostCocsnRoutes struct { - - // (list) - Route []*DataPostCocsnRoutesRouteItems0 `json:"route"` -} - -// Validate validates this data post cocsn routes -func (m *DataPostCocsnRoutes) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRoute(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataPostCocsnRoutes) validateRoute(formats strfmt.Registry) error { - - if swag.IsZero(m.Route) { // not required - return nil - } - - for i := 0; i < len(m.Route); i++ { - if swag.IsZero(m.Route[i]) { // not required - continue - } - - if m.Route[i] != nil { - if err := m.Route[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cocsn:routes" + "." + "route" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DataPostCocsnRoutes) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataPostCocsnRoutes) UnmarshalBinary(b []byte) error { - var res DataPostCocsnRoutes - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// DataPostCocsnRoutesRouteItems0 data post cocsn routes route items0 -// -// swagger:model DataPostCocsnRoutesRouteItems0 -type DataPostCocsnRoutesRouteItems0 struct { - - // Route destination. IP network (leaf) - Destination string `json:"destination,omitempty"` - - // Expiration timer of the route (leaf) - Expire string `json:"expire,omitempty"` - - // Flags of the route (leaf) - Flags string `json:"flags,omitempty"` - - // Route gateway. IP address or host name (leaf) - Gateway string `json:"gateway,omitempty"` - - // Interface used for the route (leaf) - Interface string `json:"interface,omitempty"` -} - -// Validate validates this data post cocsn routes route items0 -func (m *DataPostCocsnRoutesRouteItems0) Validate(formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DataPostCocsnRoutesRouteItems0) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataPostCocsnRoutesRouteItems0) UnmarshalBinary(b []byte) error { - var res DataPostCocsnRoutesRouteItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/api/models/data_put_patch.go b/api/models/data_put_patch.go deleted file mode 100644 index 0c921a84c5b39b395e381c14deb402daa95fb394..0000000000000000000000000000000000000000 --- a/api/models/data_put_patch.go +++ /dev/null @@ -1,438 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// DataPutPatch data put patch -// -// swagger:model data-put-patch -type DataPutPatch struct { - - // ietf restconf data - IetfRestconfData *DataPutPatchIetfRestconfData `json:"ietf-restconf:data,omitempty"` -} - -// Validate validates this data put patch -func (m *DataPutPatch) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateIetfRestconfData(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataPutPatch) validateIetfRestconfData(formats strfmt.Registry) error { - - if swag.IsZero(m.IetfRestconfData) { // not required - return nil - } - - if m.IetfRestconfData != nil { - if err := m.IetfRestconfData.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ietf-restconf:data") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DataPutPatch) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataPutPatch) UnmarshalBinary(b []byte) error { - var res DataPutPatch - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// DataPutPatchIetfRestconfData This YANG module represents the CoCSN API -// -// swagger:model DataPutPatchIetfRestconfData -type DataPutPatchIetfRestconfData struct { - - // cocsn interfaces - CocsnInterfaces *DataPutPatchIetfRestconfDataCocsnInterfaces `json:"cocsn:interfaces,omitempty"` - - // cocsn routes - CocsnRoutes *DataPutPatchIetfRestconfDataCocsnRoutes `json:"cocsn:routes,omitempty"` -} - -// Validate validates this data put patch ietf restconf data -func (m *DataPutPatchIetfRestconfData) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCocsnInterfaces(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCocsnRoutes(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataPutPatchIetfRestconfData) validateCocsnInterfaces(formats strfmt.Registry) error { - - if swag.IsZero(m.CocsnInterfaces) { // not required - return nil - } - - if m.CocsnInterfaces != nil { - if err := m.CocsnInterfaces.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ietf-restconf:data" + "." + "cocsn:interfaces") - } - return err - } - } - - return nil -} - -func (m *DataPutPatchIetfRestconfData) validateCocsnRoutes(formats strfmt.Registry) error { - - if swag.IsZero(m.CocsnRoutes) { // not required - return nil - } - - if m.CocsnRoutes != nil { - if err := m.CocsnRoutes.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ietf-restconf:data" + "." + "cocsn:routes") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DataPutPatchIetfRestconfData) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataPutPatchIetfRestconfData) UnmarshalBinary(b []byte) error { - var res DataPutPatchIetfRestconfData - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// DataPutPatchIetfRestconfDataCocsnInterfaces (non-presence) -// -// swagger:model DataPutPatchIetfRestconfDataCocsnInterfaces -type DataPutPatchIetfRestconfDataCocsnInterfaces struct { - - // (list) - Interface []*DataPutPatchIetfRestconfDataCocsnInterfacesInterfaceItems0 `json:"interface"` -} - -// Validate validates this data put patch ietf restconf data cocsn interfaces -func (m *DataPutPatchIetfRestconfDataCocsnInterfaces) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateInterface(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataPutPatchIetfRestconfDataCocsnInterfaces) validateInterface(formats strfmt.Registry) error { - - if swag.IsZero(m.Interface) { // not required - return nil - } - - for i := 0; i < len(m.Interface); i++ { - if swag.IsZero(m.Interface[i]) { // not required - continue - } - - if m.Interface[i] != nil { - if err := m.Interface[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ietf-restconf:data" + "." + "cocsn:interfaces" + "." + "interface" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DataPutPatchIetfRestconfDataCocsnInterfaces) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataPutPatchIetfRestconfDataCocsnInterfaces) UnmarshalBinary(b []byte) error { - var res DataPutPatchIetfRestconfDataCocsnInterfaces - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// DataPutPatchIetfRestconfDataCocsnInterfacesInterfaceItems0 data put patch ietf restconf data cocsn interfaces interface items0 -// -// swagger:model DataPutPatchIetfRestconfDataCocsnInterfacesInterfaceItems0 -type DataPutPatchIetfRestconfDataCocsnInterfacesInterfaceItems0 struct { - - // addresses - Addresses []string `json:"addresses"` - - // Enable or disable the interface. Example value: true (leaf) - Enabled bool `json:"enabled,omitempty"` - - // Interface name. Example value: en0 (leaf) - Name string `json:"name,omitempty"` - - // Describes whether the interface is physically up or down (leaf) - // Enum: [up down] - OperStatus *string `json:"oper-status,omitempty"` - - // The interface's address at its protocol sub-layer. For - // example, for an 802.x interface, this object normally - // contains a Media Access Control (MAC) address. The - // interface's media-specific modules must define the bit - // and byte ordering and the format of the value of this - // object. For interfaces that do not have such an address - // (e.g., a serial line), this node is not present. (leaf) - PhysAddress string `json:"phys-address,omitempty"` -} - -// Validate validates this data put patch ietf restconf data cocsn interfaces interface items0 -func (m *DataPutPatchIetfRestconfDataCocsnInterfacesInterfaceItems0) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateOperStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var dataPutPatchIetfRestconfDataCocsnInterfacesInterfaceItems0TypeOperStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["up","down"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - dataPutPatchIetfRestconfDataCocsnInterfacesInterfaceItems0TypeOperStatusPropEnum = append(dataPutPatchIetfRestconfDataCocsnInterfacesInterfaceItems0TypeOperStatusPropEnum, v) - } -} - -const ( - - // DataPutPatchIetfRestconfDataCocsnInterfacesInterfaceItems0OperStatusUp captures enum value "up" - DataPutPatchIetfRestconfDataCocsnInterfacesInterfaceItems0OperStatusUp string = "up" - - // DataPutPatchIetfRestconfDataCocsnInterfacesInterfaceItems0OperStatusDown captures enum value "down" - DataPutPatchIetfRestconfDataCocsnInterfacesInterfaceItems0OperStatusDown string = "down" -) - -// prop value enum -func (m *DataPutPatchIetfRestconfDataCocsnInterfacesInterfaceItems0) validateOperStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, dataPutPatchIetfRestconfDataCocsnInterfacesInterfaceItems0TypeOperStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *DataPutPatchIetfRestconfDataCocsnInterfacesInterfaceItems0) validateOperStatus(formats strfmt.Registry) error { - - if swag.IsZero(m.OperStatus) { // not required - return nil - } - - // value enum - if err := m.validateOperStatusEnum("oper-status", "body", *m.OperStatus); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DataPutPatchIetfRestconfDataCocsnInterfacesInterfaceItems0) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataPutPatchIetfRestconfDataCocsnInterfacesInterfaceItems0) UnmarshalBinary(b []byte) error { - var res DataPutPatchIetfRestconfDataCocsnInterfacesInterfaceItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// DataPutPatchIetfRestconfDataCocsnRoutes (non-presence) -// -// swagger:model DataPutPatchIetfRestconfDataCocsnRoutes -type DataPutPatchIetfRestconfDataCocsnRoutes struct { - - // (list) - Route []*DataPutPatchIetfRestconfDataCocsnRoutesRouteItems0 `json:"route"` -} - -// Validate validates this data put patch ietf restconf data cocsn routes -func (m *DataPutPatchIetfRestconfDataCocsnRoutes) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRoute(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataPutPatchIetfRestconfDataCocsnRoutes) validateRoute(formats strfmt.Registry) error { - - if swag.IsZero(m.Route) { // not required - return nil - } - - for i := 0; i < len(m.Route); i++ { - if swag.IsZero(m.Route[i]) { // not required - continue - } - - if m.Route[i] != nil { - if err := m.Route[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ietf-restconf:data" + "." + "cocsn:routes" + "." + "route" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DataPutPatchIetfRestconfDataCocsnRoutes) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataPutPatchIetfRestconfDataCocsnRoutes) UnmarshalBinary(b []byte) error { - var res DataPutPatchIetfRestconfDataCocsnRoutes - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// DataPutPatchIetfRestconfDataCocsnRoutesRouteItems0 data put patch ietf restconf data cocsn routes route items0 -// -// swagger:model DataPutPatchIetfRestconfDataCocsnRoutesRouteItems0 -type DataPutPatchIetfRestconfDataCocsnRoutesRouteItems0 struct { - - // Route destination. IP network (leaf) - Destination string `json:"destination,omitempty"` - - // Expiration timer of the route (leaf) - Expire string `json:"expire,omitempty"` - - // Flags of the route (leaf) - Flags string `json:"flags,omitempty"` - - // Route gateway. IP address or host name (leaf) - Gateway string `json:"gateway,omitempty"` - - // Interface used for the route (leaf) - Interface string `json:"interface,omitempty"` -} - -// Validate validates this data put patch ietf restconf data cocsn routes route items0 -func (m *DataPutPatchIetfRestconfDataCocsnRoutesRouteItems0) Validate(formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DataPutPatchIetfRestconfDataCocsnRoutesRouteItems0) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataPutPatchIetfRestconfDataCocsnRoutesRouteItems0) UnmarshalBinary(b []byte) error { - var res DataPutPatchIetfRestconfDataCocsnRoutesRouteItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/api/models/operations.go b/api/models/operations.go deleted file mode 100644 index 58f5a2ea4b811107c0183fc6aba5494cb06e4ec5..0000000000000000000000000000000000000000 --- a/api/models/operations.go +++ /dev/null @@ -1,43 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// Operations operations -// -// swagger:model operations -type Operations struct { - - // This resource is a container that provides access to the data-model-specific RPC operations supported by the server. See RESTCONF RFC 8040 for further information. - IetfRestconfOperations interface{} `json:"ietf-restconf:operations,omitempty"` -} - -// Validate validates this operations -func (m *Operations) Validate(formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *Operations) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Operations) UnmarshalBinary(b []byte) error { - var res Operations - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/api/models/root.go b/api/models/root.go deleted file mode 100644 index 3d61f262a770b826d29683aa8a093a0435b32df0..0000000000000000000000000000000000000000 --- a/api/models/root.go +++ /dev/null @@ -1,109 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// Root root -// -// swagger:model root -type Root struct { - - // ietf restconf restconf - IetfRestconfRestconf *RootIetfRestconfRestconf `json:"ietf-restconf:restconf,omitempty"` -} - -// Validate validates this root -func (m *Root) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateIetfRestconfRestconf(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Root) validateIetfRestconfRestconf(formats strfmt.Registry) error { - - if swag.IsZero(m.IetfRestconfRestconf) { // not required - return nil - } - - if m.IetfRestconfRestconf != nil { - if err := m.IetfRestconfRestconf.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ietf-restconf:restconf") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Root) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Root) UnmarshalBinary(b []byte) error { - var res Root - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// RootIetfRestconfRestconf This is the RESTCONF root resource for the RESTCONF datastore and operation resources. See RESTCONF RFC 8040 for further information. -// -// swagger:model RootIetfRestconfRestconf -type RootIetfRestconfRestconf struct { - - // data - Data interface{} `json:"data,omitempty"` - - // operations - Operations interface{} `json:"operations,omitempty"` - - // yang library version - YangLibraryVersion string `json:"yang-library-version,omitempty"` -} - -// Validate validates this root ietf restconf restconf -func (m *RootIetfRestconfRestconf) Validate(formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RootIetfRestconfRestconf) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RootIetfRestconfRestconf) UnmarshalBinary(b []byte) error { - var res RootIetfRestconfRestconf - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/api/models/yang_library_version.go b/api/models/yang_library_version.go deleted file mode 100644 index 06c49883c2b7e87eded1f6aafcbbf21b71b97385..0000000000000000000000000000000000000000 --- a/api/models/yang_library_version.go +++ /dev/null @@ -1,43 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// YangLibraryVersion yang library version -// -// swagger:model yang-library-version -type YangLibraryVersion struct { - - // This leaf identifies the revision date of the 'ietf-yang-library' YANG module that is implemented by this server. See RESTCONF RFC 8040 for further information. - IetfRestconfYangLibraryVersion interface{} `json:"ietf-restconf:yang-library-version,omitempty"` -} - -// Validate validates this yang library version -func (m *YangLibraryVersion) Validate(formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *YangLibraryVersion) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *YangLibraryVersion) UnmarshalBinary(b []byte) error { - var res YangLibraryVersion - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/api/restapi/configure_cocsn.go b/api/restapi/configure_cocsn.go deleted file mode 100644 index 36fdaa748891db845c29bfecc4ca8b840014a867..0000000000000000000000000000000000000000 --- a/api/restapi/configure_cocsn.go +++ /dev/null @@ -1,396 +0,0 @@ -// This file is safe to edit. Once it exists it will not be overwritten - -package restapi - -import ( - "crypto/tls" - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - - "code.fbi.h-da.de/cocsn/cocsn-api/api/restapi/operations" - "code.fbi.h-da.de/cocsn/cocsn-api/api/restapi/operations/data" - "code.fbi.h-da.de/cocsn/cocsn-api/api/restapi/operations/operationsops" - "code.fbi.h-da.de/cocsn/cocsn-api/api/restapi/operations/root" - "code.fbi.h-da.de/cocsn/cocsn-api/api/restapi/operations/yang_library_version" -) - -//go:generate swagger generate server --target ../../api --name Cocsn --spec ../../cocsn.json --principal interface{} - -func configureFlags(api *operations.CocsnAPI) { - // api.CommandLineOptionsGroups = []swag.CommandLineOptionsGroup{ ... } -} - -func configureAPI(api *operations.CocsnAPI) http.Handler { - // configure the api here - api.ServeError = errors.ServeError - - // Set your custom logger if needed. Default one is log.Printf - // Expected interface func(string, ...interface{}) - // - // Example: - // api.Logger = log.Printf - - api.UseSwaggerUI() - // To continue using redoc as your UI, uncomment the following line - // api.UseRedoc() - - api.JSONConsumer = runtime.JSONConsumer() - - api.JSONProducer = runtime.JSONProducer() - - // Applies when the Authorization header is set with the Basic scheme - if api.BasicAuthAuth == nil { - api.BasicAuthAuth = func(user string, pass string) (interface{}, error) { - return nil, errors.NotImplemented("basic auth (basicAuth) has not yet been implemented") - } - } - - // Set your custom authorizer if needed. Default one is security.Authorized() - // Expected interface runtime.Authorizer - // - // Example: - // api.APIAuthorizer = security.Authorized() - if api.DataDataCocsnInterfacesDeleteHandler == nil { - api.DataDataCocsnInterfacesDeleteHandler = data.DataCocsnInterfacesDeleteHandlerFunc(func(params data.DataCocsnInterfacesDeleteParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnInterfacesDelete has not yet been implemented") - }) - } - if api.DataDataCocsnInterfacesGetHandler == nil { - api.DataDataCocsnInterfacesGetHandler = data.DataCocsnInterfacesGetHandlerFunc(func(params data.DataCocsnInterfacesGetParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnInterfacesGet has not yet been implemented") - }) - } - if api.DataDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteHandler == nil { - api.DataDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteHandler = data.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDelete has not yet been implemented") - }) - } - if api.DataDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetHandler == nil { - api.DataDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetHandler = data.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGet has not yet been implemented") - }) - } - if api.DataDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchHandler == nil { - api.DataDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchHandler = data.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatch has not yet been implemented") - }) - } - if api.DataDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutHandler == nil { - api.DataDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutHandler = data.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPut has not yet been implemented") - }) - } - if api.DataDataCocsnInterfacesInterfaceInterfaceNameDeleteHandler == nil { - api.DataDataCocsnInterfacesInterfaceInterfaceNameDeleteHandler = data.DataCocsnInterfacesInterfaceInterfaceNameDeleteHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameDeleteParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameDelete has not yet been implemented") - }) - } - if api.DataDataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteHandler == nil { - api.DataDataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteHandler = data.DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameEnabledDelete has not yet been implemented") - }) - } - if api.DataDataCocsnInterfacesInterfaceInterfaceNameEnabledGetHandler == nil { - api.DataDataCocsnInterfacesInterfaceInterfaceNameEnabledGetHandler = data.DataCocsnInterfacesInterfaceInterfaceNameEnabledGetHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameEnabledGetParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameEnabledGet has not yet been implemented") - }) - } - if api.DataDataCocsnInterfacesInterfaceInterfaceNameEnabledPatchHandler == nil { - api.DataDataCocsnInterfacesInterfaceInterfaceNameEnabledPatchHandler = data.DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameEnabledPatch has not yet been implemented") - }) - } - if api.DataDataCocsnInterfacesInterfaceInterfaceNameEnabledPutHandler == nil { - api.DataDataCocsnInterfacesInterfaceInterfaceNameEnabledPutHandler = data.DataCocsnInterfacesInterfaceInterfaceNameEnabledPutHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameEnabledPutParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameEnabledPut has not yet been implemented") - }) - } - if api.DataDataCocsnInterfacesInterfaceInterfaceNameGetHandler == nil { - api.DataDataCocsnInterfacesInterfaceInterfaceNameGetHandler = data.DataCocsnInterfacesInterfaceInterfaceNameGetHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameGetParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameGet has not yet been implemented") - }) - } - if api.DataDataCocsnInterfacesInterfaceInterfaceNameNameDeleteHandler == nil { - api.DataDataCocsnInterfacesInterfaceInterfaceNameNameDeleteHandler = data.DataCocsnInterfacesInterfaceInterfaceNameNameDeleteHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameNameDeleteParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameNameDelete has not yet been implemented") - }) - } - if api.DataDataCocsnInterfacesInterfaceInterfaceNameNameGetHandler == nil { - api.DataDataCocsnInterfacesInterfaceInterfaceNameNameGetHandler = data.DataCocsnInterfacesInterfaceInterfaceNameNameGetHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameNameGetParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameNameGet has not yet been implemented") - }) - } - if api.DataDataCocsnInterfacesInterfaceInterfaceNameNamePatchHandler == nil { - api.DataDataCocsnInterfacesInterfaceInterfaceNameNamePatchHandler = data.DataCocsnInterfacesInterfaceInterfaceNameNamePatchHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameNamePatchParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameNamePatch has not yet been implemented") - }) - } - if api.DataDataCocsnInterfacesInterfaceInterfaceNameNamePutHandler == nil { - api.DataDataCocsnInterfacesInterfaceInterfaceNameNamePutHandler = data.DataCocsnInterfacesInterfaceInterfaceNameNamePutHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameNamePutParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameNamePut has not yet been implemented") - }) - } - if api.DataDataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteHandler == nil { - api.DataDataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteHandler = data.DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameOperStatusDelete has not yet been implemented") - }) - } - if api.DataDataCocsnInterfacesInterfaceInterfaceNameOperStatusGetHandler == nil { - api.DataDataCocsnInterfacesInterfaceInterfaceNameOperStatusGetHandler = data.DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameOperStatusGet has not yet been implemented") - }) - } - if api.DataDataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchHandler == nil { - api.DataDataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchHandler = data.DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatch has not yet been implemented") - }) - } - if api.DataDataCocsnInterfacesInterfaceInterfaceNameOperStatusPutHandler == nil { - api.DataDataCocsnInterfacesInterfaceInterfaceNameOperStatusPutHandler = data.DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameOperStatusPut has not yet been implemented") - }) - } - if api.DataDataCocsnInterfacesInterfaceInterfaceNamePatchHandler == nil { - api.DataDataCocsnInterfacesInterfaceInterfaceNamePatchHandler = data.DataCocsnInterfacesInterfaceInterfaceNamePatchHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNamePatchParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNamePatch has not yet been implemented") - }) - } - if api.DataDataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetHandler == nil { - api.DataDataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetHandler = data.DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGet has not yet been implemented") - }) - } - if api.DataDataCocsnInterfacesInterfaceInterfaceNamePutHandler == nil { - api.DataDataCocsnInterfacesInterfaceInterfaceNamePutHandler = data.DataCocsnInterfacesInterfaceInterfaceNamePutHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNamePutParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNamePut has not yet been implemented") - }) - } - if api.DataDataCocsnInterfacesPatchHandler == nil { - api.DataDataCocsnInterfacesPatchHandler = data.DataCocsnInterfacesPatchHandlerFunc(func(params data.DataCocsnInterfacesPatchParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnInterfacesPatch has not yet been implemented") - }) - } - if api.DataDataCocsnInterfacesPostHandler == nil { - api.DataDataCocsnInterfacesPostHandler = data.DataCocsnInterfacesPostHandlerFunc(func(params data.DataCocsnInterfacesPostParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnInterfacesPost has not yet been implemented") - }) - } - if api.DataDataCocsnInterfacesPutHandler == nil { - api.DataDataCocsnInterfacesPutHandler = data.DataCocsnInterfacesPutHandlerFunc(func(params data.DataCocsnInterfacesPutParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnInterfacesPut has not yet been implemented") - }) - } - if api.DataDataCocsnRoutesDeleteHandler == nil { - api.DataDataCocsnRoutesDeleteHandler = data.DataCocsnRoutesDeleteHandlerFunc(func(params data.DataCocsnRoutesDeleteParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnRoutesDelete has not yet been implemented") - }) - } - if api.DataDataCocsnRoutesGetHandler == nil { - api.DataDataCocsnRoutesGetHandler = data.DataCocsnRoutesGetHandlerFunc(func(params data.DataCocsnRoutesGetParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnRoutesGet has not yet been implemented") - }) - } - if api.DataDataCocsnRoutesPatchHandler == nil { - api.DataDataCocsnRoutesPatchHandler = data.DataCocsnRoutesPatchHandlerFunc(func(params data.DataCocsnRoutesPatchParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnRoutesPatch has not yet been implemented") - }) - } - if api.DataDataCocsnRoutesPostHandler == nil { - api.DataDataCocsnRoutesPostHandler = data.DataCocsnRoutesPostHandlerFunc(func(params data.DataCocsnRoutesPostParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnRoutesPost has not yet been implemented") - }) - } - if api.DataDataCocsnRoutesPutHandler == nil { - api.DataDataCocsnRoutesPutHandler = data.DataCocsnRoutesPutHandlerFunc(func(params data.DataCocsnRoutesPutParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnRoutesPut has not yet been implemented") - }) - } - if api.DataDataCocsnRoutesRouteRouteDestinationDeleteHandler == nil { - api.DataDataCocsnRoutesRouteRouteDestinationDeleteHandler = data.DataCocsnRoutesRouteRouteDestinationDeleteHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationDeleteParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationDelete has not yet been implemented") - }) - } - if api.DataDataCocsnRoutesRouteRouteDestinationDestinationDeleteHandler == nil { - api.DataDataCocsnRoutesRouteRouteDestinationDestinationDeleteHandler = data.DataCocsnRoutesRouteRouteDestinationDestinationDeleteHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationDestinationDeleteParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationDestinationDelete has not yet been implemented") - }) - } - if api.DataDataCocsnRoutesRouteRouteDestinationDestinationGetHandler == nil { - api.DataDataCocsnRoutesRouteRouteDestinationDestinationGetHandler = data.DataCocsnRoutesRouteRouteDestinationDestinationGetHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationDestinationGetParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationDestinationGet has not yet been implemented") - }) - } - if api.DataDataCocsnRoutesRouteRouteDestinationDestinationPatchHandler == nil { - api.DataDataCocsnRoutesRouteRouteDestinationDestinationPatchHandler = data.DataCocsnRoutesRouteRouteDestinationDestinationPatchHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationDestinationPatchParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationDestinationPatch has not yet been implemented") - }) - } - if api.DataDataCocsnRoutesRouteRouteDestinationDestinationPutHandler == nil { - api.DataDataCocsnRoutesRouteRouteDestinationDestinationPutHandler = data.DataCocsnRoutesRouteRouteDestinationDestinationPutHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationDestinationPutParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationDestinationPut has not yet been implemented") - }) - } - if api.DataDataCocsnRoutesRouteRouteDestinationExpireDeleteHandler == nil { - api.DataDataCocsnRoutesRouteRouteDestinationExpireDeleteHandler = data.DataCocsnRoutesRouteRouteDestinationExpireDeleteHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationExpireDeleteParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationExpireDelete has not yet been implemented") - }) - } - if api.DataDataCocsnRoutesRouteRouteDestinationExpireGetHandler == nil { - api.DataDataCocsnRoutesRouteRouteDestinationExpireGetHandler = data.DataCocsnRoutesRouteRouteDestinationExpireGetHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationExpireGetParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationExpireGet has not yet been implemented") - }) - } - if api.DataDataCocsnRoutesRouteRouteDestinationExpirePatchHandler == nil { - api.DataDataCocsnRoutesRouteRouteDestinationExpirePatchHandler = data.DataCocsnRoutesRouteRouteDestinationExpirePatchHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationExpirePatchParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationExpirePatch has not yet been implemented") - }) - } - if api.DataDataCocsnRoutesRouteRouteDestinationExpirePutHandler == nil { - api.DataDataCocsnRoutesRouteRouteDestinationExpirePutHandler = data.DataCocsnRoutesRouteRouteDestinationExpirePutHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationExpirePutParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationExpirePut has not yet been implemented") - }) - } - if api.DataDataCocsnRoutesRouteRouteDestinationFlagsDeleteHandler == nil { - api.DataDataCocsnRoutesRouteRouteDestinationFlagsDeleteHandler = data.DataCocsnRoutesRouteRouteDestinationFlagsDeleteHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationFlagsDeleteParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationFlagsDelete has not yet been implemented") - }) - } - if api.DataDataCocsnRoutesRouteRouteDestinationFlagsGetHandler == nil { - api.DataDataCocsnRoutesRouteRouteDestinationFlagsGetHandler = data.DataCocsnRoutesRouteRouteDestinationFlagsGetHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationFlagsGetParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationFlagsGet has not yet been implemented") - }) - } - if api.DataDataCocsnRoutesRouteRouteDestinationFlagsPatchHandler == nil { - api.DataDataCocsnRoutesRouteRouteDestinationFlagsPatchHandler = data.DataCocsnRoutesRouteRouteDestinationFlagsPatchHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationFlagsPatchParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationFlagsPatch has not yet been implemented") - }) - } - if api.DataDataCocsnRoutesRouteRouteDestinationFlagsPutHandler == nil { - api.DataDataCocsnRoutesRouteRouteDestinationFlagsPutHandler = data.DataCocsnRoutesRouteRouteDestinationFlagsPutHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationFlagsPutParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationFlagsPut has not yet been implemented") - }) - } - if api.DataDataCocsnRoutesRouteRouteDestinationGatewayDeleteHandler == nil { - api.DataDataCocsnRoutesRouteRouteDestinationGatewayDeleteHandler = data.DataCocsnRoutesRouteRouteDestinationGatewayDeleteHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationGatewayDeleteParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationGatewayDelete has not yet been implemented") - }) - } - if api.DataDataCocsnRoutesRouteRouteDestinationGatewayGetHandler == nil { - api.DataDataCocsnRoutesRouteRouteDestinationGatewayGetHandler = data.DataCocsnRoutesRouteRouteDestinationGatewayGetHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationGatewayGetParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationGatewayGet has not yet been implemented") - }) - } - if api.DataDataCocsnRoutesRouteRouteDestinationGatewayPatchHandler == nil { - api.DataDataCocsnRoutesRouteRouteDestinationGatewayPatchHandler = data.DataCocsnRoutesRouteRouteDestinationGatewayPatchHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationGatewayPatchParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationGatewayPatch has not yet been implemented") - }) - } - if api.DataDataCocsnRoutesRouteRouteDestinationGatewayPutHandler == nil { - api.DataDataCocsnRoutesRouteRouteDestinationGatewayPutHandler = data.DataCocsnRoutesRouteRouteDestinationGatewayPutHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationGatewayPutParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationGatewayPut has not yet been implemented") - }) - } - if api.DataDataCocsnRoutesRouteRouteDestinationGetHandler == nil { - api.DataDataCocsnRoutesRouteRouteDestinationGetHandler = data.DataCocsnRoutesRouteRouteDestinationGetHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationGetParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationGet has not yet been implemented") - }) - } - if api.DataDataCocsnRoutesRouteRouteDestinationInterfaceDeleteHandler == nil { - api.DataDataCocsnRoutesRouteRouteDestinationInterfaceDeleteHandler = data.DataCocsnRoutesRouteRouteDestinationInterfaceDeleteHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationInterfaceDeleteParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationInterfaceDelete has not yet been implemented") - }) - } - if api.DataDataCocsnRoutesRouteRouteDestinationInterfaceGetHandler == nil { - api.DataDataCocsnRoutesRouteRouteDestinationInterfaceGetHandler = data.DataCocsnRoutesRouteRouteDestinationInterfaceGetHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationInterfaceGetParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationInterfaceGet has not yet been implemented") - }) - } - if api.DataDataCocsnRoutesRouteRouteDestinationInterfacePatchHandler == nil { - api.DataDataCocsnRoutesRouteRouteDestinationInterfacePatchHandler = data.DataCocsnRoutesRouteRouteDestinationInterfacePatchHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationInterfacePatchParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationInterfacePatch has not yet been implemented") - }) - } - if api.DataDataCocsnRoutesRouteRouteDestinationInterfacePutHandler == nil { - api.DataDataCocsnRoutesRouteRouteDestinationInterfacePutHandler = data.DataCocsnRoutesRouteRouteDestinationInterfacePutHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationInterfacePutParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationInterfacePut has not yet been implemented") - }) - } - if api.DataDataCocsnRoutesRouteRouteDestinationPatchHandler == nil { - api.DataDataCocsnRoutesRouteRouteDestinationPatchHandler = data.DataCocsnRoutesRouteRouteDestinationPatchHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationPatchParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationPatch has not yet been implemented") - }) - } - if api.DataDataCocsnRoutesRouteRouteDestinationPutHandler == nil { - api.DataDataCocsnRoutesRouteRouteDestinationPutHandler = data.DataCocsnRoutesRouteRouteDestinationPutHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationPutParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationPut has not yet been implemented") - }) - } - if api.DataDataGetHandler == nil { - api.DataDataGetHandler = data.DataGetHandlerFunc(func(params data.DataGetParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataGet has not yet been implemented") - }) - } - if api.DataDataPatchHandler == nil { - api.DataDataPatchHandler = data.DataPatchHandlerFunc(func(params data.DataPatchParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataPatch has not yet been implemented") - }) - } - if api.DataDataPostHandler == nil { - api.DataDataPostHandler = data.DataPostHandlerFunc(func(params data.DataPostParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataPost has not yet been implemented") - }) - } - if api.DataDataPutHandler == nil { - api.DataDataPutHandler = data.DataPutHandlerFunc(func(params data.DataPutParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataPut has not yet been implemented") - }) - } - if api.OperationsopsOperationsGetHandler == nil { - api.OperationsopsOperationsGetHandler = operationsops.OperationsGetHandlerFunc(func(params operationsops.OperationsGetParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation operationsops.OperationsGet has not yet been implemented") - }) - } - if api.RootRootGetHandler == nil { - api.RootRootGetHandler = root.RootGetHandlerFunc(func(params root.RootGetParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation root.RootGet has not yet been implemented") - }) - } - if api.YangLibraryVersionYangLibraryVersionGetHandler == nil { - api.YangLibraryVersionYangLibraryVersionGetHandler = yang_library_version.YangLibraryVersionGetHandlerFunc(func(params yang_library_version.YangLibraryVersionGetParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation yang_library_version.YangLibraryVersionGet has not yet been implemented") - }) - } - - api.PreServerShutdown = func() {} - - api.ServerShutdown = func() {} - - return setupGlobalMiddleware(api.Serve(setupMiddlewares)) -} - -// The TLS configuration before HTTPS server starts. -func configureTLS(tlsConfig *tls.Config) { - // Make all necessary changes to the TLS configuration here. -} - -// As soon as server is initialized but not run yet, this function will be called. -// If you need to modify a config, store server instance to stop it individually later, this is the place. -// This function can be called multiple times, depending on the number of serving schemes. -// scheme value will be set accordingly: "http", "https" or "unix" -func configureServer(s *http.Server, scheme, addr string) { -} - -// The middleware configuration is for the handler executors. These do not apply to the swagger.json document. -// The middleware executes after routing but before authentication, binding and validation -func setupMiddlewares(handler http.Handler) http.Handler { - return handler -} - -// The middleware configuration happens before anything, this middleware also applies to serving the swagger.json document. -// So this is a good place to plug in a panic handling middleware, logging and metrics -func setupGlobalMiddleware(handler http.Handler) http.Handler { - return handler -} diff --git a/api/restapi/doc.go b/api/restapi/doc.go deleted file mode 100644 index b4d0738667cde116e334d443cb688b81f3babc42..0000000000000000000000000000000000000000 --- a/api/restapi/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Package restapi cocsn -// -// This YANG module represents the CoCSN API -// Schemes: -// http -// https -// Host: localhost -// BasePath: /restconf -// Version: 2020-08-17 -// -// Consumes: -// - application/yang-data+json -// -// Produces: -// - application/yang-data+json -// -// swagger:meta -package restapi diff --git a/api/restapi/embedded_spec.go b/api/restapi/embedded_spec.go deleted file mode 100644 index f1adce8ca406bf530c32227ba69a414a93450f8b..0000000000000000000000000000000000000000 --- a/api/restapi/embedded_spec.go +++ /dev/null @@ -1,8942 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restapi - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" -) - -var ( - // SwaggerJSON embedded version of the swagger document used at generation time - SwaggerJSON json.RawMessage - // FlatSwaggerJSON embedded flattened version of the swagger document used at generation time - FlatSwaggerJSON json.RawMessage -) - -func init() { - SwaggerJSON = json.RawMessage([]byte(`{ - "consumes": [ - "application/yang-data+json" - ], - "produces": [ - "application/yang-data+json" - ], - "schemes": [ - "http", - "https" - ], - "swagger": "2.0", - "info": { - "description": "This YANG module represents the CoCSN API", - "title": "cocsn", - "version": "2020-08-17" - }, - "basePath": "/restconf", - "paths": { - "/": { - "get": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "This YANG module represents the CoCSN API", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "root", - "get" - ], - "summary": "This YANG module represents the CoCSN API", - "operationId": "root_get", - "responses": { - "200": { - "description": "This YANG module represents the CoCSN API", - "schema": { - "$ref": "#/definitions/root" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - } - } - }, - "/data": { - "get": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "This YANG module represents the CoCSN API", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "get" - ], - "summary": "This YANG module represents the CoCSN API", - "operationId": "data_get", - "responses": { - "200": { - "description": "This YANG module represents the CoCSN API", - "schema": { - "$ref": "#/definitions/data" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - } - }, - "put": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "This YANG module represents the CoCSN API", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "put" - ], - "summary": "This YANG module represents the CoCSN API", - "operationId": "data_put", - "parameters": [ - { - "$ref": "#/parameters/data-put-patch" - } - ], - "responses": { - "201": { - "description": "This YANG module represents the CoCSN API" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - } - }, - "post": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "This YANG module represents the CoCSN API", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "post" - ], - "summary": "This YANG module represents the CoCSN API", - "operationId": "data_post", - "parameters": [ - { - "$ref": "#/parameters/data-post" - } - ], - "responses": { - "201": { - "description": "This YANG module represents the CoCSN API" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - } - }, - "patch": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "This YANG module represents the CoCSN API", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "patch" - ], - "summary": "This YANG module represents the CoCSN API", - "operationId": "data_patch", - "parameters": [ - { - "$ref": "#/parameters/data-put-patch" - } - ], - "responses": { - "204": { - "description": "This YANG module represents the CoCSN API" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - } - } - }, - "/data/cocsn:interfaces": { - "get": { - "security": [ - { - "basicAuth": [] - } - ], - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "get" - ], - "operationId": "data_cocsn_interfaces_get", - "parameters": [ - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/data_cocsn_interfaces" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - } - }, - "put": { - "security": [ - { - "basicAuth": [] - } - ], - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "put" - ], - "operationId": "data_cocsn_interfaces_put", - "parameters": [ - { - "$ref": "#/parameters/data_cocsn_interfaces" - } - ], - "responses": { - "201": { - "description": "container interfaces created or replaced" - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - } - }, - "post": { - "security": [ - { - "basicAuth": [] - } - ], - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "post" - ], - "operationId": "data_cocsn_interfaces_post", - "parameters": [ - { - "$ref": "#/parameters/data_cocsn_interfaces-post" - } - ], - "responses": { - "201": { - "description": "container interfaces created" - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - } - }, - "delete": { - "security": [ - { - "basicAuth": [] - } - ], - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "delete" - ], - "operationId": "data_cocsn_interfaces_delete", - "responses": { - "204": { - "$ref": "#/responses/204" - } - } - }, - "patch": { - "security": [ - { - "basicAuth": [] - } - ], - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "patch" - ], - "operationId": "data_cocsn_interfaces_patch", - "parameters": [ - { - "$ref": "#/parameters/data_cocsn_interfaces" - } - ], - "responses": { - "204": { - "description": "container interfaces updated" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - } - } - }, - "/data/cocsn:interfaces/interface": {}, - "/data/cocsn:interfaces/interface={interface-name}": { - "get": { - "security": [ - { - "basicAuth": [] - } - ], - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "get" - ], - "operationId": "data_cocsn_interfaces_interface_interface_name_get", - "parameters": [ - { - "$ref": "#/parameters/interface-name" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - } - }, - "put": { - "security": [ - { - "basicAuth": [] - } - ], - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "put" - ], - "operationId": "data_cocsn_interfaces_interface_interface_name_put", - "parameters": [ - { - "$ref": "#/parameters/interface-name" - }, - { - "$ref": "#/parameters/data_cocsn_interfaces_interface_interface-name" - }, - { - "$ref": "#/parameters/insert" - }, - { - "$ref": "#/parameters/point" - } - ], - "responses": { - "201": { - "description": "list interface created or replaced" - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - } - }, - "delete": { - "security": [ - { - "basicAuth": [] - } - ], - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "delete" - ], - "operationId": "data_cocsn_interfaces_interface_interface_name_delete", - "parameters": [ - { - "$ref": "#/parameters/interface-name" - } - ], - "responses": { - "204": { - "$ref": "#/responses/204" - } - } - }, - "patch": { - "security": [ - { - "basicAuth": [] - } - ], - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "patch" - ], - "operationId": "data_cocsn_interfaces_interface_interface_name_patch", - "parameters": [ - { - "$ref": "#/parameters/interface-name" - }, - { - "$ref": "#/parameters/data_cocsn_interfaces_interface_interface-name" - } - ], - "responses": { - "204": { - "description": "list interface updated" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - } - } - }, - "/data/cocsn:interfaces/interface={interface-name}/addresses": {}, - "/data/cocsn:interfaces/interface={interface-name}/addresses={addresses-id}": { - "get": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "Interface IP address. Example value: 10.10.10.1", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "get" - ], - "summary": "Interface IP address. Example value: 10.10.10.1", - "operationId": "data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_get", - "parameters": [ - { - "$ref": "#/parameters/interface-name" - }, - { - "$ref": "#/parameters/addresses-id" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "Interface IP address. Example value: 10.10.10.1", - "schema": { - "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_addresses_addresses-id" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - } - }, - "put": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "Interface IP address. Example value: 10.10.10.1", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "put" - ], - "summary": "Interface IP address. Example value: 10.10.10.1", - "operationId": "data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_put", - "parameters": [ - { - "$ref": "#/parameters/interface-name" - }, - { - "$ref": "#/parameters/addresses-id" - }, - { - "$ref": "#/parameters/data_cocsn_interfaces_interface_interface-name_addresses_addresses-id" - }, - { - "$ref": "#/parameters/insert" - }, - { - "$ref": "#/parameters/point" - } - ], - "responses": { - "201": { - "description": "leaf-list addresses created or replaced" - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - } - }, - "delete": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "Interface IP address. Example value: 10.10.10.1", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "delete" - ], - "summary": "Interface IP address. Example value: 10.10.10.1", - "operationId": "data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_delete", - "parameters": [ - { - "$ref": "#/parameters/interface-name" - }, - { - "$ref": "#/parameters/addresses-id" - } - ], - "responses": { - "204": { - "$ref": "#/responses/204" - } - } - }, - "patch": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "Interface IP address. Example value: 10.10.10.1", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "patch" - ], - "summary": "Interface IP address. Example value: 10.10.10.1", - "operationId": "data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_patch", - "parameters": [ - { - "$ref": "#/parameters/interface-name" - }, - { - "$ref": "#/parameters/addresses-id" - }, - { - "$ref": "#/parameters/data_cocsn_interfaces_interface_interface-name_addresses_addresses-id" - } - ], - "responses": { - "204": { - "description": "leaf-list addresses updated" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - } - } - }, - "/data/cocsn:interfaces/interface={interface-name}/enabled": { - "get": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "Enable or disable the interface. Example value: true", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "get" - ], - "summary": "Enable or disable the interface. Example value: true", - "operationId": "data_cocsn_interfaces_interface_interface_name_enabled_get", - "parameters": [ - { - "$ref": "#/parameters/interface-name" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "Enable or disable the interface. Example value: true", - "schema": { - "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_enabled" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - } - }, - "put": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "Enable or disable the interface. Example value: true", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "put" - ], - "summary": "Enable or disable the interface. Example value: true", - "operationId": "data_cocsn_interfaces_interface_interface_name_enabled_put", - "parameters": [ - { - "$ref": "#/parameters/interface-name" - }, - { - "$ref": "#/parameters/data_cocsn_interfaces_interface_interface-name_enabled" - } - ], - "responses": { - "201": { - "description": "leaf enabled created or replaced" - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - } - }, - "delete": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "Enable or disable the interface. Example value: true", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "delete" - ], - "summary": "Enable or disable the interface. Example value: true", - "operationId": "data_cocsn_interfaces_interface_interface_name_enabled_delete", - "parameters": [ - { - "$ref": "#/parameters/interface-name" - } - ], - "responses": { - "204": { - "$ref": "#/responses/204" - } - } - }, - "patch": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "Enable or disable the interface. Example value: true", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "patch" - ], - "summary": "Enable or disable the interface. Example value: true", - "operationId": "data_cocsn_interfaces_interface_interface_name_enabled_patch", - "parameters": [ - { - "$ref": "#/parameters/interface-name" - }, - { - "$ref": "#/parameters/data_cocsn_interfaces_interface_interface-name_enabled" - } - ], - "responses": { - "204": { - "description": "leaf enabled updated" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - } - } - }, - "/data/cocsn:interfaces/interface={interface-name}/name": { - "get": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "Interface name. Example value: en0", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "get" - ], - "summary": "Interface name. Example value: en0", - "operationId": "data_cocsn_interfaces_interface_interface_name_name_get", - "parameters": [ - { - "$ref": "#/parameters/interface-name" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "Interface name. Example value: en0", - "schema": { - "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_name" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - } - } - }, - "/data/cocsn:interfaces/interface={interface-name}/oper-status": { - "get": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "Describes whether the interface is physically up or down", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "get" - ], - "summary": "Describes whether the interface is physically up or down", - "operationId": "data_cocsn_interfaces_interface_interface_name_oper_status_get", - "parameters": [ - { - "$ref": "#/parameters/interface-name" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "Describes whether the interface is physically up or down", - "schema": { - "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_oper-status" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - } - }, - "put": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "Describes whether the interface is physically up or down", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "put" - ], - "summary": "Describes whether the interface is physically up or down", - "operationId": "data_cocsn_interfaces_interface_interface_name_oper_status_put", - "parameters": [ - { - "$ref": "#/parameters/interface-name" - }, - { - "$ref": "#/parameters/data_cocsn_interfaces_interface_interface-name_oper-status" - } - ], - "responses": { - "201": { - "description": "leaf oper-status created or replaced" - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - } - }, - "delete": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "Describes whether the interface is physically up or down", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "delete" - ], - "summary": "Describes whether the interface is physically up or down", - "operationId": "data_cocsn_interfaces_interface_interface_name_oper_status_delete", - "parameters": [ - { - "$ref": "#/parameters/interface-name" - } - ], - "responses": { - "204": { - "$ref": "#/responses/204" - } - } - }, - "patch": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "Describes whether the interface is physically up or down", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "patch" - ], - "summary": "Describes whether the interface is physically up or down", - "operationId": "data_cocsn_interfaces_interface_interface_name_oper_status_patch", - "parameters": [ - { - "$ref": "#/parameters/interface-name" - }, - { - "$ref": "#/parameters/data_cocsn_interfaces_interface_interface-name_oper-status" - } - ], - "responses": { - "204": { - "description": "leaf oper-status updated" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - } - } - }, - "/data/cocsn:interfaces/interface={interface-name}/phys-address": { - "get": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "The interface's address at its protocol sub-layer. For\nexample, for an 802.x interface, this object normally\ncontains a Media Access Control (MAC) address. The\ninterface's media-specific modules must define the bit\nand byte ordering and the format of the value of this\nobject. For interfaces that do not have such an address\n(e.g., a serial line), this node is not present.", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "get" - ], - "summary": "The interface's address at its protocol sub-layer. For\nexample, for an 802.x interface, this object normally\ncontains a Media Access Control (MAC) address. The\ninterface's media-specific modules must define the bit\nand byte ordering and the format of the value of this\nobject. For interfaces that do not have such an address\n(e.g., a serial line), this node is not present.", - "operationId": "data_cocsn_interfaces_interface_interface_name_phys_address_get", - "parameters": [ - { - "$ref": "#/parameters/interface-name" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "The interface's address at its protocol sub-layer. For\nexample, for an 802.x interface, this object normally\ncontains a Media Access Control (MAC) address. The\ninterface's media-specific modules must define the bit\nand byte ordering and the format of the value of this\nobject. For interfaces that do not have such an address\n(e.g., a serial line), this node is not present.", - "schema": { - "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_phys-address" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - } - } - }, - "/data/cocsn:routes": { - "get": { - "security": [ - { - "basicAuth": [] - } - ], - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "get" - ], - "operationId": "data_cocsn_routes_get", - "parameters": [ - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/data_cocsn_routes" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - } - }, - "put": { - "security": [ - { - "basicAuth": [] - } - ], - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "put" - ], - "operationId": "data_cocsn_routes_put", - "parameters": [ - { - "$ref": "#/parameters/data_cocsn_routes" - } - ], - "responses": { - "201": { - "description": "container routes created or replaced" - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - } - }, - "post": { - "security": [ - { - "basicAuth": [] - } - ], - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "post" - ], - "operationId": "data_cocsn_routes_post", - "parameters": [ - { - "$ref": "#/parameters/data_cocsn_routes-post" - } - ], - "responses": { - "201": { - "description": "container routes created" - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - } - }, - "delete": { - "security": [ - { - "basicAuth": [] - } - ], - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "delete" - ], - "operationId": "data_cocsn_routes_delete", - "responses": { - "204": { - "$ref": "#/responses/204" - } - } - }, - "patch": { - "security": [ - { - "basicAuth": [] - } - ], - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "patch" - ], - "operationId": "data_cocsn_routes_patch", - "parameters": [ - { - "$ref": "#/parameters/data_cocsn_routes" - } - ], - "responses": { - "204": { - "description": "container routes updated" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - } - } - }, - "/data/cocsn:routes/route": {}, - "/data/cocsn:routes/route={route-destination}": { - "get": { - "security": [ - { - "basicAuth": [] - } - ], - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "get" - ], - "operationId": "data_cocsn_routes_route_route_destination_get", - "parameters": [ - { - "$ref": "#/parameters/route-destination" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/data_cocsn_routes_route_route-destination" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - } - }, - "put": { - "security": [ - { - "basicAuth": [] - } - ], - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "put" - ], - "operationId": "data_cocsn_routes_route_route_destination_put", - "parameters": [ - { - "$ref": "#/parameters/route-destination" - }, - { - "$ref": "#/parameters/data_cocsn_routes_route_route-destination" - }, - { - "$ref": "#/parameters/insert" - }, - { - "$ref": "#/parameters/point" - } - ], - "responses": { - "201": { - "description": "list route created or replaced" - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - } - }, - "delete": { - "security": [ - { - "basicAuth": [] - } - ], - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "delete" - ], - "operationId": "data_cocsn_routes_route_route_destination_delete", - "parameters": [ - { - "$ref": "#/parameters/route-destination" - } - ], - "responses": { - "204": { - "$ref": "#/responses/204" - } - } - }, - "patch": { - "security": [ - { - "basicAuth": [] - } - ], - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "patch" - ], - "operationId": "data_cocsn_routes_route_route_destination_patch", - "parameters": [ - { - "$ref": "#/parameters/route-destination" - }, - { - "$ref": "#/parameters/data_cocsn_routes_route_route-destination" - } - ], - "responses": { - "204": { - "description": "list route updated" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - } - } - }, - "/data/cocsn:routes/route={route-destination}/destination": { - "get": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "Route destination. IP network", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "get" - ], - "summary": "Route destination. IP network", - "operationId": "data_cocsn_routes_route_route_destination_destination_get", - "parameters": [ - { - "$ref": "#/parameters/route-destination" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "Route destination. IP network", - "schema": { - "$ref": "#/definitions/data_cocsn_routes_route_route-destination_destination" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - } - }, - "put": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "Route destination. IP network", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "put" - ], - "summary": "Route destination. IP network", - "operationId": "data_cocsn_routes_route_route_destination_destination_put", - "parameters": [ - { - "$ref": "#/parameters/route-destination" - }, - { - "$ref": "#/parameters/data_cocsn_routes_route_route-destination_destination" - } - ], - "responses": { - "201": { - "description": "leaf destination created or replaced" - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - } - }, - "delete": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "Route destination. IP network", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "delete" - ], - "summary": "Route destination. IP network", - "operationId": "data_cocsn_routes_route_route_destination_destination_delete", - "parameters": [ - { - "$ref": "#/parameters/route-destination" - } - ], - "responses": { - "204": { - "$ref": "#/responses/204" - } - } - }, - "patch": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "Route destination. IP network", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "patch" - ], - "summary": "Route destination. IP network", - "operationId": "data_cocsn_routes_route_route_destination_destination_patch", - "parameters": [ - { - "$ref": "#/parameters/route-destination" - }, - { - "$ref": "#/parameters/data_cocsn_routes_route_route-destination_destination" - } - ], - "responses": { - "204": { - "description": "leaf destination updated" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - } - } - }, - "/data/cocsn:routes/route={route-destination}/expire": { - "get": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "Expiration timer of the route", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "get" - ], - "summary": "Expiration timer of the route", - "operationId": "data_cocsn_routes_route_route_destination_expire_get", - "parameters": [ - { - "$ref": "#/parameters/route-destination" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "Expiration timer of the route", - "schema": { - "$ref": "#/definitions/data_cocsn_routes_route_route-destination_expire" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - } - }, - "put": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "Expiration timer of the route", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "put" - ], - "summary": "Expiration timer of the route", - "operationId": "data_cocsn_routes_route_route_destination_expire_put", - "parameters": [ - { - "$ref": "#/parameters/route-destination" - }, - { - "$ref": "#/parameters/data_cocsn_routes_route_route-destination_expire" - } - ], - "responses": { - "201": { - "description": "leaf expire created or replaced" - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - } - }, - "delete": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "Expiration timer of the route", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "delete" - ], - "summary": "Expiration timer of the route", - "operationId": "data_cocsn_routes_route_route_destination_expire_delete", - "parameters": [ - { - "$ref": "#/parameters/route-destination" - } - ], - "responses": { - "204": { - "$ref": "#/responses/204" - } - } - }, - "patch": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "Expiration timer of the route", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "patch" - ], - "summary": "Expiration timer of the route", - "operationId": "data_cocsn_routes_route_route_destination_expire_patch", - "parameters": [ - { - "$ref": "#/parameters/route-destination" - }, - { - "$ref": "#/parameters/data_cocsn_routes_route_route-destination_expire" - } - ], - "responses": { - "204": { - "description": "leaf expire updated" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - } - } - }, - "/data/cocsn:routes/route={route-destination}/flags": { - "get": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "Flags of the route", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "get" - ], - "summary": "Flags of the route", - "operationId": "data_cocsn_routes_route_route_destination_flags_get", - "parameters": [ - { - "$ref": "#/parameters/route-destination" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "Flags of the route", - "schema": { - "$ref": "#/definitions/data_cocsn_routes_route_route-destination_flags" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - } - }, - "put": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "Flags of the route", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "put" - ], - "summary": "Flags of the route", - "operationId": "data_cocsn_routes_route_route_destination_flags_put", - "parameters": [ - { - "$ref": "#/parameters/route-destination" - }, - { - "$ref": "#/parameters/data_cocsn_routes_route_route-destination_flags" - } - ], - "responses": { - "201": { - "description": "leaf flags created or replaced" - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - } - }, - "delete": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "Flags of the route", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "delete" - ], - "summary": "Flags of the route", - "operationId": "data_cocsn_routes_route_route_destination_flags_delete", - "parameters": [ - { - "$ref": "#/parameters/route-destination" - } - ], - "responses": { - "204": { - "$ref": "#/responses/204" - } - } - }, - "patch": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "Flags of the route", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "patch" - ], - "summary": "Flags of the route", - "operationId": "data_cocsn_routes_route_route_destination_flags_patch", - "parameters": [ - { - "$ref": "#/parameters/route-destination" - }, - { - "$ref": "#/parameters/data_cocsn_routes_route_route-destination_flags" - } - ], - "responses": { - "204": { - "description": "leaf flags updated" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - } - } - }, - "/data/cocsn:routes/route={route-destination}/gateway": { - "get": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "Route gateway. IP address or host name", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "get" - ], - "summary": "Route gateway. IP address or host name", - "operationId": "data_cocsn_routes_route_route_destination_gateway_get", - "parameters": [ - { - "$ref": "#/parameters/route-destination" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "Route gateway. IP address or host name", - "schema": { - "$ref": "#/definitions/data_cocsn_routes_route_route-destination_gateway" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - } - }, - "put": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "Route gateway. IP address or host name", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "put" - ], - "summary": "Route gateway. IP address or host name", - "operationId": "data_cocsn_routes_route_route_destination_gateway_put", - "parameters": [ - { - "$ref": "#/parameters/route-destination" - }, - { - "$ref": "#/parameters/data_cocsn_routes_route_route-destination_gateway" - } - ], - "responses": { - "201": { - "description": "leaf gateway created or replaced" - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - } - }, - "delete": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "Route gateway. IP address or host name", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "delete" - ], - "summary": "Route gateway. IP address or host name", - "operationId": "data_cocsn_routes_route_route_destination_gateway_delete", - "parameters": [ - { - "$ref": "#/parameters/route-destination" - } - ], - "responses": { - "204": { - "$ref": "#/responses/204" - } - } - }, - "patch": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "Route gateway. IP address or host name", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "patch" - ], - "summary": "Route gateway. IP address or host name", - "operationId": "data_cocsn_routes_route_route_destination_gateway_patch", - "parameters": [ - { - "$ref": "#/parameters/route-destination" - }, - { - "$ref": "#/parameters/data_cocsn_routes_route_route-destination_gateway" - } - ], - "responses": { - "204": { - "description": "leaf gateway updated" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - } - } - }, - "/data/cocsn:routes/route={route-destination}/interface": { - "get": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "Interface used for the route", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "get" - ], - "summary": "Interface used for the route", - "operationId": "data_cocsn_routes_route_route_destination_interface_get", - "parameters": [ - { - "$ref": "#/parameters/route-destination" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "Interface used for the route", - "schema": { - "$ref": "#/definitions/data_cocsn_routes_route_route-destination_interface" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - } - }, - "put": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "Interface used for the route", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "put" - ], - "summary": "Interface used for the route", - "operationId": "data_cocsn_routes_route_route_destination_interface_put", - "parameters": [ - { - "$ref": "#/parameters/route-destination" - }, - { - "$ref": "#/parameters/data_cocsn_routes_route_route-destination_interface" - } - ], - "responses": { - "201": { - "description": "leaf interface created or replaced" - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - } - }, - "delete": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "Interface used for the route", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "delete" - ], - "summary": "Interface used for the route", - "operationId": "data_cocsn_routes_route_route_destination_interface_delete", - "parameters": [ - { - "$ref": "#/parameters/route-destination" - } - ], - "responses": { - "204": { - "$ref": "#/responses/204" - } - } - }, - "patch": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "Interface used for the route", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "patch" - ], - "summary": "Interface used for the route", - "operationId": "data_cocsn_routes_route_route_destination_interface_patch", - "parameters": [ - { - "$ref": "#/parameters/route-destination" - }, - { - "$ref": "#/parameters/data_cocsn_routes_route_route-destination_interface" - } - ], - "responses": { - "204": { - "description": "leaf interface updated" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - } - } - }, - "/operations": { - "get": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "This YANG module represents the CoCSN API", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "operations", - "get" - ], - "summary": "This YANG module represents the CoCSN API", - "operationId": "operations_get", - "responses": { - "200": { - "description": "This YANG module represents the CoCSN API", - "schema": { - "$ref": "#/definitions/operations" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - } - } - }, - "/yang-library-version": { - "get": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "This YANG module represents the CoCSN API", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "yang-library-version", - "get" - ], - "summary": "This YANG module represents the CoCSN API", - "operationId": "yang_library_version_get", - "responses": { - "200": { - "description": "This YANG module represents the CoCSN API", - "schema": { - "$ref": "#/definitions/yang-library-version" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - } - } - } - }, - "definitions": { - "data": { - "type": "object", - "properties": { - "ietf-restconf:data": { - "description": "This resource represents the combined configuration and state data resources that can be accessed by a client and cannot be created or deleted by the client. See RESTCONF RFC 8040 for further information.", - "type": "object", - "x-yang": { - "type": "datastore" - } - } - } - }, - "data-post": { - "type": "object", - "properties": { - "cocsn:interfaces": { - "description": "(non-presence)", - "type": "object", - "properties": { - "interface": { - "description": "(list)", - "type": "array", - "items": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "description": "Interface IP address. Example value: 10.10.10.1 (leaf-list)", - "type": "string", - "format": "string" - }, - "x-yang": { - "type": "leaf-list" - } - }, - "enabled": { - "description": "Enable or disable the interface. Example value: true (leaf)", - "type": "string", - "format": "boolean", - "x-yang": { - "type": "leaf" - } - }, - "name": { - "description": "Interface name. Example value: en0 (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "oper-status": { - "description": "Describes whether the interface is physically up or down (leaf)", - "type": "string", - "format": "enumeration", - "default": "up", - "enum": [ - "up", - "down" - ], - "x-yang": { - "type": "leaf" - } - }, - "phys-address": { - "description": "The interface's address at its protocol sub-layer. For\nexample, for an 802.x interface, this object normally\ncontains a Media Access Control (MAC) address. The\ninterface's media-specific modules must define the bit\nand byte ordering and the format of the value of this\nobject. For interfaces that do not have such an address\n(e.g., a serial line), this node is not present. (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - } - } - }, - "x-yang": { - "type": "list" - } - } - }, - "x-yang": { - "is_presence": "false", - "type": "container" - } - }, - "cocsn:routes": { - "description": "(non-presence)", - "type": "object", - "properties": { - "route": { - "description": "(list)", - "type": "array", - "items": { - "type": "object", - "properties": { - "destination": { - "description": "Route destination. IP network (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "expire": { - "description": "Expiration timer of the route (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "flags": { - "description": "Flags of the route (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "gateway": { - "description": "Route gateway. IP address or host name (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "interface": { - "description": "Interface used for the route (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - } - } - }, - "x-yang": { - "type": "list" - } - } - }, - "x-yang": { - "is_presence": "false", - "type": "container" - } - } - } - }, - "data-put-patch": { - "type": "object", - "properties": { - "ietf-restconf:data": { - "description": "This YANG module represents the CoCSN API", - "type": "object", - "properties": { - "cocsn:interfaces": { - "description": "(non-presence)", - "type": "object", - "properties": { - "interface": { - "description": "(list)", - "type": "array", - "items": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "description": "Interface IP address. Example value: 10.10.10.1 (leaf-list)", - "type": "string", - "format": "string" - }, - "x-yang": { - "type": "leaf-list" - } - }, - "enabled": { - "description": "Enable or disable the interface. Example value: true (leaf)", - "type": "string", - "format": "boolean", - "x-yang": { - "type": "leaf" - } - }, - "name": { - "description": "Interface name. Example value: en0 (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "oper-status": { - "description": "Describes whether the interface is physically up or down (leaf)", - "type": "string", - "format": "enumeration", - "default": "up", - "enum": [ - "up", - "down" - ], - "x-yang": { - "type": "leaf" - } - }, - "phys-address": { - "description": "The interface's address at its protocol sub-layer. For\nexample, for an 802.x interface, this object normally\ncontains a Media Access Control (MAC) address. The\ninterface's media-specific modules must define the bit\nand byte ordering and the format of the value of this\nobject. For interfaces that do not have such an address\n(e.g., a serial line), this node is not present. (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - } - } - }, - "x-yang": { - "type": "list" - } - } - }, - "x-yang": { - "is_presence": "false", - "type": "container" - } - }, - "cocsn:routes": { - "description": "(non-presence)", - "type": "object", - "properties": { - "route": { - "description": "(list)", - "type": "array", - "items": { - "type": "object", - "properties": { - "destination": { - "description": "Route destination. IP network (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "expire": { - "description": "Expiration timer of the route (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "flags": { - "description": "Flags of the route (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "gateway": { - "description": "Route gateway. IP address or host name (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "interface": { - "description": "Interface used for the route (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - } - } - }, - "x-yang": { - "type": "list" - } - } - }, - "x-yang": { - "is_presence": "false", - "type": "container" - } - } - }, - "x-yang": { - "type": "datastore" - } - } - } - }, - "data_cocsn_interfaces": { - "type": "object", - "properties": { - "cocsn:interfaces": { - "description": "(non-presence)", - "type": "object", - "properties": { - "interface": { - "description": "(list)", - "type": "array", - "items": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "description": "Interface IP address. Example value: 10.10.10.1 (leaf-list)", - "type": "string", - "format": "string" - }, - "x-yang": { - "type": "leaf-list" - } - }, - "enabled": { - "description": "Enable or disable the interface. Example value: true (leaf)", - "type": "string", - "format": "boolean", - "x-yang": { - "type": "leaf" - } - }, - "name": { - "description": "Interface name. Example value: en0 (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "oper-status": { - "description": "Describes whether the interface is physically up or down (leaf)", - "type": "string", - "format": "enumeration", - "default": "up", - "enum": [ - "up", - "down" - ], - "x-yang": { - "type": "leaf" - } - }, - "phys-address": { - "description": "The interface's address at its protocol sub-layer. For\nexample, for an 802.x interface, this object normally\ncontains a Media Access Control (MAC) address. The\ninterface's media-specific modules must define the bit\nand byte ordering and the format of the value of this\nobject. For interfaces that do not have such an address\n(e.g., a serial line), this node is not present. (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - } - } - }, - "x-yang": { - "type": "list" - } - } - }, - "x-yang": { - "is_presence": "false", - "type": "container" - } - } - } - }, - "data_cocsn_interfaces-post": { - "type": "object", - "properties": { - "cocsn:interface": { - "description": "(list)", - "type": "array", - "items": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "description": "Interface IP address. Example value: 10.10.10.1 (leaf-list)", - "type": "string", - "format": "string" - }, - "x-yang": { - "type": "leaf-list" - } - }, - "enabled": { - "description": "Enable or disable the interface. Example value: true (leaf)", - "type": "string", - "format": "boolean", - "x-yang": { - "type": "leaf" - } - }, - "name": { - "description": "Interface name. Example value: en0 (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "oper-status": { - "description": "Describes whether the interface is physically up or down (leaf)", - "type": "string", - "format": "enumeration", - "default": "up", - "enum": [ - "up", - "down" - ], - "x-yang": { - "type": "leaf" - } - }, - "phys-address": { - "description": "The interface's address at its protocol sub-layer. For\nexample, for an 802.x interface, this object normally\ncontains a Media Access Control (MAC) address. The\ninterface's media-specific modules must define the bit\nand byte ordering and the format of the value of this\nobject. For interfaces that do not have such an address\n(e.g., a serial line), this node is not present. (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - } - } - }, - "x-yang": { - "type": "list" - } - } - } - }, - "data_cocsn_interfaces_interface_interface-name": { - "type": "object", - "properties": { - "cocsn:interface": { - "description": "(list)", - "type": "array", - "items": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "description": "Interface IP address. Example value: 10.10.10.1 (leaf-list)", - "type": "string", - "format": "string" - }, - "x-yang": { - "type": "leaf-list" - } - }, - "enabled": { - "description": "Enable or disable the interface. Example value: true (leaf)", - "type": "string", - "format": "boolean", - "x-yang": { - "type": "leaf" - } - }, - "name": { - "description": "Interface name. Example value: en0 (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "oper-status": { - "description": "Describes whether the interface is physically up or down (leaf)", - "type": "string", - "format": "enumeration", - "default": "up", - "enum": [ - "up", - "down" - ], - "x-yang": { - "type": "leaf" - } - }, - "phys-address": { - "description": "The interface's address at its protocol sub-layer. For\nexample, for an 802.x interface, this object normally\ncontains a Media Access Control (MAC) address. The\ninterface's media-specific modules must define the bit\nand byte ordering and the format of the value of this\nobject. For interfaces that do not have such an address\n(e.g., a serial line), this node is not present. (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - } - } - }, - "x-yang": { - "type": "list" - } - } - } - }, - "data_cocsn_interfaces_interface_interface-name_addresses_addresses-id": { - "type": "object", - "properties": { - "cocsn:addresses": { - "type": "array", - "items": { - "description": "Interface IP address. Example value: 10.10.10.1 (leaf-list)", - "type": "string", - "format": "string" - }, - "x-yang": { - "type": "leaf-list" - } - } - } - }, - "data_cocsn_interfaces_interface_interface-name_enabled": { - "type": "object", - "properties": { - "cocsn:enabled": { - "description": "Enable or disable the interface. Example value: true (leaf)", - "type": "string", - "format": "boolean", - "x-yang": { - "type": "leaf" - } - } - } - }, - "data_cocsn_interfaces_interface_interface-name_name": { - "type": "object", - "properties": { - "cocsn:name": { - "description": "Interface name. Example value: en0 (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - } - } - }, - "data_cocsn_interfaces_interface_interface-name_oper-status": { - "type": "object", - "properties": { - "cocsn:oper-status": { - "description": "Describes whether the interface is physically up or down (leaf)", - "type": "string", - "format": "enumeration", - "default": "up", - "enum": [ - "up", - "down" - ], - "x-yang": { - "type": "leaf" - } - } - } - }, - "data_cocsn_interfaces_interface_interface-name_phys-address": { - "type": "object", - "properties": { - "cocsn:phys-address": { - "description": "The interface's address at its protocol sub-layer. For\nexample, for an 802.x interface, this object normally\ncontains a Media Access Control (MAC) address. The\ninterface's media-specific modules must define the bit\nand byte ordering and the format of the value of this\nobject. For interfaces that do not have such an address\n(e.g., a serial line), this node is not present. (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - } - } - }, - "data_cocsn_routes": { - "type": "object", - "properties": { - "cocsn:routes": { - "description": "(non-presence)", - "type": "object", - "properties": { - "route": { - "description": "(list)", - "type": "array", - "items": { - "type": "object", - "properties": { - "destination": { - "description": "Route destination. IP network (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "expire": { - "description": "Expiration timer of the route (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "flags": { - "description": "Flags of the route (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "gateway": { - "description": "Route gateway. IP address or host name (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "interface": { - "description": "Interface used for the route (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - } - } - }, - "x-yang": { - "type": "list" - } - } - }, - "x-yang": { - "is_presence": "false", - "type": "container" - } - } - } - }, - "data_cocsn_routes-post": { - "type": "object", - "properties": { - "cocsn:route": { - "description": "(list)", - "type": "array", - "items": { - "type": "object", - "properties": { - "destination": { - "description": "Route destination. IP network (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "expire": { - "description": "Expiration timer of the route (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "flags": { - "description": "Flags of the route (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "gateway": { - "description": "Route gateway. IP address or host name (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "interface": { - "description": "Interface used for the route (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - } - } - }, - "x-yang": { - "type": "list" - } - } - } - }, - "data_cocsn_routes_route_route-destination": { - "type": "object", - "properties": { - "cocsn:route": { - "description": "(list)", - "type": "array", - "items": { - "type": "object", - "properties": { - "destination": { - "description": "Route destination. IP network (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "expire": { - "description": "Expiration timer of the route (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "flags": { - "description": "Flags of the route (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "gateway": { - "description": "Route gateway. IP address or host name (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "interface": { - "description": "Interface used for the route (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - } - } - }, - "x-yang": { - "type": "list" - } - } - } - }, - "data_cocsn_routes_route_route-destination_destination": { - "type": "object", - "properties": { - "cocsn:destination": { - "description": "Route destination. IP network (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - } - } - }, - "data_cocsn_routes_route_route-destination_expire": { - "type": "object", - "properties": { - "cocsn:expire": { - "description": "Expiration timer of the route (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - } - } - }, - "data_cocsn_routes_route_route-destination_flags": { - "type": "object", - "properties": { - "cocsn:flags": { - "description": "Flags of the route (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - } - } - }, - "data_cocsn_routes_route_route-destination_gateway": { - "type": "object", - "properties": { - "cocsn:gateway": { - "description": "Route gateway. IP address or host name (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - } - } - }, - "data_cocsn_routes_route_route-destination_interface": { - "type": "object", - "properties": { - "cocsn:interface": { - "description": "Interface used for the route (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - } - } - }, - "operations": { - "type": "object", - "properties": { - "ietf-restconf:operations": { - "description": "This resource is a container that provides access to the data-model-specific RPC operations supported by the server. See RESTCONF RFC 8040 for further information.", - "type": "object", - "x-yang": { - "type": "operations" - } - } - } - }, - "root": { - "type": "object", - "properties": { - "ietf-restconf:restconf": { - "description": "This is the RESTCONF root resource for the RESTCONF datastore and operation resources. See RESTCONF RFC 8040 for further information.", - "type": "object", - "properties": { - "data": { - "type": "object" - }, - "operations": { - "type": "object" - }, - "yang-library-version": { - "type": "string" - } - }, - "x-yang": { - "type": "root" - } - } - } - }, - "yang-library-version": { - "type": "object", - "properties": { - "ietf-restconf:yang-library-version": { - "description": "This leaf identifies the revision date of the 'ietf-yang-library' YANG module that is implemented by this server. See RESTCONF RFC 8040 for further information.", - "type": "object", - "x-yang": { - "type": "leaf" - } - } - } - } - }, - "parameters": { - "addresses-id": { - "type": "string", - "format": "string", - "description": "Interface IP address. Example value: 10.10.10.1", - "name": "addresses-id", - "in": "path", - "required": true - }, - "content": { - "enum": [ - "config", - "nonconfig", - "all" - ], - "type": "string", - "format": "enumeration", - "default": "config", - "description": "controlling descendant nodes in response", - "name": "content", - "in": "query" - }, - "data-post": { - "description": "This YANG module represents the CoCSN API", - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/data-post" - } - }, - "data-put-patch": { - "description": "This YANG module represents the CoCSN API", - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/data-put-patch" - } - }, - "data_cocsn_interfaces": { - "name": "interfaces", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/data_cocsn_interfaces" - } - }, - "data_cocsn_interfaces-post": { - "name": "interfaces", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/data_cocsn_interfaces-post" - } - }, - "data_cocsn_interfaces_interface_interface-name": { - "name": "interface", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name" - } - }, - "data_cocsn_interfaces_interface_interface-name_addresses_addresses-id": { - "description": "Interface IP address. Example value: 10.10.10.1", - "name": "addresses", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_addresses_addresses-id" - } - }, - "data_cocsn_interfaces_interface_interface-name_enabled": { - "description": "Enable or disable the interface. Example value: true", - "name": "enabled", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_enabled" - } - }, - "data_cocsn_interfaces_interface_interface-name_oper-status": { - "description": "Describes whether the interface is physically up or down", - "name": "oper-status", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_oper-status" - } - }, - "data_cocsn_routes": { - "name": "routes", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/data_cocsn_routes" - } - }, - "data_cocsn_routes-post": { - "name": "routes", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/data_cocsn_routes-post" - } - }, - "data_cocsn_routes_route_route-destination": { - "name": "route", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/data_cocsn_routes_route_route-destination" - } - }, - "data_cocsn_routes_route_route-destination_destination": { - "description": "Route destination. IP network", - "name": "destination", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/data_cocsn_routes_route_route-destination_destination" - } - }, - "data_cocsn_routes_route_route-destination_expire": { - "description": "Expiration timer of the route", - "name": "expire", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/data_cocsn_routes_route_route-destination_expire" - } - }, - "data_cocsn_routes_route_route-destination_flags": { - "description": "Flags of the route", - "name": "flags", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/data_cocsn_routes_route_route-destination_flags" - } - }, - "data_cocsn_routes_route_route-destination_gateway": { - "description": "Route gateway. IP address or host name", - "name": "gateway", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/data_cocsn_routes_route_route-destination_gateway" - } - }, - "data_cocsn_routes_route_route-destination_interface": { - "description": "Interface used for the route", - "name": "interface", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/data_cocsn_routes_route_route-destination_interface" - } - }, - "depth": { - "type": "integer", - "format": "uint16", - "description": "limit the depth of nodes in response", - "name": "depth", - "in": "query" - }, - "fields": { - "type": "string", - "format": "string", - "description": "optionally identify specific data nodes in response", - "name": "fields", - "in": "query" - }, - "filter": { - "type": "string", - "format": "string", - "description": "xpath expression to filter data nodes in response", - "name": "filter", - "in": "query" - }, - "insert": { - "enum": [ - "first", - "last", - "before", - "after" - ], - "type": "string", - "format": "enumeration", - "default": "first", - "description": "controlling the order when adding new list elements", - "name": "insert", - "in": "query" - }, - "interface-name": { - "type": "string", - "format": "string", - "description": "Interface name. Example value: en0", - "name": "interface-name", - "in": "path", - "required": true - }, - "point": { - "type": "string", - "format": "string", - "description": "used to specify the insertion point", - "name": "point", - "in": "query" - }, - "route-destination": { - "type": "string", - "format": "string", - "description": "Route destination. IP network", - "name": "route-destination", - "in": "path", - "required": true - }, - "with-defaults": { - "enum": [ - "report-all", - "trim", - "explicit", - "report-all-tagged" - ], - "type": "string", - "format": "enumeration", - "default": "report-all", - "description": "controlling default values in response", - "name": "with-defaults", - "in": "query" - } - }, - "responses": { - "200": { - "description": "OK" - }, - "201": { - "description": "Created" - }, - "204": { - "description": "No Content" - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" - }, - "409": { - "description": "Conflict" - } - }, - "securityDefinitions": { - "basicAuth": { - "type": "basic" - } - }, - "tags": [ - { - "description": "root resources", - "name": "root" - }, - { - "description": "operations resources", - "name": "operations" - }, - { - "description": "data resources", - "name": "data" - }, - { - "description": "get resources", - "name": "get" - }, - { - "description": "post resources", - "name": "post" - }, - { - "description": "patch resources", - "name": "patch" - }, - { - "description": "put resources", - "name": "put" - }, - { - "description": "delete resources", - "name": "delete" - } - ] -}`)) - FlatSwaggerJSON = json.RawMessage([]byte(`{ - "consumes": [ - "application/yang-data+json" - ], - "produces": [ - "application/yang-data+json" - ], - "schemes": [ - "http", - "https" - ], - "swagger": "2.0", - "info": { - "description": "This YANG module represents the CoCSN API", - "title": "cocsn", - "version": "2020-08-17" - }, - "basePath": "/restconf", - "paths": { - "/": { - "get": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "This YANG module represents the CoCSN API", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "root", - "get" - ], - "summary": "This YANG module represents the CoCSN API", - "operationId": "root_get", - "responses": { - "200": { - "description": "This YANG module represents the CoCSN API", - "schema": { - "$ref": "#/definitions/root" - } - }, - "204": { - "description": "No Content" - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" - }, - "409": { - "description": "Conflict" - } - } - } - }, - "/data": { - "get": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "This YANG module represents the CoCSN API", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "get" - ], - "summary": "This YANG module represents the CoCSN API", - "operationId": "data_get", - "responses": { - "200": { - "description": "This YANG module represents the CoCSN API", - "schema": { - "$ref": "#/definitions/data" - } - }, - "204": { - "description": "No Content" - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" - }, - "409": { - "description": "Conflict" - } - } - }, - "put": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "This YANG module represents the CoCSN API", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "put" - ], - "summary": "This YANG module represents the CoCSN API", - "operationId": "data_put", - "parameters": [ - { - "description": "This YANG module represents the CoCSN API", - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/data-put-patch" - } - } - ], - "responses": { - "201": { - "description": "This YANG module represents the CoCSN API" - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" - }, - "409": { - "description": "Conflict" - } - } - }, - "post": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "This YANG module represents the CoCSN API", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "post" - ], - "summary": "This YANG module represents the CoCSN API", - "operationId": "data_post", - "parameters": [ - { - "description": "This YANG module represents the CoCSN API", - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/data-post" - } - } - ], - "responses": { - "201": { - "description": "This YANG module represents the CoCSN API" - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" - }, - "409": { - "description": "Conflict" - } - } - }, - "patch": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "This YANG module represents the CoCSN API", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "patch" - ], - "summary": "This YANG module represents the CoCSN API", - "operationId": "data_patch", - "parameters": [ - { - "description": "This YANG module represents the CoCSN API", - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/data-put-patch" - } - } - ], - "responses": { - "204": { - "description": "This YANG module represents the CoCSN API" - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" - }, - "409": { - "description": "Conflict" - } - } - } - }, - "/data/cocsn:interfaces": { - "get": { - "security": [ - { - "basicAuth": [] - } - ], - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "get" - ], - "operationId": "data_cocsn_interfaces_get", - "parameters": [ - { - "enum": [ - "config", - "nonconfig", - "all" - ], - "type": "string", - "format": "enumeration", - "default": "config", - "description": "controlling descendant nodes in response", - "name": "content", - "in": "query" - }, - { - "type": "integer", - "format": "uint16", - "description": "limit the depth of nodes in response", - "name": "depth", - "in": "query" - }, - { - "type": "string", - "format": "string", - "description": "optionally identify specific data nodes in response", - "name": "fields", - "in": "query" - }, - { - "type": "string", - "format": "string", - "description": "xpath expression to filter data nodes in response", - "name": "filter", - "in": "query" - }, - { - "enum": [ - "report-all", - "trim", - "explicit", - "report-all-tagged" - ], - "type": "string", - "format": "enumeration", - "default": "report-all", - "description": "controlling default values in response", - "name": "with-defaults", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/data_cocsn_interfaces" - } - }, - "204": { - "description": "No Content" - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" - }, - "409": { - "description": "Conflict" - } - } - }, - "put": { - "security": [ - { - "basicAuth": [] - } - ], - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "put" - ], - "operationId": "data_cocsn_interfaces_put", - "parameters": [ - { - "name": "interfaces", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/data_cocsn_interfaces" - } - } - ], - "responses": { - "201": { - "description": "container interfaces created or replaced" - }, - "204": { - "description": "No Content" - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" - }, - "409": { - "description": "Conflict" - } - } - }, - "post": { - "security": [ - { - "basicAuth": [] - } - ], - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "post" - ], - "operationId": "data_cocsn_interfaces_post", - "parameters": [ - { - "name": "interfaces", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/data_cocsn_interfaces-post" - } - } - ], - "responses": { - "201": { - "description": "container interfaces created" - }, - "204": { - "description": "No Content" - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" - }, - "409": { - "description": "Conflict" - } - } - }, - "delete": { - "security": [ - { - "basicAuth": [] - } - ], - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "delete" - ], - "operationId": "data_cocsn_interfaces_delete", - "responses": { - "204": { - "description": "No Content" - } - } - }, - "patch": { - "security": [ - { - "basicAuth": [] - } - ], - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "patch" - ], - "operationId": "data_cocsn_interfaces_patch", - "parameters": [ - { - "name": "interfaces", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/data_cocsn_interfaces" - } - } - ], - "responses": { - "204": { - "description": "container interfaces updated" - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" - }, - "409": { - "description": "Conflict" - } - } - } - }, - "/data/cocsn:interfaces/interface": {}, - "/data/cocsn:interfaces/interface={interface-name}": { - "get": { - "security": [ - { - "basicAuth": [] - } - ], - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "get" - ], - "operationId": "data_cocsn_interfaces_interface_interface_name_get", - "parameters": [ - { - "type": "string", - "format": "string", - "description": "Interface name. Example value: en0", - "name": "interface-name", - "in": "path", - "required": true - }, - { - "enum": [ - "config", - "nonconfig", - "all" - ], - "type": "string", - "format": "enumeration", - "default": "config", - "description": "controlling descendant nodes in response", - "name": "content", - "in": "query" - }, - { - "type": "integer", - "format": "uint16", - "description": "limit the depth of nodes in response", - "name": "depth", - "in": "query" - }, - { - "type": "string", - "format": "string", - "description": "optionally identify specific data nodes in response", - "name": "fields", - "in": "query" - }, - { - "type": "string", - "format": "string", - "description": "xpath expression to filter data nodes in response", - "name": "filter", - "in": "query" - }, - { - "enum": [ - "report-all", - "trim", - "explicit", - "report-all-tagged" - ], - "type": "string", - "format": "enumeration", - "default": "report-all", - "description": "controlling default values in response", - "name": "with-defaults", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name" - } - }, - "204": { - "description": "No Content" - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" - }, - "409": { - "description": "Conflict" - } - } - }, - "put": { - "security": [ - { - "basicAuth": [] - } - ], - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "put" - ], - "operationId": "data_cocsn_interfaces_interface_interface_name_put", - "parameters": [ - { - "type": "string", - "format": "string", - "description": "Interface name. Example value: en0", - "name": "interface-name", - "in": "path", - "required": true - }, - { - "name": "interface", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name" - } - }, - { - "enum": [ - "first", - "last", - "before", - "after" - ], - "type": "string", - "format": "enumeration", - "default": "first", - "description": "controlling the order when adding new list elements", - "name": "insert", - "in": "query" - }, - { - "type": "string", - "format": "string", - "description": "used to specify the insertion point", - "name": "point", - "in": "query" - } - ], - "responses": { - "201": { - "description": "list interface created or replaced" - }, - "204": { - "description": "No Content" - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" - }, - "409": { - "description": "Conflict" - } - } - }, - "delete": { - "security": [ - { - "basicAuth": [] - } - ], - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "delete" - ], - "operationId": "data_cocsn_interfaces_interface_interface_name_delete", - "parameters": [ - { - "type": "string", - "format": "string", - "description": "Interface name. Example value: en0", - "name": "interface-name", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "description": "No Content" - } - } - }, - "patch": { - "security": [ - { - "basicAuth": [] - } - ], - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "patch" - ], - "operationId": "data_cocsn_interfaces_interface_interface_name_patch", - "parameters": [ - { - "type": "string", - "format": "string", - "description": "Interface name. Example value: en0", - "name": "interface-name", - "in": "path", - "required": true - }, - { - "name": "interface", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name" - } - } - ], - "responses": { - "204": { - "description": "list interface updated" - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" - }, - "409": { - "description": "Conflict" - } - } - } - }, - "/data/cocsn:interfaces/interface={interface-name}/addresses": {}, - "/data/cocsn:interfaces/interface={interface-name}/addresses={addresses-id}": { - "get": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "Interface IP address. Example value: 10.10.10.1", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "get" - ], - "summary": "Interface IP address. Example value: 10.10.10.1", - "operationId": "data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_get", - "parameters": [ - { - "type": "string", - "format": "string", - "description": "Interface name. Example value: en0", - "name": "interface-name", - "in": "path", - "required": true - }, - { - "type": "string", - "format": "string", - "description": "Interface IP address. Example value: 10.10.10.1", - "name": "addresses-id", - "in": "path", - "required": true - }, - { - "enum": [ - "config", - "nonconfig", - "all" - ], - "type": "string", - "format": "enumeration", - "default": "config", - "description": "controlling descendant nodes in response", - "name": "content", - "in": "query" - }, - { - "type": "integer", - "format": "uint16", - "description": "limit the depth of nodes in response", - "name": "depth", - "in": "query" - }, - { - "type": "string", - "format": "string", - "description": "optionally identify specific data nodes in response", - "name": "fields", - "in": "query" - }, - { - "type": "string", - "format": "string", - "description": "xpath expression to filter data nodes in response", - "name": "filter", - "in": "query" - }, - { - "enum": [ - "report-all", - "trim", - "explicit", - "report-all-tagged" - ], - "type": "string", - "format": "enumeration", - "default": "report-all", - "description": "controlling default values in response", - "name": "with-defaults", - "in": "query" - } - ], - "responses": { - "200": { - "description": "Interface IP address. Example value: 10.10.10.1", - "schema": { - "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_addresses_addresses-id" - } - }, - "204": { - "description": "No Content" - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" - }, - "409": { - "description": "Conflict" - } - } - }, - "put": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "Interface IP address. Example value: 10.10.10.1", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "put" - ], - "summary": "Interface IP address. Example value: 10.10.10.1", - "operationId": "data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_put", - "parameters": [ - { - "type": "string", - "format": "string", - "description": "Interface name. Example value: en0", - "name": "interface-name", - "in": "path", - "required": true - }, - { - "type": "string", - "format": "string", - "description": "Interface IP address. Example value: 10.10.10.1", - "name": "addresses-id", - "in": "path", - "required": true - }, - { - "description": "Interface IP address. Example value: 10.10.10.1", - "name": "addresses", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_addresses_addresses-id" - } - }, - { - "enum": [ - "first", - "last", - "before", - "after" - ], - "type": "string", - "format": "enumeration", - "default": "first", - "description": "controlling the order when adding new list elements", - "name": "insert", - "in": "query" - }, - { - "type": "string", - "format": "string", - "description": "used to specify the insertion point", - "name": "point", - "in": "query" - } - ], - "responses": { - "201": { - "description": "leaf-list addresses created or replaced" - }, - "204": { - "description": "No Content" - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" - }, - "409": { - "description": "Conflict" - } - } - }, - "delete": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "Interface IP address. Example value: 10.10.10.1", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "delete" - ], - "summary": "Interface IP address. Example value: 10.10.10.1", - "operationId": "data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_delete", - "parameters": [ - { - "type": "string", - "format": "string", - "description": "Interface name. Example value: en0", - "name": "interface-name", - "in": "path", - "required": true - }, - { - "type": "string", - "format": "string", - "description": "Interface IP address. Example value: 10.10.10.1", - "name": "addresses-id", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "description": "No Content" - } - } - }, - "patch": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "Interface IP address. Example value: 10.10.10.1", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "patch" - ], - "summary": "Interface IP address. Example value: 10.10.10.1", - "operationId": "data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_patch", - "parameters": [ - { - "type": "string", - "format": "string", - "description": "Interface name. Example value: en0", - "name": "interface-name", - "in": "path", - "required": true - }, - { - "type": "string", - "format": "string", - "description": "Interface IP address. Example value: 10.10.10.1", - "name": "addresses-id", - "in": "path", - "required": true - }, - { - "description": "Interface IP address. Example value: 10.10.10.1", - "name": "addresses", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_addresses_addresses-id" - } - } - ], - "responses": { - "204": { - "description": "leaf-list addresses updated" - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" - }, - "409": { - "description": "Conflict" - } - } - } - }, - "/data/cocsn:interfaces/interface={interface-name}/enabled": { - "get": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "Enable or disable the interface. Example value: true", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "get" - ], - "summary": "Enable or disable the interface. Example value: true", - "operationId": "data_cocsn_interfaces_interface_interface_name_enabled_get", - "parameters": [ - { - "type": "string", - "format": "string", - "description": "Interface name. Example value: en0", - "name": "interface-name", - "in": "path", - "required": true - }, - { - "enum": [ - "config", - "nonconfig", - "all" - ], - "type": "string", - "format": "enumeration", - "default": "config", - "description": "controlling descendant nodes in response", - "name": "content", - "in": "query" - }, - { - "type": "integer", - "format": "uint16", - "description": "limit the depth of nodes in response", - "name": "depth", - "in": "query" - }, - { - "type": "string", - "format": "string", - "description": "optionally identify specific data nodes in response", - "name": "fields", - "in": "query" - }, - { - "type": "string", - "format": "string", - "description": "xpath expression to filter data nodes in response", - "name": "filter", - "in": "query" - }, - { - "enum": [ - "report-all", - "trim", - "explicit", - "report-all-tagged" - ], - "type": "string", - "format": "enumeration", - "default": "report-all", - "description": "controlling default values in response", - "name": "with-defaults", - "in": "query" - } - ], - "responses": { - "200": { - "description": "Enable or disable the interface. Example value: true", - "schema": { - "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_enabled" - } - }, - "204": { - "description": "No Content" - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" - }, - "409": { - "description": "Conflict" - } - } - }, - "put": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "Enable or disable the interface. Example value: true", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "put" - ], - "summary": "Enable or disable the interface. Example value: true", - "operationId": "data_cocsn_interfaces_interface_interface_name_enabled_put", - "parameters": [ - { - "type": "string", - "format": "string", - "description": "Interface name. Example value: en0", - "name": "interface-name", - "in": "path", - "required": true - }, - { - "description": "Enable or disable the interface. Example value: true", - "name": "enabled", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_enabled" - } - } - ], - "responses": { - "201": { - "description": "leaf enabled created or replaced" - }, - "204": { - "description": "No Content" - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" - }, - "409": { - "description": "Conflict" - } - } - }, - "delete": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "Enable or disable the interface. Example value: true", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "delete" - ], - "summary": "Enable or disable the interface. Example value: true", - "operationId": "data_cocsn_interfaces_interface_interface_name_enabled_delete", - "parameters": [ - { - "type": "string", - "format": "string", - "description": "Interface name. Example value: en0", - "name": "interface-name", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "description": "No Content" - } - } - }, - "patch": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "Enable or disable the interface. Example value: true", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "patch" - ], - "summary": "Enable or disable the interface. Example value: true", - "operationId": "data_cocsn_interfaces_interface_interface_name_enabled_patch", - "parameters": [ - { - "type": "string", - "format": "string", - "description": "Interface name. Example value: en0", - "name": "interface-name", - "in": "path", - "required": true - }, - { - "description": "Enable or disable the interface. Example value: true", - "name": "enabled", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_enabled" - } - } - ], - "responses": { - "204": { - "description": "leaf enabled updated" - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" - }, - "409": { - "description": "Conflict" - } - } - } - }, - "/data/cocsn:interfaces/interface={interface-name}/name": { - "get": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "Interface name. Example value: en0", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "get" - ], - "summary": "Interface name. Example value: en0", - "operationId": "data_cocsn_interfaces_interface_interface_name_name_get", - "parameters": [ - { - "type": "string", - "format": "string", - "description": "Interface name. Example value: en0", - "name": "interface-name", - "in": "path", - "required": true - }, - { - "enum": [ - "config", - "nonconfig", - "all" - ], - "type": "string", - "format": "enumeration", - "default": "config", - "description": "controlling descendant nodes in response", - "name": "content", - "in": "query" - }, - { - "type": "integer", - "format": "uint16", - "description": "limit the depth of nodes in response", - "name": "depth", - "in": "query" - }, - { - "type": "string", - "format": "string", - "description": "optionally identify specific data nodes in response", - "name": "fields", - "in": "query" - }, - { - "type": "string", - "format": "string", - "description": "xpath expression to filter data nodes in response", - "name": "filter", - "in": "query" - }, - { - "enum": [ - "report-all", - "trim", - "explicit", - "report-all-tagged" - ], - "type": "string", - "format": "enumeration", - "default": "report-all", - "description": "controlling default values in response", - "name": "with-defaults", - "in": "query" - } - ], - "responses": { - "200": { - "description": "Interface name. Example value: en0", - "schema": { - "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_name" - } - }, - "204": { - "description": "No Content" - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" - }, - "409": { - "description": "Conflict" - } - } - } - }, - "/data/cocsn:interfaces/interface={interface-name}/oper-status": { - "get": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "Describes whether the interface is physically up or down", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "get" - ], - "summary": "Describes whether the interface is physically up or down", - "operationId": "data_cocsn_interfaces_interface_interface_name_oper_status_get", - "parameters": [ - { - "type": "string", - "format": "string", - "description": "Interface name. Example value: en0", - "name": "interface-name", - "in": "path", - "required": true - }, - { - "enum": [ - "config", - "nonconfig", - "all" - ], - "type": "string", - "format": "enumeration", - "default": "config", - "description": "controlling descendant nodes in response", - "name": "content", - "in": "query" - }, - { - "type": "integer", - "format": "uint16", - "description": "limit the depth of nodes in response", - "name": "depth", - "in": "query" - }, - { - "type": "string", - "format": "string", - "description": "optionally identify specific data nodes in response", - "name": "fields", - "in": "query" - }, - { - "type": "string", - "format": "string", - "description": "xpath expression to filter data nodes in response", - "name": "filter", - "in": "query" - }, - { - "enum": [ - "report-all", - "trim", - "explicit", - "report-all-tagged" - ], - "type": "string", - "format": "enumeration", - "default": "report-all", - "description": "controlling default values in response", - "name": "with-defaults", - "in": "query" - } - ], - "responses": { - "200": { - "description": "Describes whether the interface is physically up or down", - "schema": { - "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_oper-status" - } - }, - "204": { - "description": "No Content" - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" - }, - "409": { - "description": "Conflict" - } - } - }, - "put": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "Describes whether the interface is physically up or down", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "put" - ], - "summary": "Describes whether the interface is physically up or down", - "operationId": "data_cocsn_interfaces_interface_interface_name_oper_status_put", - "parameters": [ - { - "type": "string", - "format": "string", - "description": "Interface name. Example value: en0", - "name": "interface-name", - "in": "path", - "required": true - }, - { - "description": "Describes whether the interface is physically up or down", - "name": "oper-status", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_oper-status" - } - } - ], - "responses": { - "201": { - "description": "leaf oper-status created or replaced" - }, - "204": { - "description": "No Content" - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" - }, - "409": { - "description": "Conflict" - } - } - }, - "delete": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "Describes whether the interface is physically up or down", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "delete" - ], - "summary": "Describes whether the interface is physically up or down", - "operationId": "data_cocsn_interfaces_interface_interface_name_oper_status_delete", - "parameters": [ - { - "type": "string", - "format": "string", - "description": "Interface name. Example value: en0", - "name": "interface-name", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "description": "No Content" - } - } - }, - "patch": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "Describes whether the interface is physically up or down", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "patch" - ], - "summary": "Describes whether the interface is physically up or down", - "operationId": "data_cocsn_interfaces_interface_interface_name_oper_status_patch", - "parameters": [ - { - "type": "string", - "format": "string", - "description": "Interface name. Example value: en0", - "name": "interface-name", - "in": "path", - "required": true - }, - { - "description": "Describes whether the interface is physically up or down", - "name": "oper-status", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_oper-status" - } - } - ], - "responses": { - "204": { - "description": "leaf oper-status updated" - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" - }, - "409": { - "description": "Conflict" - } - } - } - }, - "/data/cocsn:interfaces/interface={interface-name}/phys-address": { - "get": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "The interface's address at its protocol sub-layer. For\nexample, for an 802.x interface, this object normally\ncontains a Media Access Control (MAC) address. The\ninterface's media-specific modules must define the bit\nand byte ordering and the format of the value of this\nobject. For interfaces that do not have such an address\n(e.g., a serial line), this node is not present.", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "get" - ], - "summary": "The interface's address at its protocol sub-layer. For\nexample, for an 802.x interface, this object normally\ncontains a Media Access Control (MAC) address. The\ninterface's media-specific modules must define the bit\nand byte ordering and the format of the value of this\nobject. For interfaces that do not have such an address\n(e.g., a serial line), this node is not present.", - "operationId": "data_cocsn_interfaces_interface_interface_name_phys_address_get", - "parameters": [ - { - "type": "string", - "format": "string", - "description": "Interface name. Example value: en0", - "name": "interface-name", - "in": "path", - "required": true - }, - { - "enum": [ - "config", - "nonconfig", - "all" - ], - "type": "string", - "format": "enumeration", - "default": "config", - "description": "controlling descendant nodes in response", - "name": "content", - "in": "query" - }, - { - "type": "integer", - "format": "uint16", - "description": "limit the depth of nodes in response", - "name": "depth", - "in": "query" - }, - { - "type": "string", - "format": "string", - "description": "optionally identify specific data nodes in response", - "name": "fields", - "in": "query" - }, - { - "type": "string", - "format": "string", - "description": "xpath expression to filter data nodes in response", - "name": "filter", - "in": "query" - }, - { - "enum": [ - "report-all", - "trim", - "explicit", - "report-all-tagged" - ], - "type": "string", - "format": "enumeration", - "default": "report-all", - "description": "controlling default values in response", - "name": "with-defaults", - "in": "query" - } - ], - "responses": { - "200": { - "description": "The interface's address at its protocol sub-layer. For\nexample, for an 802.x interface, this object normally\ncontains a Media Access Control (MAC) address. The\ninterface's media-specific modules must define the bit\nand byte ordering and the format of the value of this\nobject. For interfaces that do not have such an address\n(e.g., a serial line), this node is not present.", - "schema": { - "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_phys-address" - } - }, - "204": { - "description": "No Content" - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" - }, - "409": { - "description": "Conflict" - } - } - } - }, - "/data/cocsn:routes": { - "get": { - "security": [ - { - "basicAuth": [] - } - ], - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "get" - ], - "operationId": "data_cocsn_routes_get", - "parameters": [ - { - "enum": [ - "config", - "nonconfig", - "all" - ], - "type": "string", - "format": "enumeration", - "default": "config", - "description": "controlling descendant nodes in response", - "name": "content", - "in": "query" - }, - { - "type": "integer", - "format": "uint16", - "description": "limit the depth of nodes in response", - "name": "depth", - "in": "query" - }, - { - "type": "string", - "format": "string", - "description": "optionally identify specific data nodes in response", - "name": "fields", - "in": "query" - }, - { - "type": "string", - "format": "string", - "description": "xpath expression to filter data nodes in response", - "name": "filter", - "in": "query" - }, - { - "enum": [ - "report-all", - "trim", - "explicit", - "report-all-tagged" - ], - "type": "string", - "format": "enumeration", - "default": "report-all", - "description": "controlling default values in response", - "name": "with-defaults", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/data_cocsn_routes" - } - }, - "204": { - "description": "No Content" - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" - }, - "409": { - "description": "Conflict" - } - } - }, - "put": { - "security": [ - { - "basicAuth": [] - } - ], - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "put" - ], - "operationId": "data_cocsn_routes_put", - "parameters": [ - { - "name": "routes", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/data_cocsn_routes" - } - } - ], - "responses": { - "201": { - "description": "container routes created or replaced" - }, - "204": { - "description": "No Content" - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" - }, - "409": { - "description": "Conflict" - } - } - }, - "post": { - "security": [ - { - "basicAuth": [] - } - ], - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "post" - ], - "operationId": "data_cocsn_routes_post", - "parameters": [ - { - "name": "routes", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/data_cocsn_routes-post" - } - } - ], - "responses": { - "201": { - "description": "container routes created" - }, - "204": { - "description": "No Content" - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" - }, - "409": { - "description": "Conflict" - } - } - }, - "delete": { - "security": [ - { - "basicAuth": [] - } - ], - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "delete" - ], - "operationId": "data_cocsn_routes_delete", - "responses": { - "204": { - "description": "No Content" - } - } - }, - "patch": { - "security": [ - { - "basicAuth": [] - } - ], - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "patch" - ], - "operationId": "data_cocsn_routes_patch", - "parameters": [ - { - "name": "routes", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/data_cocsn_routes" - } - } - ], - "responses": { - "204": { - "description": "container routes updated" - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" - }, - "409": { - "description": "Conflict" - } - } - } - }, - "/data/cocsn:routes/route": {}, - "/data/cocsn:routes/route={route-destination}": { - "get": { - "security": [ - { - "basicAuth": [] - } - ], - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "get" - ], - "operationId": "data_cocsn_routes_route_route_destination_get", - "parameters": [ - { - "type": "string", - "format": "string", - "description": "Route destination. IP network", - "name": "route-destination", - "in": "path", - "required": true - }, - { - "enum": [ - "config", - "nonconfig", - "all" - ], - "type": "string", - "format": "enumeration", - "default": "config", - "description": "controlling descendant nodes in response", - "name": "content", - "in": "query" - }, - { - "type": "integer", - "format": "uint16", - "description": "limit the depth of nodes in response", - "name": "depth", - "in": "query" - }, - { - "type": "string", - "format": "string", - "description": "optionally identify specific data nodes in response", - "name": "fields", - "in": "query" - }, - { - "type": "string", - "format": "string", - "description": "xpath expression to filter data nodes in response", - "name": "filter", - "in": "query" - }, - { - "enum": [ - "report-all", - "trim", - "explicit", - "report-all-tagged" - ], - "type": "string", - "format": "enumeration", - "default": "report-all", - "description": "controlling default values in response", - "name": "with-defaults", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/data_cocsn_routes_route_route-destination" - } - }, - "204": { - "description": "No Content" - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" - }, - "409": { - "description": "Conflict" - } - } - }, - "put": { - "security": [ - { - "basicAuth": [] - } - ], - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "put" - ], - "operationId": "data_cocsn_routes_route_route_destination_put", - "parameters": [ - { - "type": "string", - "format": "string", - "description": "Route destination. IP network", - "name": "route-destination", - "in": "path", - "required": true - }, - { - "name": "route", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/data_cocsn_routes_route_route-destination" - } - }, - { - "enum": [ - "first", - "last", - "before", - "after" - ], - "type": "string", - "format": "enumeration", - "default": "first", - "description": "controlling the order when adding new list elements", - "name": "insert", - "in": "query" - }, - { - "type": "string", - "format": "string", - "description": "used to specify the insertion point", - "name": "point", - "in": "query" - } - ], - "responses": { - "201": { - "description": "list route created or replaced" - }, - "204": { - "description": "No Content" - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" - }, - "409": { - "description": "Conflict" - } - } - }, - "delete": { - "security": [ - { - "basicAuth": [] - } - ], - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "delete" - ], - "operationId": "data_cocsn_routes_route_route_destination_delete", - "parameters": [ - { - "type": "string", - "format": "string", - "description": "Route destination. IP network", - "name": "route-destination", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "description": "No Content" - } - } - }, - "patch": { - "security": [ - { - "basicAuth": [] - } - ], - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "patch" - ], - "operationId": "data_cocsn_routes_route_route_destination_patch", - "parameters": [ - { - "type": "string", - "format": "string", - "description": "Route destination. IP network", - "name": "route-destination", - "in": "path", - "required": true - }, - { - "name": "route", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/data_cocsn_routes_route_route-destination" - } - } - ], - "responses": { - "204": { - "description": "list route updated" - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" - }, - "409": { - "description": "Conflict" - } - } - } - }, - "/data/cocsn:routes/route={route-destination}/destination": { - "get": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "Route destination. IP network", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "get" - ], - "summary": "Route destination. IP network", - "operationId": "data_cocsn_routes_route_route_destination_destination_get", - "parameters": [ - { - "type": "string", - "format": "string", - "description": "Route destination. IP network", - "name": "route-destination", - "in": "path", - "required": true - }, - { - "enum": [ - "config", - "nonconfig", - "all" - ], - "type": "string", - "format": "enumeration", - "default": "config", - "description": "controlling descendant nodes in response", - "name": "content", - "in": "query" - }, - { - "type": "integer", - "format": "uint16", - "description": "limit the depth of nodes in response", - "name": "depth", - "in": "query" - }, - { - "type": "string", - "format": "string", - "description": "optionally identify specific data nodes in response", - "name": "fields", - "in": "query" - }, - { - "type": "string", - "format": "string", - "description": "xpath expression to filter data nodes in response", - "name": "filter", - "in": "query" - }, - { - "enum": [ - "report-all", - "trim", - "explicit", - "report-all-tagged" - ], - "type": "string", - "format": "enumeration", - "default": "report-all", - "description": "controlling default values in response", - "name": "with-defaults", - "in": "query" - } - ], - "responses": { - "200": { - "description": "Route destination. IP network", - "schema": { - "$ref": "#/definitions/data_cocsn_routes_route_route-destination_destination" - } - }, - "204": { - "description": "No Content" - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" - }, - "409": { - "description": "Conflict" - } - } - }, - "put": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "Route destination. IP network", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "put" - ], - "summary": "Route destination. IP network", - "operationId": "data_cocsn_routes_route_route_destination_destination_put", - "parameters": [ - { - "type": "string", - "format": "string", - "description": "Route destination. IP network", - "name": "route-destination", - "in": "path", - "required": true - }, - { - "description": "Route destination. IP network", - "name": "destination", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/data_cocsn_routes_route_route-destination_destination" - } - } - ], - "responses": { - "201": { - "description": "leaf destination created or replaced" - }, - "204": { - "description": "No Content" - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" - }, - "409": { - "description": "Conflict" - } - } - }, - "delete": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "Route destination. IP network", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "delete" - ], - "summary": "Route destination. IP network", - "operationId": "data_cocsn_routes_route_route_destination_destination_delete", - "parameters": [ - { - "type": "string", - "format": "string", - "description": "Route destination. IP network", - "name": "route-destination", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "description": "No Content" - } - } - }, - "patch": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "Route destination. IP network", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "patch" - ], - "summary": "Route destination. IP network", - "operationId": "data_cocsn_routes_route_route_destination_destination_patch", - "parameters": [ - { - "type": "string", - "format": "string", - "description": "Route destination. IP network", - "name": "route-destination", - "in": "path", - "required": true - }, - { - "description": "Route destination. IP network", - "name": "destination", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/data_cocsn_routes_route_route-destination_destination" - } - } - ], - "responses": { - "204": { - "description": "leaf destination updated" - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" - }, - "409": { - "description": "Conflict" - } - } - } - }, - "/data/cocsn:routes/route={route-destination}/expire": { - "get": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "Expiration timer of the route", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "get" - ], - "summary": "Expiration timer of the route", - "operationId": "data_cocsn_routes_route_route_destination_expire_get", - "parameters": [ - { - "type": "string", - "format": "string", - "description": "Route destination. IP network", - "name": "route-destination", - "in": "path", - "required": true - }, - { - "enum": [ - "config", - "nonconfig", - "all" - ], - "type": "string", - "format": "enumeration", - "default": "config", - "description": "controlling descendant nodes in response", - "name": "content", - "in": "query" - }, - { - "type": "integer", - "format": "uint16", - "description": "limit the depth of nodes in response", - "name": "depth", - "in": "query" - }, - { - "type": "string", - "format": "string", - "description": "optionally identify specific data nodes in response", - "name": "fields", - "in": "query" - }, - { - "type": "string", - "format": "string", - "description": "xpath expression to filter data nodes in response", - "name": "filter", - "in": "query" - }, - { - "enum": [ - "report-all", - "trim", - "explicit", - "report-all-tagged" - ], - "type": "string", - "format": "enumeration", - "default": "report-all", - "description": "controlling default values in response", - "name": "with-defaults", - "in": "query" - } - ], - "responses": { - "200": { - "description": "Expiration timer of the route", - "schema": { - "$ref": "#/definitions/data_cocsn_routes_route_route-destination_expire" - } - }, - "204": { - "description": "No Content" - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" - }, - "409": { - "description": "Conflict" - } - } - }, - "put": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "Expiration timer of the route", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "put" - ], - "summary": "Expiration timer of the route", - "operationId": "data_cocsn_routes_route_route_destination_expire_put", - "parameters": [ - { - "type": "string", - "format": "string", - "description": "Route destination. IP network", - "name": "route-destination", - "in": "path", - "required": true - }, - { - "description": "Expiration timer of the route", - "name": "expire", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/data_cocsn_routes_route_route-destination_expire" - } - } - ], - "responses": { - "201": { - "description": "leaf expire created or replaced" - }, - "204": { - "description": "No Content" - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" - }, - "409": { - "description": "Conflict" - } - } - }, - "delete": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "Expiration timer of the route", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "delete" - ], - "summary": "Expiration timer of the route", - "operationId": "data_cocsn_routes_route_route_destination_expire_delete", - "parameters": [ - { - "type": "string", - "format": "string", - "description": "Route destination. IP network", - "name": "route-destination", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "description": "No Content" - } - } - }, - "patch": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "Expiration timer of the route", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "patch" - ], - "summary": "Expiration timer of the route", - "operationId": "data_cocsn_routes_route_route_destination_expire_patch", - "parameters": [ - { - "type": "string", - "format": "string", - "description": "Route destination. IP network", - "name": "route-destination", - "in": "path", - "required": true - }, - { - "description": "Expiration timer of the route", - "name": "expire", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/data_cocsn_routes_route_route-destination_expire" - } - } - ], - "responses": { - "204": { - "description": "leaf expire updated" - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" - }, - "409": { - "description": "Conflict" - } - } - } - }, - "/data/cocsn:routes/route={route-destination}/flags": { - "get": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "Flags of the route", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "get" - ], - "summary": "Flags of the route", - "operationId": "data_cocsn_routes_route_route_destination_flags_get", - "parameters": [ - { - "type": "string", - "format": "string", - "description": "Route destination. IP network", - "name": "route-destination", - "in": "path", - "required": true - }, - { - "enum": [ - "config", - "nonconfig", - "all" - ], - "type": "string", - "format": "enumeration", - "default": "config", - "description": "controlling descendant nodes in response", - "name": "content", - "in": "query" - }, - { - "type": "integer", - "format": "uint16", - "description": "limit the depth of nodes in response", - "name": "depth", - "in": "query" - }, - { - "type": "string", - "format": "string", - "description": "optionally identify specific data nodes in response", - "name": "fields", - "in": "query" - }, - { - "type": "string", - "format": "string", - "description": "xpath expression to filter data nodes in response", - "name": "filter", - "in": "query" - }, - { - "enum": [ - "report-all", - "trim", - "explicit", - "report-all-tagged" - ], - "type": "string", - "format": "enumeration", - "default": "report-all", - "description": "controlling default values in response", - "name": "with-defaults", - "in": "query" - } - ], - "responses": { - "200": { - "description": "Flags of the route", - "schema": { - "$ref": "#/definitions/data_cocsn_routes_route_route-destination_flags" - } - }, - "204": { - "description": "No Content" - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" - }, - "409": { - "description": "Conflict" - } - } - }, - "put": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "Flags of the route", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "put" - ], - "summary": "Flags of the route", - "operationId": "data_cocsn_routes_route_route_destination_flags_put", - "parameters": [ - { - "type": "string", - "format": "string", - "description": "Route destination. IP network", - "name": "route-destination", - "in": "path", - "required": true - }, - { - "description": "Flags of the route", - "name": "flags", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/data_cocsn_routes_route_route-destination_flags" - } - } - ], - "responses": { - "201": { - "description": "leaf flags created or replaced" - }, - "204": { - "description": "No Content" - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" - }, - "409": { - "description": "Conflict" - } - } - }, - "delete": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "Flags of the route", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "delete" - ], - "summary": "Flags of the route", - "operationId": "data_cocsn_routes_route_route_destination_flags_delete", - "parameters": [ - { - "type": "string", - "format": "string", - "description": "Route destination. IP network", - "name": "route-destination", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "description": "No Content" - } - } - }, - "patch": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "Flags of the route", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "patch" - ], - "summary": "Flags of the route", - "operationId": "data_cocsn_routes_route_route_destination_flags_patch", - "parameters": [ - { - "type": "string", - "format": "string", - "description": "Route destination. IP network", - "name": "route-destination", - "in": "path", - "required": true - }, - { - "description": "Flags of the route", - "name": "flags", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/data_cocsn_routes_route_route-destination_flags" - } - } - ], - "responses": { - "204": { - "description": "leaf flags updated" - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" - }, - "409": { - "description": "Conflict" - } - } - } - }, - "/data/cocsn:routes/route={route-destination}/gateway": { - "get": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "Route gateway. IP address or host name", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "get" - ], - "summary": "Route gateway. IP address or host name", - "operationId": "data_cocsn_routes_route_route_destination_gateway_get", - "parameters": [ - { - "type": "string", - "format": "string", - "description": "Route destination. IP network", - "name": "route-destination", - "in": "path", - "required": true - }, - { - "enum": [ - "config", - "nonconfig", - "all" - ], - "type": "string", - "format": "enumeration", - "default": "config", - "description": "controlling descendant nodes in response", - "name": "content", - "in": "query" - }, - { - "type": "integer", - "format": "uint16", - "description": "limit the depth of nodes in response", - "name": "depth", - "in": "query" - }, - { - "type": "string", - "format": "string", - "description": "optionally identify specific data nodes in response", - "name": "fields", - "in": "query" - }, - { - "type": "string", - "format": "string", - "description": "xpath expression to filter data nodes in response", - "name": "filter", - "in": "query" - }, - { - "enum": [ - "report-all", - "trim", - "explicit", - "report-all-tagged" - ], - "type": "string", - "format": "enumeration", - "default": "report-all", - "description": "controlling default values in response", - "name": "with-defaults", - "in": "query" - } - ], - "responses": { - "200": { - "description": "Route gateway. IP address or host name", - "schema": { - "$ref": "#/definitions/data_cocsn_routes_route_route-destination_gateway" - } - }, - "204": { - "description": "No Content" - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" - }, - "409": { - "description": "Conflict" - } - } - }, - "put": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "Route gateway. IP address or host name", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "put" - ], - "summary": "Route gateway. IP address or host name", - "operationId": "data_cocsn_routes_route_route_destination_gateway_put", - "parameters": [ - { - "type": "string", - "format": "string", - "description": "Route destination. IP network", - "name": "route-destination", - "in": "path", - "required": true - }, - { - "description": "Route gateway. IP address or host name", - "name": "gateway", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/data_cocsn_routes_route_route-destination_gateway" - } - } - ], - "responses": { - "201": { - "description": "leaf gateway created or replaced" - }, - "204": { - "description": "No Content" - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" - }, - "409": { - "description": "Conflict" - } - } - }, - "delete": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "Route gateway. IP address or host name", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "delete" - ], - "summary": "Route gateway. IP address or host name", - "operationId": "data_cocsn_routes_route_route_destination_gateway_delete", - "parameters": [ - { - "type": "string", - "format": "string", - "description": "Route destination. IP network", - "name": "route-destination", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "description": "No Content" - } - } - }, - "patch": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "Route gateway. IP address or host name", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "patch" - ], - "summary": "Route gateway. IP address or host name", - "operationId": "data_cocsn_routes_route_route_destination_gateway_patch", - "parameters": [ - { - "type": "string", - "format": "string", - "description": "Route destination. IP network", - "name": "route-destination", - "in": "path", - "required": true - }, - { - "description": "Route gateway. IP address or host name", - "name": "gateway", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/data_cocsn_routes_route_route-destination_gateway" - } - } - ], - "responses": { - "204": { - "description": "leaf gateway updated" - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" - }, - "409": { - "description": "Conflict" - } - } - } - }, - "/data/cocsn:routes/route={route-destination}/interface": { - "get": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "Interface used for the route", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "get" - ], - "summary": "Interface used for the route", - "operationId": "data_cocsn_routes_route_route_destination_interface_get", - "parameters": [ - { - "type": "string", - "format": "string", - "description": "Route destination. IP network", - "name": "route-destination", - "in": "path", - "required": true - }, - { - "enum": [ - "config", - "nonconfig", - "all" - ], - "type": "string", - "format": "enumeration", - "default": "config", - "description": "controlling descendant nodes in response", - "name": "content", - "in": "query" - }, - { - "type": "integer", - "format": "uint16", - "description": "limit the depth of nodes in response", - "name": "depth", - "in": "query" - }, - { - "type": "string", - "format": "string", - "description": "optionally identify specific data nodes in response", - "name": "fields", - "in": "query" - }, - { - "type": "string", - "format": "string", - "description": "xpath expression to filter data nodes in response", - "name": "filter", - "in": "query" - }, - { - "enum": [ - "report-all", - "trim", - "explicit", - "report-all-tagged" - ], - "type": "string", - "format": "enumeration", - "default": "report-all", - "description": "controlling default values in response", - "name": "with-defaults", - "in": "query" - } - ], - "responses": { - "200": { - "description": "Interface used for the route", - "schema": { - "$ref": "#/definitions/data_cocsn_routes_route_route-destination_interface" - } - }, - "204": { - "description": "No Content" - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" - }, - "409": { - "description": "Conflict" - } - } - }, - "put": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "Interface used for the route", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "put" - ], - "summary": "Interface used for the route", - "operationId": "data_cocsn_routes_route_route_destination_interface_put", - "parameters": [ - { - "type": "string", - "format": "string", - "description": "Route destination. IP network", - "name": "route-destination", - "in": "path", - "required": true - }, - { - "description": "Interface used for the route", - "name": "interface", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/data_cocsn_routes_route_route-destination_interface" - } - } - ], - "responses": { - "201": { - "description": "leaf interface created or replaced" - }, - "204": { - "description": "No Content" - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" - }, - "409": { - "description": "Conflict" - } - } - }, - "delete": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "Interface used for the route", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "delete" - ], - "summary": "Interface used for the route", - "operationId": "data_cocsn_routes_route_route_destination_interface_delete", - "parameters": [ - { - "type": "string", - "format": "string", - "description": "Route destination. IP network", - "name": "route-destination", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "description": "No Content" - } - } - }, - "patch": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "Interface used for the route", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "patch" - ], - "summary": "Interface used for the route", - "operationId": "data_cocsn_routes_route_route_destination_interface_patch", - "parameters": [ - { - "type": "string", - "format": "string", - "description": "Route destination. IP network", - "name": "route-destination", - "in": "path", - "required": true - }, - { - "description": "Interface used for the route", - "name": "interface", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/data_cocsn_routes_route_route-destination_interface" - } - } - ], - "responses": { - "204": { - "description": "leaf interface updated" - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" - }, - "409": { - "description": "Conflict" - } - } - } - }, - "/operations": { - "get": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "This YANG module represents the CoCSN API", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "operations", - "get" - ], - "summary": "This YANG module represents the CoCSN API", - "operationId": "operations_get", - "responses": { - "200": { - "description": "This YANG module represents the CoCSN API", - "schema": { - "$ref": "#/definitions/operations" - } - }, - "204": { - "description": "No Content" - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" - }, - "409": { - "description": "Conflict" - } - } - } - }, - "/yang-library-version": { - "get": { - "security": [ - { - "basicAuth": [] - } - ], - "description": "This YANG module represents the CoCSN API", - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "yang-library-version", - "get" - ], - "summary": "This YANG module represents the CoCSN API", - "operationId": "yang_library_version_get", - "responses": { - "200": { - "description": "This YANG module represents the CoCSN API", - "schema": { - "$ref": "#/definitions/yang-library-version" - } - }, - "204": { - "description": "No Content" - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" - }, - "409": { - "description": "Conflict" - } - } - } - } - }, - "definitions": { - "DataCocsnInterfacesCocsnInterfaces": { - "description": "(non-presence)", - "type": "object", - "properties": { - "interface": { - "description": "(list)", - "type": "array", - "items": { - "$ref": "#/definitions/DataCocsnInterfacesCocsnInterfacesInterfaceItems0" - }, - "x-yang": { - "type": "list" - } - } - }, - "x-yang": { - "is_presence": "false", - "type": "container" - } - }, - "DataCocsnInterfacesCocsnInterfacesInterfaceItems0": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "description": "Interface IP address. Example value: 10.10.10.1 (leaf-list)", - "type": "string", - "format": "string" - }, - "x-yang": { - "type": "leaf-list" - } - }, - "enabled": { - "description": "Enable or disable the interface. Example value: true (leaf)", - "type": "string", - "format": "boolean", - "x-yang": { - "type": "leaf" - } - }, - "name": { - "description": "Interface name. Example value: en0 (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "oper-status": { - "description": "Describes whether the interface is physically up or down (leaf)", - "type": "string", - "format": "enumeration", - "default": "up", - "enum": [ - "up", - "down" - ], - "x-yang": { - "type": "leaf" - } - }, - "phys-address": { - "description": "The interface's address at its protocol sub-layer. For\nexample, for an 802.x interface, this object normally\ncontains a Media Access Control (MAC) address. The\ninterface's media-specific modules must define the bit\nand byte ordering and the format of the value of this\nobject. For interfaces that do not have such an address\n(e.g., a serial line), this node is not present. (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - } - } - }, - "DataCocsnInterfacesInterfaceInterfaceNameCocsnInterfaceItems0": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "description": "Interface IP address. Example value: 10.10.10.1 (leaf-list)", - "type": "string", - "format": "string" - }, - "x-yang": { - "type": "leaf-list" - } - }, - "enabled": { - "description": "Enable or disable the interface. Example value: true (leaf)", - "type": "string", - "format": "boolean", - "x-yang": { - "type": "leaf" - } - }, - "name": { - "description": "Interface name. Example value: en0 (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "oper-status": { - "description": "Describes whether the interface is physically up or down (leaf)", - "type": "string", - "format": "enumeration", - "default": "up", - "enum": [ - "up", - "down" - ], - "x-yang": { - "type": "leaf" - } - }, - "phys-address": { - "description": "The interface's address at its protocol sub-layer. For\nexample, for an 802.x interface, this object normally\ncontains a Media Access Control (MAC) address. The\ninterface's media-specific modules must define the bit\nand byte ordering and the format of the value of this\nobject. For interfaces that do not have such an address\n(e.g., a serial line), this node is not present. (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - } - } - }, - "DataCocsnInterfacesPostCocsnInterfaceItems0": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "description": "Interface IP address. Example value: 10.10.10.1 (leaf-list)", - "type": "string", - "format": "string" - }, - "x-yang": { - "type": "leaf-list" - } - }, - "enabled": { - "description": "Enable or disable the interface. Example value: true (leaf)", - "type": "string", - "format": "boolean", - "x-yang": { - "type": "leaf" - } - }, - "name": { - "description": "Interface name. Example value: en0 (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "oper-status": { - "description": "Describes whether the interface is physically up or down (leaf)", - "type": "string", - "format": "enumeration", - "default": "up", - "enum": [ - "up", - "down" - ], - "x-yang": { - "type": "leaf" - } - }, - "phys-address": { - "description": "The interface's address at its protocol sub-layer. For\nexample, for an 802.x interface, this object normally\ncontains a Media Access Control (MAC) address. The\ninterface's media-specific modules must define the bit\nand byte ordering and the format of the value of this\nobject. For interfaces that do not have such an address\n(e.g., a serial line), this node is not present. (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - } - } - }, - "DataCocsnRoutesCocsnRoutes": { - "description": "(non-presence)", - "type": "object", - "properties": { - "route": { - "description": "(list)", - "type": "array", - "items": { - "$ref": "#/definitions/DataCocsnRoutesCocsnRoutesRouteItems0" - }, - "x-yang": { - "type": "list" - } - } - }, - "x-yang": { - "is_presence": "false", - "type": "container" - } - }, - "DataCocsnRoutesCocsnRoutesRouteItems0": { - "type": "object", - "properties": { - "destination": { - "description": "Route destination. IP network (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "expire": { - "description": "Expiration timer of the route (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "flags": { - "description": "Flags of the route (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "gateway": { - "description": "Route gateway. IP address or host name (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "interface": { - "description": "Interface used for the route (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - } - } - }, - "DataCocsnRoutesPostCocsnRouteItems0": { - "type": "object", - "properties": { - "destination": { - "description": "Route destination. IP network (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "expire": { - "description": "Expiration timer of the route (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "flags": { - "description": "Flags of the route (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "gateway": { - "description": "Route gateway. IP address or host name (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "interface": { - "description": "Interface used for the route (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - } - } - }, - "DataCocsnRoutesRouteRouteDestinationCocsnRouteItems0": { - "type": "object", - "properties": { - "destination": { - "description": "Route destination. IP network (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "expire": { - "description": "Expiration timer of the route (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "flags": { - "description": "Flags of the route (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "gateway": { - "description": "Route gateway. IP address or host name (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "interface": { - "description": "Interface used for the route (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - } - } - }, - "DataPostCocsnInterfaces": { - "description": "(non-presence)", - "type": "object", - "properties": { - "interface": { - "description": "(list)", - "type": "array", - "items": { - "$ref": "#/definitions/DataPostCocsnInterfacesInterfaceItems0" - }, - "x-yang": { - "type": "list" - } - } - }, - "x-yang": { - "is_presence": "false", - "type": "container" - } - }, - "DataPostCocsnInterfacesInterfaceItems0": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "description": "Interface IP address. Example value: 10.10.10.1 (leaf-list)", - "type": "string", - "format": "string" - }, - "x-yang": { - "type": "leaf-list" - } - }, - "enabled": { - "description": "Enable or disable the interface. Example value: true (leaf)", - "type": "string", - "format": "boolean", - "x-yang": { - "type": "leaf" - } - }, - "name": { - "description": "Interface name. Example value: en0 (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "oper-status": { - "description": "Describes whether the interface is physically up or down (leaf)", - "type": "string", - "format": "enumeration", - "default": "up", - "enum": [ - "up", - "down" - ], - "x-yang": { - "type": "leaf" - } - }, - "phys-address": { - "description": "The interface's address at its protocol sub-layer. For\nexample, for an 802.x interface, this object normally\ncontains a Media Access Control (MAC) address. The\ninterface's media-specific modules must define the bit\nand byte ordering and the format of the value of this\nobject. For interfaces that do not have such an address\n(e.g., a serial line), this node is not present. (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - } - } - }, - "DataPostCocsnRoutes": { - "description": "(non-presence)", - "type": "object", - "properties": { - "route": { - "description": "(list)", - "type": "array", - "items": { - "$ref": "#/definitions/DataPostCocsnRoutesRouteItems0" - }, - "x-yang": { - "type": "list" - } - } - }, - "x-yang": { - "is_presence": "false", - "type": "container" - } - }, - "DataPostCocsnRoutesRouteItems0": { - "type": "object", - "properties": { - "destination": { - "description": "Route destination. IP network (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "expire": { - "description": "Expiration timer of the route (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "flags": { - "description": "Flags of the route (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "gateway": { - "description": "Route gateway. IP address or host name (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "interface": { - "description": "Interface used for the route (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - } - } - }, - "DataPutPatchIetfRestconfData": { - "description": "This YANG module represents the CoCSN API", - "type": "object", - "properties": { - "cocsn:interfaces": { - "description": "(non-presence)", - "type": "object", - "properties": { - "interface": { - "description": "(list)", - "type": "array", - "items": { - "$ref": "#/definitions/DataPutPatchIetfRestconfDataCocsnInterfacesInterfaceItems0" - }, - "x-yang": { - "type": "list" - } - } - }, - "x-yang": { - "is_presence": "false", - "type": "container" - } - }, - "cocsn:routes": { - "description": "(non-presence)", - "type": "object", - "properties": { - "route": { - "description": "(list)", - "type": "array", - "items": { - "$ref": "#/definitions/DataPutPatchIetfRestconfDataCocsnRoutesRouteItems0" - }, - "x-yang": { - "type": "list" - } - } - }, - "x-yang": { - "is_presence": "false", - "type": "container" - } - } - }, - "x-yang": { - "type": "datastore" - } - }, - "DataPutPatchIetfRestconfDataCocsnInterfaces": { - "description": "(non-presence)", - "type": "object", - "properties": { - "interface": { - "description": "(list)", - "type": "array", - "items": { - "$ref": "#/definitions/DataPutPatchIetfRestconfDataCocsnInterfacesInterfaceItems0" - }, - "x-yang": { - "type": "list" - } - } - }, - "x-yang": { - "is_presence": "false", - "type": "container" - } - }, - "DataPutPatchIetfRestconfDataCocsnInterfacesInterfaceItems0": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "description": "Interface IP address. Example value: 10.10.10.1 (leaf-list)", - "type": "string", - "format": "string" - }, - "x-yang": { - "type": "leaf-list" - } - }, - "enabled": { - "description": "Enable or disable the interface. Example value: true (leaf)", - "type": "string", - "format": "boolean", - "x-yang": { - "type": "leaf" - } - }, - "name": { - "description": "Interface name. Example value: en0 (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "oper-status": { - "description": "Describes whether the interface is physically up or down (leaf)", - "type": "string", - "format": "enumeration", - "default": "up", - "enum": [ - "up", - "down" - ], - "x-yang": { - "type": "leaf" - } - }, - "phys-address": { - "description": "The interface's address at its protocol sub-layer. For\nexample, for an 802.x interface, this object normally\ncontains a Media Access Control (MAC) address. The\ninterface's media-specific modules must define the bit\nand byte ordering and the format of the value of this\nobject. For interfaces that do not have such an address\n(e.g., a serial line), this node is not present. (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - } - } - }, - "DataPutPatchIetfRestconfDataCocsnRoutes": { - "description": "(non-presence)", - "type": "object", - "properties": { - "route": { - "description": "(list)", - "type": "array", - "items": { - "$ref": "#/definitions/DataPutPatchIetfRestconfDataCocsnRoutesRouteItems0" - }, - "x-yang": { - "type": "list" - } - } - }, - "x-yang": { - "is_presence": "false", - "type": "container" - } - }, - "DataPutPatchIetfRestconfDataCocsnRoutesRouteItems0": { - "type": "object", - "properties": { - "destination": { - "description": "Route destination. IP network (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "expire": { - "description": "Expiration timer of the route (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "flags": { - "description": "Flags of the route (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "gateway": { - "description": "Route gateway. IP address or host name (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "interface": { - "description": "Interface used for the route (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - } - } - }, - "RootIetfRestconfRestconf": { - "description": "This is the RESTCONF root resource for the RESTCONF datastore and operation resources. See RESTCONF RFC 8040 for further information.", - "type": "object", - "properties": { - "data": { - "type": "object" - }, - "operations": { - "type": "object" - }, - "yang-library-version": { - "type": "string" - } - }, - "x-yang": { - "type": "root" - } - }, - "data": { - "type": "object", - "properties": { - "ietf-restconf:data": { - "description": "This resource represents the combined configuration and state data resources that can be accessed by a client and cannot be created or deleted by the client. See RESTCONF RFC 8040 for further information.", - "type": "object", - "x-yang": { - "type": "datastore" - } - } - } - }, - "data-post": { - "type": "object", - "properties": { - "cocsn:interfaces": { - "description": "(non-presence)", - "type": "object", - "properties": { - "interface": { - "description": "(list)", - "type": "array", - "items": { - "$ref": "#/definitions/DataPostCocsnInterfacesInterfaceItems0" - }, - "x-yang": { - "type": "list" - } - } - }, - "x-yang": { - "is_presence": "false", - "type": "container" - } - }, - "cocsn:routes": { - "description": "(non-presence)", - "type": "object", - "properties": { - "route": { - "description": "(list)", - "type": "array", - "items": { - "$ref": "#/definitions/DataPostCocsnRoutesRouteItems0" - }, - "x-yang": { - "type": "list" - } - } - }, - "x-yang": { - "is_presence": "false", - "type": "container" - } - } - } - }, - "data-put-patch": { - "type": "object", - "properties": { - "ietf-restconf:data": { - "description": "This YANG module represents the CoCSN API", - "type": "object", - "properties": { - "cocsn:interfaces": { - "description": "(non-presence)", - "type": "object", - "properties": { - "interface": { - "description": "(list)", - "type": "array", - "items": { - "$ref": "#/definitions/DataPutPatchIetfRestconfDataCocsnInterfacesInterfaceItems0" - }, - "x-yang": { - "type": "list" - } - } - }, - "x-yang": { - "is_presence": "false", - "type": "container" - } - }, - "cocsn:routes": { - "description": "(non-presence)", - "type": "object", - "properties": { - "route": { - "description": "(list)", - "type": "array", - "items": { - "$ref": "#/definitions/DataPutPatchIetfRestconfDataCocsnRoutesRouteItems0" - }, - "x-yang": { - "type": "list" - } - } - }, - "x-yang": { - "is_presence": "false", - "type": "container" - } - } - }, - "x-yang": { - "type": "datastore" - } - } - } - }, - "data_cocsn_interfaces": { - "type": "object", - "properties": { - "cocsn:interfaces": { - "description": "(non-presence)", - "type": "object", - "properties": { - "interface": { - "description": "(list)", - "type": "array", - "items": { - "$ref": "#/definitions/DataCocsnInterfacesCocsnInterfacesInterfaceItems0" - }, - "x-yang": { - "type": "list" - } - } - }, - "x-yang": { - "is_presence": "false", - "type": "container" - } - } - } - }, - "data_cocsn_interfaces-post": { - "type": "object", - "properties": { - "cocsn:interface": { - "description": "(list)", - "type": "array", - "items": { - "$ref": "#/definitions/DataCocsnInterfacesPostCocsnInterfaceItems0" - }, - "x-yang": { - "type": "list" - } - } - } - }, - "data_cocsn_interfaces_interface_interface-name": { - "type": "object", - "properties": { - "cocsn:interface": { - "description": "(list)", - "type": "array", - "items": { - "$ref": "#/definitions/DataCocsnInterfacesInterfaceInterfaceNameCocsnInterfaceItems0" - }, - "x-yang": { - "type": "list" - } - } - } - }, - "data_cocsn_interfaces_interface_interface-name_addresses_addresses-id": { - "type": "object", - "properties": { - "cocsn:addresses": { - "type": "array", - "items": { - "description": "Interface IP address. Example value: 10.10.10.1 (leaf-list)", - "type": "string", - "format": "string" - }, - "x-yang": { - "type": "leaf-list" - } - } - } - }, - "data_cocsn_interfaces_interface_interface-name_enabled": { - "type": "object", - "properties": { - "cocsn:enabled": { - "description": "Enable or disable the interface. Example value: true (leaf)", - "type": "string", - "format": "boolean", - "x-yang": { - "type": "leaf" - } - } - } - }, - "data_cocsn_interfaces_interface_interface-name_name": { - "type": "object", - "properties": { - "cocsn:name": { - "description": "Interface name. Example value: en0 (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - } - } - }, - "data_cocsn_interfaces_interface_interface-name_oper-status": { - "type": "object", - "properties": { - "cocsn:oper-status": { - "description": "Describes whether the interface is physically up or down (leaf)", - "type": "string", - "format": "enumeration", - "default": "up", - "enum": [ - "up", - "down" - ], - "x-yang": { - "type": "leaf" - } - } - } - }, - "data_cocsn_interfaces_interface_interface-name_phys-address": { - "type": "object", - "properties": { - "cocsn:phys-address": { - "description": "The interface's address at its protocol sub-layer. For\nexample, for an 802.x interface, this object normally\ncontains a Media Access Control (MAC) address. The\ninterface's media-specific modules must define the bit\nand byte ordering and the format of the value of this\nobject. For interfaces that do not have such an address\n(e.g., a serial line), this node is not present. (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - } - } - }, - "data_cocsn_routes": { - "type": "object", - "properties": { - "cocsn:routes": { - "description": "(non-presence)", - "type": "object", - "properties": { - "route": { - "description": "(list)", - "type": "array", - "items": { - "$ref": "#/definitions/DataCocsnRoutesCocsnRoutesRouteItems0" - }, - "x-yang": { - "type": "list" - } - } - }, - "x-yang": { - "is_presence": "false", - "type": "container" - } - } - } - }, - "data_cocsn_routes-post": { - "type": "object", - "properties": { - "cocsn:route": { - "description": "(list)", - "type": "array", - "items": { - "$ref": "#/definitions/DataCocsnRoutesPostCocsnRouteItems0" - }, - "x-yang": { - "type": "list" - } - } - } - }, - "data_cocsn_routes_route_route-destination": { - "type": "object", - "properties": { - "cocsn:route": { - "description": "(list)", - "type": "array", - "items": { - "$ref": "#/definitions/DataCocsnRoutesRouteRouteDestinationCocsnRouteItems0" - }, - "x-yang": { - "type": "list" - } - } - } - }, - "data_cocsn_routes_route_route-destination_destination": { - "type": "object", - "properties": { - "cocsn:destination": { - "description": "Route destination. IP network (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - } - } - }, - "data_cocsn_routes_route_route-destination_expire": { - "type": "object", - "properties": { - "cocsn:expire": { - "description": "Expiration timer of the route (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - } - } - }, - "data_cocsn_routes_route_route-destination_flags": { - "type": "object", - "properties": { - "cocsn:flags": { - "description": "Flags of the route (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - } - } - }, - "data_cocsn_routes_route_route-destination_gateway": { - "type": "object", - "properties": { - "cocsn:gateway": { - "description": "Route gateway. IP address or host name (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - } - } - }, - "data_cocsn_routes_route_route-destination_interface": { - "type": "object", - "properties": { - "cocsn:interface": { - "description": "Interface used for the route (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - } - } - }, - "operations": { - "type": "object", - "properties": { - "ietf-restconf:operations": { - "description": "This resource is a container that provides access to the data-model-specific RPC operations supported by the server. See RESTCONF RFC 8040 for further information.", - "type": "object", - "x-yang": { - "type": "operations" - } - } - } - }, - "root": { - "type": "object", - "properties": { - "ietf-restconf:restconf": { - "description": "This is the RESTCONF root resource for the RESTCONF datastore and operation resources. See RESTCONF RFC 8040 for further information.", - "type": "object", - "properties": { - "data": { - "type": "object" - }, - "operations": { - "type": "object" - }, - "yang-library-version": { - "type": "string" - } - }, - "x-yang": { - "type": "root" - } - } - } - }, - "yang-library-version": { - "type": "object", - "properties": { - "ietf-restconf:yang-library-version": { - "description": "This leaf identifies the revision date of the 'ietf-yang-library' YANG module that is implemented by this server. See RESTCONF RFC 8040 for further information.", - "type": "object", - "x-yang": { - "type": "leaf" - } - } - } - } - }, - "parameters": { - "addresses-id": { - "type": "string", - "format": "string", - "description": "Interface IP address. Example value: 10.10.10.1", - "name": "addresses-id", - "in": "path", - "required": true - }, - "content": { - "enum": [ - "config", - "nonconfig", - "all" - ], - "type": "string", - "format": "enumeration", - "default": "config", - "description": "controlling descendant nodes in response", - "name": "content", - "in": "query" - }, - "data-post": { - "description": "This YANG module represents the CoCSN API", - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/data-post" - } - }, - "data-put-patch": { - "description": "This YANG module represents the CoCSN API", - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/data-put-patch" - } - }, - "data_cocsn_interfaces": { - "name": "interfaces", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/data_cocsn_interfaces" - } - }, - "data_cocsn_interfaces-post": { - "name": "interfaces", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/data_cocsn_interfaces-post" - } - }, - "data_cocsn_interfaces_interface_interface-name": { - "name": "interface", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name" - } - }, - "data_cocsn_interfaces_interface_interface-name_addresses_addresses-id": { - "description": "Interface IP address. Example value: 10.10.10.1", - "name": "addresses", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_addresses_addresses-id" - } - }, - "data_cocsn_interfaces_interface_interface-name_enabled": { - "description": "Enable or disable the interface. Example value: true", - "name": "enabled", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_enabled" - } - }, - "data_cocsn_interfaces_interface_interface-name_oper-status": { - "description": "Describes whether the interface is physically up or down", - "name": "oper-status", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_oper-status" - } - }, - "data_cocsn_routes": { - "name": "routes", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/data_cocsn_routes" - } - }, - "data_cocsn_routes-post": { - "name": "routes", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/data_cocsn_routes-post" - } - }, - "data_cocsn_routes_route_route-destination": { - "name": "route", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/data_cocsn_routes_route_route-destination" - } - }, - "data_cocsn_routes_route_route-destination_destination": { - "description": "Route destination. IP network", - "name": "destination", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/data_cocsn_routes_route_route-destination_destination" - } - }, - "data_cocsn_routes_route_route-destination_expire": { - "description": "Expiration timer of the route", - "name": "expire", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/data_cocsn_routes_route_route-destination_expire" - } - }, - "data_cocsn_routes_route_route-destination_flags": { - "description": "Flags of the route", - "name": "flags", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/data_cocsn_routes_route_route-destination_flags" - } - }, - "data_cocsn_routes_route_route-destination_gateway": { - "description": "Route gateway. IP address or host name", - "name": "gateway", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/data_cocsn_routes_route_route-destination_gateway" - } - }, - "data_cocsn_routes_route_route-destination_interface": { - "description": "Interface used for the route", - "name": "interface", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/data_cocsn_routes_route_route-destination_interface" - } - }, - "depth": { - "type": "integer", - "format": "uint16", - "description": "limit the depth of nodes in response", - "name": "depth", - "in": "query" - }, - "fields": { - "type": "string", - "format": "string", - "description": "optionally identify specific data nodes in response", - "name": "fields", - "in": "query" - }, - "filter": { - "type": "string", - "format": "string", - "description": "xpath expression to filter data nodes in response", - "name": "filter", - "in": "query" - }, - "insert": { - "enum": [ - "first", - "last", - "before", - "after" - ], - "type": "string", - "format": "enumeration", - "default": "first", - "description": "controlling the order when adding new list elements", - "name": "insert", - "in": "query" - }, - "interface-name": { - "type": "string", - "format": "string", - "description": "Interface name. Example value: en0", - "name": "interface-name", - "in": "path", - "required": true - }, - "point": { - "type": "string", - "format": "string", - "description": "used to specify the insertion point", - "name": "point", - "in": "query" - }, - "route-destination": { - "type": "string", - "format": "string", - "description": "Route destination. IP network", - "name": "route-destination", - "in": "path", - "required": true - }, - "with-defaults": { - "enum": [ - "report-all", - "trim", - "explicit", - "report-all-tagged" - ], - "type": "string", - "format": "enumeration", - "default": "report-all", - "description": "controlling default values in response", - "name": "with-defaults", - "in": "query" - } - }, - "responses": { - "200": { - "description": "OK" - }, - "201": { - "description": "Created" - }, - "204": { - "description": "No Content" - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" - }, - "409": { - "description": "Conflict" - } - }, - "securityDefinitions": { - "basicAuth": { - "type": "basic" - } - }, - "tags": [ - { - "description": "root resources", - "name": "root" - }, - { - "description": "operations resources", - "name": "operations" - }, - { - "description": "data resources", - "name": "data" - }, - { - "description": "get resources", - "name": "get" - }, - { - "description": "post resources", - "name": "post" - }, - { - "description": "patch resources", - "name": "patch" - }, - { - "description": "put resources", - "name": "put" - }, - { - "description": "delete resources", - "name": "delete" - } - ] -}`)) -} diff --git a/api/restapi/operations/cocsn_api.go b/api/restapi/operations/cocsn_api.go deleted file mode 100644 index d2b7f0ac54142d7d869e5c3aa101595f6a72148f..0000000000000000000000000000000000000000 --- a/api/restapi/operations/cocsn_api.go +++ /dev/null @@ -1,1025 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "net/http" - "strings" - - "github.com/go-openapi/errors" - "github.com/go-openapi/loads" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/runtime/security" - "github.com/go-openapi/spec" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - - "code.fbi.h-da.de/cocsn/cocsn-api/api/restapi/operations/data" - "code.fbi.h-da.de/cocsn/cocsn-api/api/restapi/operations/operationsops" - "code.fbi.h-da.de/cocsn/cocsn-api/api/restapi/operations/root" - "code.fbi.h-da.de/cocsn/cocsn-api/api/restapi/operations/yang_library_version" -) - -// NewCocsnAPI creates a new Cocsn instance -func NewCocsnAPI(spec *loads.Document) *CocsnAPI { - return &CocsnAPI{ - handlers: make(map[string]map[string]http.Handler), - formats: strfmt.Default, - defaultConsumes: "application/json", - defaultProduces: "application/json", - customConsumers: make(map[string]runtime.Consumer), - customProducers: make(map[string]runtime.Producer), - PreServerShutdown: func() {}, - ServerShutdown: func() {}, - spec: spec, - useSwaggerUI: false, - ServeError: errors.ServeError, - BasicAuthenticator: security.BasicAuth, - APIKeyAuthenticator: security.APIKeyAuth, - BearerAuthenticator: security.BearerAuth, - - JSONConsumer: runtime.JSONConsumer(), - - JSONProducer: runtime.JSONProducer(), - - DataDataCocsnInterfacesDeleteHandler: data.DataCocsnInterfacesDeleteHandlerFunc(func(params data.DataCocsnInterfacesDeleteParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnInterfacesDelete has not yet been implemented") - }), - DataDataCocsnInterfacesGetHandler: data.DataCocsnInterfacesGetHandlerFunc(func(params data.DataCocsnInterfacesGetParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnInterfacesGet has not yet been implemented") - }), - DataDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteHandler: data.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDelete has not yet been implemented") - }), - DataDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetHandler: data.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGet has not yet been implemented") - }), - DataDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchHandler: data.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatch has not yet been implemented") - }), - DataDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutHandler: data.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPut has not yet been implemented") - }), - DataDataCocsnInterfacesInterfaceInterfaceNameDeleteHandler: data.DataCocsnInterfacesInterfaceInterfaceNameDeleteHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameDeleteParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameDelete has not yet been implemented") - }), - DataDataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteHandler: data.DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameEnabledDelete has not yet been implemented") - }), - DataDataCocsnInterfacesInterfaceInterfaceNameEnabledGetHandler: data.DataCocsnInterfacesInterfaceInterfaceNameEnabledGetHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameEnabledGetParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameEnabledGet has not yet been implemented") - }), - DataDataCocsnInterfacesInterfaceInterfaceNameEnabledPatchHandler: data.DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameEnabledPatch has not yet been implemented") - }), - DataDataCocsnInterfacesInterfaceInterfaceNameEnabledPutHandler: data.DataCocsnInterfacesInterfaceInterfaceNameEnabledPutHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameEnabledPutParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameEnabledPut has not yet been implemented") - }), - DataDataCocsnInterfacesInterfaceInterfaceNameGetHandler: data.DataCocsnInterfacesInterfaceInterfaceNameGetHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameGetParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameGet has not yet been implemented") - }), - DataDataCocsnInterfacesInterfaceInterfaceNameNameGetHandler: data.DataCocsnInterfacesInterfaceInterfaceNameNameGetHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameNameGetParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameNameGet has not yet been implemented") - }), - DataDataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteHandler: data.DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameOperStatusDelete has not yet been implemented") - }), - DataDataCocsnInterfacesInterfaceInterfaceNameOperStatusGetHandler: data.DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameOperStatusGet has not yet been implemented") - }), - DataDataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchHandler: data.DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatch has not yet been implemented") - }), - DataDataCocsnInterfacesInterfaceInterfaceNameOperStatusPutHandler: data.DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameOperStatusPut has not yet been implemented") - }), - DataDataCocsnInterfacesInterfaceInterfaceNamePatchHandler: data.DataCocsnInterfacesInterfaceInterfaceNamePatchHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNamePatchParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNamePatch has not yet been implemented") - }), - DataDataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetHandler: data.DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGet has not yet been implemented") - }), - DataDataCocsnInterfacesInterfaceInterfaceNamePutHandler: data.DataCocsnInterfacesInterfaceInterfaceNamePutHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNamePutParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNamePut has not yet been implemented") - }), - DataDataCocsnInterfacesPatchHandler: data.DataCocsnInterfacesPatchHandlerFunc(func(params data.DataCocsnInterfacesPatchParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnInterfacesPatch has not yet been implemented") - }), - DataDataCocsnInterfacesPostHandler: data.DataCocsnInterfacesPostHandlerFunc(func(params data.DataCocsnInterfacesPostParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnInterfacesPost has not yet been implemented") - }), - DataDataCocsnInterfacesPutHandler: data.DataCocsnInterfacesPutHandlerFunc(func(params data.DataCocsnInterfacesPutParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnInterfacesPut has not yet been implemented") - }), - DataDataCocsnRoutesDeleteHandler: data.DataCocsnRoutesDeleteHandlerFunc(func(params data.DataCocsnRoutesDeleteParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnRoutesDelete has not yet been implemented") - }), - DataDataCocsnRoutesGetHandler: data.DataCocsnRoutesGetHandlerFunc(func(params data.DataCocsnRoutesGetParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnRoutesGet has not yet been implemented") - }), - DataDataCocsnRoutesPatchHandler: data.DataCocsnRoutesPatchHandlerFunc(func(params data.DataCocsnRoutesPatchParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnRoutesPatch has not yet been implemented") - }), - DataDataCocsnRoutesPostHandler: data.DataCocsnRoutesPostHandlerFunc(func(params data.DataCocsnRoutesPostParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnRoutesPost has not yet been implemented") - }), - DataDataCocsnRoutesPutHandler: data.DataCocsnRoutesPutHandlerFunc(func(params data.DataCocsnRoutesPutParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnRoutesPut has not yet been implemented") - }), - DataDataCocsnRoutesRouteRouteDestinationDeleteHandler: data.DataCocsnRoutesRouteRouteDestinationDeleteHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationDeleteParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationDelete has not yet been implemented") - }), - DataDataCocsnRoutesRouteRouteDestinationDestinationDeleteHandler: data.DataCocsnRoutesRouteRouteDestinationDestinationDeleteHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationDestinationDeleteParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationDestinationDelete has not yet been implemented") - }), - DataDataCocsnRoutesRouteRouteDestinationDestinationGetHandler: data.DataCocsnRoutesRouteRouteDestinationDestinationGetHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationDestinationGetParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationDestinationGet has not yet been implemented") - }), - DataDataCocsnRoutesRouteRouteDestinationDestinationPatchHandler: data.DataCocsnRoutesRouteRouteDestinationDestinationPatchHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationDestinationPatchParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationDestinationPatch has not yet been implemented") - }), - DataDataCocsnRoutesRouteRouteDestinationDestinationPutHandler: data.DataCocsnRoutesRouteRouteDestinationDestinationPutHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationDestinationPutParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationDestinationPut has not yet been implemented") - }), - DataDataCocsnRoutesRouteRouteDestinationExpireDeleteHandler: data.DataCocsnRoutesRouteRouteDestinationExpireDeleteHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationExpireDeleteParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationExpireDelete has not yet been implemented") - }), - DataDataCocsnRoutesRouteRouteDestinationExpireGetHandler: data.DataCocsnRoutesRouteRouteDestinationExpireGetHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationExpireGetParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationExpireGet has not yet been implemented") - }), - DataDataCocsnRoutesRouteRouteDestinationExpirePatchHandler: data.DataCocsnRoutesRouteRouteDestinationExpirePatchHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationExpirePatchParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationExpirePatch has not yet been implemented") - }), - DataDataCocsnRoutesRouteRouteDestinationExpirePutHandler: data.DataCocsnRoutesRouteRouteDestinationExpirePutHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationExpirePutParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationExpirePut has not yet been implemented") - }), - DataDataCocsnRoutesRouteRouteDestinationFlagsDeleteHandler: data.DataCocsnRoutesRouteRouteDestinationFlagsDeleteHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationFlagsDeleteParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationFlagsDelete has not yet been implemented") - }), - DataDataCocsnRoutesRouteRouteDestinationFlagsGetHandler: data.DataCocsnRoutesRouteRouteDestinationFlagsGetHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationFlagsGetParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationFlagsGet has not yet been implemented") - }), - DataDataCocsnRoutesRouteRouteDestinationFlagsPatchHandler: data.DataCocsnRoutesRouteRouteDestinationFlagsPatchHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationFlagsPatchParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationFlagsPatch has not yet been implemented") - }), - DataDataCocsnRoutesRouteRouteDestinationFlagsPutHandler: data.DataCocsnRoutesRouteRouteDestinationFlagsPutHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationFlagsPutParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationFlagsPut has not yet been implemented") - }), - DataDataCocsnRoutesRouteRouteDestinationGatewayDeleteHandler: data.DataCocsnRoutesRouteRouteDestinationGatewayDeleteHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationGatewayDeleteParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationGatewayDelete has not yet been implemented") - }), - DataDataCocsnRoutesRouteRouteDestinationGatewayGetHandler: data.DataCocsnRoutesRouteRouteDestinationGatewayGetHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationGatewayGetParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationGatewayGet has not yet been implemented") - }), - DataDataCocsnRoutesRouteRouteDestinationGatewayPatchHandler: data.DataCocsnRoutesRouteRouteDestinationGatewayPatchHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationGatewayPatchParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationGatewayPatch has not yet been implemented") - }), - DataDataCocsnRoutesRouteRouteDestinationGatewayPutHandler: data.DataCocsnRoutesRouteRouteDestinationGatewayPutHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationGatewayPutParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationGatewayPut has not yet been implemented") - }), - DataDataCocsnRoutesRouteRouteDestinationGetHandler: data.DataCocsnRoutesRouteRouteDestinationGetHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationGetParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationGet has not yet been implemented") - }), - DataDataCocsnRoutesRouteRouteDestinationInterfaceDeleteHandler: data.DataCocsnRoutesRouteRouteDestinationInterfaceDeleteHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationInterfaceDeleteParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationInterfaceDelete has not yet been implemented") - }), - DataDataCocsnRoutesRouteRouteDestinationInterfaceGetHandler: data.DataCocsnRoutesRouteRouteDestinationInterfaceGetHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationInterfaceGetParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationInterfaceGet has not yet been implemented") - }), - DataDataCocsnRoutesRouteRouteDestinationInterfacePatchHandler: data.DataCocsnRoutesRouteRouteDestinationInterfacePatchHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationInterfacePatchParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationInterfacePatch has not yet been implemented") - }), - DataDataCocsnRoutesRouteRouteDestinationInterfacePutHandler: data.DataCocsnRoutesRouteRouteDestinationInterfacePutHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationInterfacePutParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationInterfacePut has not yet been implemented") - }), - DataDataCocsnRoutesRouteRouteDestinationPatchHandler: data.DataCocsnRoutesRouteRouteDestinationPatchHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationPatchParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationPatch has not yet been implemented") - }), - DataDataCocsnRoutesRouteRouteDestinationPutHandler: data.DataCocsnRoutesRouteRouteDestinationPutHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationPutParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationPut has not yet been implemented") - }), - DataDataGetHandler: data.DataGetHandlerFunc(func(params data.DataGetParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataGet has not yet been implemented") - }), - DataDataPatchHandler: data.DataPatchHandlerFunc(func(params data.DataPatchParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataPatch has not yet been implemented") - }), - DataDataPostHandler: data.DataPostHandlerFunc(func(params data.DataPostParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataPost has not yet been implemented") - }), - DataDataPutHandler: data.DataPutHandlerFunc(func(params data.DataPutParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataPut has not yet been implemented") - }), - OperationsopsOperationsGetHandler: operationsops.OperationsGetHandlerFunc(func(params operationsops.OperationsGetParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation operationsops.OperationsGet has not yet been implemented") - }), - RootRootGetHandler: root.RootGetHandlerFunc(func(params root.RootGetParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation root.RootGet has not yet been implemented") - }), - YangLibraryVersionYangLibraryVersionGetHandler: yang_library_version.YangLibraryVersionGetHandlerFunc(func(params yang_library_version.YangLibraryVersionGetParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation yang_library_version.YangLibraryVersionGet has not yet been implemented") - }), - - // Applies when the Authorization header is set with the Basic scheme - BasicAuthAuth: func(user string, pass string) (interface{}, error) { - return nil, errors.NotImplemented("basic auth (basicAuth) has not yet been implemented") - }, - // default authorizer is authorized meaning no requests are blocked - APIAuthorizer: security.Authorized(), - } -} - -/*CocsnAPI This YANG module represents the CoCSN API */ -type CocsnAPI struct { - spec *loads.Document - context *middleware.Context - handlers map[string]map[string]http.Handler - formats strfmt.Registry - customConsumers map[string]runtime.Consumer - customProducers map[string]runtime.Producer - defaultConsumes string - defaultProduces string - Middleware func(middleware.Builder) http.Handler - useSwaggerUI bool - - // BasicAuthenticator generates a runtime.Authenticator from the supplied basic auth function. - // It has a default implementation in the security package, however you can replace it for your particular usage. - BasicAuthenticator func(security.UserPassAuthentication) runtime.Authenticator - // APIKeyAuthenticator generates a runtime.Authenticator from the supplied token auth function. - // It has a default implementation in the security package, however you can replace it for your particular usage. - APIKeyAuthenticator func(string, string, security.TokenAuthentication) runtime.Authenticator - // BearerAuthenticator generates a runtime.Authenticator from the supplied bearer token auth function. - // It has a default implementation in the security package, however you can replace it for your particular usage. - BearerAuthenticator func(string, security.ScopedTokenAuthentication) runtime.Authenticator - - // JSONConsumer registers a consumer for the following mime types: - // - application/yang-data+json - JSONConsumer runtime.Consumer - - // JSONProducer registers a producer for the following mime types: - // - application/yang-data+json - JSONProducer runtime.Producer - - // BasicAuthAuth registers a function that takes username and password and returns a principal - // it performs authentication with basic auth - BasicAuthAuth func(string, string) (interface{}, error) - - // APIAuthorizer provides access control (ACL/RBAC/ABAC) by providing access to the request and authenticated principal - APIAuthorizer runtime.Authorizer - - // DataDataCocsnInterfacesDeleteHandler sets the operation handler for the data cocsn interfaces delete operation - DataDataCocsnInterfacesDeleteHandler data.DataCocsnInterfacesDeleteHandler - // DataDataCocsnInterfacesGetHandler sets the operation handler for the data cocsn interfaces get operation - DataDataCocsnInterfacesGetHandler data.DataCocsnInterfacesGetHandler - // DataDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteHandler sets the operation handler for the data cocsn interfaces interface interface name addresses addresses id delete operation - DataDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteHandler data.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteHandler - // DataDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetHandler sets the operation handler for the data cocsn interfaces interface interface name addresses addresses id get operation - DataDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetHandler data.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetHandler - // DataDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchHandler sets the operation handler for the data cocsn interfaces interface interface name addresses addresses id patch operation - DataDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchHandler data.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchHandler - // DataDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutHandler sets the operation handler for the data cocsn interfaces interface interface name addresses addresses id put operation - DataDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutHandler data.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutHandler - // DataDataCocsnInterfacesInterfaceInterfaceNameDeleteHandler sets the operation handler for the data cocsn interfaces interface interface name delete operation - DataDataCocsnInterfacesInterfaceInterfaceNameDeleteHandler data.DataCocsnInterfacesInterfaceInterfaceNameDeleteHandler - // DataDataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteHandler sets the operation handler for the data cocsn interfaces interface interface name enabled delete operation - DataDataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteHandler data.DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteHandler - // DataDataCocsnInterfacesInterfaceInterfaceNameEnabledGetHandler sets the operation handler for the data cocsn interfaces interface interface name enabled get operation - DataDataCocsnInterfacesInterfaceInterfaceNameEnabledGetHandler data.DataCocsnInterfacesInterfaceInterfaceNameEnabledGetHandler - // DataDataCocsnInterfacesInterfaceInterfaceNameEnabledPatchHandler sets the operation handler for the data cocsn interfaces interface interface name enabled patch operation - DataDataCocsnInterfacesInterfaceInterfaceNameEnabledPatchHandler data.DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchHandler - // DataDataCocsnInterfacesInterfaceInterfaceNameEnabledPutHandler sets the operation handler for the data cocsn interfaces interface interface name enabled put operation - DataDataCocsnInterfacesInterfaceInterfaceNameEnabledPutHandler data.DataCocsnInterfacesInterfaceInterfaceNameEnabledPutHandler - // DataDataCocsnInterfacesInterfaceInterfaceNameGetHandler sets the operation handler for the data cocsn interfaces interface interface name get operation - DataDataCocsnInterfacesInterfaceInterfaceNameGetHandler data.DataCocsnInterfacesInterfaceInterfaceNameGetHandler - // DataDataCocsnInterfacesInterfaceInterfaceNameNameGetHandler sets the operation handler for the data cocsn interfaces interface interface name name get operation - DataDataCocsnInterfacesInterfaceInterfaceNameNameGetHandler data.DataCocsnInterfacesInterfaceInterfaceNameNameGetHandler - // DataDataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteHandler sets the operation handler for the data cocsn interfaces interface interface name oper status delete operation - DataDataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteHandler data.DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteHandler - // DataDataCocsnInterfacesInterfaceInterfaceNameOperStatusGetHandler sets the operation handler for the data cocsn interfaces interface interface name oper status get operation - DataDataCocsnInterfacesInterfaceInterfaceNameOperStatusGetHandler data.DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetHandler - // DataDataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchHandler sets the operation handler for the data cocsn interfaces interface interface name oper status patch operation - DataDataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchHandler data.DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchHandler - // DataDataCocsnInterfacesInterfaceInterfaceNameOperStatusPutHandler sets the operation handler for the data cocsn interfaces interface interface name oper status put operation - DataDataCocsnInterfacesInterfaceInterfaceNameOperStatusPutHandler data.DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutHandler - // DataDataCocsnInterfacesInterfaceInterfaceNamePatchHandler sets the operation handler for the data cocsn interfaces interface interface name patch operation - DataDataCocsnInterfacesInterfaceInterfaceNamePatchHandler data.DataCocsnInterfacesInterfaceInterfaceNamePatchHandler - // DataDataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetHandler sets the operation handler for the data cocsn interfaces interface interface name phys address get operation - DataDataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetHandler data.DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetHandler - // DataDataCocsnInterfacesInterfaceInterfaceNamePutHandler sets the operation handler for the data cocsn interfaces interface interface name put operation - DataDataCocsnInterfacesInterfaceInterfaceNamePutHandler data.DataCocsnInterfacesInterfaceInterfaceNamePutHandler - // DataDataCocsnInterfacesPatchHandler sets the operation handler for the data cocsn interfaces patch operation - DataDataCocsnInterfacesPatchHandler data.DataCocsnInterfacesPatchHandler - // DataDataCocsnInterfacesPostHandler sets the operation handler for the data cocsn interfaces post operation - DataDataCocsnInterfacesPostHandler data.DataCocsnInterfacesPostHandler - // DataDataCocsnInterfacesPutHandler sets the operation handler for the data cocsn interfaces put operation - DataDataCocsnInterfacesPutHandler data.DataCocsnInterfacesPutHandler - // DataDataCocsnRoutesDeleteHandler sets the operation handler for the data cocsn routes delete operation - DataDataCocsnRoutesDeleteHandler data.DataCocsnRoutesDeleteHandler - // DataDataCocsnRoutesGetHandler sets the operation handler for the data cocsn routes get operation - DataDataCocsnRoutesGetHandler data.DataCocsnRoutesGetHandler - // DataDataCocsnRoutesPatchHandler sets the operation handler for the data cocsn routes patch operation - DataDataCocsnRoutesPatchHandler data.DataCocsnRoutesPatchHandler - // DataDataCocsnRoutesPostHandler sets the operation handler for the data cocsn routes post operation - DataDataCocsnRoutesPostHandler data.DataCocsnRoutesPostHandler - // DataDataCocsnRoutesPutHandler sets the operation handler for the data cocsn routes put operation - DataDataCocsnRoutesPutHandler data.DataCocsnRoutesPutHandler - // DataDataCocsnRoutesRouteRouteDestinationDeleteHandler sets the operation handler for the data cocsn routes route route destination delete operation - DataDataCocsnRoutesRouteRouteDestinationDeleteHandler data.DataCocsnRoutesRouteRouteDestinationDeleteHandler - // DataDataCocsnRoutesRouteRouteDestinationDestinationDeleteHandler sets the operation handler for the data cocsn routes route route destination destination delete operation - DataDataCocsnRoutesRouteRouteDestinationDestinationDeleteHandler data.DataCocsnRoutesRouteRouteDestinationDestinationDeleteHandler - // DataDataCocsnRoutesRouteRouteDestinationDestinationGetHandler sets the operation handler for the data cocsn routes route route destination destination get operation - DataDataCocsnRoutesRouteRouteDestinationDestinationGetHandler data.DataCocsnRoutesRouteRouteDestinationDestinationGetHandler - // DataDataCocsnRoutesRouteRouteDestinationDestinationPatchHandler sets the operation handler for the data cocsn routes route route destination destination patch operation - DataDataCocsnRoutesRouteRouteDestinationDestinationPatchHandler data.DataCocsnRoutesRouteRouteDestinationDestinationPatchHandler - // DataDataCocsnRoutesRouteRouteDestinationDestinationPutHandler sets the operation handler for the data cocsn routes route route destination destination put operation - DataDataCocsnRoutesRouteRouteDestinationDestinationPutHandler data.DataCocsnRoutesRouteRouteDestinationDestinationPutHandler - // DataDataCocsnRoutesRouteRouteDestinationExpireDeleteHandler sets the operation handler for the data cocsn routes route route destination expire delete operation - DataDataCocsnRoutesRouteRouteDestinationExpireDeleteHandler data.DataCocsnRoutesRouteRouteDestinationExpireDeleteHandler - // DataDataCocsnRoutesRouteRouteDestinationExpireGetHandler sets the operation handler for the data cocsn routes route route destination expire get operation - DataDataCocsnRoutesRouteRouteDestinationExpireGetHandler data.DataCocsnRoutesRouteRouteDestinationExpireGetHandler - // DataDataCocsnRoutesRouteRouteDestinationExpirePatchHandler sets the operation handler for the data cocsn routes route route destination expire patch operation - DataDataCocsnRoutesRouteRouteDestinationExpirePatchHandler data.DataCocsnRoutesRouteRouteDestinationExpirePatchHandler - // DataDataCocsnRoutesRouteRouteDestinationExpirePutHandler sets the operation handler for the data cocsn routes route route destination expire put operation - DataDataCocsnRoutesRouteRouteDestinationExpirePutHandler data.DataCocsnRoutesRouteRouteDestinationExpirePutHandler - // DataDataCocsnRoutesRouteRouteDestinationFlagsDeleteHandler sets the operation handler for the data cocsn routes route route destination flags delete operation - DataDataCocsnRoutesRouteRouteDestinationFlagsDeleteHandler data.DataCocsnRoutesRouteRouteDestinationFlagsDeleteHandler - // DataDataCocsnRoutesRouteRouteDestinationFlagsGetHandler sets the operation handler for the data cocsn routes route route destination flags get operation - DataDataCocsnRoutesRouteRouteDestinationFlagsGetHandler data.DataCocsnRoutesRouteRouteDestinationFlagsGetHandler - // DataDataCocsnRoutesRouteRouteDestinationFlagsPatchHandler sets the operation handler for the data cocsn routes route route destination flags patch operation - DataDataCocsnRoutesRouteRouteDestinationFlagsPatchHandler data.DataCocsnRoutesRouteRouteDestinationFlagsPatchHandler - // DataDataCocsnRoutesRouteRouteDestinationFlagsPutHandler sets the operation handler for the data cocsn routes route route destination flags put operation - DataDataCocsnRoutesRouteRouteDestinationFlagsPutHandler data.DataCocsnRoutesRouteRouteDestinationFlagsPutHandler - // DataDataCocsnRoutesRouteRouteDestinationGatewayDeleteHandler sets the operation handler for the data cocsn routes route route destination gateway delete operation - DataDataCocsnRoutesRouteRouteDestinationGatewayDeleteHandler data.DataCocsnRoutesRouteRouteDestinationGatewayDeleteHandler - // DataDataCocsnRoutesRouteRouteDestinationGatewayGetHandler sets the operation handler for the data cocsn routes route route destination gateway get operation - DataDataCocsnRoutesRouteRouteDestinationGatewayGetHandler data.DataCocsnRoutesRouteRouteDestinationGatewayGetHandler - // DataDataCocsnRoutesRouteRouteDestinationGatewayPatchHandler sets the operation handler for the data cocsn routes route route destination gateway patch operation - DataDataCocsnRoutesRouteRouteDestinationGatewayPatchHandler data.DataCocsnRoutesRouteRouteDestinationGatewayPatchHandler - // DataDataCocsnRoutesRouteRouteDestinationGatewayPutHandler sets the operation handler for the data cocsn routes route route destination gateway put operation - DataDataCocsnRoutesRouteRouteDestinationGatewayPutHandler data.DataCocsnRoutesRouteRouteDestinationGatewayPutHandler - // DataDataCocsnRoutesRouteRouteDestinationGetHandler sets the operation handler for the data cocsn routes route route destination get operation - DataDataCocsnRoutesRouteRouteDestinationGetHandler data.DataCocsnRoutesRouteRouteDestinationGetHandler - // DataDataCocsnRoutesRouteRouteDestinationInterfaceDeleteHandler sets the operation handler for the data cocsn routes route route destination interface delete operation - DataDataCocsnRoutesRouteRouteDestinationInterfaceDeleteHandler data.DataCocsnRoutesRouteRouteDestinationInterfaceDeleteHandler - // DataDataCocsnRoutesRouteRouteDestinationInterfaceGetHandler sets the operation handler for the data cocsn routes route route destination interface get operation - DataDataCocsnRoutesRouteRouteDestinationInterfaceGetHandler data.DataCocsnRoutesRouteRouteDestinationInterfaceGetHandler - // DataDataCocsnRoutesRouteRouteDestinationInterfacePatchHandler sets the operation handler for the data cocsn routes route route destination interface patch operation - DataDataCocsnRoutesRouteRouteDestinationInterfacePatchHandler data.DataCocsnRoutesRouteRouteDestinationInterfacePatchHandler - // DataDataCocsnRoutesRouteRouteDestinationInterfacePutHandler sets the operation handler for the data cocsn routes route route destination interface put operation - DataDataCocsnRoutesRouteRouteDestinationInterfacePutHandler data.DataCocsnRoutesRouteRouteDestinationInterfacePutHandler - // DataDataCocsnRoutesRouteRouteDestinationPatchHandler sets the operation handler for the data cocsn routes route route destination patch operation - DataDataCocsnRoutesRouteRouteDestinationPatchHandler data.DataCocsnRoutesRouteRouteDestinationPatchHandler - // DataDataCocsnRoutesRouteRouteDestinationPutHandler sets the operation handler for the data cocsn routes route route destination put operation - DataDataCocsnRoutesRouteRouteDestinationPutHandler data.DataCocsnRoutesRouteRouteDestinationPutHandler - // DataDataGetHandler sets the operation handler for the data get operation - DataDataGetHandler data.DataGetHandler - // DataDataPatchHandler sets the operation handler for the data patch operation - DataDataPatchHandler data.DataPatchHandler - // DataDataPostHandler sets the operation handler for the data post operation - DataDataPostHandler data.DataPostHandler - // DataDataPutHandler sets the operation handler for the data put operation - DataDataPutHandler data.DataPutHandler - // OperationsopsOperationsGetHandler sets the operation handler for the operations get operation - OperationsopsOperationsGetHandler operationsops.OperationsGetHandler - // RootRootGetHandler sets the operation handler for the root get operation - RootRootGetHandler root.RootGetHandler - // YangLibraryVersionYangLibraryVersionGetHandler sets the operation handler for the yang library version get operation - YangLibraryVersionYangLibraryVersionGetHandler yang_library_version.YangLibraryVersionGetHandler - // ServeError is called when an error is received, there is a default handler - // but you can set your own with this - ServeError func(http.ResponseWriter, *http.Request, error) - - // PreServerShutdown is called before the HTTP(S) server is shutdown - // This allows for custom functions to get executed before the HTTP(S) server stops accepting traffic - PreServerShutdown func() - - // ServerShutdown is called when the HTTP(S) server is shut down and done - // handling all active connections and does not accept connections any more - ServerShutdown func() - - // Custom command line argument groups with their descriptions - CommandLineOptionsGroups []swag.CommandLineOptionsGroup - - // User defined logger function. - Logger func(string, ...interface{}) -} - -// UseRedoc for documentation at /docs -func (o *CocsnAPI) UseRedoc() { - o.useSwaggerUI = false -} - -// UseSwaggerUI for documentation at /docs -func (o *CocsnAPI) UseSwaggerUI() { - o.useSwaggerUI = true -} - -// SetDefaultProduces sets the default produces media type -func (o *CocsnAPI) SetDefaultProduces(mediaType string) { - o.defaultProduces = mediaType -} - -// SetDefaultConsumes returns the default consumes media type -func (o *CocsnAPI) SetDefaultConsumes(mediaType string) { - o.defaultConsumes = mediaType -} - -// SetSpec sets a spec that will be served for the clients. -func (o *CocsnAPI) SetSpec(spec *loads.Document) { - o.spec = spec -} - -// DefaultProduces returns the default produces media type -func (o *CocsnAPI) DefaultProduces() string { - return o.defaultProduces -} - -// DefaultConsumes returns the default consumes media type -func (o *CocsnAPI) DefaultConsumes() string { - return o.defaultConsumes -} - -// Formats returns the registered string formats -func (o *CocsnAPI) Formats() strfmt.Registry { - return o.formats -} - -// RegisterFormat registers a custom format validator -func (o *CocsnAPI) RegisterFormat(name string, format strfmt.Format, validator strfmt.Validator) { - o.formats.Add(name, format, validator) -} - -// Validate validates the registrations in the CocsnAPI -func (o *CocsnAPI) Validate() error { - var unregistered []string - - if o.JSONConsumer == nil { - unregistered = append(unregistered, "JSONConsumer") - } - - if o.JSONProducer == nil { - unregistered = append(unregistered, "JSONProducer") - } - - if o.BasicAuthAuth == nil { - unregistered = append(unregistered, "BasicAuthAuth") - } - - if o.DataDataCocsnInterfacesDeleteHandler == nil { - unregistered = append(unregistered, "data.DataCocsnInterfacesDeleteHandler") - } - if o.DataDataCocsnInterfacesGetHandler == nil { - unregistered = append(unregistered, "data.DataCocsnInterfacesGetHandler") - } - if o.DataDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteHandler == nil { - unregistered = append(unregistered, "data.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteHandler") - } - if o.DataDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetHandler == nil { - unregistered = append(unregistered, "data.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetHandler") - } - if o.DataDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchHandler == nil { - unregistered = append(unregistered, "data.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchHandler") - } - if o.DataDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutHandler == nil { - unregistered = append(unregistered, "data.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutHandler") - } - if o.DataDataCocsnInterfacesInterfaceInterfaceNameDeleteHandler == nil { - unregistered = append(unregistered, "data.DataCocsnInterfacesInterfaceInterfaceNameDeleteHandler") - } - if o.DataDataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteHandler == nil { - unregistered = append(unregistered, "data.DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteHandler") - } - if o.DataDataCocsnInterfacesInterfaceInterfaceNameEnabledGetHandler == nil { - unregistered = append(unregistered, "data.DataCocsnInterfacesInterfaceInterfaceNameEnabledGetHandler") - } - if o.DataDataCocsnInterfacesInterfaceInterfaceNameEnabledPatchHandler == nil { - unregistered = append(unregistered, "data.DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchHandler") - } - if o.DataDataCocsnInterfacesInterfaceInterfaceNameEnabledPutHandler == nil { - unregistered = append(unregistered, "data.DataCocsnInterfacesInterfaceInterfaceNameEnabledPutHandler") - } - if o.DataDataCocsnInterfacesInterfaceInterfaceNameGetHandler == nil { - unregistered = append(unregistered, "data.DataCocsnInterfacesInterfaceInterfaceNameGetHandler") - } - if o.DataDataCocsnInterfacesInterfaceInterfaceNameNameGetHandler == nil { - unregistered = append(unregistered, "data.DataCocsnInterfacesInterfaceInterfaceNameNameGetHandler") - } - if o.DataDataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteHandler == nil { - unregistered = append(unregistered, "data.DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteHandler") - } - if o.DataDataCocsnInterfacesInterfaceInterfaceNameOperStatusGetHandler == nil { - unregistered = append(unregistered, "data.DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetHandler") - } - if o.DataDataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchHandler == nil { - unregistered = append(unregistered, "data.DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchHandler") - } - if o.DataDataCocsnInterfacesInterfaceInterfaceNameOperStatusPutHandler == nil { - unregistered = append(unregistered, "data.DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutHandler") - } - if o.DataDataCocsnInterfacesInterfaceInterfaceNamePatchHandler == nil { - unregistered = append(unregistered, "data.DataCocsnInterfacesInterfaceInterfaceNamePatchHandler") - } - if o.DataDataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetHandler == nil { - unregistered = append(unregistered, "data.DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetHandler") - } - if o.DataDataCocsnInterfacesInterfaceInterfaceNamePutHandler == nil { - unregistered = append(unregistered, "data.DataCocsnInterfacesInterfaceInterfaceNamePutHandler") - } - if o.DataDataCocsnInterfacesPatchHandler == nil { - unregistered = append(unregistered, "data.DataCocsnInterfacesPatchHandler") - } - if o.DataDataCocsnInterfacesPostHandler == nil { - unregistered = append(unregistered, "data.DataCocsnInterfacesPostHandler") - } - if o.DataDataCocsnInterfacesPutHandler == nil { - unregistered = append(unregistered, "data.DataCocsnInterfacesPutHandler") - } - if o.DataDataCocsnRoutesDeleteHandler == nil { - unregistered = append(unregistered, "data.DataCocsnRoutesDeleteHandler") - } - if o.DataDataCocsnRoutesGetHandler == nil { - unregistered = append(unregistered, "data.DataCocsnRoutesGetHandler") - } - if o.DataDataCocsnRoutesPatchHandler == nil { - unregistered = append(unregistered, "data.DataCocsnRoutesPatchHandler") - } - if o.DataDataCocsnRoutesPostHandler == nil { - unregistered = append(unregistered, "data.DataCocsnRoutesPostHandler") - } - if o.DataDataCocsnRoutesPutHandler == nil { - unregistered = append(unregistered, "data.DataCocsnRoutesPutHandler") - } - if o.DataDataCocsnRoutesRouteRouteDestinationDeleteHandler == nil { - unregistered = append(unregistered, "data.DataCocsnRoutesRouteRouteDestinationDeleteHandler") - } - if o.DataDataCocsnRoutesRouteRouteDestinationDestinationDeleteHandler == nil { - unregistered = append(unregistered, "data.DataCocsnRoutesRouteRouteDestinationDestinationDeleteHandler") - } - if o.DataDataCocsnRoutesRouteRouteDestinationDestinationGetHandler == nil { - unregistered = append(unregistered, "data.DataCocsnRoutesRouteRouteDestinationDestinationGetHandler") - } - if o.DataDataCocsnRoutesRouteRouteDestinationDestinationPatchHandler == nil { - unregistered = append(unregistered, "data.DataCocsnRoutesRouteRouteDestinationDestinationPatchHandler") - } - if o.DataDataCocsnRoutesRouteRouteDestinationDestinationPutHandler == nil { - unregistered = append(unregistered, "data.DataCocsnRoutesRouteRouteDestinationDestinationPutHandler") - } - if o.DataDataCocsnRoutesRouteRouteDestinationExpireDeleteHandler == nil { - unregistered = append(unregistered, "data.DataCocsnRoutesRouteRouteDestinationExpireDeleteHandler") - } - if o.DataDataCocsnRoutesRouteRouteDestinationExpireGetHandler == nil { - unregistered = append(unregistered, "data.DataCocsnRoutesRouteRouteDestinationExpireGetHandler") - } - if o.DataDataCocsnRoutesRouteRouteDestinationExpirePatchHandler == nil { - unregistered = append(unregistered, "data.DataCocsnRoutesRouteRouteDestinationExpirePatchHandler") - } - if o.DataDataCocsnRoutesRouteRouteDestinationExpirePutHandler == nil { - unregistered = append(unregistered, "data.DataCocsnRoutesRouteRouteDestinationExpirePutHandler") - } - if o.DataDataCocsnRoutesRouteRouteDestinationFlagsDeleteHandler == nil { - unregistered = append(unregistered, "data.DataCocsnRoutesRouteRouteDestinationFlagsDeleteHandler") - } - if o.DataDataCocsnRoutesRouteRouteDestinationFlagsGetHandler == nil { - unregistered = append(unregistered, "data.DataCocsnRoutesRouteRouteDestinationFlagsGetHandler") - } - if o.DataDataCocsnRoutesRouteRouteDestinationFlagsPatchHandler == nil { - unregistered = append(unregistered, "data.DataCocsnRoutesRouteRouteDestinationFlagsPatchHandler") - } - if o.DataDataCocsnRoutesRouteRouteDestinationFlagsPutHandler == nil { - unregistered = append(unregistered, "data.DataCocsnRoutesRouteRouteDestinationFlagsPutHandler") - } - if o.DataDataCocsnRoutesRouteRouteDestinationGatewayDeleteHandler == nil { - unregistered = append(unregistered, "data.DataCocsnRoutesRouteRouteDestinationGatewayDeleteHandler") - } - if o.DataDataCocsnRoutesRouteRouteDestinationGatewayGetHandler == nil { - unregistered = append(unregistered, "data.DataCocsnRoutesRouteRouteDestinationGatewayGetHandler") - } - if o.DataDataCocsnRoutesRouteRouteDestinationGatewayPatchHandler == nil { - unregistered = append(unregistered, "data.DataCocsnRoutesRouteRouteDestinationGatewayPatchHandler") - } - if o.DataDataCocsnRoutesRouteRouteDestinationGatewayPutHandler == nil { - unregistered = append(unregistered, "data.DataCocsnRoutesRouteRouteDestinationGatewayPutHandler") - } - if o.DataDataCocsnRoutesRouteRouteDestinationGetHandler == nil { - unregistered = append(unregistered, "data.DataCocsnRoutesRouteRouteDestinationGetHandler") - } - if o.DataDataCocsnRoutesRouteRouteDestinationInterfaceDeleteHandler == nil { - unregistered = append(unregistered, "data.DataCocsnRoutesRouteRouteDestinationInterfaceDeleteHandler") - } - if o.DataDataCocsnRoutesRouteRouteDestinationInterfaceGetHandler == nil { - unregistered = append(unregistered, "data.DataCocsnRoutesRouteRouteDestinationInterfaceGetHandler") - } - if o.DataDataCocsnRoutesRouteRouteDestinationInterfacePatchHandler == nil { - unregistered = append(unregistered, "data.DataCocsnRoutesRouteRouteDestinationInterfacePatchHandler") - } - if o.DataDataCocsnRoutesRouteRouteDestinationInterfacePutHandler == nil { - unregistered = append(unregistered, "data.DataCocsnRoutesRouteRouteDestinationInterfacePutHandler") - } - if o.DataDataCocsnRoutesRouteRouteDestinationPatchHandler == nil { - unregistered = append(unregistered, "data.DataCocsnRoutesRouteRouteDestinationPatchHandler") - } - if o.DataDataCocsnRoutesRouteRouteDestinationPutHandler == nil { - unregistered = append(unregistered, "data.DataCocsnRoutesRouteRouteDestinationPutHandler") - } - if o.DataDataGetHandler == nil { - unregistered = append(unregistered, "data.DataGetHandler") - } - if o.DataDataPatchHandler == nil { - unregistered = append(unregistered, "data.DataPatchHandler") - } - if o.DataDataPostHandler == nil { - unregistered = append(unregistered, "data.DataPostHandler") - } - if o.DataDataPutHandler == nil { - unregistered = append(unregistered, "data.DataPutHandler") - } - if o.OperationsopsOperationsGetHandler == nil { - unregistered = append(unregistered, "operationsops.OperationsGetHandler") - } - if o.RootRootGetHandler == nil { - unregistered = append(unregistered, "root.RootGetHandler") - } - if o.YangLibraryVersionYangLibraryVersionGetHandler == nil { - unregistered = append(unregistered, "yang_library_version.YangLibraryVersionGetHandler") - } - - if len(unregistered) > 0 { - return fmt.Errorf("missing registration: %s", strings.Join(unregistered, ", ")) - } - - return nil -} - -// ServeErrorFor gets a error handler for a given operation id -func (o *CocsnAPI) ServeErrorFor(operationID string) func(http.ResponseWriter, *http.Request, error) { - return o.ServeError -} - -// AuthenticatorsFor gets the authenticators for the specified security schemes -func (o *CocsnAPI) AuthenticatorsFor(schemes map[string]spec.SecurityScheme) map[string]runtime.Authenticator { - result := make(map[string]runtime.Authenticator) - for name := range schemes { - switch name { - case "basicAuth": - result[name] = o.BasicAuthenticator(o.BasicAuthAuth) - - } - } - return result -} - -// Authorizer returns the registered authorizer -func (o *CocsnAPI) Authorizer() runtime.Authorizer { - return o.APIAuthorizer -} - -// ConsumersFor gets the consumers for the specified media types. -// MIME type parameters are ignored here. -func (o *CocsnAPI) ConsumersFor(mediaTypes []string) map[string]runtime.Consumer { - result := make(map[string]runtime.Consumer, len(mediaTypes)) - for _, mt := range mediaTypes { - switch mt { - case "application/yang-data+json": - result["application/yang-data+json"] = o.JSONConsumer - } - - if c, ok := o.customConsumers[mt]; ok { - result[mt] = c - } - } - return result -} - -// ProducersFor gets the producers for the specified media types. -// MIME type parameters are ignored here. -func (o *CocsnAPI) ProducersFor(mediaTypes []string) map[string]runtime.Producer { - result := make(map[string]runtime.Producer, len(mediaTypes)) - for _, mt := range mediaTypes { - switch mt { - case "application/yang-data+json": - result["application/yang-data+json"] = o.JSONProducer - } - - if p, ok := o.customProducers[mt]; ok { - result[mt] = p - } - } - return result -} - -// HandlerFor gets a http.Handler for the provided operation method and path -func (o *CocsnAPI) HandlerFor(method, path string) (http.Handler, bool) { - if o.handlers == nil { - return nil, false - } - um := strings.ToUpper(method) - if _, ok := o.handlers[um]; !ok { - return nil, false - } - if path == "/" { - path = "" - } - h, ok := o.handlers[um][path] - return h, ok -} - -// Context returns the middleware context for the cocsn API -func (o *CocsnAPI) Context() *middleware.Context { - if o.context == nil { - o.context = middleware.NewRoutableContext(o.spec, o, nil) - } - - return o.context -} - -func (o *CocsnAPI) initHandlerCache() { - o.Context() // don't care about the result, just that the initialization happened - if o.handlers == nil { - o.handlers = make(map[string]map[string]http.Handler) - } - - if o.handlers["DELETE"] == nil { - o.handlers["DELETE"] = make(map[string]http.Handler) - } - o.handlers["DELETE"]["/data/cocsn:interfaces"] = data.NewDataCocsnInterfacesDelete(o.context, o.DataDataCocsnInterfacesDeleteHandler) - if o.handlers["GET"] == nil { - o.handlers["GET"] = make(map[string]http.Handler) - } - o.handlers["GET"]["/data/cocsn:interfaces"] = data.NewDataCocsnInterfacesGet(o.context, o.DataDataCocsnInterfacesGetHandler) - if o.handlers["DELETE"] == nil { - o.handlers["DELETE"] = make(map[string]http.Handler) - } - o.handlers["DELETE"]["/data/cocsn:interfaces/interface={interface-name}/addresses={addresses-id}"] = data.NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDelete(o.context, o.DataDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteHandler) - if o.handlers["GET"] == nil { - o.handlers["GET"] = make(map[string]http.Handler) - } - o.handlers["GET"]["/data/cocsn:interfaces/interface={interface-name}/addresses={addresses-id}"] = data.NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGet(o.context, o.DataDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetHandler) - if o.handlers["PATCH"] == nil { - o.handlers["PATCH"] = make(map[string]http.Handler) - } - o.handlers["PATCH"]["/data/cocsn:interfaces/interface={interface-name}/addresses={addresses-id}"] = data.NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatch(o.context, o.DataDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchHandler) - if o.handlers["PUT"] == nil { - o.handlers["PUT"] = make(map[string]http.Handler) - } - o.handlers["PUT"]["/data/cocsn:interfaces/interface={interface-name}/addresses={addresses-id}"] = data.NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPut(o.context, o.DataDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutHandler) - if o.handlers["DELETE"] == nil { - o.handlers["DELETE"] = make(map[string]http.Handler) - } - o.handlers["DELETE"]["/data/cocsn:interfaces/interface={interface-name}"] = data.NewDataCocsnInterfacesInterfaceInterfaceNameDelete(o.context, o.DataDataCocsnInterfacesInterfaceInterfaceNameDeleteHandler) - if o.handlers["DELETE"] == nil { - o.handlers["DELETE"] = make(map[string]http.Handler) - } - o.handlers["DELETE"]["/data/cocsn:interfaces/interface={interface-name}/enabled"] = data.NewDataCocsnInterfacesInterfaceInterfaceNameEnabledDelete(o.context, o.DataDataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteHandler) - if o.handlers["GET"] == nil { - o.handlers["GET"] = make(map[string]http.Handler) - } - o.handlers["GET"]["/data/cocsn:interfaces/interface={interface-name}/enabled"] = data.NewDataCocsnInterfacesInterfaceInterfaceNameEnabledGet(o.context, o.DataDataCocsnInterfacesInterfaceInterfaceNameEnabledGetHandler) - if o.handlers["PATCH"] == nil { - o.handlers["PATCH"] = make(map[string]http.Handler) - } - o.handlers["PATCH"]["/data/cocsn:interfaces/interface={interface-name}/enabled"] = data.NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPatch(o.context, o.DataDataCocsnInterfacesInterfaceInterfaceNameEnabledPatchHandler) - if o.handlers["PUT"] == nil { - o.handlers["PUT"] = make(map[string]http.Handler) - } - o.handlers["PUT"]["/data/cocsn:interfaces/interface={interface-name}/enabled"] = data.NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPut(o.context, o.DataDataCocsnInterfacesInterfaceInterfaceNameEnabledPutHandler) - if o.handlers["GET"] == nil { - o.handlers["GET"] = make(map[string]http.Handler) - } - o.handlers["GET"]["/data/cocsn:interfaces/interface={interface-name}"] = data.NewDataCocsnInterfacesInterfaceInterfaceNameGet(o.context, o.DataDataCocsnInterfacesInterfaceInterfaceNameGetHandler) - if o.handlers["GET"] == nil { - o.handlers["GET"] = make(map[string]http.Handler) - } - o.handlers["GET"]["/data/cocsn:interfaces/interface={interface-name}/name"] = data.NewDataCocsnInterfacesInterfaceInterfaceNameNameGet(o.context, o.DataDataCocsnInterfacesInterfaceInterfaceNameNameGetHandler) - if o.handlers["DELETE"] == nil { - o.handlers["DELETE"] = make(map[string]http.Handler) - } - o.handlers["DELETE"]["/data/cocsn:interfaces/interface={interface-name}/oper-status"] = data.NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusDelete(o.context, o.DataDataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteHandler) - if o.handlers["GET"] == nil { - o.handlers["GET"] = make(map[string]http.Handler) - } - o.handlers["GET"]["/data/cocsn:interfaces/interface={interface-name}/oper-status"] = data.NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusGet(o.context, o.DataDataCocsnInterfacesInterfaceInterfaceNameOperStatusGetHandler) - if o.handlers["PATCH"] == nil { - o.handlers["PATCH"] = make(map[string]http.Handler) - } - o.handlers["PATCH"]["/data/cocsn:interfaces/interface={interface-name}/oper-status"] = data.NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPatch(o.context, o.DataDataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchHandler) - if o.handlers["PUT"] == nil { - o.handlers["PUT"] = make(map[string]http.Handler) - } - o.handlers["PUT"]["/data/cocsn:interfaces/interface={interface-name}/oper-status"] = data.NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPut(o.context, o.DataDataCocsnInterfacesInterfaceInterfaceNameOperStatusPutHandler) - if o.handlers["PATCH"] == nil { - o.handlers["PATCH"] = make(map[string]http.Handler) - } - o.handlers["PATCH"]["/data/cocsn:interfaces/interface={interface-name}"] = data.NewDataCocsnInterfacesInterfaceInterfaceNamePatch(o.context, o.DataDataCocsnInterfacesInterfaceInterfaceNamePatchHandler) - if o.handlers["GET"] == nil { - o.handlers["GET"] = make(map[string]http.Handler) - } - o.handlers["GET"]["/data/cocsn:interfaces/interface={interface-name}/phys-address"] = data.NewDataCocsnInterfacesInterfaceInterfaceNamePhysAddressGet(o.context, o.DataDataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetHandler) - if o.handlers["PUT"] == nil { - o.handlers["PUT"] = make(map[string]http.Handler) - } - o.handlers["PUT"]["/data/cocsn:interfaces/interface={interface-name}"] = data.NewDataCocsnInterfacesInterfaceInterfaceNamePut(o.context, o.DataDataCocsnInterfacesInterfaceInterfaceNamePutHandler) - if o.handlers["PATCH"] == nil { - o.handlers["PATCH"] = make(map[string]http.Handler) - } - o.handlers["PATCH"]["/data/cocsn:interfaces"] = data.NewDataCocsnInterfacesPatch(o.context, o.DataDataCocsnInterfacesPatchHandler) - if o.handlers["POST"] == nil { - o.handlers["POST"] = make(map[string]http.Handler) - } - o.handlers["POST"]["/data/cocsn:interfaces"] = data.NewDataCocsnInterfacesPost(o.context, o.DataDataCocsnInterfacesPostHandler) - if o.handlers["PUT"] == nil { - o.handlers["PUT"] = make(map[string]http.Handler) - } - o.handlers["PUT"]["/data/cocsn:interfaces"] = data.NewDataCocsnInterfacesPut(o.context, o.DataDataCocsnInterfacesPutHandler) - if o.handlers["DELETE"] == nil { - o.handlers["DELETE"] = make(map[string]http.Handler) - } - o.handlers["DELETE"]["/data/cocsn:routes"] = data.NewDataCocsnRoutesDelete(o.context, o.DataDataCocsnRoutesDeleteHandler) - if o.handlers["GET"] == nil { - o.handlers["GET"] = make(map[string]http.Handler) - } - o.handlers["GET"]["/data/cocsn:routes"] = data.NewDataCocsnRoutesGet(o.context, o.DataDataCocsnRoutesGetHandler) - if o.handlers["PATCH"] == nil { - o.handlers["PATCH"] = make(map[string]http.Handler) - } - o.handlers["PATCH"]["/data/cocsn:routes"] = data.NewDataCocsnRoutesPatch(o.context, o.DataDataCocsnRoutesPatchHandler) - if o.handlers["POST"] == nil { - o.handlers["POST"] = make(map[string]http.Handler) - } - o.handlers["POST"]["/data/cocsn:routes"] = data.NewDataCocsnRoutesPost(o.context, o.DataDataCocsnRoutesPostHandler) - if o.handlers["PUT"] == nil { - o.handlers["PUT"] = make(map[string]http.Handler) - } - o.handlers["PUT"]["/data/cocsn:routes"] = data.NewDataCocsnRoutesPut(o.context, o.DataDataCocsnRoutesPutHandler) - if o.handlers["DELETE"] == nil { - o.handlers["DELETE"] = make(map[string]http.Handler) - } - o.handlers["DELETE"]["/data/cocsn:routes/route={route-destination}"] = data.NewDataCocsnRoutesRouteRouteDestinationDelete(o.context, o.DataDataCocsnRoutesRouteRouteDestinationDeleteHandler) - if o.handlers["DELETE"] == nil { - o.handlers["DELETE"] = make(map[string]http.Handler) - } - o.handlers["DELETE"]["/data/cocsn:routes/route={route-destination}/destination"] = data.NewDataCocsnRoutesRouteRouteDestinationDestinationDelete(o.context, o.DataDataCocsnRoutesRouteRouteDestinationDestinationDeleteHandler) - if o.handlers["GET"] == nil { - o.handlers["GET"] = make(map[string]http.Handler) - } - o.handlers["GET"]["/data/cocsn:routes/route={route-destination}/destination"] = data.NewDataCocsnRoutesRouteRouteDestinationDestinationGet(o.context, o.DataDataCocsnRoutesRouteRouteDestinationDestinationGetHandler) - if o.handlers["PATCH"] == nil { - o.handlers["PATCH"] = make(map[string]http.Handler) - } - o.handlers["PATCH"]["/data/cocsn:routes/route={route-destination}/destination"] = data.NewDataCocsnRoutesRouteRouteDestinationDestinationPatch(o.context, o.DataDataCocsnRoutesRouteRouteDestinationDestinationPatchHandler) - if o.handlers["PUT"] == nil { - o.handlers["PUT"] = make(map[string]http.Handler) - } - o.handlers["PUT"]["/data/cocsn:routes/route={route-destination}/destination"] = data.NewDataCocsnRoutesRouteRouteDestinationDestinationPut(o.context, o.DataDataCocsnRoutesRouteRouteDestinationDestinationPutHandler) - if o.handlers["DELETE"] == nil { - o.handlers["DELETE"] = make(map[string]http.Handler) - } - o.handlers["DELETE"]["/data/cocsn:routes/route={route-destination}/expire"] = data.NewDataCocsnRoutesRouteRouteDestinationExpireDelete(o.context, o.DataDataCocsnRoutesRouteRouteDestinationExpireDeleteHandler) - if o.handlers["GET"] == nil { - o.handlers["GET"] = make(map[string]http.Handler) - } - o.handlers["GET"]["/data/cocsn:routes/route={route-destination}/expire"] = data.NewDataCocsnRoutesRouteRouteDestinationExpireGet(o.context, o.DataDataCocsnRoutesRouteRouteDestinationExpireGetHandler) - if o.handlers["PATCH"] == nil { - o.handlers["PATCH"] = make(map[string]http.Handler) - } - o.handlers["PATCH"]["/data/cocsn:routes/route={route-destination}/expire"] = data.NewDataCocsnRoutesRouteRouteDestinationExpirePatch(o.context, o.DataDataCocsnRoutesRouteRouteDestinationExpirePatchHandler) - if o.handlers["PUT"] == nil { - o.handlers["PUT"] = make(map[string]http.Handler) - } - o.handlers["PUT"]["/data/cocsn:routes/route={route-destination}/expire"] = data.NewDataCocsnRoutesRouteRouteDestinationExpirePut(o.context, o.DataDataCocsnRoutesRouteRouteDestinationExpirePutHandler) - if o.handlers["DELETE"] == nil { - o.handlers["DELETE"] = make(map[string]http.Handler) - } - o.handlers["DELETE"]["/data/cocsn:routes/route={route-destination}/flags"] = data.NewDataCocsnRoutesRouteRouteDestinationFlagsDelete(o.context, o.DataDataCocsnRoutesRouteRouteDestinationFlagsDeleteHandler) - if o.handlers["GET"] == nil { - o.handlers["GET"] = make(map[string]http.Handler) - } - o.handlers["GET"]["/data/cocsn:routes/route={route-destination}/flags"] = data.NewDataCocsnRoutesRouteRouteDestinationFlagsGet(o.context, o.DataDataCocsnRoutesRouteRouteDestinationFlagsGetHandler) - if o.handlers["PATCH"] == nil { - o.handlers["PATCH"] = make(map[string]http.Handler) - } - o.handlers["PATCH"]["/data/cocsn:routes/route={route-destination}/flags"] = data.NewDataCocsnRoutesRouteRouteDestinationFlagsPatch(o.context, o.DataDataCocsnRoutesRouteRouteDestinationFlagsPatchHandler) - if o.handlers["PUT"] == nil { - o.handlers["PUT"] = make(map[string]http.Handler) - } - o.handlers["PUT"]["/data/cocsn:routes/route={route-destination}/flags"] = data.NewDataCocsnRoutesRouteRouteDestinationFlagsPut(o.context, o.DataDataCocsnRoutesRouteRouteDestinationFlagsPutHandler) - if o.handlers["DELETE"] == nil { - o.handlers["DELETE"] = make(map[string]http.Handler) - } - o.handlers["DELETE"]["/data/cocsn:routes/route={route-destination}/gateway"] = data.NewDataCocsnRoutesRouteRouteDestinationGatewayDelete(o.context, o.DataDataCocsnRoutesRouteRouteDestinationGatewayDeleteHandler) - if o.handlers["GET"] == nil { - o.handlers["GET"] = make(map[string]http.Handler) - } - o.handlers["GET"]["/data/cocsn:routes/route={route-destination}/gateway"] = data.NewDataCocsnRoutesRouteRouteDestinationGatewayGet(o.context, o.DataDataCocsnRoutesRouteRouteDestinationGatewayGetHandler) - if o.handlers["PATCH"] == nil { - o.handlers["PATCH"] = make(map[string]http.Handler) - } - o.handlers["PATCH"]["/data/cocsn:routes/route={route-destination}/gateway"] = data.NewDataCocsnRoutesRouteRouteDestinationGatewayPatch(o.context, o.DataDataCocsnRoutesRouteRouteDestinationGatewayPatchHandler) - if o.handlers["PUT"] == nil { - o.handlers["PUT"] = make(map[string]http.Handler) - } - o.handlers["PUT"]["/data/cocsn:routes/route={route-destination}/gateway"] = data.NewDataCocsnRoutesRouteRouteDestinationGatewayPut(o.context, o.DataDataCocsnRoutesRouteRouteDestinationGatewayPutHandler) - if o.handlers["GET"] == nil { - o.handlers["GET"] = make(map[string]http.Handler) - } - o.handlers["GET"]["/data/cocsn:routes/route={route-destination}"] = data.NewDataCocsnRoutesRouteRouteDestinationGet(o.context, o.DataDataCocsnRoutesRouteRouteDestinationGetHandler) - if o.handlers["DELETE"] == nil { - o.handlers["DELETE"] = make(map[string]http.Handler) - } - o.handlers["DELETE"]["/data/cocsn:routes/route={route-destination}/interface"] = data.NewDataCocsnRoutesRouteRouteDestinationInterfaceDelete(o.context, o.DataDataCocsnRoutesRouteRouteDestinationInterfaceDeleteHandler) - if o.handlers["GET"] == nil { - o.handlers["GET"] = make(map[string]http.Handler) - } - o.handlers["GET"]["/data/cocsn:routes/route={route-destination}/interface"] = data.NewDataCocsnRoutesRouteRouteDestinationInterfaceGet(o.context, o.DataDataCocsnRoutesRouteRouteDestinationInterfaceGetHandler) - if o.handlers["PATCH"] == nil { - o.handlers["PATCH"] = make(map[string]http.Handler) - } - o.handlers["PATCH"]["/data/cocsn:routes/route={route-destination}/interface"] = data.NewDataCocsnRoutesRouteRouteDestinationInterfacePatch(o.context, o.DataDataCocsnRoutesRouteRouteDestinationInterfacePatchHandler) - if o.handlers["PUT"] == nil { - o.handlers["PUT"] = make(map[string]http.Handler) - } - o.handlers["PUT"]["/data/cocsn:routes/route={route-destination}/interface"] = data.NewDataCocsnRoutesRouteRouteDestinationInterfacePut(o.context, o.DataDataCocsnRoutesRouteRouteDestinationInterfacePutHandler) - if o.handlers["PATCH"] == nil { - o.handlers["PATCH"] = make(map[string]http.Handler) - } - o.handlers["PATCH"]["/data/cocsn:routes/route={route-destination}"] = data.NewDataCocsnRoutesRouteRouteDestinationPatch(o.context, o.DataDataCocsnRoutesRouteRouteDestinationPatchHandler) - if o.handlers["PUT"] == nil { - o.handlers["PUT"] = make(map[string]http.Handler) - } - o.handlers["PUT"]["/data/cocsn:routes/route={route-destination}"] = data.NewDataCocsnRoutesRouteRouteDestinationPut(o.context, o.DataDataCocsnRoutesRouteRouteDestinationPutHandler) - if o.handlers["GET"] == nil { - o.handlers["GET"] = make(map[string]http.Handler) - } - o.handlers["GET"]["/data"] = data.NewDataGet(o.context, o.DataDataGetHandler) - if o.handlers["PATCH"] == nil { - o.handlers["PATCH"] = make(map[string]http.Handler) - } - o.handlers["PATCH"]["/data"] = data.NewDataPatch(o.context, o.DataDataPatchHandler) - if o.handlers["POST"] == nil { - o.handlers["POST"] = make(map[string]http.Handler) - } - o.handlers["POST"]["/data"] = data.NewDataPost(o.context, o.DataDataPostHandler) - if o.handlers["PUT"] == nil { - o.handlers["PUT"] = make(map[string]http.Handler) - } - o.handlers["PUT"]["/data"] = data.NewDataPut(o.context, o.DataDataPutHandler) - if o.handlers["GET"] == nil { - o.handlers["GET"] = make(map[string]http.Handler) - } - o.handlers["GET"]["/operations"] = operationsops.NewOperationsGet(o.context, o.OperationsopsOperationsGetHandler) - if o.handlers["GET"] == nil { - o.handlers["GET"] = make(map[string]http.Handler) - } - o.handlers["GET"][""] = root.NewRootGet(o.context, o.RootRootGetHandler) - if o.handlers["GET"] == nil { - o.handlers["GET"] = make(map[string]http.Handler) - } - o.handlers["GET"]["/yang-library-version"] = yang_library_version.NewYangLibraryVersionGet(o.context, o.YangLibraryVersionYangLibraryVersionGetHandler) -} - -// Serve creates a http handler to serve the API over HTTP -// can be used directly in http.ListenAndServe(":8000", api.Serve(nil)) -func (o *CocsnAPI) Serve(builder middleware.Builder) http.Handler { - o.Init() - - if o.Middleware != nil { - return o.Middleware(builder) - } - if o.useSwaggerUI { - return o.context.APIHandlerSwaggerUI(builder) - } - return o.context.APIHandler(builder) -} - -// Init allows you to just initialize the handler cache, you can then recompose the middleware as you see fit -func (o *CocsnAPI) Init() { - if len(o.handlers) == 0 { - o.initHandlerCache() - } -} - -// RegisterConsumer allows you to add (or override) a consumer for a media type. -func (o *CocsnAPI) RegisterConsumer(mediaType string, consumer runtime.Consumer) { - o.customConsumers[mediaType] = consumer -} - -// RegisterProducer allows you to add (or override) a producer for a media type. -func (o *CocsnAPI) RegisterProducer(mediaType string, producer runtime.Producer) { - o.customProducers[mediaType] = producer -} - -// AddMiddlewareFor adds a http middleware to existing handler -func (o *CocsnAPI) AddMiddlewareFor(method, path string, builder middleware.Builder) { - um := strings.ToUpper(method) - if path == "/" { - path = "" - } - o.Init() - if h, ok := o.handlers[um][path]; ok { - o.handlers[method][path] = builder(h) - } -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_delete.go b/api/restapi/operations/data/data_cocsn_interfaces_delete.go deleted file mode 100644 index 4817f91ccf8cb19e02b7a8bcf94901ba56178f3a..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataCocsnInterfacesDeleteHandlerFunc turns a function with the right signature into a data cocsn interfaces delete handler -type DataCocsnInterfacesDeleteHandlerFunc func(DataCocsnInterfacesDeleteParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataCocsnInterfacesDeleteHandlerFunc) Handle(params DataCocsnInterfacesDeleteParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataCocsnInterfacesDeleteHandler interface for that can handle valid data cocsn interfaces delete params -type DataCocsnInterfacesDeleteHandler interface { - Handle(DataCocsnInterfacesDeleteParams, interface{}) middleware.Responder -} - -// NewDataCocsnInterfacesDelete creates a new http.Handler for the data cocsn interfaces delete operation -func NewDataCocsnInterfacesDelete(ctx *middleware.Context, handler DataCocsnInterfacesDeleteHandler) *DataCocsnInterfacesDelete { - return &DataCocsnInterfacesDelete{Context: ctx, Handler: handler} -} - -/*DataCocsnInterfacesDelete swagger:route DELETE /data/cocsn:interfaces data delete dataCocsnInterfacesDelete - -DataCocsnInterfacesDelete data cocsn interfaces delete API - -*/ -type DataCocsnInterfacesDelete struct { - Context *middleware.Context - Handler DataCocsnInterfacesDeleteHandler -} - -func (o *DataCocsnInterfacesDelete) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataCocsnInterfacesDeleteParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_delete_parameters.go b/api/restapi/operations/data/data_cocsn_interfaces_delete_parameters.go deleted file mode 100644 index a4a53c7be5ffd072a75a219f678fb821cf3aea5d..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_delete_parameters.go +++ /dev/null @@ -1,45 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime/middleware" -) - -// NewDataCocsnInterfacesDeleteParams creates a new DataCocsnInterfacesDeleteParams object -// no default values defined in spec. -func NewDataCocsnInterfacesDeleteParams() DataCocsnInterfacesDeleteParams { - - return DataCocsnInterfacesDeleteParams{} -} - -// DataCocsnInterfacesDeleteParams contains all the bound params for the data cocsn interfaces delete operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_interfaces_delete -type DataCocsnInterfacesDeleteParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnInterfacesDeleteParams() beforehand. -func (o *DataCocsnInterfacesDeleteParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_delete_responses.go b/api/restapi/operations/data/data_cocsn_interfaces_delete_responses.go deleted file mode 100644 index b1f92dc9604c0b96ee346029ca38ac4a835bb2b8..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_delete_responses.go +++ /dev/null @@ -1,36 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// DataCocsnInterfacesDeleteNoContentCode is the HTTP code returned for type DataCocsnInterfacesDeleteNoContent -const DataCocsnInterfacesDeleteNoContentCode int = 204 - -/*DataCocsnInterfacesDeleteNoContent No Content - -swagger:response dataCocsnInterfacesDeleteNoContent -*/ -type DataCocsnInterfacesDeleteNoContent struct { -} - -// NewDataCocsnInterfacesDeleteNoContent creates DataCocsnInterfacesDeleteNoContent with default headers values -func NewDataCocsnInterfacesDeleteNoContent() *DataCocsnInterfacesDeleteNoContent { - - return &DataCocsnInterfacesDeleteNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesDeleteNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_delete_urlbuilder.go b/api/restapi/operations/data/data_cocsn_interfaces_delete_urlbuilder.go deleted file mode 100644 index fa61c2f32aa4bbae4e6ecc576c5439671fecb9f8..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_delete_urlbuilder.go +++ /dev/null @@ -1,87 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" -) - -// DataCocsnInterfacesDeleteURL generates an URL for the data cocsn interfaces delete operation -type DataCocsnInterfacesDeleteURL struct { - _basePath string -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnInterfacesDeleteURL) WithBasePath(bp string) *DataCocsnInterfacesDeleteURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnInterfacesDeleteURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DataCocsnInterfacesDeleteURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/cocsn:interfaces" - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnInterfacesDeleteURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DataCocsnInterfacesDeleteURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnInterfacesDeleteURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnInterfacesDeleteURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnInterfacesDeleteURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DataCocsnInterfacesDeleteURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_get.go b/api/restapi/operations/data/data_cocsn_interfaces_get.go deleted file mode 100644 index afe6c7ec5164203f8499aa8d96f4e94208f69e5d..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_get.go +++ /dev/null @@ -1,71 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataCocsnInterfacesGetHandlerFunc turns a function with the right signature into a data cocsn interfaces get handler -type DataCocsnInterfacesGetHandlerFunc func(DataCocsnInterfacesGetParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataCocsnInterfacesGetHandlerFunc) Handle(params DataCocsnInterfacesGetParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataCocsnInterfacesGetHandler interface for that can handle valid data cocsn interfaces get params -type DataCocsnInterfacesGetHandler interface { - Handle(DataCocsnInterfacesGetParams, interface{}) middleware.Responder -} - -// NewDataCocsnInterfacesGet creates a new http.Handler for the data cocsn interfaces get operation -func NewDataCocsnInterfacesGet(ctx *middleware.Context, handler DataCocsnInterfacesGetHandler) *DataCocsnInterfacesGet { - return &DataCocsnInterfacesGet{Context: ctx, Handler: handler} -} - -/*DataCocsnInterfacesGet swagger:route GET /data/cocsn:interfaces data get dataCocsnInterfacesGet - -DataCocsnInterfacesGet data cocsn interfaces get API - -*/ -type DataCocsnInterfacesGet struct { - Context *middleware.Context - Handler DataCocsnInterfacesGetHandler -} - -func (o *DataCocsnInterfacesGet) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataCocsnInterfacesGetParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_get_parameters.go b/api/restapi/operations/data/data_cocsn_interfaces_get_parameters.go deleted file mode 100644 index 58a17b37e84786338998041f781551178599a863..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_get_parameters.go +++ /dev/null @@ -1,235 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// NewDataCocsnInterfacesGetParams creates a new DataCocsnInterfacesGetParams object -// with the default values initialized. -func NewDataCocsnInterfacesGetParams() DataCocsnInterfacesGetParams { - - var ( - // initialize parameters with default values - - contentDefault = string("config") - - withDefaultsDefault = string("report-all") - ) - - return DataCocsnInterfacesGetParams{ - Content: &contentDefault, - - WithDefaults: &withDefaultsDefault, - } -} - -// DataCocsnInterfacesGetParams contains all the bound params for the data cocsn interfaces get operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_interfaces_get -type DataCocsnInterfacesGetParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*controlling descendant nodes in response - In: query - Default: "config" - */ - Content *string - /*limit the depth of nodes in response - In: query - */ - Depth *uint16 - /*optionally identify specific data nodes in response - In: query - */ - Fields *string - /*xpath expression to filter data nodes in response - In: query - */ - Filter *string - /*controlling default values in response - In: query - Default: "report-all" - */ - WithDefaults *string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnInterfacesGetParams() beforehand. -func (o *DataCocsnInterfacesGetParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - qs := runtime.Values(r.URL.Query()) - - qContent, qhkContent, _ := qs.GetOK("content") - if err := o.bindContent(qContent, qhkContent, route.Formats); err != nil { - res = append(res, err) - } - - qDepth, qhkDepth, _ := qs.GetOK("depth") - if err := o.bindDepth(qDepth, qhkDepth, route.Formats); err != nil { - res = append(res, err) - } - - qFields, qhkFields, _ := qs.GetOK("fields") - if err := o.bindFields(qFields, qhkFields, route.Formats); err != nil { - res = append(res, err) - } - - qFilter, qhkFilter, _ := qs.GetOK("filter") - if err := o.bindFilter(qFilter, qhkFilter, route.Formats); err != nil { - res = append(res, err) - } - - qWithDefaults, qhkWithDefaults, _ := qs.GetOK("with-defaults") - if err := o.bindWithDefaults(qWithDefaults, qhkWithDefaults, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindContent binds and validates parameter Content from query. -func (o *DataCocsnInterfacesGetParams) bindContent(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - // Default values have been previously initialized by NewDataCocsnInterfacesGetParams() - return nil - } - - o.Content = &raw - - if err := o.validateContent(formats); err != nil { - return err - } - - return nil -} - -// validateContent carries on validations for parameter Content -func (o *DataCocsnInterfacesGetParams) validateContent(formats strfmt.Registry) error { - - if err := validate.EnumCase("content", "query", *o.Content, []interface{}{"config", "nonconfig", "all"}, true); err != nil { - return err - } - - return nil -} - -// bindDepth binds and validates parameter Depth from query. -func (o *DataCocsnInterfacesGetParams) bindDepth(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - value, err := swag.ConvertUint16(raw) - if err != nil { - return errors.InvalidType("depth", "query", "uint16", raw) - } - o.Depth = &value - - return nil -} - -// bindFields binds and validates parameter Fields from query. -func (o *DataCocsnInterfacesGetParams) bindFields(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - o.Fields = &raw - - return nil -} - -// bindFilter binds and validates parameter Filter from query. -func (o *DataCocsnInterfacesGetParams) bindFilter(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - o.Filter = &raw - - return nil -} - -// bindWithDefaults binds and validates parameter WithDefaults from query. -func (o *DataCocsnInterfacesGetParams) bindWithDefaults(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - // Default values have been previously initialized by NewDataCocsnInterfacesGetParams() - return nil - } - - o.WithDefaults = &raw - - if err := o.validateWithDefaults(formats); err != nil { - return err - } - - return nil -} - -// validateWithDefaults carries on validations for parameter WithDefaults -func (o *DataCocsnInterfacesGetParams) validateWithDefaults(formats strfmt.Registry) error { - - if err := validate.EnumCase("with-defaults", "query", *o.WithDefaults, []interface{}{"report-all", "trim", "explicit", "report-all-tagged"}, true); err != nil { - return err - } - - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_get_responses.go b/api/restapi/operations/data/data_cocsn_interfaces_get_responses.go deleted file mode 100644 index 47a12c8d305643b3eb4782d2b57bc62d6032c2ab..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_get_responses.go +++ /dev/null @@ -1,202 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" - - "code.fbi.h-da.de/cocsn/cocsn-api/api/models" -) - -// DataCocsnInterfacesGetOKCode is the HTTP code returned for type DataCocsnInterfacesGetOK -const DataCocsnInterfacesGetOKCode int = 200 - -/*DataCocsnInterfacesGetOK OK - -swagger:response dataCocsnInterfacesGetOK -*/ -type DataCocsnInterfacesGetOK struct { - - /* - In: Body - */ - Payload *models.DataCocsnInterfaces `json:"body,omitempty"` -} - -// NewDataCocsnInterfacesGetOK creates DataCocsnInterfacesGetOK with default headers values -func NewDataCocsnInterfacesGetOK() *DataCocsnInterfacesGetOK { - - return &DataCocsnInterfacesGetOK{} -} - -// WithPayload adds the payload to the data cocsn interfaces get o k response -func (o *DataCocsnInterfacesGetOK) WithPayload(payload *models.DataCocsnInterfaces) *DataCocsnInterfacesGetOK { - o.Payload = payload - return o -} - -// SetPayload sets the payload to the data cocsn interfaces get o k response -func (o *DataCocsnInterfacesGetOK) SetPayload(payload *models.DataCocsnInterfaces) { - o.Payload = payload -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesGetOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.WriteHeader(200) - if o.Payload != nil { - payload := o.Payload - if err := producer.Produce(rw, payload); err != nil { - panic(err) // let the recovery middleware deal with this - } - } -} - -// DataCocsnInterfacesGetNoContentCode is the HTTP code returned for type DataCocsnInterfacesGetNoContent -const DataCocsnInterfacesGetNoContentCode int = 204 - -/*DataCocsnInterfacesGetNoContent No Content - -swagger:response dataCocsnInterfacesGetNoContent -*/ -type DataCocsnInterfacesGetNoContent struct { -} - -// NewDataCocsnInterfacesGetNoContent creates DataCocsnInterfacesGetNoContent with default headers values -func NewDataCocsnInterfacesGetNoContent() *DataCocsnInterfacesGetNoContent { - - return &DataCocsnInterfacesGetNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesGetNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DataCocsnInterfacesGetBadRequestCode is the HTTP code returned for type DataCocsnInterfacesGetBadRequest -const DataCocsnInterfacesGetBadRequestCode int = 400 - -/*DataCocsnInterfacesGetBadRequest Bad Request - -swagger:response dataCocsnInterfacesGetBadRequest -*/ -type DataCocsnInterfacesGetBadRequest struct { -} - -// NewDataCocsnInterfacesGetBadRequest creates DataCocsnInterfacesGetBadRequest with default headers values -func NewDataCocsnInterfacesGetBadRequest() *DataCocsnInterfacesGetBadRequest { - - return &DataCocsnInterfacesGetBadRequest{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesGetBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// DataCocsnInterfacesGetUnauthorizedCode is the HTTP code returned for type DataCocsnInterfacesGetUnauthorized -const DataCocsnInterfacesGetUnauthorizedCode int = 401 - -/*DataCocsnInterfacesGetUnauthorized Unauthorized - -swagger:response dataCocsnInterfacesGetUnauthorized -*/ -type DataCocsnInterfacesGetUnauthorized struct { -} - -// NewDataCocsnInterfacesGetUnauthorized creates DataCocsnInterfacesGetUnauthorized with default headers values -func NewDataCocsnInterfacesGetUnauthorized() *DataCocsnInterfacesGetUnauthorized { - - return &DataCocsnInterfacesGetUnauthorized{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesGetUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(401) -} - -// DataCocsnInterfacesGetNotFoundCode is the HTTP code returned for type DataCocsnInterfacesGetNotFound -const DataCocsnInterfacesGetNotFoundCode int = 404 - -/*DataCocsnInterfacesGetNotFound Not Found - -swagger:response dataCocsnInterfacesGetNotFound -*/ -type DataCocsnInterfacesGetNotFound struct { -} - -// NewDataCocsnInterfacesGetNotFound creates DataCocsnInterfacesGetNotFound with default headers values -func NewDataCocsnInterfacesGetNotFound() *DataCocsnInterfacesGetNotFound { - - return &DataCocsnInterfacesGetNotFound{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesGetNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(404) -} - -// DataCocsnInterfacesGetMethodNotAllowedCode is the HTTP code returned for type DataCocsnInterfacesGetMethodNotAllowed -const DataCocsnInterfacesGetMethodNotAllowedCode int = 405 - -/*DataCocsnInterfacesGetMethodNotAllowed Method Not Allowed - -swagger:response dataCocsnInterfacesGetMethodNotAllowed -*/ -type DataCocsnInterfacesGetMethodNotAllowed struct { -} - -// NewDataCocsnInterfacesGetMethodNotAllowed creates DataCocsnInterfacesGetMethodNotAllowed with default headers values -func NewDataCocsnInterfacesGetMethodNotAllowed() *DataCocsnInterfacesGetMethodNotAllowed { - - return &DataCocsnInterfacesGetMethodNotAllowed{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesGetMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(405) -} - -// DataCocsnInterfacesGetConflictCode is the HTTP code returned for type DataCocsnInterfacesGetConflict -const DataCocsnInterfacesGetConflictCode int = 409 - -/*DataCocsnInterfacesGetConflict Conflict - -swagger:response dataCocsnInterfacesGetConflict -*/ -type DataCocsnInterfacesGetConflict struct { -} - -// NewDataCocsnInterfacesGetConflict creates DataCocsnInterfacesGetConflict with default headers values -func NewDataCocsnInterfacesGetConflict() *DataCocsnInterfacesGetConflict { - - return &DataCocsnInterfacesGetConflict{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesGetConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_get_urlbuilder.go b/api/restapi/operations/data/data_cocsn_interfaces_get_urlbuilder.go deleted file mode 100644 index 3ce02d45dd8c239d1dacea86dd5acbbaaffd2665..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_get_urlbuilder.go +++ /dev/null @@ -1,141 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - - "github.com/go-openapi/swag" -) - -// DataCocsnInterfacesGetURL generates an URL for the data cocsn interfaces get operation -type DataCocsnInterfacesGetURL struct { - Content *string - Depth *uint16 - Fields *string - Filter *string - WithDefaults *string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnInterfacesGetURL) WithBasePath(bp string) *DataCocsnInterfacesGetURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnInterfacesGetURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DataCocsnInterfacesGetURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/cocsn:interfaces" - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - qs := make(url.Values) - - var contentQ string - if o.Content != nil { - contentQ = *o.Content - } - if contentQ != "" { - qs.Set("content", contentQ) - } - - var depthQ string - if o.Depth != nil { - depthQ = swag.FormatUint16(*o.Depth) - } - if depthQ != "" { - qs.Set("depth", depthQ) - } - - var fieldsQ string - if o.Fields != nil { - fieldsQ = *o.Fields - } - if fieldsQ != "" { - qs.Set("fields", fieldsQ) - } - - var filterQ string - if o.Filter != nil { - filterQ = *o.Filter - } - if filterQ != "" { - qs.Set("filter", filterQ) - } - - var withDefaultsQ string - if o.WithDefaults != nil { - withDefaultsQ = *o.WithDefaults - } - if withDefaultsQ != "" { - qs.Set("with-defaults", withDefaultsQ) - } - - _result.RawQuery = qs.Encode() - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnInterfacesGetURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DataCocsnInterfacesGetURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnInterfacesGetURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnInterfacesGetURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnInterfacesGetURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DataCocsnInterfacesGetURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_delete.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_delete.go deleted file mode 100644 index 476e90b04d8c6b7ff3ec79bcb89b0fee6c26e094..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_delete.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteHandlerFunc turns a function with the right signature into a data cocsn interfaces interface interface name addresses addresses id delete handler -type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteHandlerFunc func(DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteHandlerFunc) Handle(params DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteHandler interface for that can handle valid data cocsn interfaces interface interface name addresses addresses id delete params -type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteHandler interface { - Handle(DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteParams, interface{}) middleware.Responder -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDelete creates a new http.Handler for the data cocsn interfaces interface interface name addresses addresses id delete operation -func NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDelete(ctx *middleware.Context, handler DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteHandler) *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDelete { - return &DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDelete{Context: ctx, Handler: handler} -} - -/*DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDelete swagger:route DELETE /data/cocsn:interfaces/interface={interface-name}/addresses={addresses-id} data delete dataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIdDelete - -Interface IP address. Example value: 10.10.10.1 - -Interface IP address. Example value: 10.10.10.1 - -*/ -type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDelete struct { - Context *middleware.Context - Handler DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteHandler -} - -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDelete) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_delete_parameters.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_delete_parameters.go deleted file mode 100644 index cf4be8a25964736444bc9959d8b487b1b734d738..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_delete_parameters.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" -) - -// NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteParams creates a new DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteParams object -// no default values defined in spec. -func NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteParams() DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteParams { - - return DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteParams{} -} - -// DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteParams contains all the bound params for the data cocsn interfaces interface interface name addresses addresses id delete operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_delete -type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*Interface IP address. Example value: 10.10.10.1 - Required: true - In: path - */ - AddressesID string - /*Interface name. Example value: en0 - Required: true - In: path - */ - InterfaceName string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteParams() beforehand. -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - rAddressesID, rhkAddressesID, _ := route.Params.GetOK("addresses-id") - if err := o.bindAddressesID(rAddressesID, rhkAddressesID, route.Formats); err != nil { - res = append(res, err) - } - - rInterfaceName, rhkInterfaceName, _ := route.Params.GetOK("interface-name") - if err := o.bindInterfaceName(rInterfaceName, rhkInterfaceName, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindAddressesID binds and validates parameter AddressesID from path. -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteParams) bindAddressesID(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.AddressesID = raw - - return nil -} - -// bindInterfaceName binds and validates parameter InterfaceName from path. -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteParams) bindInterfaceName(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.InterfaceName = raw - - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_delete_responses.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_delete_responses.go deleted file mode 100644 index dcf7cdcd700a0048eeb776dffcca64d6e1d1f045..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_delete_responses.go +++ /dev/null @@ -1,36 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteNoContentCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteNoContent -const DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteNoContentCode int = 204 - -/*DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteNoContent No Content - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIdDeleteNoContent -*/ -type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteNoContent struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteNoContent creates DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteNoContent with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteNoContent() *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteNoContent { - - return &DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_delete_urlbuilder.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_delete_urlbuilder.go deleted file mode 100644 index cb06f64b90c5626c305e95a84feee97bf05c5aa4..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_delete_urlbuilder.go +++ /dev/null @@ -1,107 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" -) - -// DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteURL generates an URL for the data cocsn interfaces interface interface name addresses addresses id delete operation -type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteURL struct { - AddressesID string - InterfaceName string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteURL) WithBasePath(bp string) *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/cocsn:interfaces/interface={interface-name}/addresses={addresses-id}" - - addressesID := o.AddressesID - if addressesID != "" { - _path = strings.Replace(_path, "{addresses-id}", addressesID, -1) - } else { - return nil, errors.New("addressesId is required on DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteURL") - } - - interfaceName := o.InterfaceName - if interfaceName != "" { - _path = strings.Replace(_path, "{interface-name}", interfaceName, -1) - } else { - return nil, errors.New("interfaceName is required on DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteURL") - } - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_get.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_get.go deleted file mode 100644 index 9797fbf7cf87e80176bad3e83228029941758c48..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_get.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetHandlerFunc turns a function with the right signature into a data cocsn interfaces interface interface name addresses addresses id get handler -type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetHandlerFunc func(DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetHandlerFunc) Handle(params DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetHandler interface for that can handle valid data cocsn interfaces interface interface name addresses addresses id get params -type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetHandler interface { - Handle(DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetParams, interface{}) middleware.Responder -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGet creates a new http.Handler for the data cocsn interfaces interface interface name addresses addresses id get operation -func NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGet(ctx *middleware.Context, handler DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetHandler) *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGet { - return &DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGet{Context: ctx, Handler: handler} -} - -/*DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGet swagger:route GET /data/cocsn:interfaces/interface={interface-name}/addresses={addresses-id} data get dataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIdGet - -Interface IP address. Example value: 10.10.10.1 - -Interface IP address. Example value: 10.10.10.1 - -*/ -type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGet struct { - Context *middleware.Context - Handler DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetHandler -} - -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGet) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_get_parameters.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_get_parameters.go deleted file mode 100644 index 0264dfa61cb27d8bf2e008b8e2ed2a49fbe74a24..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_get_parameters.go +++ /dev/null @@ -1,285 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetParams creates a new DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetParams object -// with the default values initialized. -func NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetParams() DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetParams { - - var ( - // initialize parameters with default values - - contentDefault = string("config") - - withDefaultsDefault = string("report-all") - ) - - return DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetParams{ - Content: &contentDefault, - - WithDefaults: &withDefaultsDefault, - } -} - -// DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetParams contains all the bound params for the data cocsn interfaces interface interface name addresses addresses id get operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_get -type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*Interface IP address. Example value: 10.10.10.1 - Required: true - In: path - */ - AddressesID string - /*controlling descendant nodes in response - In: query - Default: "config" - */ - Content *string - /*limit the depth of nodes in response - In: query - */ - Depth *uint16 - /*optionally identify specific data nodes in response - In: query - */ - Fields *string - /*xpath expression to filter data nodes in response - In: query - */ - Filter *string - /*Interface name. Example value: en0 - Required: true - In: path - */ - InterfaceName string - /*controlling default values in response - In: query - Default: "report-all" - */ - WithDefaults *string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetParams() beforehand. -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - qs := runtime.Values(r.URL.Query()) - - rAddressesID, rhkAddressesID, _ := route.Params.GetOK("addresses-id") - if err := o.bindAddressesID(rAddressesID, rhkAddressesID, route.Formats); err != nil { - res = append(res, err) - } - - qContent, qhkContent, _ := qs.GetOK("content") - if err := o.bindContent(qContent, qhkContent, route.Formats); err != nil { - res = append(res, err) - } - - qDepth, qhkDepth, _ := qs.GetOK("depth") - if err := o.bindDepth(qDepth, qhkDepth, route.Formats); err != nil { - res = append(res, err) - } - - qFields, qhkFields, _ := qs.GetOK("fields") - if err := o.bindFields(qFields, qhkFields, route.Formats); err != nil { - res = append(res, err) - } - - qFilter, qhkFilter, _ := qs.GetOK("filter") - if err := o.bindFilter(qFilter, qhkFilter, route.Formats); err != nil { - res = append(res, err) - } - - rInterfaceName, rhkInterfaceName, _ := route.Params.GetOK("interface-name") - if err := o.bindInterfaceName(rInterfaceName, rhkInterfaceName, route.Formats); err != nil { - res = append(res, err) - } - - qWithDefaults, qhkWithDefaults, _ := qs.GetOK("with-defaults") - if err := o.bindWithDefaults(qWithDefaults, qhkWithDefaults, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindAddressesID binds and validates parameter AddressesID from path. -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetParams) bindAddressesID(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.AddressesID = raw - - return nil -} - -// bindContent binds and validates parameter Content from query. -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetParams) bindContent(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - // Default values have been previously initialized by NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetParams() - return nil - } - - o.Content = &raw - - if err := o.validateContent(formats); err != nil { - return err - } - - return nil -} - -// validateContent carries on validations for parameter Content -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetParams) validateContent(formats strfmt.Registry) error { - - if err := validate.EnumCase("content", "query", *o.Content, []interface{}{"config", "nonconfig", "all"}, true); err != nil { - return err - } - - return nil -} - -// bindDepth binds and validates parameter Depth from query. -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetParams) bindDepth(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - value, err := swag.ConvertUint16(raw) - if err != nil { - return errors.InvalidType("depth", "query", "uint16", raw) - } - o.Depth = &value - - return nil -} - -// bindFields binds and validates parameter Fields from query. -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetParams) bindFields(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - o.Fields = &raw - - return nil -} - -// bindFilter binds and validates parameter Filter from query. -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetParams) bindFilter(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - o.Filter = &raw - - return nil -} - -// bindInterfaceName binds and validates parameter InterfaceName from path. -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetParams) bindInterfaceName(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.InterfaceName = raw - - return nil -} - -// bindWithDefaults binds and validates parameter WithDefaults from query. -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetParams) bindWithDefaults(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - // Default values have been previously initialized by NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetParams() - return nil - } - - o.WithDefaults = &raw - - if err := o.validateWithDefaults(formats); err != nil { - return err - } - - return nil -} - -// validateWithDefaults carries on validations for parameter WithDefaults -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetParams) validateWithDefaults(formats strfmt.Registry) error { - - if err := validate.EnumCase("with-defaults", "query", *o.WithDefaults, []interface{}{"report-all", "trim", "explicit", "report-all-tagged"}, true); err != nil { - return err - } - - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_get_responses.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_get_responses.go deleted file mode 100644 index 11010b8370ff5b9ab8213176bacdf7b883be79c8..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_get_responses.go +++ /dev/null @@ -1,202 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" - - "code.fbi.h-da.de/cocsn/cocsn-api/api/models" -) - -// DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetOKCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetOK -const DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetOKCode int = 200 - -/*DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetOK Interface IP address. Example value: 10.10.10.1 - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIdGetOK -*/ -type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetOK struct { - - /* - In: Body - */ - Payload *models.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesID `json:"body,omitempty"` -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetOK creates DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetOK with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetOK() *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetOK { - - return &DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetOK{} -} - -// WithPayload adds the payload to the data cocsn interfaces interface interface name addresses addresses Id get o k response -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetOK) WithPayload(payload *models.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesID) *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetOK { - o.Payload = payload - return o -} - -// SetPayload sets the payload to the data cocsn interfaces interface interface name addresses addresses Id get o k response -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetOK) SetPayload(payload *models.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesID) { - o.Payload = payload -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.WriteHeader(200) - if o.Payload != nil { - payload := o.Payload - if err := producer.Produce(rw, payload); err != nil { - panic(err) // let the recovery middleware deal with this - } - } -} - -// DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetNoContentCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetNoContent -const DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetNoContentCode int = 204 - -/*DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetNoContent No Content - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIdGetNoContent -*/ -type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetNoContent struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetNoContent creates DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetNoContent with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetNoContent() *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetNoContent { - - return &DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetBadRequestCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetBadRequest -const DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetBadRequestCode int = 400 - -/*DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetBadRequest Bad Request - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIdGetBadRequest -*/ -type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetBadRequest struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetBadRequest creates DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetBadRequest with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetBadRequest() *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetBadRequest { - - return &DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetBadRequest{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetUnauthorizedCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetUnauthorized -const DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetUnauthorizedCode int = 401 - -/*DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetUnauthorized Unauthorized - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIdGetUnauthorized -*/ -type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetUnauthorized struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetUnauthorized creates DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetUnauthorized with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetUnauthorized() *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetUnauthorized { - - return &DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetUnauthorized{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(401) -} - -// DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetNotFoundCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetNotFound -const DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetNotFoundCode int = 404 - -/*DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetNotFound Not Found - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIdGetNotFound -*/ -type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetNotFound struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetNotFound creates DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetNotFound with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetNotFound() *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetNotFound { - - return &DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetNotFound{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(404) -} - -// DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetMethodNotAllowedCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetMethodNotAllowed -const DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetMethodNotAllowedCode int = 405 - -/*DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetMethodNotAllowed Method Not Allowed - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIdGetMethodNotAllowed -*/ -type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetMethodNotAllowed struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetMethodNotAllowed creates DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetMethodNotAllowed with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetMethodNotAllowed() *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetMethodNotAllowed { - - return &DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetMethodNotAllowed{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(405) -} - -// DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetConflictCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetConflict -const DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetConflictCode int = 409 - -/*DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetConflict Conflict - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIdGetConflict -*/ -type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetConflict struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetConflict creates DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetConflict with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetConflict() *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetConflict { - - return &DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetConflict{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_get_urlbuilder.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_get_urlbuilder.go deleted file mode 100644 index ee75a35184cffc4cb78a97315459db5bf38a56cf..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_get_urlbuilder.go +++ /dev/null @@ -1,159 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" - - "github.com/go-openapi/swag" -) - -// DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetURL generates an URL for the data cocsn interfaces interface interface name addresses addresses id get operation -type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetURL struct { - AddressesID string - InterfaceName string - - Content *string - Depth *uint16 - Fields *string - Filter *string - WithDefaults *string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetURL) WithBasePath(bp string) *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/cocsn:interfaces/interface={interface-name}/addresses={addresses-id}" - - addressesID := o.AddressesID - if addressesID != "" { - _path = strings.Replace(_path, "{addresses-id}", addressesID, -1) - } else { - return nil, errors.New("addressesId is required on DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetURL") - } - - interfaceName := o.InterfaceName - if interfaceName != "" { - _path = strings.Replace(_path, "{interface-name}", interfaceName, -1) - } else { - return nil, errors.New("interfaceName is required on DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetURL") - } - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - qs := make(url.Values) - - var contentQ string - if o.Content != nil { - contentQ = *o.Content - } - if contentQ != "" { - qs.Set("content", contentQ) - } - - var depthQ string - if o.Depth != nil { - depthQ = swag.FormatUint16(*o.Depth) - } - if depthQ != "" { - qs.Set("depth", depthQ) - } - - var fieldsQ string - if o.Fields != nil { - fieldsQ = *o.Fields - } - if fieldsQ != "" { - qs.Set("fields", fieldsQ) - } - - var filterQ string - if o.Filter != nil { - filterQ = *o.Filter - } - if filterQ != "" { - qs.Set("filter", filterQ) - } - - var withDefaultsQ string - if o.WithDefaults != nil { - withDefaultsQ = *o.WithDefaults - } - if withDefaultsQ != "" { - qs.Set("with-defaults", withDefaultsQ) - } - - _result.RawQuery = qs.Encode() - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_patch.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_patch.go deleted file mode 100644 index fd339dd9ca1b6e3376616d1e2dd5ebe266cd7396..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_patch.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchHandlerFunc turns a function with the right signature into a data cocsn interfaces interface interface name addresses addresses id patch handler -type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchHandlerFunc func(DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchHandlerFunc) Handle(params DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchHandler interface for that can handle valid data cocsn interfaces interface interface name addresses addresses id patch params -type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchHandler interface { - Handle(DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchParams, interface{}) middleware.Responder -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatch creates a new http.Handler for the data cocsn interfaces interface interface name addresses addresses id patch operation -func NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatch(ctx *middleware.Context, handler DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchHandler) *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatch { - return &DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatch{Context: ctx, Handler: handler} -} - -/*DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatch swagger:route PATCH /data/cocsn:interfaces/interface={interface-name}/addresses={addresses-id} data patch dataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIdPatch - -Interface IP address. Example value: 10.10.10.1 - -Interface IP address. Example value: 10.10.10.1 - -*/ -type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatch struct { - Context *middleware.Context - Handler DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchHandler -} - -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatch) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_patch_parameters.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_patch_parameters.go deleted file mode 100644 index de80c98fd29374e4c44f904fc2de006d28914def..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_patch_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "io" - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - - "code.fbi.h-da.de/cocsn/cocsn-api/api/models" -) - -// NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchParams creates a new DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchParams object -// no default values defined in spec. -func NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchParams() DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchParams { - - return DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchParams{} -} - -// DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchParams contains all the bound params for the data cocsn interfaces interface interface name addresses addresses id patch operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_patch -type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*Interface IP address. Example value: 10.10.10.1 - Required: true - In: body - */ - Addresses *models.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesID - /*Interface IP address. Example value: 10.10.10.1 - Required: true - In: path - */ - AddressesID string - /*Interface name. Example value: en0 - Required: true - In: path - */ - InterfaceName string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchParams() beforehand. -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if runtime.HasBody(r) { - defer r.Body.Close() - var body models.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesID - if err := route.Consumer.Consume(r.Body, &body); err != nil { - if err == io.EOF { - res = append(res, errors.Required("addresses", "body", "")) - } else { - res = append(res, errors.NewParseError("addresses", "body", "", err)) - } - } else { - // validate body object - if err := body.Validate(route.Formats); err != nil { - res = append(res, err) - } - - if len(res) == 0 { - o.Addresses = &body - } - } - } else { - res = append(res, errors.Required("addresses", "body", "")) - } - rAddressesID, rhkAddressesID, _ := route.Params.GetOK("addresses-id") - if err := o.bindAddressesID(rAddressesID, rhkAddressesID, route.Formats); err != nil { - res = append(res, err) - } - - rInterfaceName, rhkInterfaceName, _ := route.Params.GetOK("interface-name") - if err := o.bindInterfaceName(rInterfaceName, rhkInterfaceName, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindAddressesID binds and validates parameter AddressesID from path. -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchParams) bindAddressesID(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.AddressesID = raw - - return nil -} - -// bindInterfaceName binds and validates parameter InterfaceName from path. -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchParams) bindInterfaceName(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.InterfaceName = raw - - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_patch_responses.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_patch_responses.go deleted file mode 100644 index 5c0914ea81005605eff67fcc20e04703c638ba53..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_patch_responses.go +++ /dev/null @@ -1,156 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchNoContentCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchNoContent -const DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchNoContentCode int = 204 - -/*DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchNoContent leaf-list addresses updated - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIdPatchNoContent -*/ -type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchNoContent struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchNoContent creates DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchNoContent with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchNoContent() *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchNoContent { - - return &DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchBadRequestCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchBadRequest -const DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchBadRequestCode int = 400 - -/*DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchBadRequest Bad Request - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIdPatchBadRequest -*/ -type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchBadRequest struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchBadRequest creates DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchBadRequest with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchBadRequest() *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchBadRequest { - - return &DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchBadRequest{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchUnauthorizedCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchUnauthorized -const DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchUnauthorizedCode int = 401 - -/*DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchUnauthorized Unauthorized - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIdPatchUnauthorized -*/ -type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchUnauthorized struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchUnauthorized creates DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchUnauthorized with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchUnauthorized() *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchUnauthorized { - - return &DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchUnauthorized{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(401) -} - -// DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchNotFoundCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchNotFound -const DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchNotFoundCode int = 404 - -/*DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchNotFound Not Found - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIdPatchNotFound -*/ -type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchNotFound struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchNotFound creates DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchNotFound with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchNotFound() *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchNotFound { - - return &DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchNotFound{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(404) -} - -// DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchMethodNotAllowedCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchMethodNotAllowed -const DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchMethodNotAllowedCode int = 405 - -/*DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchMethodNotAllowed Method Not Allowed - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIdPatchMethodNotAllowed -*/ -type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchMethodNotAllowed struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchMethodNotAllowed creates DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchMethodNotAllowed with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchMethodNotAllowed() *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchMethodNotAllowed { - - return &DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchMethodNotAllowed{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(405) -} - -// DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchConflictCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchConflict -const DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchConflictCode int = 409 - -/*DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchConflict Conflict - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIdPatchConflict -*/ -type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchConflict struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchConflict creates DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchConflict with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchConflict() *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchConflict { - - return &DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchConflict{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_patch_urlbuilder.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_patch_urlbuilder.go deleted file mode 100644 index 2c713bf92a0e69d9ae7f0971598e3478e4123ed8..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_patch_urlbuilder.go +++ /dev/null @@ -1,107 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" -) - -// DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchURL generates an URL for the data cocsn interfaces interface interface name addresses addresses id patch operation -type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchURL struct { - AddressesID string - InterfaceName string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchURL) WithBasePath(bp string) *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/cocsn:interfaces/interface={interface-name}/addresses={addresses-id}" - - addressesID := o.AddressesID - if addressesID != "" { - _path = strings.Replace(_path, "{addresses-id}", addressesID, -1) - } else { - return nil, errors.New("addressesId is required on DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchURL") - } - - interfaceName := o.InterfaceName - if interfaceName != "" { - _path = strings.Replace(_path, "{interface-name}", interfaceName, -1) - } else { - return nil, errors.New("interfaceName is required on DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchURL") - } - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_put.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_put.go deleted file mode 100644 index cb7c4c3709928752ff21a682ff0643e291b99d91..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_put.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutHandlerFunc turns a function with the right signature into a data cocsn interfaces interface interface name addresses addresses id put handler -type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutHandlerFunc func(DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutHandlerFunc) Handle(params DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutHandler interface for that can handle valid data cocsn interfaces interface interface name addresses addresses id put params -type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutHandler interface { - Handle(DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutParams, interface{}) middleware.Responder -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPut creates a new http.Handler for the data cocsn interfaces interface interface name addresses addresses id put operation -func NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPut(ctx *middleware.Context, handler DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutHandler) *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPut { - return &DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPut{Context: ctx, Handler: handler} -} - -/*DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPut swagger:route PUT /data/cocsn:interfaces/interface={interface-name}/addresses={addresses-id} data put dataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIdPut - -Interface IP address. Example value: 10.10.10.1 - -Interface IP address. Example value: 10.10.10.1 - -*/ -type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPut struct { - Context *middleware.Context - Handler DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutHandler -} - -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPut) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_put_parameters.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_put_parameters.go deleted file mode 100644 index b0bc9615eb16ad00fef2eb15464bd32931224397..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_put_parameters.go +++ /dev/null @@ -1,209 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "io" - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/validate" - - "code.fbi.h-da.de/cocsn/cocsn-api/api/models" -) - -// NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutParams creates a new DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutParams object -// with the default values initialized. -func NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutParams() DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutParams { - - var ( - // initialize parameters with default values - - insertDefault = string("first") - ) - - return DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutParams{ - Insert: &insertDefault, - } -} - -// DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutParams contains all the bound params for the data cocsn interfaces interface interface name addresses addresses id put operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_put -type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*Interface IP address. Example value: 10.10.10.1 - Required: true - In: body - */ - Addresses *models.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesID - /*Interface IP address. Example value: 10.10.10.1 - Required: true - In: path - */ - AddressesID string - /*controlling the order when adding new list elements - In: query - Default: "first" - */ - Insert *string - /*Interface name. Example value: en0 - Required: true - In: path - */ - InterfaceName string - /*used to specify the insertion point - In: query - */ - Point *string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutParams() beforehand. -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - qs := runtime.Values(r.URL.Query()) - - if runtime.HasBody(r) { - defer r.Body.Close() - var body models.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesID - if err := route.Consumer.Consume(r.Body, &body); err != nil { - if err == io.EOF { - res = append(res, errors.Required("addresses", "body", "")) - } else { - res = append(res, errors.NewParseError("addresses", "body", "", err)) - } - } else { - // validate body object - if err := body.Validate(route.Formats); err != nil { - res = append(res, err) - } - - if len(res) == 0 { - o.Addresses = &body - } - } - } else { - res = append(res, errors.Required("addresses", "body", "")) - } - rAddressesID, rhkAddressesID, _ := route.Params.GetOK("addresses-id") - if err := o.bindAddressesID(rAddressesID, rhkAddressesID, route.Formats); err != nil { - res = append(res, err) - } - - qInsert, qhkInsert, _ := qs.GetOK("insert") - if err := o.bindInsert(qInsert, qhkInsert, route.Formats); err != nil { - res = append(res, err) - } - - rInterfaceName, rhkInterfaceName, _ := route.Params.GetOK("interface-name") - if err := o.bindInterfaceName(rInterfaceName, rhkInterfaceName, route.Formats); err != nil { - res = append(res, err) - } - - qPoint, qhkPoint, _ := qs.GetOK("point") - if err := o.bindPoint(qPoint, qhkPoint, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindAddressesID binds and validates parameter AddressesID from path. -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutParams) bindAddressesID(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.AddressesID = raw - - return nil -} - -// bindInsert binds and validates parameter Insert from query. -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutParams) bindInsert(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - // Default values have been previously initialized by NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutParams() - return nil - } - - o.Insert = &raw - - if err := o.validateInsert(formats); err != nil { - return err - } - - return nil -} - -// validateInsert carries on validations for parameter Insert -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutParams) validateInsert(formats strfmt.Registry) error { - - if err := validate.EnumCase("insert", "query", *o.Insert, []interface{}{"first", "last", "before", "after"}, true); err != nil { - return err - } - - return nil -} - -// bindInterfaceName binds and validates parameter InterfaceName from path. -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutParams) bindInterfaceName(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.InterfaceName = raw - - return nil -} - -// bindPoint binds and validates parameter Point from query. -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutParams) bindPoint(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - o.Point = &raw - - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_put_responses.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_put_responses.go deleted file mode 100644 index 39285a5e9350af347f235904daa76b15da3a778e..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_put_responses.go +++ /dev/null @@ -1,180 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutCreatedCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutCreated -const DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutCreatedCode int = 201 - -/*DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutCreated leaf-list addresses created or replaced - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIdPutCreated -*/ -type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutCreated struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutCreated creates DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutCreated with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutCreated() *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutCreated { - - return &DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutCreated{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(201) -} - -// DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutNoContentCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutNoContent -const DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutNoContentCode int = 204 - -/*DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutNoContent No Content - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIdPutNoContent -*/ -type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutNoContent struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutNoContent creates DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutNoContent with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutNoContent() *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutNoContent { - - return &DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutBadRequestCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutBadRequest -const DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutBadRequestCode int = 400 - -/*DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutBadRequest Bad Request - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIdPutBadRequest -*/ -type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutBadRequest struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutBadRequest creates DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutBadRequest with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutBadRequest() *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutBadRequest { - - return &DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutBadRequest{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutUnauthorizedCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutUnauthorized -const DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutUnauthorizedCode int = 401 - -/*DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutUnauthorized Unauthorized - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIdPutUnauthorized -*/ -type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutUnauthorized struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutUnauthorized creates DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutUnauthorized with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutUnauthorized() *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutUnauthorized { - - return &DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutUnauthorized{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(401) -} - -// DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutNotFoundCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutNotFound -const DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutNotFoundCode int = 404 - -/*DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutNotFound Not Found - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIdPutNotFound -*/ -type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutNotFound struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutNotFound creates DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutNotFound with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutNotFound() *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutNotFound { - - return &DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutNotFound{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(404) -} - -// DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutMethodNotAllowedCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutMethodNotAllowed -const DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutMethodNotAllowedCode int = 405 - -/*DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutMethodNotAllowed Method Not Allowed - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIdPutMethodNotAllowed -*/ -type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutMethodNotAllowed struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutMethodNotAllowed creates DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutMethodNotAllowed with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutMethodNotAllowed() *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutMethodNotAllowed { - - return &DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutMethodNotAllowed{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(405) -} - -// DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutConflictCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutConflict -const DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutConflictCode int = 409 - -/*DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutConflict Conflict - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIdPutConflict -*/ -type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutConflict struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutConflict creates DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutConflict with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutConflict() *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutConflict { - - return &DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutConflict{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_put_urlbuilder.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_put_urlbuilder.go deleted file mode 100644 index 7dcc0809d217cfd113a3a4f6cb6130dd9e738357..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_put_urlbuilder.go +++ /dev/null @@ -1,130 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" -) - -// DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutURL generates an URL for the data cocsn interfaces interface interface name addresses addresses id put operation -type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutURL struct { - AddressesID string - InterfaceName string - - Insert *string - Point *string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutURL) WithBasePath(bp string) *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/cocsn:interfaces/interface={interface-name}/addresses={addresses-id}" - - addressesID := o.AddressesID - if addressesID != "" { - _path = strings.Replace(_path, "{addresses-id}", addressesID, -1) - } else { - return nil, errors.New("addressesId is required on DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutURL") - } - - interfaceName := o.InterfaceName - if interfaceName != "" { - _path = strings.Replace(_path, "{interface-name}", interfaceName, -1) - } else { - return nil, errors.New("interfaceName is required on DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutURL") - } - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - qs := make(url.Values) - - var insertQ string - if o.Insert != nil { - insertQ = *o.Insert - } - if insertQ != "" { - qs.Set("insert", insertQ) - } - - var pointQ string - if o.Point != nil { - pointQ = *o.Point - } - if pointQ != "" { - qs.Set("point", pointQ) - } - - _result.RawQuery = qs.Encode() - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_delete.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_delete.go deleted file mode 100644 index 3dbcc05d768ad3733f7d1d4ba1791e813de01e9b..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataCocsnInterfacesInterfaceInterfaceNameDeleteHandlerFunc turns a function with the right signature into a data cocsn interfaces interface interface name delete handler -type DataCocsnInterfacesInterfaceInterfaceNameDeleteHandlerFunc func(DataCocsnInterfacesInterfaceInterfaceNameDeleteParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataCocsnInterfacesInterfaceInterfaceNameDeleteHandlerFunc) Handle(params DataCocsnInterfacesInterfaceInterfaceNameDeleteParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataCocsnInterfacesInterfaceInterfaceNameDeleteHandler interface for that can handle valid data cocsn interfaces interface interface name delete params -type DataCocsnInterfacesInterfaceInterfaceNameDeleteHandler interface { - Handle(DataCocsnInterfacesInterfaceInterfaceNameDeleteParams, interface{}) middleware.Responder -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameDelete creates a new http.Handler for the data cocsn interfaces interface interface name delete operation -func NewDataCocsnInterfacesInterfaceInterfaceNameDelete(ctx *middleware.Context, handler DataCocsnInterfacesInterfaceInterfaceNameDeleteHandler) *DataCocsnInterfacesInterfaceInterfaceNameDelete { - return &DataCocsnInterfacesInterfaceInterfaceNameDelete{Context: ctx, Handler: handler} -} - -/*DataCocsnInterfacesInterfaceInterfaceNameDelete swagger:route DELETE /data/cocsn:interfaces/interface={interface-name} data delete dataCocsnInterfacesInterfaceInterfaceNameDelete - -DataCocsnInterfacesInterfaceInterfaceNameDelete data cocsn interfaces interface interface name delete API - -*/ -type DataCocsnInterfacesInterfaceInterfaceNameDelete struct { - Context *middleware.Context - Handler DataCocsnInterfacesInterfaceInterfaceNameDeleteHandler -} - -func (o *DataCocsnInterfacesInterfaceInterfaceNameDelete) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataCocsnInterfacesInterfaceInterfaceNameDeleteParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_delete_parameters.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_delete_parameters.go deleted file mode 100644 index 579b814414bc3b2f7814b67586039951444a9b46..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_delete_parameters.go +++ /dev/null @@ -1,72 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" -) - -// NewDataCocsnInterfacesInterfaceInterfaceNameDeleteParams creates a new DataCocsnInterfacesInterfaceInterfaceNameDeleteParams object -// no default values defined in spec. -func NewDataCocsnInterfacesInterfaceInterfaceNameDeleteParams() DataCocsnInterfacesInterfaceInterfaceNameDeleteParams { - - return DataCocsnInterfacesInterfaceInterfaceNameDeleteParams{} -} - -// DataCocsnInterfacesInterfaceInterfaceNameDeleteParams contains all the bound params for the data cocsn interfaces interface interface name delete operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_interfaces_interface_interface_name_delete -type DataCocsnInterfacesInterfaceInterfaceNameDeleteParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*Interface name. Example value: en0 - Required: true - In: path - */ - InterfaceName string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnInterfacesInterfaceInterfaceNameDeleteParams() beforehand. -func (o *DataCocsnInterfacesInterfaceInterfaceNameDeleteParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - rInterfaceName, rhkInterfaceName, _ := route.Params.GetOK("interface-name") - if err := o.bindInterfaceName(rInterfaceName, rhkInterfaceName, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindInterfaceName binds and validates parameter InterfaceName from path. -func (o *DataCocsnInterfacesInterfaceInterfaceNameDeleteParams) bindInterfaceName(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.InterfaceName = raw - - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_delete_responses.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_delete_responses.go deleted file mode 100644 index 932e48cc4b30a10a18c0002d4aa05c604a2dce8d..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_delete_responses.go +++ /dev/null @@ -1,36 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// DataCocsnInterfacesInterfaceInterfaceNameDeleteNoContentCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameDeleteNoContent -const DataCocsnInterfacesInterfaceInterfaceNameDeleteNoContentCode int = 204 - -/*DataCocsnInterfacesInterfaceInterfaceNameDeleteNoContent No Content - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameDeleteNoContent -*/ -type DataCocsnInterfacesInterfaceInterfaceNameDeleteNoContent struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameDeleteNoContent creates DataCocsnInterfacesInterfaceInterfaceNameDeleteNoContent with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameDeleteNoContent() *DataCocsnInterfacesInterfaceInterfaceNameDeleteNoContent { - - return &DataCocsnInterfacesInterfaceInterfaceNameDeleteNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameDeleteNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_delete_urlbuilder.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_delete_urlbuilder.go deleted file mode 100644 index 7d8870b7ee5eb9c1ab81d8a2c90b4e5857f4bd0d..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_delete_urlbuilder.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" -) - -// DataCocsnInterfacesInterfaceInterfaceNameDeleteURL generates an URL for the data cocsn interfaces interface interface name delete operation -type DataCocsnInterfacesInterfaceInterfaceNameDeleteURL struct { - InterfaceName string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnInterfacesInterfaceInterfaceNameDeleteURL) WithBasePath(bp string) *DataCocsnInterfacesInterfaceInterfaceNameDeleteURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnInterfacesInterfaceInterfaceNameDeleteURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DataCocsnInterfacesInterfaceInterfaceNameDeleteURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/cocsn:interfaces/interface={interface-name}" - - interfaceName := o.InterfaceName - if interfaceName != "" { - _path = strings.Replace(_path, "{interface-name}", interfaceName, -1) - } else { - return nil, errors.New("interfaceName is required on DataCocsnInterfacesInterfaceInterfaceNameDeleteURL") - } - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnInterfacesInterfaceInterfaceNameDeleteURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DataCocsnInterfacesInterfaceInterfaceNameDeleteURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnInterfacesInterfaceInterfaceNameDeleteURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnInterfacesInterfaceInterfaceNameDeleteURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnInterfacesInterfaceInterfaceNameDeleteURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DataCocsnInterfacesInterfaceInterfaceNameDeleteURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_delete.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_delete.go deleted file mode 100644 index b8f989b9c3abfe6ada1461bfa744e3c94c565f03..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_delete.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteHandlerFunc turns a function with the right signature into a data cocsn interfaces interface interface name enabled delete handler -type DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteHandlerFunc func(DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteHandlerFunc) Handle(params DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteHandler interface for that can handle valid data cocsn interfaces interface interface name enabled delete params -type DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteHandler interface { - Handle(DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteParams, interface{}) middleware.Responder -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameEnabledDelete creates a new http.Handler for the data cocsn interfaces interface interface name enabled delete operation -func NewDataCocsnInterfacesInterfaceInterfaceNameEnabledDelete(ctx *middleware.Context, handler DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteHandler) *DataCocsnInterfacesInterfaceInterfaceNameEnabledDelete { - return &DataCocsnInterfacesInterfaceInterfaceNameEnabledDelete{Context: ctx, Handler: handler} -} - -/*DataCocsnInterfacesInterfaceInterfaceNameEnabledDelete swagger:route DELETE /data/cocsn:interfaces/interface={interface-name}/enabled data delete dataCocsnInterfacesInterfaceInterfaceNameEnabledDelete - -Enable or disable the interface. Example value: true - -Enable or disable the interface. Example value: true - -*/ -type DataCocsnInterfacesInterfaceInterfaceNameEnabledDelete struct { - Context *middleware.Context - Handler DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteHandler -} - -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledDelete) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_delete_parameters.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_delete_parameters.go deleted file mode 100644 index f1a5b20a53010131038f8908daaccba08b915b3f..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_delete_parameters.go +++ /dev/null @@ -1,72 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" -) - -// NewDataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteParams creates a new DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteParams object -// no default values defined in spec. -func NewDataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteParams() DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteParams { - - return DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteParams{} -} - -// DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteParams contains all the bound params for the data cocsn interfaces interface interface name enabled delete operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_interfaces_interface_interface_name_enabled_delete -type DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*Interface name. Example value: en0 - Required: true - In: path - */ - InterfaceName string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteParams() beforehand. -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - rInterfaceName, rhkInterfaceName, _ := route.Params.GetOK("interface-name") - if err := o.bindInterfaceName(rInterfaceName, rhkInterfaceName, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindInterfaceName binds and validates parameter InterfaceName from path. -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteParams) bindInterfaceName(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.InterfaceName = raw - - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_delete_responses.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_delete_responses.go deleted file mode 100644 index 4f2ff330eaa87a44086d17d1dc387442ef3a83ae..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_delete_responses.go +++ /dev/null @@ -1,36 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteNoContentCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteNoContent -const DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteNoContentCode int = 204 - -/*DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteNoContent No Content - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteNoContent -*/ -type DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteNoContent struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteNoContent creates DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteNoContent with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteNoContent() *DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteNoContent { - - return &DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_delete_urlbuilder.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_delete_urlbuilder.go deleted file mode 100644 index 165e52413570f53ceca1202ae023fb474cdb5560..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_delete_urlbuilder.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" -) - -// DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteURL generates an URL for the data cocsn interfaces interface interface name enabled delete operation -type DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteURL struct { - InterfaceName string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteURL) WithBasePath(bp string) *DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/cocsn:interfaces/interface={interface-name}/enabled" - - interfaceName := o.InterfaceName - if interfaceName != "" { - _path = strings.Replace(_path, "{interface-name}", interfaceName, -1) - } else { - return nil, errors.New("interfaceName is required on DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteURL") - } - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_get.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_get.go deleted file mode 100644 index 407e5676dc7882d3e9dc69d1fd8deb044d6ef640..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_get.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataCocsnInterfacesInterfaceInterfaceNameEnabledGetHandlerFunc turns a function with the right signature into a data cocsn interfaces interface interface name enabled get handler -type DataCocsnInterfacesInterfaceInterfaceNameEnabledGetHandlerFunc func(DataCocsnInterfacesInterfaceInterfaceNameEnabledGetParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataCocsnInterfacesInterfaceInterfaceNameEnabledGetHandlerFunc) Handle(params DataCocsnInterfacesInterfaceInterfaceNameEnabledGetParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataCocsnInterfacesInterfaceInterfaceNameEnabledGetHandler interface for that can handle valid data cocsn interfaces interface interface name enabled get params -type DataCocsnInterfacesInterfaceInterfaceNameEnabledGetHandler interface { - Handle(DataCocsnInterfacesInterfaceInterfaceNameEnabledGetParams, interface{}) middleware.Responder -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameEnabledGet creates a new http.Handler for the data cocsn interfaces interface interface name enabled get operation -func NewDataCocsnInterfacesInterfaceInterfaceNameEnabledGet(ctx *middleware.Context, handler DataCocsnInterfacesInterfaceInterfaceNameEnabledGetHandler) *DataCocsnInterfacesInterfaceInterfaceNameEnabledGet { - return &DataCocsnInterfacesInterfaceInterfaceNameEnabledGet{Context: ctx, Handler: handler} -} - -/*DataCocsnInterfacesInterfaceInterfaceNameEnabledGet swagger:route GET /data/cocsn:interfaces/interface={interface-name}/enabled data get dataCocsnInterfacesInterfaceInterfaceNameEnabledGet - -Enable or disable the interface. Example value: true - -Enable or disable the interface. Example value: true - -*/ -type DataCocsnInterfacesInterfaceInterfaceNameEnabledGet struct { - Context *middleware.Context - Handler DataCocsnInterfacesInterfaceInterfaceNameEnabledGetHandler -} - -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledGet) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataCocsnInterfacesInterfaceInterfaceNameEnabledGetParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_get_parameters.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_get_parameters.go deleted file mode 100644 index 2fa284b0dd725432d6cb1d37bc2adb19d06c7779..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_get_parameters.go +++ /dev/null @@ -1,260 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// NewDataCocsnInterfacesInterfaceInterfaceNameEnabledGetParams creates a new DataCocsnInterfacesInterfaceInterfaceNameEnabledGetParams object -// with the default values initialized. -func NewDataCocsnInterfacesInterfaceInterfaceNameEnabledGetParams() DataCocsnInterfacesInterfaceInterfaceNameEnabledGetParams { - - var ( - // initialize parameters with default values - - contentDefault = string("config") - - withDefaultsDefault = string("report-all") - ) - - return DataCocsnInterfacesInterfaceInterfaceNameEnabledGetParams{ - Content: &contentDefault, - - WithDefaults: &withDefaultsDefault, - } -} - -// DataCocsnInterfacesInterfaceInterfaceNameEnabledGetParams contains all the bound params for the data cocsn interfaces interface interface name enabled get operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_interfaces_interface_interface_name_enabled_get -type DataCocsnInterfacesInterfaceInterfaceNameEnabledGetParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*controlling descendant nodes in response - In: query - Default: "config" - */ - Content *string - /*limit the depth of nodes in response - In: query - */ - Depth *uint16 - /*optionally identify specific data nodes in response - In: query - */ - Fields *string - /*xpath expression to filter data nodes in response - In: query - */ - Filter *string - /*Interface name. Example value: en0 - Required: true - In: path - */ - InterfaceName string - /*controlling default values in response - In: query - Default: "report-all" - */ - WithDefaults *string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnInterfacesInterfaceInterfaceNameEnabledGetParams() beforehand. -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledGetParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - qs := runtime.Values(r.URL.Query()) - - qContent, qhkContent, _ := qs.GetOK("content") - if err := o.bindContent(qContent, qhkContent, route.Formats); err != nil { - res = append(res, err) - } - - qDepth, qhkDepth, _ := qs.GetOK("depth") - if err := o.bindDepth(qDepth, qhkDepth, route.Formats); err != nil { - res = append(res, err) - } - - qFields, qhkFields, _ := qs.GetOK("fields") - if err := o.bindFields(qFields, qhkFields, route.Formats); err != nil { - res = append(res, err) - } - - qFilter, qhkFilter, _ := qs.GetOK("filter") - if err := o.bindFilter(qFilter, qhkFilter, route.Formats); err != nil { - res = append(res, err) - } - - rInterfaceName, rhkInterfaceName, _ := route.Params.GetOK("interface-name") - if err := o.bindInterfaceName(rInterfaceName, rhkInterfaceName, route.Formats); err != nil { - res = append(res, err) - } - - qWithDefaults, qhkWithDefaults, _ := qs.GetOK("with-defaults") - if err := o.bindWithDefaults(qWithDefaults, qhkWithDefaults, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindContent binds and validates parameter Content from query. -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledGetParams) bindContent(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - // Default values have been previously initialized by NewDataCocsnInterfacesInterfaceInterfaceNameEnabledGetParams() - return nil - } - - o.Content = &raw - - if err := o.validateContent(formats); err != nil { - return err - } - - return nil -} - -// validateContent carries on validations for parameter Content -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledGetParams) validateContent(formats strfmt.Registry) error { - - if err := validate.EnumCase("content", "query", *o.Content, []interface{}{"config", "nonconfig", "all"}, true); err != nil { - return err - } - - return nil -} - -// bindDepth binds and validates parameter Depth from query. -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledGetParams) bindDepth(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - value, err := swag.ConvertUint16(raw) - if err != nil { - return errors.InvalidType("depth", "query", "uint16", raw) - } - o.Depth = &value - - return nil -} - -// bindFields binds and validates parameter Fields from query. -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledGetParams) bindFields(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - o.Fields = &raw - - return nil -} - -// bindFilter binds and validates parameter Filter from query. -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledGetParams) bindFilter(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - o.Filter = &raw - - return nil -} - -// bindInterfaceName binds and validates parameter InterfaceName from path. -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledGetParams) bindInterfaceName(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.InterfaceName = raw - - return nil -} - -// bindWithDefaults binds and validates parameter WithDefaults from query. -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledGetParams) bindWithDefaults(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - // Default values have been previously initialized by NewDataCocsnInterfacesInterfaceInterfaceNameEnabledGetParams() - return nil - } - - o.WithDefaults = &raw - - if err := o.validateWithDefaults(formats); err != nil { - return err - } - - return nil -} - -// validateWithDefaults carries on validations for parameter WithDefaults -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledGetParams) validateWithDefaults(formats strfmt.Registry) error { - - if err := validate.EnumCase("with-defaults", "query", *o.WithDefaults, []interface{}{"report-all", "trim", "explicit", "report-all-tagged"}, true); err != nil { - return err - } - - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_get_responses.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_get_responses.go deleted file mode 100644 index 600fd31a98aae4183809600aaedbab10386a4d37..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_get_responses.go +++ /dev/null @@ -1,202 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" - - "code.fbi.h-da.de/cocsn/cocsn-api/api/models" -) - -// DataCocsnInterfacesInterfaceInterfaceNameEnabledGetOKCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameEnabledGetOK -const DataCocsnInterfacesInterfaceInterfaceNameEnabledGetOKCode int = 200 - -/*DataCocsnInterfacesInterfaceInterfaceNameEnabledGetOK Enable or disable the interface. Example value: true - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameEnabledGetOK -*/ -type DataCocsnInterfacesInterfaceInterfaceNameEnabledGetOK struct { - - /* - In: Body - */ - Payload *models.DataCocsnInterfacesInterfaceInterfaceNameEnabled `json:"body,omitempty"` -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameEnabledGetOK creates DataCocsnInterfacesInterfaceInterfaceNameEnabledGetOK with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameEnabledGetOK() *DataCocsnInterfacesInterfaceInterfaceNameEnabledGetOK { - - return &DataCocsnInterfacesInterfaceInterfaceNameEnabledGetOK{} -} - -// WithPayload adds the payload to the data cocsn interfaces interface interface name enabled get o k response -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledGetOK) WithPayload(payload *models.DataCocsnInterfacesInterfaceInterfaceNameEnabled) *DataCocsnInterfacesInterfaceInterfaceNameEnabledGetOK { - o.Payload = payload - return o -} - -// SetPayload sets the payload to the data cocsn interfaces interface interface name enabled get o k response -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledGetOK) SetPayload(payload *models.DataCocsnInterfacesInterfaceInterfaceNameEnabled) { - o.Payload = payload -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledGetOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.WriteHeader(200) - if o.Payload != nil { - payload := o.Payload - if err := producer.Produce(rw, payload); err != nil { - panic(err) // let the recovery middleware deal with this - } - } -} - -// DataCocsnInterfacesInterfaceInterfaceNameEnabledGetNoContentCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameEnabledGetNoContent -const DataCocsnInterfacesInterfaceInterfaceNameEnabledGetNoContentCode int = 204 - -/*DataCocsnInterfacesInterfaceInterfaceNameEnabledGetNoContent No Content - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameEnabledGetNoContent -*/ -type DataCocsnInterfacesInterfaceInterfaceNameEnabledGetNoContent struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameEnabledGetNoContent creates DataCocsnInterfacesInterfaceInterfaceNameEnabledGetNoContent with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameEnabledGetNoContent() *DataCocsnInterfacesInterfaceInterfaceNameEnabledGetNoContent { - - return &DataCocsnInterfacesInterfaceInterfaceNameEnabledGetNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledGetNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DataCocsnInterfacesInterfaceInterfaceNameEnabledGetBadRequestCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameEnabledGetBadRequest -const DataCocsnInterfacesInterfaceInterfaceNameEnabledGetBadRequestCode int = 400 - -/*DataCocsnInterfacesInterfaceInterfaceNameEnabledGetBadRequest Bad Request - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameEnabledGetBadRequest -*/ -type DataCocsnInterfacesInterfaceInterfaceNameEnabledGetBadRequest struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameEnabledGetBadRequest creates DataCocsnInterfacesInterfaceInterfaceNameEnabledGetBadRequest with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameEnabledGetBadRequest() *DataCocsnInterfacesInterfaceInterfaceNameEnabledGetBadRequest { - - return &DataCocsnInterfacesInterfaceInterfaceNameEnabledGetBadRequest{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledGetBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// DataCocsnInterfacesInterfaceInterfaceNameEnabledGetUnauthorizedCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameEnabledGetUnauthorized -const DataCocsnInterfacesInterfaceInterfaceNameEnabledGetUnauthorizedCode int = 401 - -/*DataCocsnInterfacesInterfaceInterfaceNameEnabledGetUnauthorized Unauthorized - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameEnabledGetUnauthorized -*/ -type DataCocsnInterfacesInterfaceInterfaceNameEnabledGetUnauthorized struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameEnabledGetUnauthorized creates DataCocsnInterfacesInterfaceInterfaceNameEnabledGetUnauthorized with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameEnabledGetUnauthorized() *DataCocsnInterfacesInterfaceInterfaceNameEnabledGetUnauthorized { - - return &DataCocsnInterfacesInterfaceInterfaceNameEnabledGetUnauthorized{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledGetUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(401) -} - -// DataCocsnInterfacesInterfaceInterfaceNameEnabledGetNotFoundCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameEnabledGetNotFound -const DataCocsnInterfacesInterfaceInterfaceNameEnabledGetNotFoundCode int = 404 - -/*DataCocsnInterfacesInterfaceInterfaceNameEnabledGetNotFound Not Found - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameEnabledGetNotFound -*/ -type DataCocsnInterfacesInterfaceInterfaceNameEnabledGetNotFound struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameEnabledGetNotFound creates DataCocsnInterfacesInterfaceInterfaceNameEnabledGetNotFound with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameEnabledGetNotFound() *DataCocsnInterfacesInterfaceInterfaceNameEnabledGetNotFound { - - return &DataCocsnInterfacesInterfaceInterfaceNameEnabledGetNotFound{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledGetNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(404) -} - -// DataCocsnInterfacesInterfaceInterfaceNameEnabledGetMethodNotAllowedCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameEnabledGetMethodNotAllowed -const DataCocsnInterfacesInterfaceInterfaceNameEnabledGetMethodNotAllowedCode int = 405 - -/*DataCocsnInterfacesInterfaceInterfaceNameEnabledGetMethodNotAllowed Method Not Allowed - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameEnabledGetMethodNotAllowed -*/ -type DataCocsnInterfacesInterfaceInterfaceNameEnabledGetMethodNotAllowed struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameEnabledGetMethodNotAllowed creates DataCocsnInterfacesInterfaceInterfaceNameEnabledGetMethodNotAllowed with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameEnabledGetMethodNotAllowed() *DataCocsnInterfacesInterfaceInterfaceNameEnabledGetMethodNotAllowed { - - return &DataCocsnInterfacesInterfaceInterfaceNameEnabledGetMethodNotAllowed{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledGetMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(405) -} - -// DataCocsnInterfacesInterfaceInterfaceNameEnabledGetConflictCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameEnabledGetConflict -const DataCocsnInterfacesInterfaceInterfaceNameEnabledGetConflictCode int = 409 - -/*DataCocsnInterfacesInterfaceInterfaceNameEnabledGetConflict Conflict - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameEnabledGetConflict -*/ -type DataCocsnInterfacesInterfaceInterfaceNameEnabledGetConflict struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameEnabledGetConflict creates DataCocsnInterfacesInterfaceInterfaceNameEnabledGetConflict with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameEnabledGetConflict() *DataCocsnInterfacesInterfaceInterfaceNameEnabledGetConflict { - - return &DataCocsnInterfacesInterfaceInterfaceNameEnabledGetConflict{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledGetConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_get_urlbuilder.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_get_urlbuilder.go deleted file mode 100644 index 522084f71336d7448e738f3647a06b73bd3505e6..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_get_urlbuilder.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" - - "github.com/go-openapi/swag" -) - -// DataCocsnInterfacesInterfaceInterfaceNameEnabledGetURL generates an URL for the data cocsn interfaces interface interface name enabled get operation -type DataCocsnInterfacesInterfaceInterfaceNameEnabledGetURL struct { - InterfaceName string - - Content *string - Depth *uint16 - Fields *string - Filter *string - WithDefaults *string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledGetURL) WithBasePath(bp string) *DataCocsnInterfacesInterfaceInterfaceNameEnabledGetURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledGetURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledGetURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/cocsn:interfaces/interface={interface-name}/enabled" - - interfaceName := o.InterfaceName - if interfaceName != "" { - _path = strings.Replace(_path, "{interface-name}", interfaceName, -1) - } else { - return nil, errors.New("interfaceName is required on DataCocsnInterfacesInterfaceInterfaceNameEnabledGetURL") - } - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - qs := make(url.Values) - - var contentQ string - if o.Content != nil { - contentQ = *o.Content - } - if contentQ != "" { - qs.Set("content", contentQ) - } - - var depthQ string - if o.Depth != nil { - depthQ = swag.FormatUint16(*o.Depth) - } - if depthQ != "" { - qs.Set("depth", depthQ) - } - - var fieldsQ string - if o.Fields != nil { - fieldsQ = *o.Fields - } - if fieldsQ != "" { - qs.Set("fields", fieldsQ) - } - - var filterQ string - if o.Filter != nil { - filterQ = *o.Filter - } - if filterQ != "" { - qs.Set("filter", filterQ) - } - - var withDefaultsQ string - if o.WithDefaults != nil { - withDefaultsQ = *o.WithDefaults - } - if withDefaultsQ != "" { - qs.Set("with-defaults", withDefaultsQ) - } - - _result.RawQuery = qs.Encode() - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledGetURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledGetURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledGetURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnInterfacesInterfaceInterfaceNameEnabledGetURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnInterfacesInterfaceInterfaceNameEnabledGetURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledGetURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_patch.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_patch.go deleted file mode 100644 index 74fdbde86d583aa1f29648d9e387bfaef7d7ff2d..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_patch.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchHandlerFunc turns a function with the right signature into a data cocsn interfaces interface interface name enabled patch handler -type DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchHandlerFunc func(DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchHandlerFunc) Handle(params DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchHandler interface for that can handle valid data cocsn interfaces interface interface name enabled patch params -type DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchHandler interface { - Handle(DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchParams, interface{}) middleware.Responder -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPatch creates a new http.Handler for the data cocsn interfaces interface interface name enabled patch operation -func NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPatch(ctx *middleware.Context, handler DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchHandler) *DataCocsnInterfacesInterfaceInterfaceNameEnabledPatch { - return &DataCocsnInterfacesInterfaceInterfaceNameEnabledPatch{Context: ctx, Handler: handler} -} - -/*DataCocsnInterfacesInterfaceInterfaceNameEnabledPatch swagger:route PATCH /data/cocsn:interfaces/interface={interface-name}/enabled data patch dataCocsnInterfacesInterfaceInterfaceNameEnabledPatch - -Enable or disable the interface. Example value: true - -Enable or disable the interface. Example value: true - -*/ -type DataCocsnInterfacesInterfaceInterfaceNameEnabledPatch struct { - Context *middleware.Context - Handler DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchHandler -} - -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledPatch) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPatchParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_patch_parameters.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_patch_parameters.go deleted file mode 100644 index 32e328518ed6137f7ec343172b09453ff186e5e6..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_patch_parameters.go +++ /dev/null @@ -1,103 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "io" - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - - "code.fbi.h-da.de/cocsn/cocsn-api/api/models" -) - -// NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPatchParams creates a new DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchParams object -// no default values defined in spec. -func NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPatchParams() DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchParams { - - return DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchParams{} -} - -// DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchParams contains all the bound params for the data cocsn interfaces interface interface name enabled patch operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_interfaces_interface_interface_name_enabled_patch -type DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*Enable or disable the interface. Example value: true - Required: true - In: body - */ - Enabled *models.DataCocsnInterfacesInterfaceInterfaceNameEnabled - /*Interface name. Example value: en0 - Required: true - In: path - */ - InterfaceName string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPatchParams() beforehand. -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if runtime.HasBody(r) { - defer r.Body.Close() - var body models.DataCocsnInterfacesInterfaceInterfaceNameEnabled - if err := route.Consumer.Consume(r.Body, &body); err != nil { - if err == io.EOF { - res = append(res, errors.Required("enabled", "body", "")) - } else { - res = append(res, errors.NewParseError("enabled", "body", "", err)) - } - } else { - // validate body object - if err := body.Validate(route.Formats); err != nil { - res = append(res, err) - } - - if len(res) == 0 { - o.Enabled = &body - } - } - } else { - res = append(res, errors.Required("enabled", "body", "")) - } - rInterfaceName, rhkInterfaceName, _ := route.Params.GetOK("interface-name") - if err := o.bindInterfaceName(rInterfaceName, rhkInterfaceName, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindInterfaceName binds and validates parameter InterfaceName from path. -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchParams) bindInterfaceName(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.InterfaceName = raw - - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_patch_responses.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_patch_responses.go deleted file mode 100644 index acdd4267b10c41697c9b8bd1487854f20d00d763..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_patch_responses.go +++ /dev/null @@ -1,156 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchNoContentCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchNoContent -const DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchNoContentCode int = 204 - -/*DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchNoContent leaf enabled updated - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameEnabledPatchNoContent -*/ -type DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchNoContent struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPatchNoContent creates DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchNoContent with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPatchNoContent() *DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchNoContent { - - return &DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchBadRequestCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchBadRequest -const DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchBadRequestCode int = 400 - -/*DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchBadRequest Bad Request - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameEnabledPatchBadRequest -*/ -type DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchBadRequest struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPatchBadRequest creates DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchBadRequest with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPatchBadRequest() *DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchBadRequest { - - return &DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchBadRequest{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchUnauthorizedCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchUnauthorized -const DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchUnauthorizedCode int = 401 - -/*DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchUnauthorized Unauthorized - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameEnabledPatchUnauthorized -*/ -type DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchUnauthorized struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPatchUnauthorized creates DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchUnauthorized with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPatchUnauthorized() *DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchUnauthorized { - - return &DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchUnauthorized{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(401) -} - -// DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchNotFoundCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchNotFound -const DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchNotFoundCode int = 404 - -/*DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchNotFound Not Found - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameEnabledPatchNotFound -*/ -type DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchNotFound struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPatchNotFound creates DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchNotFound with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPatchNotFound() *DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchNotFound { - - return &DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchNotFound{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(404) -} - -// DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchMethodNotAllowedCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchMethodNotAllowed -const DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchMethodNotAllowedCode int = 405 - -/*DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchMethodNotAllowed Method Not Allowed - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameEnabledPatchMethodNotAllowed -*/ -type DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchMethodNotAllowed struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPatchMethodNotAllowed creates DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchMethodNotAllowed with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPatchMethodNotAllowed() *DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchMethodNotAllowed { - - return &DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchMethodNotAllowed{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(405) -} - -// DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchConflictCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchConflict -const DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchConflictCode int = 409 - -/*DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchConflict Conflict - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameEnabledPatchConflict -*/ -type DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchConflict struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPatchConflict creates DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchConflict with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPatchConflict() *DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchConflict { - - return &DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchConflict{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_patch_urlbuilder.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_patch_urlbuilder.go deleted file mode 100644 index 4e726c73f735f90dd8937a25cb494a7253570035..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_patch_urlbuilder.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" -) - -// DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchURL generates an URL for the data cocsn interfaces interface interface name enabled patch operation -type DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchURL struct { - InterfaceName string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchURL) WithBasePath(bp string) *DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/cocsn:interfaces/interface={interface-name}/enabled" - - interfaceName := o.InterfaceName - if interfaceName != "" { - _path = strings.Replace(_path, "{interface-name}", interfaceName, -1) - } else { - return nil, errors.New("interfaceName is required on DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchURL") - } - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_put.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_put.go deleted file mode 100644 index 99cb5ec40cb9d9fb9cfb77fe82e0edc102445965..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_put.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataCocsnInterfacesInterfaceInterfaceNameEnabledPutHandlerFunc turns a function with the right signature into a data cocsn interfaces interface interface name enabled put handler -type DataCocsnInterfacesInterfaceInterfaceNameEnabledPutHandlerFunc func(DataCocsnInterfacesInterfaceInterfaceNameEnabledPutParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataCocsnInterfacesInterfaceInterfaceNameEnabledPutHandlerFunc) Handle(params DataCocsnInterfacesInterfaceInterfaceNameEnabledPutParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataCocsnInterfacesInterfaceInterfaceNameEnabledPutHandler interface for that can handle valid data cocsn interfaces interface interface name enabled put params -type DataCocsnInterfacesInterfaceInterfaceNameEnabledPutHandler interface { - Handle(DataCocsnInterfacesInterfaceInterfaceNameEnabledPutParams, interface{}) middleware.Responder -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPut creates a new http.Handler for the data cocsn interfaces interface interface name enabled put operation -func NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPut(ctx *middleware.Context, handler DataCocsnInterfacesInterfaceInterfaceNameEnabledPutHandler) *DataCocsnInterfacesInterfaceInterfaceNameEnabledPut { - return &DataCocsnInterfacesInterfaceInterfaceNameEnabledPut{Context: ctx, Handler: handler} -} - -/*DataCocsnInterfacesInterfaceInterfaceNameEnabledPut swagger:route PUT /data/cocsn:interfaces/interface={interface-name}/enabled data put dataCocsnInterfacesInterfaceInterfaceNameEnabledPut - -Enable or disable the interface. Example value: true - -Enable or disable the interface. Example value: true - -*/ -type DataCocsnInterfacesInterfaceInterfaceNameEnabledPut struct { - Context *middleware.Context - Handler DataCocsnInterfacesInterfaceInterfaceNameEnabledPutHandler -} - -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledPut) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPutParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_put_parameters.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_put_parameters.go deleted file mode 100644 index c7200669842cc3036346a41bd8d5c41307b9e416..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_put_parameters.go +++ /dev/null @@ -1,103 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "io" - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - - "code.fbi.h-da.de/cocsn/cocsn-api/api/models" -) - -// NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPutParams creates a new DataCocsnInterfacesInterfaceInterfaceNameEnabledPutParams object -// no default values defined in spec. -func NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPutParams() DataCocsnInterfacesInterfaceInterfaceNameEnabledPutParams { - - return DataCocsnInterfacesInterfaceInterfaceNameEnabledPutParams{} -} - -// DataCocsnInterfacesInterfaceInterfaceNameEnabledPutParams contains all the bound params for the data cocsn interfaces interface interface name enabled put operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_interfaces_interface_interface_name_enabled_put -type DataCocsnInterfacesInterfaceInterfaceNameEnabledPutParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*Enable or disable the interface. Example value: true - Required: true - In: body - */ - Enabled *models.DataCocsnInterfacesInterfaceInterfaceNameEnabled - /*Interface name. Example value: en0 - Required: true - In: path - */ - InterfaceName string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPutParams() beforehand. -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledPutParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if runtime.HasBody(r) { - defer r.Body.Close() - var body models.DataCocsnInterfacesInterfaceInterfaceNameEnabled - if err := route.Consumer.Consume(r.Body, &body); err != nil { - if err == io.EOF { - res = append(res, errors.Required("enabled", "body", "")) - } else { - res = append(res, errors.NewParseError("enabled", "body", "", err)) - } - } else { - // validate body object - if err := body.Validate(route.Formats); err != nil { - res = append(res, err) - } - - if len(res) == 0 { - o.Enabled = &body - } - } - } else { - res = append(res, errors.Required("enabled", "body", "")) - } - rInterfaceName, rhkInterfaceName, _ := route.Params.GetOK("interface-name") - if err := o.bindInterfaceName(rInterfaceName, rhkInterfaceName, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindInterfaceName binds and validates parameter InterfaceName from path. -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledPutParams) bindInterfaceName(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.InterfaceName = raw - - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_put_responses.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_put_responses.go deleted file mode 100644 index 8a2c2fcdd34461ce510041d3a95771448f427895..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_put_responses.go +++ /dev/null @@ -1,180 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// DataCocsnInterfacesInterfaceInterfaceNameEnabledPutCreatedCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameEnabledPutCreated -const DataCocsnInterfacesInterfaceInterfaceNameEnabledPutCreatedCode int = 201 - -/*DataCocsnInterfacesInterfaceInterfaceNameEnabledPutCreated leaf enabled created or replaced - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameEnabledPutCreated -*/ -type DataCocsnInterfacesInterfaceInterfaceNameEnabledPutCreated struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPutCreated creates DataCocsnInterfacesInterfaceInterfaceNameEnabledPutCreated with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPutCreated() *DataCocsnInterfacesInterfaceInterfaceNameEnabledPutCreated { - - return &DataCocsnInterfacesInterfaceInterfaceNameEnabledPutCreated{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledPutCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(201) -} - -// DataCocsnInterfacesInterfaceInterfaceNameEnabledPutNoContentCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameEnabledPutNoContent -const DataCocsnInterfacesInterfaceInterfaceNameEnabledPutNoContentCode int = 204 - -/*DataCocsnInterfacesInterfaceInterfaceNameEnabledPutNoContent No Content - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameEnabledPutNoContent -*/ -type DataCocsnInterfacesInterfaceInterfaceNameEnabledPutNoContent struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPutNoContent creates DataCocsnInterfacesInterfaceInterfaceNameEnabledPutNoContent with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPutNoContent() *DataCocsnInterfacesInterfaceInterfaceNameEnabledPutNoContent { - - return &DataCocsnInterfacesInterfaceInterfaceNameEnabledPutNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledPutNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DataCocsnInterfacesInterfaceInterfaceNameEnabledPutBadRequestCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameEnabledPutBadRequest -const DataCocsnInterfacesInterfaceInterfaceNameEnabledPutBadRequestCode int = 400 - -/*DataCocsnInterfacesInterfaceInterfaceNameEnabledPutBadRequest Bad Request - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameEnabledPutBadRequest -*/ -type DataCocsnInterfacesInterfaceInterfaceNameEnabledPutBadRequest struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPutBadRequest creates DataCocsnInterfacesInterfaceInterfaceNameEnabledPutBadRequest with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPutBadRequest() *DataCocsnInterfacesInterfaceInterfaceNameEnabledPutBadRequest { - - return &DataCocsnInterfacesInterfaceInterfaceNameEnabledPutBadRequest{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledPutBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// DataCocsnInterfacesInterfaceInterfaceNameEnabledPutUnauthorizedCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameEnabledPutUnauthorized -const DataCocsnInterfacesInterfaceInterfaceNameEnabledPutUnauthorizedCode int = 401 - -/*DataCocsnInterfacesInterfaceInterfaceNameEnabledPutUnauthorized Unauthorized - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameEnabledPutUnauthorized -*/ -type DataCocsnInterfacesInterfaceInterfaceNameEnabledPutUnauthorized struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPutUnauthorized creates DataCocsnInterfacesInterfaceInterfaceNameEnabledPutUnauthorized with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPutUnauthorized() *DataCocsnInterfacesInterfaceInterfaceNameEnabledPutUnauthorized { - - return &DataCocsnInterfacesInterfaceInterfaceNameEnabledPutUnauthorized{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledPutUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(401) -} - -// DataCocsnInterfacesInterfaceInterfaceNameEnabledPutNotFoundCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameEnabledPutNotFound -const DataCocsnInterfacesInterfaceInterfaceNameEnabledPutNotFoundCode int = 404 - -/*DataCocsnInterfacesInterfaceInterfaceNameEnabledPutNotFound Not Found - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameEnabledPutNotFound -*/ -type DataCocsnInterfacesInterfaceInterfaceNameEnabledPutNotFound struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPutNotFound creates DataCocsnInterfacesInterfaceInterfaceNameEnabledPutNotFound with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPutNotFound() *DataCocsnInterfacesInterfaceInterfaceNameEnabledPutNotFound { - - return &DataCocsnInterfacesInterfaceInterfaceNameEnabledPutNotFound{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledPutNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(404) -} - -// DataCocsnInterfacesInterfaceInterfaceNameEnabledPutMethodNotAllowedCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameEnabledPutMethodNotAllowed -const DataCocsnInterfacesInterfaceInterfaceNameEnabledPutMethodNotAllowedCode int = 405 - -/*DataCocsnInterfacesInterfaceInterfaceNameEnabledPutMethodNotAllowed Method Not Allowed - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameEnabledPutMethodNotAllowed -*/ -type DataCocsnInterfacesInterfaceInterfaceNameEnabledPutMethodNotAllowed struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPutMethodNotAllowed creates DataCocsnInterfacesInterfaceInterfaceNameEnabledPutMethodNotAllowed with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPutMethodNotAllowed() *DataCocsnInterfacesInterfaceInterfaceNameEnabledPutMethodNotAllowed { - - return &DataCocsnInterfacesInterfaceInterfaceNameEnabledPutMethodNotAllowed{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledPutMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(405) -} - -// DataCocsnInterfacesInterfaceInterfaceNameEnabledPutConflictCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameEnabledPutConflict -const DataCocsnInterfacesInterfaceInterfaceNameEnabledPutConflictCode int = 409 - -/*DataCocsnInterfacesInterfaceInterfaceNameEnabledPutConflict Conflict - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameEnabledPutConflict -*/ -type DataCocsnInterfacesInterfaceInterfaceNameEnabledPutConflict struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPutConflict creates DataCocsnInterfacesInterfaceInterfaceNameEnabledPutConflict with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPutConflict() *DataCocsnInterfacesInterfaceInterfaceNameEnabledPutConflict { - - return &DataCocsnInterfacesInterfaceInterfaceNameEnabledPutConflict{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledPutConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_put_urlbuilder.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_put_urlbuilder.go deleted file mode 100644 index 2f88fe691cf0edd9696363c7442242d1f1929c22..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_put_urlbuilder.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" -) - -// DataCocsnInterfacesInterfaceInterfaceNameEnabledPutURL generates an URL for the data cocsn interfaces interface interface name enabled put operation -type DataCocsnInterfacesInterfaceInterfaceNameEnabledPutURL struct { - InterfaceName string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledPutURL) WithBasePath(bp string) *DataCocsnInterfacesInterfaceInterfaceNameEnabledPutURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledPutURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledPutURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/cocsn:interfaces/interface={interface-name}/enabled" - - interfaceName := o.InterfaceName - if interfaceName != "" { - _path = strings.Replace(_path, "{interface-name}", interfaceName, -1) - } else { - return nil, errors.New("interfaceName is required on DataCocsnInterfacesInterfaceInterfaceNameEnabledPutURL") - } - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledPutURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledPutURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledPutURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnInterfacesInterfaceInterfaceNameEnabledPutURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnInterfacesInterfaceInterfaceNameEnabledPutURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledPutURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_get.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_get.go deleted file mode 100644 index d9d5a53c44f248629cd611643481a7bb92900ab9..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_get.go +++ /dev/null @@ -1,71 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataCocsnInterfacesInterfaceInterfaceNameGetHandlerFunc turns a function with the right signature into a data cocsn interfaces interface interface name get handler -type DataCocsnInterfacesInterfaceInterfaceNameGetHandlerFunc func(DataCocsnInterfacesInterfaceInterfaceNameGetParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataCocsnInterfacesInterfaceInterfaceNameGetHandlerFunc) Handle(params DataCocsnInterfacesInterfaceInterfaceNameGetParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataCocsnInterfacesInterfaceInterfaceNameGetHandler interface for that can handle valid data cocsn interfaces interface interface name get params -type DataCocsnInterfacesInterfaceInterfaceNameGetHandler interface { - Handle(DataCocsnInterfacesInterfaceInterfaceNameGetParams, interface{}) middleware.Responder -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameGet creates a new http.Handler for the data cocsn interfaces interface interface name get operation -func NewDataCocsnInterfacesInterfaceInterfaceNameGet(ctx *middleware.Context, handler DataCocsnInterfacesInterfaceInterfaceNameGetHandler) *DataCocsnInterfacesInterfaceInterfaceNameGet { - return &DataCocsnInterfacesInterfaceInterfaceNameGet{Context: ctx, Handler: handler} -} - -/*DataCocsnInterfacesInterfaceInterfaceNameGet swagger:route GET /data/cocsn:interfaces/interface={interface-name} data get dataCocsnInterfacesInterfaceInterfaceNameGet - -DataCocsnInterfacesInterfaceInterfaceNameGet data cocsn interfaces interface interface name get API - -*/ -type DataCocsnInterfacesInterfaceInterfaceNameGet struct { - Context *middleware.Context - Handler DataCocsnInterfacesInterfaceInterfaceNameGetHandler -} - -func (o *DataCocsnInterfacesInterfaceInterfaceNameGet) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataCocsnInterfacesInterfaceInterfaceNameGetParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_get_parameters.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_get_parameters.go deleted file mode 100644 index 416673612eeb221152fe7f6df0ef115a6d63849e..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_get_parameters.go +++ /dev/null @@ -1,260 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// NewDataCocsnInterfacesInterfaceInterfaceNameGetParams creates a new DataCocsnInterfacesInterfaceInterfaceNameGetParams object -// with the default values initialized. -func NewDataCocsnInterfacesInterfaceInterfaceNameGetParams() DataCocsnInterfacesInterfaceInterfaceNameGetParams { - - var ( - // initialize parameters with default values - - contentDefault = string("config") - - withDefaultsDefault = string("report-all") - ) - - return DataCocsnInterfacesInterfaceInterfaceNameGetParams{ - Content: &contentDefault, - - WithDefaults: &withDefaultsDefault, - } -} - -// DataCocsnInterfacesInterfaceInterfaceNameGetParams contains all the bound params for the data cocsn interfaces interface interface name get operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_interfaces_interface_interface_name_get -type DataCocsnInterfacesInterfaceInterfaceNameGetParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*controlling descendant nodes in response - In: query - Default: "config" - */ - Content *string - /*limit the depth of nodes in response - In: query - */ - Depth *uint16 - /*optionally identify specific data nodes in response - In: query - */ - Fields *string - /*xpath expression to filter data nodes in response - In: query - */ - Filter *string - /*Interface name. Example value: en0 - Required: true - In: path - */ - InterfaceName string - /*controlling default values in response - In: query - Default: "report-all" - */ - WithDefaults *string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnInterfacesInterfaceInterfaceNameGetParams() beforehand. -func (o *DataCocsnInterfacesInterfaceInterfaceNameGetParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - qs := runtime.Values(r.URL.Query()) - - qContent, qhkContent, _ := qs.GetOK("content") - if err := o.bindContent(qContent, qhkContent, route.Formats); err != nil { - res = append(res, err) - } - - qDepth, qhkDepth, _ := qs.GetOK("depth") - if err := o.bindDepth(qDepth, qhkDepth, route.Formats); err != nil { - res = append(res, err) - } - - qFields, qhkFields, _ := qs.GetOK("fields") - if err := o.bindFields(qFields, qhkFields, route.Formats); err != nil { - res = append(res, err) - } - - qFilter, qhkFilter, _ := qs.GetOK("filter") - if err := o.bindFilter(qFilter, qhkFilter, route.Formats); err != nil { - res = append(res, err) - } - - rInterfaceName, rhkInterfaceName, _ := route.Params.GetOK("interface-name") - if err := o.bindInterfaceName(rInterfaceName, rhkInterfaceName, route.Formats); err != nil { - res = append(res, err) - } - - qWithDefaults, qhkWithDefaults, _ := qs.GetOK("with-defaults") - if err := o.bindWithDefaults(qWithDefaults, qhkWithDefaults, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindContent binds and validates parameter Content from query. -func (o *DataCocsnInterfacesInterfaceInterfaceNameGetParams) bindContent(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - // Default values have been previously initialized by NewDataCocsnInterfacesInterfaceInterfaceNameGetParams() - return nil - } - - o.Content = &raw - - if err := o.validateContent(formats); err != nil { - return err - } - - return nil -} - -// validateContent carries on validations for parameter Content -func (o *DataCocsnInterfacesInterfaceInterfaceNameGetParams) validateContent(formats strfmt.Registry) error { - - if err := validate.EnumCase("content", "query", *o.Content, []interface{}{"config", "nonconfig", "all"}, true); err != nil { - return err - } - - return nil -} - -// bindDepth binds and validates parameter Depth from query. -func (o *DataCocsnInterfacesInterfaceInterfaceNameGetParams) bindDepth(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - value, err := swag.ConvertUint16(raw) - if err != nil { - return errors.InvalidType("depth", "query", "uint16", raw) - } - o.Depth = &value - - return nil -} - -// bindFields binds and validates parameter Fields from query. -func (o *DataCocsnInterfacesInterfaceInterfaceNameGetParams) bindFields(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - o.Fields = &raw - - return nil -} - -// bindFilter binds and validates parameter Filter from query. -func (o *DataCocsnInterfacesInterfaceInterfaceNameGetParams) bindFilter(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - o.Filter = &raw - - return nil -} - -// bindInterfaceName binds and validates parameter InterfaceName from path. -func (o *DataCocsnInterfacesInterfaceInterfaceNameGetParams) bindInterfaceName(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.InterfaceName = raw - - return nil -} - -// bindWithDefaults binds and validates parameter WithDefaults from query. -func (o *DataCocsnInterfacesInterfaceInterfaceNameGetParams) bindWithDefaults(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - // Default values have been previously initialized by NewDataCocsnInterfacesInterfaceInterfaceNameGetParams() - return nil - } - - o.WithDefaults = &raw - - if err := o.validateWithDefaults(formats); err != nil { - return err - } - - return nil -} - -// validateWithDefaults carries on validations for parameter WithDefaults -func (o *DataCocsnInterfacesInterfaceInterfaceNameGetParams) validateWithDefaults(formats strfmt.Registry) error { - - if err := validate.EnumCase("with-defaults", "query", *o.WithDefaults, []interface{}{"report-all", "trim", "explicit", "report-all-tagged"}, true); err != nil { - return err - } - - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_get_responses.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_get_responses.go deleted file mode 100644 index 4be0e6f1a8c7de3f36aafacb49e7cacb829097ba..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_get_responses.go +++ /dev/null @@ -1,202 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" - - "code.fbi.h-da.de/cocsn/cocsn-api/api/models" -) - -// DataCocsnInterfacesInterfaceInterfaceNameGetOKCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameGetOK -const DataCocsnInterfacesInterfaceInterfaceNameGetOKCode int = 200 - -/*DataCocsnInterfacesInterfaceInterfaceNameGetOK OK - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameGetOK -*/ -type DataCocsnInterfacesInterfaceInterfaceNameGetOK struct { - - /* - In: Body - */ - Payload *models.DataCocsnInterfacesInterfaceInterfaceName `json:"body,omitempty"` -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameGetOK creates DataCocsnInterfacesInterfaceInterfaceNameGetOK with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameGetOK() *DataCocsnInterfacesInterfaceInterfaceNameGetOK { - - return &DataCocsnInterfacesInterfaceInterfaceNameGetOK{} -} - -// WithPayload adds the payload to the data cocsn interfaces interface interface name get o k response -func (o *DataCocsnInterfacesInterfaceInterfaceNameGetOK) WithPayload(payload *models.DataCocsnInterfacesInterfaceInterfaceName) *DataCocsnInterfacesInterfaceInterfaceNameGetOK { - o.Payload = payload - return o -} - -// SetPayload sets the payload to the data cocsn interfaces interface interface name get o k response -func (o *DataCocsnInterfacesInterfaceInterfaceNameGetOK) SetPayload(payload *models.DataCocsnInterfacesInterfaceInterfaceName) { - o.Payload = payload -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameGetOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.WriteHeader(200) - if o.Payload != nil { - payload := o.Payload - if err := producer.Produce(rw, payload); err != nil { - panic(err) // let the recovery middleware deal with this - } - } -} - -// DataCocsnInterfacesInterfaceInterfaceNameGetNoContentCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameGetNoContent -const DataCocsnInterfacesInterfaceInterfaceNameGetNoContentCode int = 204 - -/*DataCocsnInterfacesInterfaceInterfaceNameGetNoContent No Content - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameGetNoContent -*/ -type DataCocsnInterfacesInterfaceInterfaceNameGetNoContent struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameGetNoContent creates DataCocsnInterfacesInterfaceInterfaceNameGetNoContent with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameGetNoContent() *DataCocsnInterfacesInterfaceInterfaceNameGetNoContent { - - return &DataCocsnInterfacesInterfaceInterfaceNameGetNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameGetNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DataCocsnInterfacesInterfaceInterfaceNameGetBadRequestCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameGetBadRequest -const DataCocsnInterfacesInterfaceInterfaceNameGetBadRequestCode int = 400 - -/*DataCocsnInterfacesInterfaceInterfaceNameGetBadRequest Bad Request - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameGetBadRequest -*/ -type DataCocsnInterfacesInterfaceInterfaceNameGetBadRequest struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameGetBadRequest creates DataCocsnInterfacesInterfaceInterfaceNameGetBadRequest with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameGetBadRequest() *DataCocsnInterfacesInterfaceInterfaceNameGetBadRequest { - - return &DataCocsnInterfacesInterfaceInterfaceNameGetBadRequest{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameGetBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// DataCocsnInterfacesInterfaceInterfaceNameGetUnauthorizedCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameGetUnauthorized -const DataCocsnInterfacesInterfaceInterfaceNameGetUnauthorizedCode int = 401 - -/*DataCocsnInterfacesInterfaceInterfaceNameGetUnauthorized Unauthorized - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameGetUnauthorized -*/ -type DataCocsnInterfacesInterfaceInterfaceNameGetUnauthorized struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameGetUnauthorized creates DataCocsnInterfacesInterfaceInterfaceNameGetUnauthorized with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameGetUnauthorized() *DataCocsnInterfacesInterfaceInterfaceNameGetUnauthorized { - - return &DataCocsnInterfacesInterfaceInterfaceNameGetUnauthorized{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameGetUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(401) -} - -// DataCocsnInterfacesInterfaceInterfaceNameGetNotFoundCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameGetNotFound -const DataCocsnInterfacesInterfaceInterfaceNameGetNotFoundCode int = 404 - -/*DataCocsnInterfacesInterfaceInterfaceNameGetNotFound Not Found - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameGetNotFound -*/ -type DataCocsnInterfacesInterfaceInterfaceNameGetNotFound struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameGetNotFound creates DataCocsnInterfacesInterfaceInterfaceNameGetNotFound with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameGetNotFound() *DataCocsnInterfacesInterfaceInterfaceNameGetNotFound { - - return &DataCocsnInterfacesInterfaceInterfaceNameGetNotFound{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameGetNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(404) -} - -// DataCocsnInterfacesInterfaceInterfaceNameGetMethodNotAllowedCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameGetMethodNotAllowed -const DataCocsnInterfacesInterfaceInterfaceNameGetMethodNotAllowedCode int = 405 - -/*DataCocsnInterfacesInterfaceInterfaceNameGetMethodNotAllowed Method Not Allowed - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameGetMethodNotAllowed -*/ -type DataCocsnInterfacesInterfaceInterfaceNameGetMethodNotAllowed struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameGetMethodNotAllowed creates DataCocsnInterfacesInterfaceInterfaceNameGetMethodNotAllowed with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameGetMethodNotAllowed() *DataCocsnInterfacesInterfaceInterfaceNameGetMethodNotAllowed { - - return &DataCocsnInterfacesInterfaceInterfaceNameGetMethodNotAllowed{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameGetMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(405) -} - -// DataCocsnInterfacesInterfaceInterfaceNameGetConflictCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameGetConflict -const DataCocsnInterfacesInterfaceInterfaceNameGetConflictCode int = 409 - -/*DataCocsnInterfacesInterfaceInterfaceNameGetConflict Conflict - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameGetConflict -*/ -type DataCocsnInterfacesInterfaceInterfaceNameGetConflict struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameGetConflict creates DataCocsnInterfacesInterfaceInterfaceNameGetConflict with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameGetConflict() *DataCocsnInterfacesInterfaceInterfaceNameGetConflict { - - return &DataCocsnInterfacesInterfaceInterfaceNameGetConflict{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameGetConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_get_urlbuilder.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_get_urlbuilder.go deleted file mode 100644 index 1e1103e2c6b30e9fc3e4b4b95c1fe188fde63c18..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_get_urlbuilder.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" - - "github.com/go-openapi/swag" -) - -// DataCocsnInterfacesInterfaceInterfaceNameGetURL generates an URL for the data cocsn interfaces interface interface name get operation -type DataCocsnInterfacesInterfaceInterfaceNameGetURL struct { - InterfaceName string - - Content *string - Depth *uint16 - Fields *string - Filter *string - WithDefaults *string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnInterfacesInterfaceInterfaceNameGetURL) WithBasePath(bp string) *DataCocsnInterfacesInterfaceInterfaceNameGetURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnInterfacesInterfaceInterfaceNameGetURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DataCocsnInterfacesInterfaceInterfaceNameGetURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/cocsn:interfaces/interface={interface-name}" - - interfaceName := o.InterfaceName - if interfaceName != "" { - _path = strings.Replace(_path, "{interface-name}", interfaceName, -1) - } else { - return nil, errors.New("interfaceName is required on DataCocsnInterfacesInterfaceInterfaceNameGetURL") - } - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - qs := make(url.Values) - - var contentQ string - if o.Content != nil { - contentQ = *o.Content - } - if contentQ != "" { - qs.Set("content", contentQ) - } - - var depthQ string - if o.Depth != nil { - depthQ = swag.FormatUint16(*o.Depth) - } - if depthQ != "" { - qs.Set("depth", depthQ) - } - - var fieldsQ string - if o.Fields != nil { - fieldsQ = *o.Fields - } - if fieldsQ != "" { - qs.Set("fields", fieldsQ) - } - - var filterQ string - if o.Filter != nil { - filterQ = *o.Filter - } - if filterQ != "" { - qs.Set("filter", filterQ) - } - - var withDefaultsQ string - if o.WithDefaults != nil { - withDefaultsQ = *o.WithDefaults - } - if withDefaultsQ != "" { - qs.Set("with-defaults", withDefaultsQ) - } - - _result.RawQuery = qs.Encode() - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnInterfacesInterfaceInterfaceNameGetURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DataCocsnInterfacesInterfaceInterfaceNameGetURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnInterfacesInterfaceInterfaceNameGetURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnInterfacesInterfaceInterfaceNameGetURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnInterfacesInterfaceInterfaceNameGetURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DataCocsnInterfacesInterfaceInterfaceNameGetURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_delete.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_delete.go deleted file mode 100644 index 6cd56c14d9b77fb359f39232c49d41018d454da8..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_delete.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataCocsnInterfacesInterfaceInterfaceNameNameDeleteHandlerFunc turns a function with the right signature into a data cocsn interfaces interface interface name name delete handler -type DataCocsnInterfacesInterfaceInterfaceNameNameDeleteHandlerFunc func(DataCocsnInterfacesInterfaceInterfaceNameNameDeleteParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataCocsnInterfacesInterfaceInterfaceNameNameDeleteHandlerFunc) Handle(params DataCocsnInterfacesInterfaceInterfaceNameNameDeleteParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataCocsnInterfacesInterfaceInterfaceNameNameDeleteHandler interface for that can handle valid data cocsn interfaces interface interface name name delete params -type DataCocsnInterfacesInterfaceInterfaceNameNameDeleteHandler interface { - Handle(DataCocsnInterfacesInterfaceInterfaceNameNameDeleteParams, interface{}) middleware.Responder -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameNameDelete creates a new http.Handler for the data cocsn interfaces interface interface name name delete operation -func NewDataCocsnInterfacesInterfaceInterfaceNameNameDelete(ctx *middleware.Context, handler DataCocsnInterfacesInterfaceInterfaceNameNameDeleteHandler) *DataCocsnInterfacesInterfaceInterfaceNameNameDelete { - return &DataCocsnInterfacesInterfaceInterfaceNameNameDelete{Context: ctx, Handler: handler} -} - -/*DataCocsnInterfacesInterfaceInterfaceNameNameDelete swagger:route DELETE /data/cocsn:interfaces/interface={interface-name}/name data delete dataCocsnInterfacesInterfaceInterfaceNameNameDelete - -Interface name. Example value: en0 - -Interface name. Example value: en0 - -*/ -type DataCocsnInterfacesInterfaceInterfaceNameNameDelete struct { - Context *middleware.Context - Handler DataCocsnInterfacesInterfaceInterfaceNameNameDeleteHandler -} - -func (o *DataCocsnInterfacesInterfaceInterfaceNameNameDelete) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataCocsnInterfacesInterfaceInterfaceNameNameDeleteParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_delete_parameters.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_delete_parameters.go deleted file mode 100644 index d00389d30334e038c5768b04656a653396c2cc62..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_delete_parameters.go +++ /dev/null @@ -1,72 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" -) - -// NewDataCocsnInterfacesInterfaceInterfaceNameNameDeleteParams creates a new DataCocsnInterfacesInterfaceInterfaceNameNameDeleteParams object -// no default values defined in spec. -func NewDataCocsnInterfacesInterfaceInterfaceNameNameDeleteParams() DataCocsnInterfacesInterfaceInterfaceNameNameDeleteParams { - - return DataCocsnInterfacesInterfaceInterfaceNameNameDeleteParams{} -} - -// DataCocsnInterfacesInterfaceInterfaceNameNameDeleteParams contains all the bound params for the data cocsn interfaces interface interface name name delete operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_interfaces_interface_interface_name_name_delete -type DataCocsnInterfacesInterfaceInterfaceNameNameDeleteParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*Interface name. Example value: en0 - Required: true - In: path - */ - InterfaceName string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnInterfacesInterfaceInterfaceNameNameDeleteParams() beforehand. -func (o *DataCocsnInterfacesInterfaceInterfaceNameNameDeleteParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - rInterfaceName, rhkInterfaceName, _ := route.Params.GetOK("interface-name") - if err := o.bindInterfaceName(rInterfaceName, rhkInterfaceName, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindInterfaceName binds and validates parameter InterfaceName from path. -func (o *DataCocsnInterfacesInterfaceInterfaceNameNameDeleteParams) bindInterfaceName(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.InterfaceName = raw - - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_delete_responses.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_delete_responses.go deleted file mode 100644 index 7439a7eb66735b671c43e1aa6797178af4a15d2c..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_delete_responses.go +++ /dev/null @@ -1,36 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// DataCocsnInterfacesInterfaceInterfaceNameNameDeleteNoContentCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameNameDeleteNoContent -const DataCocsnInterfacesInterfaceInterfaceNameNameDeleteNoContentCode int = 204 - -/*DataCocsnInterfacesInterfaceInterfaceNameNameDeleteNoContent No Content - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameNameDeleteNoContent -*/ -type DataCocsnInterfacesInterfaceInterfaceNameNameDeleteNoContent struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameNameDeleteNoContent creates DataCocsnInterfacesInterfaceInterfaceNameNameDeleteNoContent with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameNameDeleteNoContent() *DataCocsnInterfacesInterfaceInterfaceNameNameDeleteNoContent { - - return &DataCocsnInterfacesInterfaceInterfaceNameNameDeleteNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameNameDeleteNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_delete_urlbuilder.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_delete_urlbuilder.go deleted file mode 100644 index fecc4547c6a55f0ade557ffd2196ac111616b48d..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_delete_urlbuilder.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" -) - -// DataCocsnInterfacesInterfaceInterfaceNameNameDeleteURL generates an URL for the data cocsn interfaces interface interface name name delete operation -type DataCocsnInterfacesInterfaceInterfaceNameNameDeleteURL struct { - InterfaceName string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnInterfacesInterfaceInterfaceNameNameDeleteURL) WithBasePath(bp string) *DataCocsnInterfacesInterfaceInterfaceNameNameDeleteURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnInterfacesInterfaceInterfaceNameNameDeleteURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DataCocsnInterfacesInterfaceInterfaceNameNameDeleteURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/cocsn:interfaces/interface={interface-name}/name" - - interfaceName := o.InterfaceName - if interfaceName != "" { - _path = strings.Replace(_path, "{interface-name}", interfaceName, -1) - } else { - return nil, errors.New("interfaceName is required on DataCocsnInterfacesInterfaceInterfaceNameNameDeleteURL") - } - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnInterfacesInterfaceInterfaceNameNameDeleteURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DataCocsnInterfacesInterfaceInterfaceNameNameDeleteURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnInterfacesInterfaceInterfaceNameNameDeleteURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnInterfacesInterfaceInterfaceNameNameDeleteURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnInterfacesInterfaceInterfaceNameNameDeleteURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DataCocsnInterfacesInterfaceInterfaceNameNameDeleteURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_get.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_get.go deleted file mode 100644 index 7eb5031e81be5ee883f5abbfaafb6cf8be0bc8af..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_get.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataCocsnInterfacesInterfaceInterfaceNameNameGetHandlerFunc turns a function with the right signature into a data cocsn interfaces interface interface name name get handler -type DataCocsnInterfacesInterfaceInterfaceNameNameGetHandlerFunc func(DataCocsnInterfacesInterfaceInterfaceNameNameGetParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataCocsnInterfacesInterfaceInterfaceNameNameGetHandlerFunc) Handle(params DataCocsnInterfacesInterfaceInterfaceNameNameGetParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataCocsnInterfacesInterfaceInterfaceNameNameGetHandler interface for that can handle valid data cocsn interfaces interface interface name name get params -type DataCocsnInterfacesInterfaceInterfaceNameNameGetHandler interface { - Handle(DataCocsnInterfacesInterfaceInterfaceNameNameGetParams, interface{}) middleware.Responder -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameNameGet creates a new http.Handler for the data cocsn interfaces interface interface name name get operation -func NewDataCocsnInterfacesInterfaceInterfaceNameNameGet(ctx *middleware.Context, handler DataCocsnInterfacesInterfaceInterfaceNameNameGetHandler) *DataCocsnInterfacesInterfaceInterfaceNameNameGet { - return &DataCocsnInterfacesInterfaceInterfaceNameNameGet{Context: ctx, Handler: handler} -} - -/*DataCocsnInterfacesInterfaceInterfaceNameNameGet swagger:route GET /data/cocsn:interfaces/interface={interface-name}/name data get dataCocsnInterfacesInterfaceInterfaceNameNameGet - -Interface name. Example value: en0 - -Interface name. Example value: en0 - -*/ -type DataCocsnInterfacesInterfaceInterfaceNameNameGet struct { - Context *middleware.Context - Handler DataCocsnInterfacesInterfaceInterfaceNameNameGetHandler -} - -func (o *DataCocsnInterfacesInterfaceInterfaceNameNameGet) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataCocsnInterfacesInterfaceInterfaceNameNameGetParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_get_parameters.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_get_parameters.go deleted file mode 100644 index c036b05d59b59343c672413df22bf376f65f7f34..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_get_parameters.go +++ /dev/null @@ -1,260 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// NewDataCocsnInterfacesInterfaceInterfaceNameNameGetParams creates a new DataCocsnInterfacesInterfaceInterfaceNameNameGetParams object -// with the default values initialized. -func NewDataCocsnInterfacesInterfaceInterfaceNameNameGetParams() DataCocsnInterfacesInterfaceInterfaceNameNameGetParams { - - var ( - // initialize parameters with default values - - contentDefault = string("config") - - withDefaultsDefault = string("report-all") - ) - - return DataCocsnInterfacesInterfaceInterfaceNameNameGetParams{ - Content: &contentDefault, - - WithDefaults: &withDefaultsDefault, - } -} - -// DataCocsnInterfacesInterfaceInterfaceNameNameGetParams contains all the bound params for the data cocsn interfaces interface interface name name get operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_interfaces_interface_interface_name_name_get -type DataCocsnInterfacesInterfaceInterfaceNameNameGetParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*controlling descendant nodes in response - In: query - Default: "config" - */ - Content *string - /*limit the depth of nodes in response - In: query - */ - Depth *uint16 - /*optionally identify specific data nodes in response - In: query - */ - Fields *string - /*xpath expression to filter data nodes in response - In: query - */ - Filter *string - /*Interface name. Example value: en0 - Required: true - In: path - */ - InterfaceName string - /*controlling default values in response - In: query - Default: "report-all" - */ - WithDefaults *string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnInterfacesInterfaceInterfaceNameNameGetParams() beforehand. -func (o *DataCocsnInterfacesInterfaceInterfaceNameNameGetParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - qs := runtime.Values(r.URL.Query()) - - qContent, qhkContent, _ := qs.GetOK("content") - if err := o.bindContent(qContent, qhkContent, route.Formats); err != nil { - res = append(res, err) - } - - qDepth, qhkDepth, _ := qs.GetOK("depth") - if err := o.bindDepth(qDepth, qhkDepth, route.Formats); err != nil { - res = append(res, err) - } - - qFields, qhkFields, _ := qs.GetOK("fields") - if err := o.bindFields(qFields, qhkFields, route.Formats); err != nil { - res = append(res, err) - } - - qFilter, qhkFilter, _ := qs.GetOK("filter") - if err := o.bindFilter(qFilter, qhkFilter, route.Formats); err != nil { - res = append(res, err) - } - - rInterfaceName, rhkInterfaceName, _ := route.Params.GetOK("interface-name") - if err := o.bindInterfaceName(rInterfaceName, rhkInterfaceName, route.Formats); err != nil { - res = append(res, err) - } - - qWithDefaults, qhkWithDefaults, _ := qs.GetOK("with-defaults") - if err := o.bindWithDefaults(qWithDefaults, qhkWithDefaults, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindContent binds and validates parameter Content from query. -func (o *DataCocsnInterfacesInterfaceInterfaceNameNameGetParams) bindContent(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - // Default values have been previously initialized by NewDataCocsnInterfacesInterfaceInterfaceNameNameGetParams() - return nil - } - - o.Content = &raw - - if err := o.validateContent(formats); err != nil { - return err - } - - return nil -} - -// validateContent carries on validations for parameter Content -func (o *DataCocsnInterfacesInterfaceInterfaceNameNameGetParams) validateContent(formats strfmt.Registry) error { - - if err := validate.EnumCase("content", "query", *o.Content, []interface{}{"config", "nonconfig", "all"}, true); err != nil { - return err - } - - return nil -} - -// bindDepth binds and validates parameter Depth from query. -func (o *DataCocsnInterfacesInterfaceInterfaceNameNameGetParams) bindDepth(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - value, err := swag.ConvertUint16(raw) - if err != nil { - return errors.InvalidType("depth", "query", "uint16", raw) - } - o.Depth = &value - - return nil -} - -// bindFields binds and validates parameter Fields from query. -func (o *DataCocsnInterfacesInterfaceInterfaceNameNameGetParams) bindFields(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - o.Fields = &raw - - return nil -} - -// bindFilter binds and validates parameter Filter from query. -func (o *DataCocsnInterfacesInterfaceInterfaceNameNameGetParams) bindFilter(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - o.Filter = &raw - - return nil -} - -// bindInterfaceName binds and validates parameter InterfaceName from path. -func (o *DataCocsnInterfacesInterfaceInterfaceNameNameGetParams) bindInterfaceName(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.InterfaceName = raw - - return nil -} - -// bindWithDefaults binds and validates parameter WithDefaults from query. -func (o *DataCocsnInterfacesInterfaceInterfaceNameNameGetParams) bindWithDefaults(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - // Default values have been previously initialized by NewDataCocsnInterfacesInterfaceInterfaceNameNameGetParams() - return nil - } - - o.WithDefaults = &raw - - if err := o.validateWithDefaults(formats); err != nil { - return err - } - - return nil -} - -// validateWithDefaults carries on validations for parameter WithDefaults -func (o *DataCocsnInterfacesInterfaceInterfaceNameNameGetParams) validateWithDefaults(formats strfmt.Registry) error { - - if err := validate.EnumCase("with-defaults", "query", *o.WithDefaults, []interface{}{"report-all", "trim", "explicit", "report-all-tagged"}, true); err != nil { - return err - } - - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_get_responses.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_get_responses.go deleted file mode 100644 index ca3370a48fc81a4d10e8b1eef7c829fea8216c0c..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_get_responses.go +++ /dev/null @@ -1,202 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" - - "code.fbi.h-da.de/cocsn/cocsn-api/api/models" -) - -// DataCocsnInterfacesInterfaceInterfaceNameNameGetOKCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameNameGetOK -const DataCocsnInterfacesInterfaceInterfaceNameNameGetOKCode int = 200 - -/*DataCocsnInterfacesInterfaceInterfaceNameNameGetOK Interface name. Example value: en0 - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameNameGetOK -*/ -type DataCocsnInterfacesInterfaceInterfaceNameNameGetOK struct { - - /* - In: Body - */ - Payload *models.DataCocsnInterfacesInterfaceInterfaceNameName `json:"body,omitempty"` -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameNameGetOK creates DataCocsnInterfacesInterfaceInterfaceNameNameGetOK with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameNameGetOK() *DataCocsnInterfacesInterfaceInterfaceNameNameGetOK { - - return &DataCocsnInterfacesInterfaceInterfaceNameNameGetOK{} -} - -// WithPayload adds the payload to the data cocsn interfaces interface interface name name get o k response -func (o *DataCocsnInterfacesInterfaceInterfaceNameNameGetOK) WithPayload(payload *models.DataCocsnInterfacesInterfaceInterfaceNameName) *DataCocsnInterfacesInterfaceInterfaceNameNameGetOK { - o.Payload = payload - return o -} - -// SetPayload sets the payload to the data cocsn interfaces interface interface name name get o k response -func (o *DataCocsnInterfacesInterfaceInterfaceNameNameGetOK) SetPayload(payload *models.DataCocsnInterfacesInterfaceInterfaceNameName) { - o.Payload = payload -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameNameGetOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.WriteHeader(200) - if o.Payload != nil { - payload := o.Payload - if err := producer.Produce(rw, payload); err != nil { - panic(err) // let the recovery middleware deal with this - } - } -} - -// DataCocsnInterfacesInterfaceInterfaceNameNameGetNoContentCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameNameGetNoContent -const DataCocsnInterfacesInterfaceInterfaceNameNameGetNoContentCode int = 204 - -/*DataCocsnInterfacesInterfaceInterfaceNameNameGetNoContent No Content - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameNameGetNoContent -*/ -type DataCocsnInterfacesInterfaceInterfaceNameNameGetNoContent struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameNameGetNoContent creates DataCocsnInterfacesInterfaceInterfaceNameNameGetNoContent with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameNameGetNoContent() *DataCocsnInterfacesInterfaceInterfaceNameNameGetNoContent { - - return &DataCocsnInterfacesInterfaceInterfaceNameNameGetNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameNameGetNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DataCocsnInterfacesInterfaceInterfaceNameNameGetBadRequestCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameNameGetBadRequest -const DataCocsnInterfacesInterfaceInterfaceNameNameGetBadRequestCode int = 400 - -/*DataCocsnInterfacesInterfaceInterfaceNameNameGetBadRequest Bad Request - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameNameGetBadRequest -*/ -type DataCocsnInterfacesInterfaceInterfaceNameNameGetBadRequest struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameNameGetBadRequest creates DataCocsnInterfacesInterfaceInterfaceNameNameGetBadRequest with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameNameGetBadRequest() *DataCocsnInterfacesInterfaceInterfaceNameNameGetBadRequest { - - return &DataCocsnInterfacesInterfaceInterfaceNameNameGetBadRequest{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameNameGetBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// DataCocsnInterfacesInterfaceInterfaceNameNameGetUnauthorizedCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameNameGetUnauthorized -const DataCocsnInterfacesInterfaceInterfaceNameNameGetUnauthorizedCode int = 401 - -/*DataCocsnInterfacesInterfaceInterfaceNameNameGetUnauthorized Unauthorized - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameNameGetUnauthorized -*/ -type DataCocsnInterfacesInterfaceInterfaceNameNameGetUnauthorized struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameNameGetUnauthorized creates DataCocsnInterfacesInterfaceInterfaceNameNameGetUnauthorized with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameNameGetUnauthorized() *DataCocsnInterfacesInterfaceInterfaceNameNameGetUnauthorized { - - return &DataCocsnInterfacesInterfaceInterfaceNameNameGetUnauthorized{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameNameGetUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(401) -} - -// DataCocsnInterfacesInterfaceInterfaceNameNameGetNotFoundCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameNameGetNotFound -const DataCocsnInterfacesInterfaceInterfaceNameNameGetNotFoundCode int = 404 - -/*DataCocsnInterfacesInterfaceInterfaceNameNameGetNotFound Not Found - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameNameGetNotFound -*/ -type DataCocsnInterfacesInterfaceInterfaceNameNameGetNotFound struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameNameGetNotFound creates DataCocsnInterfacesInterfaceInterfaceNameNameGetNotFound with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameNameGetNotFound() *DataCocsnInterfacesInterfaceInterfaceNameNameGetNotFound { - - return &DataCocsnInterfacesInterfaceInterfaceNameNameGetNotFound{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameNameGetNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(404) -} - -// DataCocsnInterfacesInterfaceInterfaceNameNameGetMethodNotAllowedCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameNameGetMethodNotAllowed -const DataCocsnInterfacesInterfaceInterfaceNameNameGetMethodNotAllowedCode int = 405 - -/*DataCocsnInterfacesInterfaceInterfaceNameNameGetMethodNotAllowed Method Not Allowed - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameNameGetMethodNotAllowed -*/ -type DataCocsnInterfacesInterfaceInterfaceNameNameGetMethodNotAllowed struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameNameGetMethodNotAllowed creates DataCocsnInterfacesInterfaceInterfaceNameNameGetMethodNotAllowed with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameNameGetMethodNotAllowed() *DataCocsnInterfacesInterfaceInterfaceNameNameGetMethodNotAllowed { - - return &DataCocsnInterfacesInterfaceInterfaceNameNameGetMethodNotAllowed{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameNameGetMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(405) -} - -// DataCocsnInterfacesInterfaceInterfaceNameNameGetConflictCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameNameGetConflict -const DataCocsnInterfacesInterfaceInterfaceNameNameGetConflictCode int = 409 - -/*DataCocsnInterfacesInterfaceInterfaceNameNameGetConflict Conflict - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameNameGetConflict -*/ -type DataCocsnInterfacesInterfaceInterfaceNameNameGetConflict struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameNameGetConflict creates DataCocsnInterfacesInterfaceInterfaceNameNameGetConflict with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameNameGetConflict() *DataCocsnInterfacesInterfaceInterfaceNameNameGetConflict { - - return &DataCocsnInterfacesInterfaceInterfaceNameNameGetConflict{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameNameGetConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_get_urlbuilder.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_get_urlbuilder.go deleted file mode 100644 index 0dfab86cd94b9163fc33493113be6415a8248227..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_get_urlbuilder.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" - - "github.com/go-openapi/swag" -) - -// DataCocsnInterfacesInterfaceInterfaceNameNameGetURL generates an URL for the data cocsn interfaces interface interface name name get operation -type DataCocsnInterfacesInterfaceInterfaceNameNameGetURL struct { - InterfaceName string - - Content *string - Depth *uint16 - Fields *string - Filter *string - WithDefaults *string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnInterfacesInterfaceInterfaceNameNameGetURL) WithBasePath(bp string) *DataCocsnInterfacesInterfaceInterfaceNameNameGetURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnInterfacesInterfaceInterfaceNameNameGetURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DataCocsnInterfacesInterfaceInterfaceNameNameGetURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/cocsn:interfaces/interface={interface-name}/name" - - interfaceName := o.InterfaceName - if interfaceName != "" { - _path = strings.Replace(_path, "{interface-name}", interfaceName, -1) - } else { - return nil, errors.New("interfaceName is required on DataCocsnInterfacesInterfaceInterfaceNameNameGetURL") - } - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - qs := make(url.Values) - - var contentQ string - if o.Content != nil { - contentQ = *o.Content - } - if contentQ != "" { - qs.Set("content", contentQ) - } - - var depthQ string - if o.Depth != nil { - depthQ = swag.FormatUint16(*o.Depth) - } - if depthQ != "" { - qs.Set("depth", depthQ) - } - - var fieldsQ string - if o.Fields != nil { - fieldsQ = *o.Fields - } - if fieldsQ != "" { - qs.Set("fields", fieldsQ) - } - - var filterQ string - if o.Filter != nil { - filterQ = *o.Filter - } - if filterQ != "" { - qs.Set("filter", filterQ) - } - - var withDefaultsQ string - if o.WithDefaults != nil { - withDefaultsQ = *o.WithDefaults - } - if withDefaultsQ != "" { - qs.Set("with-defaults", withDefaultsQ) - } - - _result.RawQuery = qs.Encode() - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnInterfacesInterfaceInterfaceNameNameGetURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DataCocsnInterfacesInterfaceInterfaceNameNameGetURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnInterfacesInterfaceInterfaceNameNameGetURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnInterfacesInterfaceInterfaceNameNameGetURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnInterfacesInterfaceInterfaceNameNameGetURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DataCocsnInterfacesInterfaceInterfaceNameNameGetURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_patch.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_patch.go deleted file mode 100644 index 0fa74eb639d1fbac3fdd4bad2009091ecc0431f5..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_patch.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataCocsnInterfacesInterfaceInterfaceNameNamePatchHandlerFunc turns a function with the right signature into a data cocsn interfaces interface interface name name patch handler -type DataCocsnInterfacesInterfaceInterfaceNameNamePatchHandlerFunc func(DataCocsnInterfacesInterfaceInterfaceNameNamePatchParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataCocsnInterfacesInterfaceInterfaceNameNamePatchHandlerFunc) Handle(params DataCocsnInterfacesInterfaceInterfaceNameNamePatchParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataCocsnInterfacesInterfaceInterfaceNameNamePatchHandler interface for that can handle valid data cocsn interfaces interface interface name name patch params -type DataCocsnInterfacesInterfaceInterfaceNameNamePatchHandler interface { - Handle(DataCocsnInterfacesInterfaceInterfaceNameNamePatchParams, interface{}) middleware.Responder -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameNamePatch creates a new http.Handler for the data cocsn interfaces interface interface name name patch operation -func NewDataCocsnInterfacesInterfaceInterfaceNameNamePatch(ctx *middleware.Context, handler DataCocsnInterfacesInterfaceInterfaceNameNamePatchHandler) *DataCocsnInterfacesInterfaceInterfaceNameNamePatch { - return &DataCocsnInterfacesInterfaceInterfaceNameNamePatch{Context: ctx, Handler: handler} -} - -/*DataCocsnInterfacesInterfaceInterfaceNameNamePatch swagger:route PATCH /data/cocsn:interfaces/interface={interface-name}/name data patch dataCocsnInterfacesInterfaceInterfaceNameNamePatch - -Interface name. Example value: en0 - -Interface name. Example value: en0 - -*/ -type DataCocsnInterfacesInterfaceInterfaceNameNamePatch struct { - Context *middleware.Context - Handler DataCocsnInterfacesInterfaceInterfaceNameNamePatchHandler -} - -func (o *DataCocsnInterfacesInterfaceInterfaceNameNamePatch) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataCocsnInterfacesInterfaceInterfaceNameNamePatchParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_patch_parameters.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_patch_parameters.go deleted file mode 100644 index 3c48ab4ca2b0150b6cadeb7e1782ee283ef33a9a..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_patch_parameters.go +++ /dev/null @@ -1,103 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "io" - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - - "code.fbi.h-da.de/cocsn/cocsn-api/api/models" -) - -// NewDataCocsnInterfacesInterfaceInterfaceNameNamePatchParams creates a new DataCocsnInterfacesInterfaceInterfaceNameNamePatchParams object -// no default values defined in spec. -func NewDataCocsnInterfacesInterfaceInterfaceNameNamePatchParams() DataCocsnInterfacesInterfaceInterfaceNameNamePatchParams { - - return DataCocsnInterfacesInterfaceInterfaceNameNamePatchParams{} -} - -// DataCocsnInterfacesInterfaceInterfaceNameNamePatchParams contains all the bound params for the data cocsn interfaces interface interface name name patch operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_interfaces_interface_interface_name_name_patch -type DataCocsnInterfacesInterfaceInterfaceNameNamePatchParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*Interface name. Example value: en0 - Required: true - In: path - */ - InterfaceName string - /*Interface name. Example value: en0 - Required: true - In: body - */ - Name *models.DataCocsnInterfacesInterfaceInterfaceNameName -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnInterfacesInterfaceInterfaceNameNamePatchParams() beforehand. -func (o *DataCocsnInterfacesInterfaceInterfaceNameNamePatchParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - rInterfaceName, rhkInterfaceName, _ := route.Params.GetOK("interface-name") - if err := o.bindInterfaceName(rInterfaceName, rhkInterfaceName, route.Formats); err != nil { - res = append(res, err) - } - - if runtime.HasBody(r) { - defer r.Body.Close() - var body models.DataCocsnInterfacesInterfaceInterfaceNameName - if err := route.Consumer.Consume(r.Body, &body); err != nil { - if err == io.EOF { - res = append(res, errors.Required("name", "body", "")) - } else { - res = append(res, errors.NewParseError("name", "body", "", err)) - } - } else { - // validate body object - if err := body.Validate(route.Formats); err != nil { - res = append(res, err) - } - - if len(res) == 0 { - o.Name = &body - } - } - } else { - res = append(res, errors.Required("name", "body", "")) - } - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindInterfaceName binds and validates parameter InterfaceName from path. -func (o *DataCocsnInterfacesInterfaceInterfaceNameNamePatchParams) bindInterfaceName(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.InterfaceName = raw - - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_patch_responses.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_patch_responses.go deleted file mode 100644 index 184e6835744a37a453d32115ba7c0c259a4734d0..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_patch_responses.go +++ /dev/null @@ -1,156 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// DataCocsnInterfacesInterfaceInterfaceNameNamePatchNoContentCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameNamePatchNoContent -const DataCocsnInterfacesInterfaceInterfaceNameNamePatchNoContentCode int = 204 - -/*DataCocsnInterfacesInterfaceInterfaceNameNamePatchNoContent leaf name updated - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameNamePatchNoContent -*/ -type DataCocsnInterfacesInterfaceInterfaceNameNamePatchNoContent struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameNamePatchNoContent creates DataCocsnInterfacesInterfaceInterfaceNameNamePatchNoContent with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameNamePatchNoContent() *DataCocsnInterfacesInterfaceInterfaceNameNamePatchNoContent { - - return &DataCocsnInterfacesInterfaceInterfaceNameNamePatchNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameNamePatchNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DataCocsnInterfacesInterfaceInterfaceNameNamePatchBadRequestCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameNamePatchBadRequest -const DataCocsnInterfacesInterfaceInterfaceNameNamePatchBadRequestCode int = 400 - -/*DataCocsnInterfacesInterfaceInterfaceNameNamePatchBadRequest Bad Request - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameNamePatchBadRequest -*/ -type DataCocsnInterfacesInterfaceInterfaceNameNamePatchBadRequest struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameNamePatchBadRequest creates DataCocsnInterfacesInterfaceInterfaceNameNamePatchBadRequest with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameNamePatchBadRequest() *DataCocsnInterfacesInterfaceInterfaceNameNamePatchBadRequest { - - return &DataCocsnInterfacesInterfaceInterfaceNameNamePatchBadRequest{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameNamePatchBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// DataCocsnInterfacesInterfaceInterfaceNameNamePatchUnauthorizedCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameNamePatchUnauthorized -const DataCocsnInterfacesInterfaceInterfaceNameNamePatchUnauthorizedCode int = 401 - -/*DataCocsnInterfacesInterfaceInterfaceNameNamePatchUnauthorized Unauthorized - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameNamePatchUnauthorized -*/ -type DataCocsnInterfacesInterfaceInterfaceNameNamePatchUnauthorized struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameNamePatchUnauthorized creates DataCocsnInterfacesInterfaceInterfaceNameNamePatchUnauthorized with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameNamePatchUnauthorized() *DataCocsnInterfacesInterfaceInterfaceNameNamePatchUnauthorized { - - return &DataCocsnInterfacesInterfaceInterfaceNameNamePatchUnauthorized{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameNamePatchUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(401) -} - -// DataCocsnInterfacesInterfaceInterfaceNameNamePatchNotFoundCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameNamePatchNotFound -const DataCocsnInterfacesInterfaceInterfaceNameNamePatchNotFoundCode int = 404 - -/*DataCocsnInterfacesInterfaceInterfaceNameNamePatchNotFound Not Found - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameNamePatchNotFound -*/ -type DataCocsnInterfacesInterfaceInterfaceNameNamePatchNotFound struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameNamePatchNotFound creates DataCocsnInterfacesInterfaceInterfaceNameNamePatchNotFound with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameNamePatchNotFound() *DataCocsnInterfacesInterfaceInterfaceNameNamePatchNotFound { - - return &DataCocsnInterfacesInterfaceInterfaceNameNamePatchNotFound{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameNamePatchNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(404) -} - -// DataCocsnInterfacesInterfaceInterfaceNameNamePatchMethodNotAllowedCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameNamePatchMethodNotAllowed -const DataCocsnInterfacesInterfaceInterfaceNameNamePatchMethodNotAllowedCode int = 405 - -/*DataCocsnInterfacesInterfaceInterfaceNameNamePatchMethodNotAllowed Method Not Allowed - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameNamePatchMethodNotAllowed -*/ -type DataCocsnInterfacesInterfaceInterfaceNameNamePatchMethodNotAllowed struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameNamePatchMethodNotAllowed creates DataCocsnInterfacesInterfaceInterfaceNameNamePatchMethodNotAllowed with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameNamePatchMethodNotAllowed() *DataCocsnInterfacesInterfaceInterfaceNameNamePatchMethodNotAllowed { - - return &DataCocsnInterfacesInterfaceInterfaceNameNamePatchMethodNotAllowed{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameNamePatchMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(405) -} - -// DataCocsnInterfacesInterfaceInterfaceNameNamePatchConflictCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameNamePatchConflict -const DataCocsnInterfacesInterfaceInterfaceNameNamePatchConflictCode int = 409 - -/*DataCocsnInterfacesInterfaceInterfaceNameNamePatchConflict Conflict - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameNamePatchConflict -*/ -type DataCocsnInterfacesInterfaceInterfaceNameNamePatchConflict struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameNamePatchConflict creates DataCocsnInterfacesInterfaceInterfaceNameNamePatchConflict with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameNamePatchConflict() *DataCocsnInterfacesInterfaceInterfaceNameNamePatchConflict { - - return &DataCocsnInterfacesInterfaceInterfaceNameNamePatchConflict{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameNamePatchConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_patch_urlbuilder.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_patch_urlbuilder.go deleted file mode 100644 index de999056820d6408c785383b58670a0a0b4f480f..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_patch_urlbuilder.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" -) - -// DataCocsnInterfacesInterfaceInterfaceNameNamePatchURL generates an URL for the data cocsn interfaces interface interface name name patch operation -type DataCocsnInterfacesInterfaceInterfaceNameNamePatchURL struct { - InterfaceName string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnInterfacesInterfaceInterfaceNameNamePatchURL) WithBasePath(bp string) *DataCocsnInterfacesInterfaceInterfaceNameNamePatchURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnInterfacesInterfaceInterfaceNameNamePatchURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DataCocsnInterfacesInterfaceInterfaceNameNamePatchURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/cocsn:interfaces/interface={interface-name}/name" - - interfaceName := o.InterfaceName - if interfaceName != "" { - _path = strings.Replace(_path, "{interface-name}", interfaceName, -1) - } else { - return nil, errors.New("interfaceName is required on DataCocsnInterfacesInterfaceInterfaceNameNamePatchURL") - } - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnInterfacesInterfaceInterfaceNameNamePatchURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DataCocsnInterfacesInterfaceInterfaceNameNamePatchURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnInterfacesInterfaceInterfaceNameNamePatchURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnInterfacesInterfaceInterfaceNameNamePatchURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnInterfacesInterfaceInterfaceNameNamePatchURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DataCocsnInterfacesInterfaceInterfaceNameNamePatchURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_put.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_put.go deleted file mode 100644 index d423b6c9dda85929bdb29150d2f23bdf91354960..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_put.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataCocsnInterfacesInterfaceInterfaceNameNamePutHandlerFunc turns a function with the right signature into a data cocsn interfaces interface interface name name put handler -type DataCocsnInterfacesInterfaceInterfaceNameNamePutHandlerFunc func(DataCocsnInterfacesInterfaceInterfaceNameNamePutParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataCocsnInterfacesInterfaceInterfaceNameNamePutHandlerFunc) Handle(params DataCocsnInterfacesInterfaceInterfaceNameNamePutParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataCocsnInterfacesInterfaceInterfaceNameNamePutHandler interface for that can handle valid data cocsn interfaces interface interface name name put params -type DataCocsnInterfacesInterfaceInterfaceNameNamePutHandler interface { - Handle(DataCocsnInterfacesInterfaceInterfaceNameNamePutParams, interface{}) middleware.Responder -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameNamePut creates a new http.Handler for the data cocsn interfaces interface interface name name put operation -func NewDataCocsnInterfacesInterfaceInterfaceNameNamePut(ctx *middleware.Context, handler DataCocsnInterfacesInterfaceInterfaceNameNamePutHandler) *DataCocsnInterfacesInterfaceInterfaceNameNamePut { - return &DataCocsnInterfacesInterfaceInterfaceNameNamePut{Context: ctx, Handler: handler} -} - -/*DataCocsnInterfacesInterfaceInterfaceNameNamePut swagger:route PUT /data/cocsn:interfaces/interface={interface-name}/name data put dataCocsnInterfacesInterfaceInterfaceNameNamePut - -Interface name. Example value: en0 - -Interface name. Example value: en0 - -*/ -type DataCocsnInterfacesInterfaceInterfaceNameNamePut struct { - Context *middleware.Context - Handler DataCocsnInterfacesInterfaceInterfaceNameNamePutHandler -} - -func (o *DataCocsnInterfacesInterfaceInterfaceNameNamePut) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataCocsnInterfacesInterfaceInterfaceNameNamePutParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_put_parameters.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_put_parameters.go deleted file mode 100644 index f9df3b7ba9c050d900d2adac727ca53775b2a179..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_put_parameters.go +++ /dev/null @@ -1,103 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "io" - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - - "code.fbi.h-da.de/cocsn/cocsn-api/api/models" -) - -// NewDataCocsnInterfacesInterfaceInterfaceNameNamePutParams creates a new DataCocsnInterfacesInterfaceInterfaceNameNamePutParams object -// no default values defined in spec. -func NewDataCocsnInterfacesInterfaceInterfaceNameNamePutParams() DataCocsnInterfacesInterfaceInterfaceNameNamePutParams { - - return DataCocsnInterfacesInterfaceInterfaceNameNamePutParams{} -} - -// DataCocsnInterfacesInterfaceInterfaceNameNamePutParams contains all the bound params for the data cocsn interfaces interface interface name name put operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_interfaces_interface_interface_name_name_put -type DataCocsnInterfacesInterfaceInterfaceNameNamePutParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*Interface name. Example value: en0 - Required: true - In: path - */ - InterfaceName string - /*Interface name. Example value: en0 - Required: true - In: body - */ - Name *models.DataCocsnInterfacesInterfaceInterfaceNameName -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnInterfacesInterfaceInterfaceNameNamePutParams() beforehand. -func (o *DataCocsnInterfacesInterfaceInterfaceNameNamePutParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - rInterfaceName, rhkInterfaceName, _ := route.Params.GetOK("interface-name") - if err := o.bindInterfaceName(rInterfaceName, rhkInterfaceName, route.Formats); err != nil { - res = append(res, err) - } - - if runtime.HasBody(r) { - defer r.Body.Close() - var body models.DataCocsnInterfacesInterfaceInterfaceNameName - if err := route.Consumer.Consume(r.Body, &body); err != nil { - if err == io.EOF { - res = append(res, errors.Required("name", "body", "")) - } else { - res = append(res, errors.NewParseError("name", "body", "", err)) - } - } else { - // validate body object - if err := body.Validate(route.Formats); err != nil { - res = append(res, err) - } - - if len(res) == 0 { - o.Name = &body - } - } - } else { - res = append(res, errors.Required("name", "body", "")) - } - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindInterfaceName binds and validates parameter InterfaceName from path. -func (o *DataCocsnInterfacesInterfaceInterfaceNameNamePutParams) bindInterfaceName(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.InterfaceName = raw - - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_put_responses.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_put_responses.go deleted file mode 100644 index 0c901a690bae2c7f2b61fc4bb2b49aca345d3710..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_put_responses.go +++ /dev/null @@ -1,180 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// DataCocsnInterfacesInterfaceInterfaceNameNamePutCreatedCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameNamePutCreated -const DataCocsnInterfacesInterfaceInterfaceNameNamePutCreatedCode int = 201 - -/*DataCocsnInterfacesInterfaceInterfaceNameNamePutCreated leaf name created or replaced - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameNamePutCreated -*/ -type DataCocsnInterfacesInterfaceInterfaceNameNamePutCreated struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameNamePutCreated creates DataCocsnInterfacesInterfaceInterfaceNameNamePutCreated with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameNamePutCreated() *DataCocsnInterfacesInterfaceInterfaceNameNamePutCreated { - - return &DataCocsnInterfacesInterfaceInterfaceNameNamePutCreated{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameNamePutCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(201) -} - -// DataCocsnInterfacesInterfaceInterfaceNameNamePutNoContentCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameNamePutNoContent -const DataCocsnInterfacesInterfaceInterfaceNameNamePutNoContentCode int = 204 - -/*DataCocsnInterfacesInterfaceInterfaceNameNamePutNoContent No Content - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameNamePutNoContent -*/ -type DataCocsnInterfacesInterfaceInterfaceNameNamePutNoContent struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameNamePutNoContent creates DataCocsnInterfacesInterfaceInterfaceNameNamePutNoContent with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameNamePutNoContent() *DataCocsnInterfacesInterfaceInterfaceNameNamePutNoContent { - - return &DataCocsnInterfacesInterfaceInterfaceNameNamePutNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameNamePutNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DataCocsnInterfacesInterfaceInterfaceNameNamePutBadRequestCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameNamePutBadRequest -const DataCocsnInterfacesInterfaceInterfaceNameNamePutBadRequestCode int = 400 - -/*DataCocsnInterfacesInterfaceInterfaceNameNamePutBadRequest Bad Request - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameNamePutBadRequest -*/ -type DataCocsnInterfacesInterfaceInterfaceNameNamePutBadRequest struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameNamePutBadRequest creates DataCocsnInterfacesInterfaceInterfaceNameNamePutBadRequest with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameNamePutBadRequest() *DataCocsnInterfacesInterfaceInterfaceNameNamePutBadRequest { - - return &DataCocsnInterfacesInterfaceInterfaceNameNamePutBadRequest{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameNamePutBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// DataCocsnInterfacesInterfaceInterfaceNameNamePutUnauthorizedCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameNamePutUnauthorized -const DataCocsnInterfacesInterfaceInterfaceNameNamePutUnauthorizedCode int = 401 - -/*DataCocsnInterfacesInterfaceInterfaceNameNamePutUnauthorized Unauthorized - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameNamePutUnauthorized -*/ -type DataCocsnInterfacesInterfaceInterfaceNameNamePutUnauthorized struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameNamePutUnauthorized creates DataCocsnInterfacesInterfaceInterfaceNameNamePutUnauthorized with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameNamePutUnauthorized() *DataCocsnInterfacesInterfaceInterfaceNameNamePutUnauthorized { - - return &DataCocsnInterfacesInterfaceInterfaceNameNamePutUnauthorized{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameNamePutUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(401) -} - -// DataCocsnInterfacesInterfaceInterfaceNameNamePutNotFoundCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameNamePutNotFound -const DataCocsnInterfacesInterfaceInterfaceNameNamePutNotFoundCode int = 404 - -/*DataCocsnInterfacesInterfaceInterfaceNameNamePutNotFound Not Found - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameNamePutNotFound -*/ -type DataCocsnInterfacesInterfaceInterfaceNameNamePutNotFound struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameNamePutNotFound creates DataCocsnInterfacesInterfaceInterfaceNameNamePutNotFound with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameNamePutNotFound() *DataCocsnInterfacesInterfaceInterfaceNameNamePutNotFound { - - return &DataCocsnInterfacesInterfaceInterfaceNameNamePutNotFound{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameNamePutNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(404) -} - -// DataCocsnInterfacesInterfaceInterfaceNameNamePutMethodNotAllowedCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameNamePutMethodNotAllowed -const DataCocsnInterfacesInterfaceInterfaceNameNamePutMethodNotAllowedCode int = 405 - -/*DataCocsnInterfacesInterfaceInterfaceNameNamePutMethodNotAllowed Method Not Allowed - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameNamePutMethodNotAllowed -*/ -type DataCocsnInterfacesInterfaceInterfaceNameNamePutMethodNotAllowed struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameNamePutMethodNotAllowed creates DataCocsnInterfacesInterfaceInterfaceNameNamePutMethodNotAllowed with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameNamePutMethodNotAllowed() *DataCocsnInterfacesInterfaceInterfaceNameNamePutMethodNotAllowed { - - return &DataCocsnInterfacesInterfaceInterfaceNameNamePutMethodNotAllowed{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameNamePutMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(405) -} - -// DataCocsnInterfacesInterfaceInterfaceNameNamePutConflictCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameNamePutConflict -const DataCocsnInterfacesInterfaceInterfaceNameNamePutConflictCode int = 409 - -/*DataCocsnInterfacesInterfaceInterfaceNameNamePutConflict Conflict - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameNamePutConflict -*/ -type DataCocsnInterfacesInterfaceInterfaceNameNamePutConflict struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameNamePutConflict creates DataCocsnInterfacesInterfaceInterfaceNameNamePutConflict with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameNamePutConflict() *DataCocsnInterfacesInterfaceInterfaceNameNamePutConflict { - - return &DataCocsnInterfacesInterfaceInterfaceNameNamePutConflict{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameNamePutConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_put_urlbuilder.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_put_urlbuilder.go deleted file mode 100644 index b9285a9650bfb23102fdd3b1026a0a0e463ef0e3..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_put_urlbuilder.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" -) - -// DataCocsnInterfacesInterfaceInterfaceNameNamePutURL generates an URL for the data cocsn interfaces interface interface name name put operation -type DataCocsnInterfacesInterfaceInterfaceNameNamePutURL struct { - InterfaceName string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnInterfacesInterfaceInterfaceNameNamePutURL) WithBasePath(bp string) *DataCocsnInterfacesInterfaceInterfaceNameNamePutURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnInterfacesInterfaceInterfaceNameNamePutURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DataCocsnInterfacesInterfaceInterfaceNameNamePutURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/cocsn:interfaces/interface={interface-name}/name" - - interfaceName := o.InterfaceName - if interfaceName != "" { - _path = strings.Replace(_path, "{interface-name}", interfaceName, -1) - } else { - return nil, errors.New("interfaceName is required on DataCocsnInterfacesInterfaceInterfaceNameNamePutURL") - } - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnInterfacesInterfaceInterfaceNameNamePutURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DataCocsnInterfacesInterfaceInterfaceNameNamePutURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnInterfacesInterfaceInterfaceNameNamePutURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnInterfacesInterfaceInterfaceNameNamePutURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnInterfacesInterfaceInterfaceNameNamePutURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DataCocsnInterfacesInterfaceInterfaceNameNamePutURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_delete.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_delete.go deleted file mode 100644 index 7ceba593c786060199ceebac2183bba5aab5179b..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_delete.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteHandlerFunc turns a function with the right signature into a data cocsn interfaces interface interface name oper status delete handler -type DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteHandlerFunc func(DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteHandlerFunc) Handle(params DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteHandler interface for that can handle valid data cocsn interfaces interface interface name oper status delete params -type DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteHandler interface { - Handle(DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteParams, interface{}) middleware.Responder -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusDelete creates a new http.Handler for the data cocsn interfaces interface interface name oper status delete operation -func NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusDelete(ctx *middleware.Context, handler DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteHandler) *DataCocsnInterfacesInterfaceInterfaceNameOperStatusDelete { - return &DataCocsnInterfacesInterfaceInterfaceNameOperStatusDelete{Context: ctx, Handler: handler} -} - -/*DataCocsnInterfacesInterfaceInterfaceNameOperStatusDelete swagger:route DELETE /data/cocsn:interfaces/interface={interface-name}/oper-status data delete dataCocsnInterfacesInterfaceInterfaceNameOperStatusDelete - -Describes whether the interface is physically up or down - -Describes whether the interface is physically up or down - -*/ -type DataCocsnInterfacesInterfaceInterfaceNameOperStatusDelete struct { - Context *middleware.Context - Handler DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteHandler -} - -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusDelete) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_delete_parameters.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_delete_parameters.go deleted file mode 100644 index 2b1d849056982e28351515b26a968e24e056a6b0..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_delete_parameters.go +++ /dev/null @@ -1,72 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" -) - -// NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteParams creates a new DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteParams object -// no default values defined in spec. -func NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteParams() DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteParams { - - return DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteParams{} -} - -// DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteParams contains all the bound params for the data cocsn interfaces interface interface name oper status delete operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_interfaces_interface_interface_name_oper_status_delete -type DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*Interface name. Example value: en0 - Required: true - In: path - */ - InterfaceName string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteParams() beforehand. -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - rInterfaceName, rhkInterfaceName, _ := route.Params.GetOK("interface-name") - if err := o.bindInterfaceName(rInterfaceName, rhkInterfaceName, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindInterfaceName binds and validates parameter InterfaceName from path. -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteParams) bindInterfaceName(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.InterfaceName = raw - - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_delete_responses.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_delete_responses.go deleted file mode 100644 index 510f508023ed1cbdd268c0f87b13bc481f198851..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_delete_responses.go +++ /dev/null @@ -1,36 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteNoContentCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteNoContent -const DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteNoContentCode int = 204 - -/*DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteNoContent No Content - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteNoContent -*/ -type DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteNoContent struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteNoContent creates DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteNoContent with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteNoContent() *DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteNoContent { - - return &DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_delete_urlbuilder.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_delete_urlbuilder.go deleted file mode 100644 index 5890ad7aa6ee1e5930643ddb2f3631f8b4b6d4dd..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_delete_urlbuilder.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" -) - -// DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteURL generates an URL for the data cocsn interfaces interface interface name oper status delete operation -type DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteURL struct { - InterfaceName string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteURL) WithBasePath(bp string) *DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/cocsn:interfaces/interface={interface-name}/oper-status" - - interfaceName := o.InterfaceName - if interfaceName != "" { - _path = strings.Replace(_path, "{interface-name}", interfaceName, -1) - } else { - return nil, errors.New("interfaceName is required on DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteURL") - } - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_get.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_get.go deleted file mode 100644 index dd27b070a7bfa46471088272cdc021c89745eeed..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_get.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetHandlerFunc turns a function with the right signature into a data cocsn interfaces interface interface name oper status get handler -type DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetHandlerFunc func(DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetHandlerFunc) Handle(params DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetHandler interface for that can handle valid data cocsn interfaces interface interface name oper status get params -type DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetHandler interface { - Handle(DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetParams, interface{}) middleware.Responder -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusGet creates a new http.Handler for the data cocsn interfaces interface interface name oper status get operation -func NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusGet(ctx *middleware.Context, handler DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetHandler) *DataCocsnInterfacesInterfaceInterfaceNameOperStatusGet { - return &DataCocsnInterfacesInterfaceInterfaceNameOperStatusGet{Context: ctx, Handler: handler} -} - -/*DataCocsnInterfacesInterfaceInterfaceNameOperStatusGet swagger:route GET /data/cocsn:interfaces/interface={interface-name}/oper-status data get dataCocsnInterfacesInterfaceInterfaceNameOperStatusGet - -Describes whether the interface is physically up or down - -Describes whether the interface is physically up or down - -*/ -type DataCocsnInterfacesInterfaceInterfaceNameOperStatusGet struct { - Context *middleware.Context - Handler DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetHandler -} - -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusGet) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusGetParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_get_parameters.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_get_parameters.go deleted file mode 100644 index a9e306e2e1a825d803d65689faa61e13345bd0bf..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_get_parameters.go +++ /dev/null @@ -1,260 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusGetParams creates a new DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetParams object -// with the default values initialized. -func NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusGetParams() DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetParams { - - var ( - // initialize parameters with default values - - contentDefault = string("config") - - withDefaultsDefault = string("report-all") - ) - - return DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetParams{ - Content: &contentDefault, - - WithDefaults: &withDefaultsDefault, - } -} - -// DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetParams contains all the bound params for the data cocsn interfaces interface interface name oper status get operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_interfaces_interface_interface_name_oper_status_get -type DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*controlling descendant nodes in response - In: query - Default: "config" - */ - Content *string - /*limit the depth of nodes in response - In: query - */ - Depth *uint16 - /*optionally identify specific data nodes in response - In: query - */ - Fields *string - /*xpath expression to filter data nodes in response - In: query - */ - Filter *string - /*Interface name. Example value: en0 - Required: true - In: path - */ - InterfaceName string - /*controlling default values in response - In: query - Default: "report-all" - */ - WithDefaults *string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusGetParams() beforehand. -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - qs := runtime.Values(r.URL.Query()) - - qContent, qhkContent, _ := qs.GetOK("content") - if err := o.bindContent(qContent, qhkContent, route.Formats); err != nil { - res = append(res, err) - } - - qDepth, qhkDepth, _ := qs.GetOK("depth") - if err := o.bindDepth(qDepth, qhkDepth, route.Formats); err != nil { - res = append(res, err) - } - - qFields, qhkFields, _ := qs.GetOK("fields") - if err := o.bindFields(qFields, qhkFields, route.Formats); err != nil { - res = append(res, err) - } - - qFilter, qhkFilter, _ := qs.GetOK("filter") - if err := o.bindFilter(qFilter, qhkFilter, route.Formats); err != nil { - res = append(res, err) - } - - rInterfaceName, rhkInterfaceName, _ := route.Params.GetOK("interface-name") - if err := o.bindInterfaceName(rInterfaceName, rhkInterfaceName, route.Formats); err != nil { - res = append(res, err) - } - - qWithDefaults, qhkWithDefaults, _ := qs.GetOK("with-defaults") - if err := o.bindWithDefaults(qWithDefaults, qhkWithDefaults, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindContent binds and validates parameter Content from query. -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetParams) bindContent(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - // Default values have been previously initialized by NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusGetParams() - return nil - } - - o.Content = &raw - - if err := o.validateContent(formats); err != nil { - return err - } - - return nil -} - -// validateContent carries on validations for parameter Content -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetParams) validateContent(formats strfmt.Registry) error { - - if err := validate.EnumCase("content", "query", *o.Content, []interface{}{"config", "nonconfig", "all"}, true); err != nil { - return err - } - - return nil -} - -// bindDepth binds and validates parameter Depth from query. -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetParams) bindDepth(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - value, err := swag.ConvertUint16(raw) - if err != nil { - return errors.InvalidType("depth", "query", "uint16", raw) - } - o.Depth = &value - - return nil -} - -// bindFields binds and validates parameter Fields from query. -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetParams) bindFields(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - o.Fields = &raw - - return nil -} - -// bindFilter binds and validates parameter Filter from query. -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetParams) bindFilter(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - o.Filter = &raw - - return nil -} - -// bindInterfaceName binds and validates parameter InterfaceName from path. -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetParams) bindInterfaceName(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.InterfaceName = raw - - return nil -} - -// bindWithDefaults binds and validates parameter WithDefaults from query. -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetParams) bindWithDefaults(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - // Default values have been previously initialized by NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusGetParams() - return nil - } - - o.WithDefaults = &raw - - if err := o.validateWithDefaults(formats); err != nil { - return err - } - - return nil -} - -// validateWithDefaults carries on validations for parameter WithDefaults -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetParams) validateWithDefaults(formats strfmt.Registry) error { - - if err := validate.EnumCase("with-defaults", "query", *o.WithDefaults, []interface{}{"report-all", "trim", "explicit", "report-all-tagged"}, true); err != nil { - return err - } - - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_get_responses.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_get_responses.go deleted file mode 100644 index 0629296fef45bd89ec8b861e34ea200d5f7059b5..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_get_responses.go +++ /dev/null @@ -1,202 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" - - "code.fbi.h-da.de/cocsn/cocsn-api/api/models" -) - -// DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetOKCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetOK -const DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetOKCode int = 200 - -/*DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetOK Describes whether the interface is physically up or down - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameOperStatusGetOK -*/ -type DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetOK struct { - - /* - In: Body - */ - Payload *models.DataCocsnInterfacesInterfaceInterfaceNameOperStatus `json:"body,omitempty"` -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusGetOK creates DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetOK with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusGetOK() *DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetOK { - - return &DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetOK{} -} - -// WithPayload adds the payload to the data cocsn interfaces interface interface name oper status get o k response -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetOK) WithPayload(payload *models.DataCocsnInterfacesInterfaceInterfaceNameOperStatus) *DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetOK { - o.Payload = payload - return o -} - -// SetPayload sets the payload to the data cocsn interfaces interface interface name oper status get o k response -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetOK) SetPayload(payload *models.DataCocsnInterfacesInterfaceInterfaceNameOperStatus) { - o.Payload = payload -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.WriteHeader(200) - if o.Payload != nil { - payload := o.Payload - if err := producer.Produce(rw, payload); err != nil { - panic(err) // let the recovery middleware deal with this - } - } -} - -// DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetNoContentCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetNoContent -const DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetNoContentCode int = 204 - -/*DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetNoContent No Content - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameOperStatusGetNoContent -*/ -type DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetNoContent struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusGetNoContent creates DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetNoContent with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusGetNoContent() *DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetNoContent { - - return &DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetBadRequestCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetBadRequest -const DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetBadRequestCode int = 400 - -/*DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetBadRequest Bad Request - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameOperStatusGetBadRequest -*/ -type DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetBadRequest struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusGetBadRequest creates DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetBadRequest with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusGetBadRequest() *DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetBadRequest { - - return &DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetBadRequest{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetUnauthorizedCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetUnauthorized -const DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetUnauthorizedCode int = 401 - -/*DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetUnauthorized Unauthorized - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameOperStatusGetUnauthorized -*/ -type DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetUnauthorized struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusGetUnauthorized creates DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetUnauthorized with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusGetUnauthorized() *DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetUnauthorized { - - return &DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetUnauthorized{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(401) -} - -// DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetNotFoundCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetNotFound -const DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetNotFoundCode int = 404 - -/*DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetNotFound Not Found - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameOperStatusGetNotFound -*/ -type DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetNotFound struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusGetNotFound creates DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetNotFound with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusGetNotFound() *DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetNotFound { - - return &DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetNotFound{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(404) -} - -// DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetMethodNotAllowedCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetMethodNotAllowed -const DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetMethodNotAllowedCode int = 405 - -/*DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetMethodNotAllowed Method Not Allowed - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameOperStatusGetMethodNotAllowed -*/ -type DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetMethodNotAllowed struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusGetMethodNotAllowed creates DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetMethodNotAllowed with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusGetMethodNotAllowed() *DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetMethodNotAllowed { - - return &DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetMethodNotAllowed{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(405) -} - -// DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetConflictCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetConflict -const DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetConflictCode int = 409 - -/*DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetConflict Conflict - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameOperStatusGetConflict -*/ -type DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetConflict struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusGetConflict creates DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetConflict with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusGetConflict() *DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetConflict { - - return &DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetConflict{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_get_urlbuilder.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_get_urlbuilder.go deleted file mode 100644 index 6e4d274a5fd38790bd8600d3e488e81b4c5449c2..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_get_urlbuilder.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" - - "github.com/go-openapi/swag" -) - -// DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetURL generates an URL for the data cocsn interfaces interface interface name oper status get operation -type DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetURL struct { - InterfaceName string - - Content *string - Depth *uint16 - Fields *string - Filter *string - WithDefaults *string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetURL) WithBasePath(bp string) *DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/cocsn:interfaces/interface={interface-name}/oper-status" - - interfaceName := o.InterfaceName - if interfaceName != "" { - _path = strings.Replace(_path, "{interface-name}", interfaceName, -1) - } else { - return nil, errors.New("interfaceName is required on DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetURL") - } - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - qs := make(url.Values) - - var contentQ string - if o.Content != nil { - contentQ = *o.Content - } - if contentQ != "" { - qs.Set("content", contentQ) - } - - var depthQ string - if o.Depth != nil { - depthQ = swag.FormatUint16(*o.Depth) - } - if depthQ != "" { - qs.Set("depth", depthQ) - } - - var fieldsQ string - if o.Fields != nil { - fieldsQ = *o.Fields - } - if fieldsQ != "" { - qs.Set("fields", fieldsQ) - } - - var filterQ string - if o.Filter != nil { - filterQ = *o.Filter - } - if filterQ != "" { - qs.Set("filter", filterQ) - } - - var withDefaultsQ string - if o.WithDefaults != nil { - withDefaultsQ = *o.WithDefaults - } - if withDefaultsQ != "" { - qs.Set("with-defaults", withDefaultsQ) - } - - _result.RawQuery = qs.Encode() - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_patch.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_patch.go deleted file mode 100644 index fdcda7d395d1287d112a83c60aec568acc2814ac..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_patch.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchHandlerFunc turns a function with the right signature into a data cocsn interfaces interface interface name oper status patch handler -type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchHandlerFunc func(DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchHandlerFunc) Handle(params DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchHandler interface for that can handle valid data cocsn interfaces interface interface name oper status patch params -type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchHandler interface { - Handle(DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchParams, interface{}) middleware.Responder -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPatch creates a new http.Handler for the data cocsn interfaces interface interface name oper status patch operation -func NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPatch(ctx *middleware.Context, handler DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchHandler) *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatch { - return &DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatch{Context: ctx, Handler: handler} -} - -/*DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatch swagger:route PATCH /data/cocsn:interfaces/interface={interface-name}/oper-status data patch dataCocsnInterfacesInterfaceInterfaceNameOperStatusPatch - -Describes whether the interface is physically up or down - -Describes whether the interface is physically up or down - -*/ -type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatch struct { - Context *middleware.Context - Handler DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchHandler -} - -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatch) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_patch_parameters.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_patch_parameters.go deleted file mode 100644 index 8d9436f65dec835c32a6ef1cd70b67ba67106b31..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_patch_parameters.go +++ /dev/null @@ -1,103 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "io" - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - - "code.fbi.h-da.de/cocsn/cocsn-api/api/models" -) - -// NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchParams creates a new DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchParams object -// no default values defined in spec. -func NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchParams() DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchParams { - - return DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchParams{} -} - -// DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchParams contains all the bound params for the data cocsn interfaces interface interface name oper status patch operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_interfaces_interface_interface_name_oper_status_patch -type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*Interface name. Example value: en0 - Required: true - In: path - */ - InterfaceName string - /*Describes whether the interface is physically up or down - Required: true - In: body - */ - OperStatus *models.DataCocsnInterfacesInterfaceInterfaceNameOperStatus -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchParams() beforehand. -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - rInterfaceName, rhkInterfaceName, _ := route.Params.GetOK("interface-name") - if err := o.bindInterfaceName(rInterfaceName, rhkInterfaceName, route.Formats); err != nil { - res = append(res, err) - } - - if runtime.HasBody(r) { - defer r.Body.Close() - var body models.DataCocsnInterfacesInterfaceInterfaceNameOperStatus - if err := route.Consumer.Consume(r.Body, &body); err != nil { - if err == io.EOF { - res = append(res, errors.Required("operStatus", "body", "")) - } else { - res = append(res, errors.NewParseError("operStatus", "body", "", err)) - } - } else { - // validate body object - if err := body.Validate(route.Formats); err != nil { - res = append(res, err) - } - - if len(res) == 0 { - o.OperStatus = &body - } - } - } else { - res = append(res, errors.Required("operStatus", "body", "")) - } - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindInterfaceName binds and validates parameter InterfaceName from path. -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchParams) bindInterfaceName(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.InterfaceName = raw - - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_patch_responses.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_patch_responses.go deleted file mode 100644 index 7983ed7975b5732bbb5b08cf5148950c1b58bfa6..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_patch_responses.go +++ /dev/null @@ -1,156 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchNoContentCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchNoContent -const DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchNoContentCode int = 204 - -/*DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchNoContent leaf oper-status updated - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchNoContent -*/ -type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchNoContent struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchNoContent creates DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchNoContent with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchNoContent() *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchNoContent { - - return &DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchBadRequestCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchBadRequest -const DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchBadRequestCode int = 400 - -/*DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchBadRequest Bad Request - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchBadRequest -*/ -type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchBadRequest struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchBadRequest creates DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchBadRequest with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchBadRequest() *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchBadRequest { - - return &DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchBadRequest{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchUnauthorizedCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchUnauthorized -const DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchUnauthorizedCode int = 401 - -/*DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchUnauthorized Unauthorized - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchUnauthorized -*/ -type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchUnauthorized struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchUnauthorized creates DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchUnauthorized with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchUnauthorized() *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchUnauthorized { - - return &DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchUnauthorized{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(401) -} - -// DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchNotFoundCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchNotFound -const DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchNotFoundCode int = 404 - -/*DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchNotFound Not Found - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchNotFound -*/ -type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchNotFound struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchNotFound creates DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchNotFound with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchNotFound() *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchNotFound { - - return &DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchNotFound{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(404) -} - -// DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchMethodNotAllowedCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchMethodNotAllowed -const DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchMethodNotAllowedCode int = 405 - -/*DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchMethodNotAllowed Method Not Allowed - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchMethodNotAllowed -*/ -type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchMethodNotAllowed struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchMethodNotAllowed creates DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchMethodNotAllowed with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchMethodNotAllowed() *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchMethodNotAllowed { - - return &DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchMethodNotAllowed{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(405) -} - -// DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchConflictCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchConflict -const DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchConflictCode int = 409 - -/*DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchConflict Conflict - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchConflict -*/ -type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchConflict struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchConflict creates DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchConflict with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchConflict() *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchConflict { - - return &DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchConflict{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_patch_urlbuilder.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_patch_urlbuilder.go deleted file mode 100644 index ae6270b416ad3f941a8f724b4e673092479bce71..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_patch_urlbuilder.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" -) - -// DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchURL generates an URL for the data cocsn interfaces interface interface name oper status patch operation -type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchURL struct { - InterfaceName string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchURL) WithBasePath(bp string) *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/cocsn:interfaces/interface={interface-name}/oper-status" - - interfaceName := o.InterfaceName - if interfaceName != "" { - _path = strings.Replace(_path, "{interface-name}", interfaceName, -1) - } else { - return nil, errors.New("interfaceName is required on DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchURL") - } - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_put.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_put.go deleted file mode 100644 index 256397260e9a1a0bfdb3ef218c220f336e634944..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_put.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutHandlerFunc turns a function with the right signature into a data cocsn interfaces interface interface name oper status put handler -type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutHandlerFunc func(DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutHandlerFunc) Handle(params DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutHandler interface for that can handle valid data cocsn interfaces interface interface name oper status put params -type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutHandler interface { - Handle(DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutParams, interface{}) middleware.Responder -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPut creates a new http.Handler for the data cocsn interfaces interface interface name oper status put operation -func NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPut(ctx *middleware.Context, handler DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutHandler) *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPut { - return &DataCocsnInterfacesInterfaceInterfaceNameOperStatusPut{Context: ctx, Handler: handler} -} - -/*DataCocsnInterfacesInterfaceInterfaceNameOperStatusPut swagger:route PUT /data/cocsn:interfaces/interface={interface-name}/oper-status data put dataCocsnInterfacesInterfaceInterfaceNameOperStatusPut - -Describes whether the interface is physically up or down - -Describes whether the interface is physically up or down - -*/ -type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPut struct { - Context *middleware.Context - Handler DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutHandler -} - -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPut) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPutParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_put_parameters.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_put_parameters.go deleted file mode 100644 index d1dbf6dc505be1caf76440a1b033e68b89bbc6b5..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_put_parameters.go +++ /dev/null @@ -1,103 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "io" - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - - "code.fbi.h-da.de/cocsn/cocsn-api/api/models" -) - -// NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPutParams creates a new DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutParams object -// no default values defined in spec. -func NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPutParams() DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutParams { - - return DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutParams{} -} - -// DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutParams contains all the bound params for the data cocsn interfaces interface interface name oper status put operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_interfaces_interface_interface_name_oper_status_put -type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*Interface name. Example value: en0 - Required: true - In: path - */ - InterfaceName string - /*Describes whether the interface is physically up or down - Required: true - In: body - */ - OperStatus *models.DataCocsnInterfacesInterfaceInterfaceNameOperStatus -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPutParams() beforehand. -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - rInterfaceName, rhkInterfaceName, _ := route.Params.GetOK("interface-name") - if err := o.bindInterfaceName(rInterfaceName, rhkInterfaceName, route.Formats); err != nil { - res = append(res, err) - } - - if runtime.HasBody(r) { - defer r.Body.Close() - var body models.DataCocsnInterfacesInterfaceInterfaceNameOperStatus - if err := route.Consumer.Consume(r.Body, &body); err != nil { - if err == io.EOF { - res = append(res, errors.Required("operStatus", "body", "")) - } else { - res = append(res, errors.NewParseError("operStatus", "body", "", err)) - } - } else { - // validate body object - if err := body.Validate(route.Formats); err != nil { - res = append(res, err) - } - - if len(res) == 0 { - o.OperStatus = &body - } - } - } else { - res = append(res, errors.Required("operStatus", "body", "")) - } - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindInterfaceName binds and validates parameter InterfaceName from path. -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutParams) bindInterfaceName(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.InterfaceName = raw - - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_put_responses.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_put_responses.go deleted file mode 100644 index 54c5ec7d4f0e01190dd12b3b226f61d0975f13f7..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_put_responses.go +++ /dev/null @@ -1,180 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutCreatedCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutCreated -const DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutCreatedCode int = 201 - -/*DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutCreated leaf oper-status created or replaced - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameOperStatusPutCreated -*/ -type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutCreated struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPutCreated creates DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutCreated with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPutCreated() *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutCreated { - - return &DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutCreated{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(201) -} - -// DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutNoContentCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutNoContent -const DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutNoContentCode int = 204 - -/*DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutNoContent No Content - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameOperStatusPutNoContent -*/ -type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutNoContent struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPutNoContent creates DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutNoContent with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPutNoContent() *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutNoContent { - - return &DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutBadRequestCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutBadRequest -const DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutBadRequestCode int = 400 - -/*DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutBadRequest Bad Request - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameOperStatusPutBadRequest -*/ -type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutBadRequest struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPutBadRequest creates DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutBadRequest with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPutBadRequest() *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutBadRequest { - - return &DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutBadRequest{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutUnauthorizedCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutUnauthorized -const DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutUnauthorizedCode int = 401 - -/*DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutUnauthorized Unauthorized - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameOperStatusPutUnauthorized -*/ -type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutUnauthorized struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPutUnauthorized creates DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutUnauthorized with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPutUnauthorized() *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutUnauthorized { - - return &DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutUnauthorized{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(401) -} - -// DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutNotFoundCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutNotFound -const DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutNotFoundCode int = 404 - -/*DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutNotFound Not Found - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameOperStatusPutNotFound -*/ -type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutNotFound struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPutNotFound creates DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutNotFound with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPutNotFound() *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutNotFound { - - return &DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutNotFound{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(404) -} - -// DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutMethodNotAllowedCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutMethodNotAllowed -const DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutMethodNotAllowedCode int = 405 - -/*DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutMethodNotAllowed Method Not Allowed - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameOperStatusPutMethodNotAllowed -*/ -type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutMethodNotAllowed struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPutMethodNotAllowed creates DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutMethodNotAllowed with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPutMethodNotAllowed() *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutMethodNotAllowed { - - return &DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutMethodNotAllowed{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(405) -} - -// DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutConflictCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutConflict -const DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutConflictCode int = 409 - -/*DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutConflict Conflict - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameOperStatusPutConflict -*/ -type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutConflict struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPutConflict creates DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutConflict with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPutConflict() *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutConflict { - - return &DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutConflict{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_put_urlbuilder.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_put_urlbuilder.go deleted file mode 100644 index cf05cd068844458a4de36da314f4e21013ee4332..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_put_urlbuilder.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" -) - -// DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutURL generates an URL for the data cocsn interfaces interface interface name oper status put operation -type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutURL struct { - InterfaceName string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutURL) WithBasePath(bp string) *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/cocsn:interfaces/interface={interface-name}/oper-status" - - interfaceName := o.InterfaceName - if interfaceName != "" { - _path = strings.Replace(_path, "{interface-name}", interfaceName, -1) - } else { - return nil, errors.New("interfaceName is required on DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutURL") - } - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_patch.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_patch.go deleted file mode 100644 index d94e49e42cf151d1804f49bcc5d845e500b50172..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_patch.go +++ /dev/null @@ -1,71 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataCocsnInterfacesInterfaceInterfaceNamePatchHandlerFunc turns a function with the right signature into a data cocsn interfaces interface interface name patch handler -type DataCocsnInterfacesInterfaceInterfaceNamePatchHandlerFunc func(DataCocsnInterfacesInterfaceInterfaceNamePatchParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataCocsnInterfacesInterfaceInterfaceNamePatchHandlerFunc) Handle(params DataCocsnInterfacesInterfaceInterfaceNamePatchParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataCocsnInterfacesInterfaceInterfaceNamePatchHandler interface for that can handle valid data cocsn interfaces interface interface name patch params -type DataCocsnInterfacesInterfaceInterfaceNamePatchHandler interface { - Handle(DataCocsnInterfacesInterfaceInterfaceNamePatchParams, interface{}) middleware.Responder -} - -// NewDataCocsnInterfacesInterfaceInterfaceNamePatch creates a new http.Handler for the data cocsn interfaces interface interface name patch operation -func NewDataCocsnInterfacesInterfaceInterfaceNamePatch(ctx *middleware.Context, handler DataCocsnInterfacesInterfaceInterfaceNamePatchHandler) *DataCocsnInterfacesInterfaceInterfaceNamePatch { - return &DataCocsnInterfacesInterfaceInterfaceNamePatch{Context: ctx, Handler: handler} -} - -/*DataCocsnInterfacesInterfaceInterfaceNamePatch swagger:route PATCH /data/cocsn:interfaces/interface={interface-name} data patch dataCocsnInterfacesInterfaceInterfaceNamePatch - -DataCocsnInterfacesInterfaceInterfaceNamePatch data cocsn interfaces interface interface name patch API - -*/ -type DataCocsnInterfacesInterfaceInterfaceNamePatch struct { - Context *middleware.Context - Handler DataCocsnInterfacesInterfaceInterfaceNamePatchHandler -} - -func (o *DataCocsnInterfacesInterfaceInterfaceNamePatch) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataCocsnInterfacesInterfaceInterfaceNamePatchParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_patch_parameters.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_patch_parameters.go deleted file mode 100644 index f2846ba9af059aec553fd68a298773471e25c4ad..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_patch_parameters.go +++ /dev/null @@ -1,103 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "io" - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - - "code.fbi.h-da.de/cocsn/cocsn-api/api/models" -) - -// NewDataCocsnInterfacesInterfaceInterfaceNamePatchParams creates a new DataCocsnInterfacesInterfaceInterfaceNamePatchParams object -// no default values defined in spec. -func NewDataCocsnInterfacesInterfaceInterfaceNamePatchParams() DataCocsnInterfacesInterfaceInterfaceNamePatchParams { - - return DataCocsnInterfacesInterfaceInterfaceNamePatchParams{} -} - -// DataCocsnInterfacesInterfaceInterfaceNamePatchParams contains all the bound params for the data cocsn interfaces interface interface name patch operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_interfaces_interface_interface_name_patch -type DataCocsnInterfacesInterfaceInterfaceNamePatchParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /* - Required: true - In: body - */ - Interface *models.DataCocsnInterfacesInterfaceInterfaceName - /*Interface name. Example value: en0 - Required: true - In: path - */ - InterfaceName string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnInterfacesInterfaceInterfaceNamePatchParams() beforehand. -func (o *DataCocsnInterfacesInterfaceInterfaceNamePatchParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if runtime.HasBody(r) { - defer r.Body.Close() - var body models.DataCocsnInterfacesInterfaceInterfaceName - if err := route.Consumer.Consume(r.Body, &body); err != nil { - if err == io.EOF { - res = append(res, errors.Required("interface", "body", "")) - } else { - res = append(res, errors.NewParseError("interface", "body", "", err)) - } - } else { - // validate body object - if err := body.Validate(route.Formats); err != nil { - res = append(res, err) - } - - if len(res) == 0 { - o.Interface = &body - } - } - } else { - res = append(res, errors.Required("interface", "body", "")) - } - rInterfaceName, rhkInterfaceName, _ := route.Params.GetOK("interface-name") - if err := o.bindInterfaceName(rInterfaceName, rhkInterfaceName, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindInterfaceName binds and validates parameter InterfaceName from path. -func (o *DataCocsnInterfacesInterfaceInterfaceNamePatchParams) bindInterfaceName(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.InterfaceName = raw - - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_patch_responses.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_patch_responses.go deleted file mode 100644 index cb7eb1c052262072f5d6189d450ea96aecd3a521..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_patch_responses.go +++ /dev/null @@ -1,156 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// DataCocsnInterfacesInterfaceInterfaceNamePatchNoContentCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNamePatchNoContent -const DataCocsnInterfacesInterfaceInterfaceNamePatchNoContentCode int = 204 - -/*DataCocsnInterfacesInterfaceInterfaceNamePatchNoContent list interface updated - -swagger:response dataCocsnInterfacesInterfaceInterfaceNamePatchNoContent -*/ -type DataCocsnInterfacesInterfaceInterfaceNamePatchNoContent struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNamePatchNoContent creates DataCocsnInterfacesInterfaceInterfaceNamePatchNoContent with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNamePatchNoContent() *DataCocsnInterfacesInterfaceInterfaceNamePatchNoContent { - - return &DataCocsnInterfacesInterfaceInterfaceNamePatchNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNamePatchNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DataCocsnInterfacesInterfaceInterfaceNamePatchBadRequestCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNamePatchBadRequest -const DataCocsnInterfacesInterfaceInterfaceNamePatchBadRequestCode int = 400 - -/*DataCocsnInterfacesInterfaceInterfaceNamePatchBadRequest Bad Request - -swagger:response dataCocsnInterfacesInterfaceInterfaceNamePatchBadRequest -*/ -type DataCocsnInterfacesInterfaceInterfaceNamePatchBadRequest struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNamePatchBadRequest creates DataCocsnInterfacesInterfaceInterfaceNamePatchBadRequest with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNamePatchBadRequest() *DataCocsnInterfacesInterfaceInterfaceNamePatchBadRequest { - - return &DataCocsnInterfacesInterfaceInterfaceNamePatchBadRequest{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNamePatchBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// DataCocsnInterfacesInterfaceInterfaceNamePatchUnauthorizedCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNamePatchUnauthorized -const DataCocsnInterfacesInterfaceInterfaceNamePatchUnauthorizedCode int = 401 - -/*DataCocsnInterfacesInterfaceInterfaceNamePatchUnauthorized Unauthorized - -swagger:response dataCocsnInterfacesInterfaceInterfaceNamePatchUnauthorized -*/ -type DataCocsnInterfacesInterfaceInterfaceNamePatchUnauthorized struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNamePatchUnauthorized creates DataCocsnInterfacesInterfaceInterfaceNamePatchUnauthorized with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNamePatchUnauthorized() *DataCocsnInterfacesInterfaceInterfaceNamePatchUnauthorized { - - return &DataCocsnInterfacesInterfaceInterfaceNamePatchUnauthorized{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNamePatchUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(401) -} - -// DataCocsnInterfacesInterfaceInterfaceNamePatchNotFoundCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNamePatchNotFound -const DataCocsnInterfacesInterfaceInterfaceNamePatchNotFoundCode int = 404 - -/*DataCocsnInterfacesInterfaceInterfaceNamePatchNotFound Not Found - -swagger:response dataCocsnInterfacesInterfaceInterfaceNamePatchNotFound -*/ -type DataCocsnInterfacesInterfaceInterfaceNamePatchNotFound struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNamePatchNotFound creates DataCocsnInterfacesInterfaceInterfaceNamePatchNotFound with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNamePatchNotFound() *DataCocsnInterfacesInterfaceInterfaceNamePatchNotFound { - - return &DataCocsnInterfacesInterfaceInterfaceNamePatchNotFound{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNamePatchNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(404) -} - -// DataCocsnInterfacesInterfaceInterfaceNamePatchMethodNotAllowedCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNamePatchMethodNotAllowed -const DataCocsnInterfacesInterfaceInterfaceNamePatchMethodNotAllowedCode int = 405 - -/*DataCocsnInterfacesInterfaceInterfaceNamePatchMethodNotAllowed Method Not Allowed - -swagger:response dataCocsnInterfacesInterfaceInterfaceNamePatchMethodNotAllowed -*/ -type DataCocsnInterfacesInterfaceInterfaceNamePatchMethodNotAllowed struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNamePatchMethodNotAllowed creates DataCocsnInterfacesInterfaceInterfaceNamePatchMethodNotAllowed with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNamePatchMethodNotAllowed() *DataCocsnInterfacesInterfaceInterfaceNamePatchMethodNotAllowed { - - return &DataCocsnInterfacesInterfaceInterfaceNamePatchMethodNotAllowed{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNamePatchMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(405) -} - -// DataCocsnInterfacesInterfaceInterfaceNamePatchConflictCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNamePatchConflict -const DataCocsnInterfacesInterfaceInterfaceNamePatchConflictCode int = 409 - -/*DataCocsnInterfacesInterfaceInterfaceNamePatchConflict Conflict - -swagger:response dataCocsnInterfacesInterfaceInterfaceNamePatchConflict -*/ -type DataCocsnInterfacesInterfaceInterfaceNamePatchConflict struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNamePatchConflict creates DataCocsnInterfacesInterfaceInterfaceNamePatchConflict with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNamePatchConflict() *DataCocsnInterfacesInterfaceInterfaceNamePatchConflict { - - return &DataCocsnInterfacesInterfaceInterfaceNamePatchConflict{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNamePatchConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_patch_urlbuilder.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_patch_urlbuilder.go deleted file mode 100644 index ac5fbfd912679ea4b9842b6781280fd814fe8820..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_patch_urlbuilder.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" -) - -// DataCocsnInterfacesInterfaceInterfaceNamePatchURL generates an URL for the data cocsn interfaces interface interface name patch operation -type DataCocsnInterfacesInterfaceInterfaceNamePatchURL struct { - InterfaceName string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnInterfacesInterfaceInterfaceNamePatchURL) WithBasePath(bp string) *DataCocsnInterfacesInterfaceInterfaceNamePatchURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnInterfacesInterfaceInterfaceNamePatchURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DataCocsnInterfacesInterfaceInterfaceNamePatchURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/cocsn:interfaces/interface={interface-name}" - - interfaceName := o.InterfaceName - if interfaceName != "" { - _path = strings.Replace(_path, "{interface-name}", interfaceName, -1) - } else { - return nil, errors.New("interfaceName is required on DataCocsnInterfacesInterfaceInterfaceNamePatchURL") - } - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnInterfacesInterfaceInterfaceNamePatchURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DataCocsnInterfacesInterfaceInterfaceNamePatchURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnInterfacesInterfaceInterfaceNamePatchURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnInterfacesInterfaceInterfaceNamePatchURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnInterfacesInterfaceInterfaceNamePatchURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DataCocsnInterfacesInterfaceInterfaceNamePatchURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_phys_address_get.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_phys_address_get.go deleted file mode 100644 index 2c0f27c42cd5d74d91146fef956127da11f37f97..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_phys_address_get.go +++ /dev/null @@ -1,85 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetHandlerFunc turns a function with the right signature into a data cocsn interfaces interface interface name phys address get handler -type DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetHandlerFunc func(DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetHandlerFunc) Handle(params DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetHandler interface for that can handle valid data cocsn interfaces interface interface name phys address get params -type DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetHandler interface { - Handle(DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetParams, interface{}) middleware.Responder -} - -// NewDataCocsnInterfacesInterfaceInterfaceNamePhysAddressGet creates a new http.Handler for the data cocsn interfaces interface interface name phys address get operation -func NewDataCocsnInterfacesInterfaceInterfaceNamePhysAddressGet(ctx *middleware.Context, handler DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetHandler) *DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGet { - return &DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGet{Context: ctx, Handler: handler} -} - -/*DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGet swagger:route GET /data/cocsn:interfaces/interface={interface-name}/phys-address data get dataCocsnInterfacesInterfaceInterfaceNamePhysAddressGet - -The interface's address at its protocol sub-layer. For -example, for an 802.x interface, this object normally -contains a Media Access Control (MAC) address. The -interface's media-specific modules must define the bit -and byte ordering and the format of the value of this -object. For interfaces that do not have such an address -(e.g., a serial line), this node is not present. - -The interface's address at its protocol sub-layer. For -example, for an 802.x interface, this object normally -contains a Media Access Control (MAC) address. The -interface's media-specific modules must define the bit -and byte ordering and the format of the value of this -object. For interfaces that do not have such an address -(e.g., a serial line), this node is not present. - -*/ -type DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGet struct { - Context *middleware.Context - Handler DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetHandler -} - -func (o *DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGet) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_phys_address_get_parameters.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_phys_address_get_parameters.go deleted file mode 100644 index bba1dd07b267f267d833f31a133f8d237a4aae2d..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_phys_address_get_parameters.go +++ /dev/null @@ -1,260 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// NewDataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetParams creates a new DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetParams object -// with the default values initialized. -func NewDataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetParams() DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetParams { - - var ( - // initialize parameters with default values - - contentDefault = string("config") - - withDefaultsDefault = string("report-all") - ) - - return DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetParams{ - Content: &contentDefault, - - WithDefaults: &withDefaultsDefault, - } -} - -// DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetParams contains all the bound params for the data cocsn interfaces interface interface name phys address get operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_interfaces_interface_interface_name_phys_address_get -type DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*controlling descendant nodes in response - In: query - Default: "config" - */ - Content *string - /*limit the depth of nodes in response - In: query - */ - Depth *uint16 - /*optionally identify specific data nodes in response - In: query - */ - Fields *string - /*xpath expression to filter data nodes in response - In: query - */ - Filter *string - /*Interface name. Example value: en0 - Required: true - In: path - */ - InterfaceName string - /*controlling default values in response - In: query - Default: "report-all" - */ - WithDefaults *string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetParams() beforehand. -func (o *DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - qs := runtime.Values(r.URL.Query()) - - qContent, qhkContent, _ := qs.GetOK("content") - if err := o.bindContent(qContent, qhkContent, route.Formats); err != nil { - res = append(res, err) - } - - qDepth, qhkDepth, _ := qs.GetOK("depth") - if err := o.bindDepth(qDepth, qhkDepth, route.Formats); err != nil { - res = append(res, err) - } - - qFields, qhkFields, _ := qs.GetOK("fields") - if err := o.bindFields(qFields, qhkFields, route.Formats); err != nil { - res = append(res, err) - } - - qFilter, qhkFilter, _ := qs.GetOK("filter") - if err := o.bindFilter(qFilter, qhkFilter, route.Formats); err != nil { - res = append(res, err) - } - - rInterfaceName, rhkInterfaceName, _ := route.Params.GetOK("interface-name") - if err := o.bindInterfaceName(rInterfaceName, rhkInterfaceName, route.Formats); err != nil { - res = append(res, err) - } - - qWithDefaults, qhkWithDefaults, _ := qs.GetOK("with-defaults") - if err := o.bindWithDefaults(qWithDefaults, qhkWithDefaults, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindContent binds and validates parameter Content from query. -func (o *DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetParams) bindContent(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - // Default values have been previously initialized by NewDataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetParams() - return nil - } - - o.Content = &raw - - if err := o.validateContent(formats); err != nil { - return err - } - - return nil -} - -// validateContent carries on validations for parameter Content -func (o *DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetParams) validateContent(formats strfmt.Registry) error { - - if err := validate.EnumCase("content", "query", *o.Content, []interface{}{"config", "nonconfig", "all"}, true); err != nil { - return err - } - - return nil -} - -// bindDepth binds and validates parameter Depth from query. -func (o *DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetParams) bindDepth(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - value, err := swag.ConvertUint16(raw) - if err != nil { - return errors.InvalidType("depth", "query", "uint16", raw) - } - o.Depth = &value - - return nil -} - -// bindFields binds and validates parameter Fields from query. -func (o *DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetParams) bindFields(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - o.Fields = &raw - - return nil -} - -// bindFilter binds and validates parameter Filter from query. -func (o *DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetParams) bindFilter(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - o.Filter = &raw - - return nil -} - -// bindInterfaceName binds and validates parameter InterfaceName from path. -func (o *DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetParams) bindInterfaceName(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.InterfaceName = raw - - return nil -} - -// bindWithDefaults binds and validates parameter WithDefaults from query. -func (o *DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetParams) bindWithDefaults(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - // Default values have been previously initialized by NewDataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetParams() - return nil - } - - o.WithDefaults = &raw - - if err := o.validateWithDefaults(formats); err != nil { - return err - } - - return nil -} - -// validateWithDefaults carries on validations for parameter WithDefaults -func (o *DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetParams) validateWithDefaults(formats strfmt.Registry) error { - - if err := validate.EnumCase("with-defaults", "query", *o.WithDefaults, []interface{}{"report-all", "trim", "explicit", "report-all-tagged"}, true); err != nil { - return err - } - - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_phys_address_get_responses.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_phys_address_get_responses.go deleted file mode 100644 index fdc238e54f584b9149b3bf80937e5bc9a8f5da22..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_phys_address_get_responses.go +++ /dev/null @@ -1,208 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" - - "code.fbi.h-da.de/cocsn/cocsn-api/api/models" -) - -// DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetOKCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetOK -const DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetOKCode int = 200 - -/*DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetOK The interface's address at its protocol sub-layer. For -example, for an 802.x interface, this object normally -contains a Media Access Control (MAC) address. The -interface's media-specific modules must define the bit -and byte ordering and the format of the value of this -object. For interfaces that do not have such an address -(e.g., a serial line), this node is not present. - -swagger:response dataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetOK -*/ -type DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetOK struct { - - /* - In: Body - */ - Payload *models.DataCocsnInterfacesInterfaceInterfaceNamePhysAddress `json:"body,omitempty"` -} - -// NewDataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetOK creates DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetOK with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetOK() *DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetOK { - - return &DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetOK{} -} - -// WithPayload adds the payload to the data cocsn interfaces interface interface name phys address get o k response -func (o *DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetOK) WithPayload(payload *models.DataCocsnInterfacesInterfaceInterfaceNamePhysAddress) *DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetOK { - o.Payload = payload - return o -} - -// SetPayload sets the payload to the data cocsn interfaces interface interface name phys address get o k response -func (o *DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetOK) SetPayload(payload *models.DataCocsnInterfacesInterfaceInterfaceNamePhysAddress) { - o.Payload = payload -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.WriteHeader(200) - if o.Payload != nil { - payload := o.Payload - if err := producer.Produce(rw, payload); err != nil { - panic(err) // let the recovery middleware deal with this - } - } -} - -// DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetNoContentCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetNoContent -const DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetNoContentCode int = 204 - -/*DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetNoContent No Content - -swagger:response dataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetNoContent -*/ -type DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetNoContent struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetNoContent creates DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetNoContent with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetNoContent() *DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetNoContent { - - return &DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetBadRequestCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetBadRequest -const DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetBadRequestCode int = 400 - -/*DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetBadRequest Bad Request - -swagger:response dataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetBadRequest -*/ -type DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetBadRequest struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetBadRequest creates DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetBadRequest with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetBadRequest() *DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetBadRequest { - - return &DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetBadRequest{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetUnauthorizedCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetUnauthorized -const DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetUnauthorizedCode int = 401 - -/*DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetUnauthorized Unauthorized - -swagger:response dataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetUnauthorized -*/ -type DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetUnauthorized struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetUnauthorized creates DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetUnauthorized with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetUnauthorized() *DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetUnauthorized { - - return &DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetUnauthorized{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(401) -} - -// DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetNotFoundCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetNotFound -const DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetNotFoundCode int = 404 - -/*DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetNotFound Not Found - -swagger:response dataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetNotFound -*/ -type DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetNotFound struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetNotFound creates DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetNotFound with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetNotFound() *DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetNotFound { - - return &DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetNotFound{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(404) -} - -// DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetMethodNotAllowedCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetMethodNotAllowed -const DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetMethodNotAllowedCode int = 405 - -/*DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetMethodNotAllowed Method Not Allowed - -swagger:response dataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetMethodNotAllowed -*/ -type DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetMethodNotAllowed struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetMethodNotAllowed creates DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetMethodNotAllowed with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetMethodNotAllowed() *DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetMethodNotAllowed { - - return &DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetMethodNotAllowed{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(405) -} - -// DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetConflictCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetConflict -const DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetConflictCode int = 409 - -/*DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetConflict Conflict - -swagger:response dataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetConflict -*/ -type DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetConflict struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetConflict creates DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetConflict with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetConflict() *DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetConflict { - - return &DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetConflict{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_phys_address_get_urlbuilder.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_phys_address_get_urlbuilder.go deleted file mode 100644 index c838dd0ee35ac1d35fab01035d2f4c1718ca58f9..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_phys_address_get_urlbuilder.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" - - "github.com/go-openapi/swag" -) - -// DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetURL generates an URL for the data cocsn interfaces interface interface name phys address get operation -type DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetURL struct { - InterfaceName string - - Content *string - Depth *uint16 - Fields *string - Filter *string - WithDefaults *string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetURL) WithBasePath(bp string) *DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/cocsn:interfaces/interface={interface-name}/phys-address" - - interfaceName := o.InterfaceName - if interfaceName != "" { - _path = strings.Replace(_path, "{interface-name}", interfaceName, -1) - } else { - return nil, errors.New("interfaceName is required on DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetURL") - } - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - qs := make(url.Values) - - var contentQ string - if o.Content != nil { - contentQ = *o.Content - } - if contentQ != "" { - qs.Set("content", contentQ) - } - - var depthQ string - if o.Depth != nil { - depthQ = swag.FormatUint16(*o.Depth) - } - if depthQ != "" { - qs.Set("depth", depthQ) - } - - var fieldsQ string - if o.Fields != nil { - fieldsQ = *o.Fields - } - if fieldsQ != "" { - qs.Set("fields", fieldsQ) - } - - var filterQ string - if o.Filter != nil { - filterQ = *o.Filter - } - if filterQ != "" { - qs.Set("filter", filterQ) - } - - var withDefaultsQ string - if o.WithDefaults != nil { - withDefaultsQ = *o.WithDefaults - } - if withDefaultsQ != "" { - qs.Set("with-defaults", withDefaultsQ) - } - - _result.RawQuery = qs.Encode() - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_put.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_put.go deleted file mode 100644 index 5480f5deb9a3ecaf84bd5713b3cd8296dd5b1e6e..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_put.go +++ /dev/null @@ -1,71 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataCocsnInterfacesInterfaceInterfaceNamePutHandlerFunc turns a function with the right signature into a data cocsn interfaces interface interface name put handler -type DataCocsnInterfacesInterfaceInterfaceNamePutHandlerFunc func(DataCocsnInterfacesInterfaceInterfaceNamePutParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataCocsnInterfacesInterfaceInterfaceNamePutHandlerFunc) Handle(params DataCocsnInterfacesInterfaceInterfaceNamePutParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataCocsnInterfacesInterfaceInterfaceNamePutHandler interface for that can handle valid data cocsn interfaces interface interface name put params -type DataCocsnInterfacesInterfaceInterfaceNamePutHandler interface { - Handle(DataCocsnInterfacesInterfaceInterfaceNamePutParams, interface{}) middleware.Responder -} - -// NewDataCocsnInterfacesInterfaceInterfaceNamePut creates a new http.Handler for the data cocsn interfaces interface interface name put operation -func NewDataCocsnInterfacesInterfaceInterfaceNamePut(ctx *middleware.Context, handler DataCocsnInterfacesInterfaceInterfaceNamePutHandler) *DataCocsnInterfacesInterfaceInterfaceNamePut { - return &DataCocsnInterfacesInterfaceInterfaceNamePut{Context: ctx, Handler: handler} -} - -/*DataCocsnInterfacesInterfaceInterfaceNamePut swagger:route PUT /data/cocsn:interfaces/interface={interface-name} data put dataCocsnInterfacesInterfaceInterfaceNamePut - -DataCocsnInterfacesInterfaceInterfaceNamePut data cocsn interfaces interface interface name put API - -*/ -type DataCocsnInterfacesInterfaceInterfaceNamePut struct { - Context *middleware.Context - Handler DataCocsnInterfacesInterfaceInterfaceNamePutHandler -} - -func (o *DataCocsnInterfacesInterfaceInterfaceNamePut) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataCocsnInterfacesInterfaceInterfaceNamePutParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_put_parameters.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_put_parameters.go deleted file mode 100644 index 4475559bf2578c2604025adbff7b7e8a52a2da0f..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_put_parameters.go +++ /dev/null @@ -1,184 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "io" - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/validate" - - "code.fbi.h-da.de/cocsn/cocsn-api/api/models" -) - -// NewDataCocsnInterfacesInterfaceInterfaceNamePutParams creates a new DataCocsnInterfacesInterfaceInterfaceNamePutParams object -// with the default values initialized. -func NewDataCocsnInterfacesInterfaceInterfaceNamePutParams() DataCocsnInterfacesInterfaceInterfaceNamePutParams { - - var ( - // initialize parameters with default values - - insertDefault = string("first") - ) - - return DataCocsnInterfacesInterfaceInterfaceNamePutParams{ - Insert: &insertDefault, - } -} - -// DataCocsnInterfacesInterfaceInterfaceNamePutParams contains all the bound params for the data cocsn interfaces interface interface name put operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_interfaces_interface_interface_name_put -type DataCocsnInterfacesInterfaceInterfaceNamePutParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*controlling the order when adding new list elements - In: query - Default: "first" - */ - Insert *string - /* - Required: true - In: body - */ - Interface *models.DataCocsnInterfacesInterfaceInterfaceName - /*Interface name. Example value: en0 - Required: true - In: path - */ - InterfaceName string - /*used to specify the insertion point - In: query - */ - Point *string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnInterfacesInterfaceInterfaceNamePutParams() beforehand. -func (o *DataCocsnInterfacesInterfaceInterfaceNamePutParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - qs := runtime.Values(r.URL.Query()) - - qInsert, qhkInsert, _ := qs.GetOK("insert") - if err := o.bindInsert(qInsert, qhkInsert, route.Formats); err != nil { - res = append(res, err) - } - - if runtime.HasBody(r) { - defer r.Body.Close() - var body models.DataCocsnInterfacesInterfaceInterfaceName - if err := route.Consumer.Consume(r.Body, &body); err != nil { - if err == io.EOF { - res = append(res, errors.Required("interface", "body", "")) - } else { - res = append(res, errors.NewParseError("interface", "body", "", err)) - } - } else { - // validate body object - if err := body.Validate(route.Formats); err != nil { - res = append(res, err) - } - - if len(res) == 0 { - o.Interface = &body - } - } - } else { - res = append(res, errors.Required("interface", "body", "")) - } - rInterfaceName, rhkInterfaceName, _ := route.Params.GetOK("interface-name") - if err := o.bindInterfaceName(rInterfaceName, rhkInterfaceName, route.Formats); err != nil { - res = append(res, err) - } - - qPoint, qhkPoint, _ := qs.GetOK("point") - if err := o.bindPoint(qPoint, qhkPoint, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindInsert binds and validates parameter Insert from query. -func (o *DataCocsnInterfacesInterfaceInterfaceNamePutParams) bindInsert(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - // Default values have been previously initialized by NewDataCocsnInterfacesInterfaceInterfaceNamePutParams() - return nil - } - - o.Insert = &raw - - if err := o.validateInsert(formats); err != nil { - return err - } - - return nil -} - -// validateInsert carries on validations for parameter Insert -func (o *DataCocsnInterfacesInterfaceInterfaceNamePutParams) validateInsert(formats strfmt.Registry) error { - - if err := validate.EnumCase("insert", "query", *o.Insert, []interface{}{"first", "last", "before", "after"}, true); err != nil { - return err - } - - return nil -} - -// bindInterfaceName binds and validates parameter InterfaceName from path. -func (o *DataCocsnInterfacesInterfaceInterfaceNamePutParams) bindInterfaceName(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.InterfaceName = raw - - return nil -} - -// bindPoint binds and validates parameter Point from query. -func (o *DataCocsnInterfacesInterfaceInterfaceNamePutParams) bindPoint(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - o.Point = &raw - - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_put_responses.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_put_responses.go deleted file mode 100644 index 1971fc75525d554d9067737f92e3d37a7508b826..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_put_responses.go +++ /dev/null @@ -1,180 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// DataCocsnInterfacesInterfaceInterfaceNamePutCreatedCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNamePutCreated -const DataCocsnInterfacesInterfaceInterfaceNamePutCreatedCode int = 201 - -/*DataCocsnInterfacesInterfaceInterfaceNamePutCreated list interface created or replaced - -swagger:response dataCocsnInterfacesInterfaceInterfaceNamePutCreated -*/ -type DataCocsnInterfacesInterfaceInterfaceNamePutCreated struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNamePutCreated creates DataCocsnInterfacesInterfaceInterfaceNamePutCreated with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNamePutCreated() *DataCocsnInterfacesInterfaceInterfaceNamePutCreated { - - return &DataCocsnInterfacesInterfaceInterfaceNamePutCreated{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNamePutCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(201) -} - -// DataCocsnInterfacesInterfaceInterfaceNamePutNoContentCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNamePutNoContent -const DataCocsnInterfacesInterfaceInterfaceNamePutNoContentCode int = 204 - -/*DataCocsnInterfacesInterfaceInterfaceNamePutNoContent No Content - -swagger:response dataCocsnInterfacesInterfaceInterfaceNamePutNoContent -*/ -type DataCocsnInterfacesInterfaceInterfaceNamePutNoContent struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNamePutNoContent creates DataCocsnInterfacesInterfaceInterfaceNamePutNoContent with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNamePutNoContent() *DataCocsnInterfacesInterfaceInterfaceNamePutNoContent { - - return &DataCocsnInterfacesInterfaceInterfaceNamePutNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNamePutNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DataCocsnInterfacesInterfaceInterfaceNamePutBadRequestCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNamePutBadRequest -const DataCocsnInterfacesInterfaceInterfaceNamePutBadRequestCode int = 400 - -/*DataCocsnInterfacesInterfaceInterfaceNamePutBadRequest Bad Request - -swagger:response dataCocsnInterfacesInterfaceInterfaceNamePutBadRequest -*/ -type DataCocsnInterfacesInterfaceInterfaceNamePutBadRequest struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNamePutBadRequest creates DataCocsnInterfacesInterfaceInterfaceNamePutBadRequest with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNamePutBadRequest() *DataCocsnInterfacesInterfaceInterfaceNamePutBadRequest { - - return &DataCocsnInterfacesInterfaceInterfaceNamePutBadRequest{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNamePutBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// DataCocsnInterfacesInterfaceInterfaceNamePutUnauthorizedCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNamePutUnauthorized -const DataCocsnInterfacesInterfaceInterfaceNamePutUnauthorizedCode int = 401 - -/*DataCocsnInterfacesInterfaceInterfaceNamePutUnauthorized Unauthorized - -swagger:response dataCocsnInterfacesInterfaceInterfaceNamePutUnauthorized -*/ -type DataCocsnInterfacesInterfaceInterfaceNamePutUnauthorized struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNamePutUnauthorized creates DataCocsnInterfacesInterfaceInterfaceNamePutUnauthorized with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNamePutUnauthorized() *DataCocsnInterfacesInterfaceInterfaceNamePutUnauthorized { - - return &DataCocsnInterfacesInterfaceInterfaceNamePutUnauthorized{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNamePutUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(401) -} - -// DataCocsnInterfacesInterfaceInterfaceNamePutNotFoundCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNamePutNotFound -const DataCocsnInterfacesInterfaceInterfaceNamePutNotFoundCode int = 404 - -/*DataCocsnInterfacesInterfaceInterfaceNamePutNotFound Not Found - -swagger:response dataCocsnInterfacesInterfaceInterfaceNamePutNotFound -*/ -type DataCocsnInterfacesInterfaceInterfaceNamePutNotFound struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNamePutNotFound creates DataCocsnInterfacesInterfaceInterfaceNamePutNotFound with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNamePutNotFound() *DataCocsnInterfacesInterfaceInterfaceNamePutNotFound { - - return &DataCocsnInterfacesInterfaceInterfaceNamePutNotFound{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNamePutNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(404) -} - -// DataCocsnInterfacesInterfaceInterfaceNamePutMethodNotAllowedCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNamePutMethodNotAllowed -const DataCocsnInterfacesInterfaceInterfaceNamePutMethodNotAllowedCode int = 405 - -/*DataCocsnInterfacesInterfaceInterfaceNamePutMethodNotAllowed Method Not Allowed - -swagger:response dataCocsnInterfacesInterfaceInterfaceNamePutMethodNotAllowed -*/ -type DataCocsnInterfacesInterfaceInterfaceNamePutMethodNotAllowed struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNamePutMethodNotAllowed creates DataCocsnInterfacesInterfaceInterfaceNamePutMethodNotAllowed with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNamePutMethodNotAllowed() *DataCocsnInterfacesInterfaceInterfaceNamePutMethodNotAllowed { - - return &DataCocsnInterfacesInterfaceInterfaceNamePutMethodNotAllowed{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNamePutMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(405) -} - -// DataCocsnInterfacesInterfaceInterfaceNamePutConflictCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNamePutConflict -const DataCocsnInterfacesInterfaceInterfaceNamePutConflictCode int = 409 - -/*DataCocsnInterfacesInterfaceInterfaceNamePutConflict Conflict - -swagger:response dataCocsnInterfacesInterfaceInterfaceNamePutConflict -*/ -type DataCocsnInterfacesInterfaceInterfaceNamePutConflict struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNamePutConflict creates DataCocsnInterfacesInterfaceInterfaceNamePutConflict with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNamePutConflict() *DataCocsnInterfacesInterfaceInterfaceNamePutConflict { - - return &DataCocsnInterfacesInterfaceInterfaceNamePutConflict{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNamePutConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_put_urlbuilder.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_put_urlbuilder.go deleted file mode 100644 index 5615184f033c5d21716d581f69712da0f3662f96..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_put_urlbuilder.go +++ /dev/null @@ -1,122 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" -) - -// DataCocsnInterfacesInterfaceInterfaceNamePutURL generates an URL for the data cocsn interfaces interface interface name put operation -type DataCocsnInterfacesInterfaceInterfaceNamePutURL struct { - InterfaceName string - - Insert *string - Point *string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnInterfacesInterfaceInterfaceNamePutURL) WithBasePath(bp string) *DataCocsnInterfacesInterfaceInterfaceNamePutURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnInterfacesInterfaceInterfaceNamePutURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DataCocsnInterfacesInterfaceInterfaceNamePutURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/cocsn:interfaces/interface={interface-name}" - - interfaceName := o.InterfaceName - if interfaceName != "" { - _path = strings.Replace(_path, "{interface-name}", interfaceName, -1) - } else { - return nil, errors.New("interfaceName is required on DataCocsnInterfacesInterfaceInterfaceNamePutURL") - } - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - qs := make(url.Values) - - var insertQ string - if o.Insert != nil { - insertQ = *o.Insert - } - if insertQ != "" { - qs.Set("insert", insertQ) - } - - var pointQ string - if o.Point != nil { - pointQ = *o.Point - } - if pointQ != "" { - qs.Set("point", pointQ) - } - - _result.RawQuery = qs.Encode() - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnInterfacesInterfaceInterfaceNamePutURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DataCocsnInterfacesInterfaceInterfaceNamePutURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnInterfacesInterfaceInterfaceNamePutURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnInterfacesInterfaceInterfaceNamePutURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnInterfacesInterfaceInterfaceNamePutURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DataCocsnInterfacesInterfaceInterfaceNamePutURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_patch.go b/api/restapi/operations/data/data_cocsn_interfaces_patch.go deleted file mode 100644 index 802d8ebc2dc365ed224b3c827175b22ed86adb84..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_patch.go +++ /dev/null @@ -1,71 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataCocsnInterfacesPatchHandlerFunc turns a function with the right signature into a data cocsn interfaces patch handler -type DataCocsnInterfacesPatchHandlerFunc func(DataCocsnInterfacesPatchParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataCocsnInterfacesPatchHandlerFunc) Handle(params DataCocsnInterfacesPatchParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataCocsnInterfacesPatchHandler interface for that can handle valid data cocsn interfaces patch params -type DataCocsnInterfacesPatchHandler interface { - Handle(DataCocsnInterfacesPatchParams, interface{}) middleware.Responder -} - -// NewDataCocsnInterfacesPatch creates a new http.Handler for the data cocsn interfaces patch operation -func NewDataCocsnInterfacesPatch(ctx *middleware.Context, handler DataCocsnInterfacesPatchHandler) *DataCocsnInterfacesPatch { - return &DataCocsnInterfacesPatch{Context: ctx, Handler: handler} -} - -/*DataCocsnInterfacesPatch swagger:route PATCH /data/cocsn:interfaces data patch dataCocsnInterfacesPatch - -DataCocsnInterfacesPatch data cocsn interfaces patch API - -*/ -type DataCocsnInterfacesPatch struct { - Context *middleware.Context - Handler DataCocsnInterfacesPatchHandler -} - -func (o *DataCocsnInterfacesPatch) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataCocsnInterfacesPatchParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_patch_parameters.go b/api/restapi/operations/data/data_cocsn_interfaces_patch_parameters.go deleted file mode 100644 index fedb501d5d4bd326137e9529bde805fbd424c7e7..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_patch_parameters.go +++ /dev/null @@ -1,77 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "io" - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - - "code.fbi.h-da.de/cocsn/cocsn-api/api/models" -) - -// NewDataCocsnInterfacesPatchParams creates a new DataCocsnInterfacesPatchParams object -// no default values defined in spec. -func NewDataCocsnInterfacesPatchParams() DataCocsnInterfacesPatchParams { - - return DataCocsnInterfacesPatchParams{} -} - -// DataCocsnInterfacesPatchParams contains all the bound params for the data cocsn interfaces patch operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_interfaces_patch -type DataCocsnInterfacesPatchParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /* - Required: true - In: body - */ - Interfaces *models.DataCocsnInterfaces -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnInterfacesPatchParams() beforehand. -func (o *DataCocsnInterfacesPatchParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if runtime.HasBody(r) { - defer r.Body.Close() - var body models.DataCocsnInterfaces - if err := route.Consumer.Consume(r.Body, &body); err != nil { - if err == io.EOF { - res = append(res, errors.Required("interfaces", "body", "")) - } else { - res = append(res, errors.NewParseError("interfaces", "body", "", err)) - } - } else { - // validate body object - if err := body.Validate(route.Formats); err != nil { - res = append(res, err) - } - - if len(res) == 0 { - o.Interfaces = &body - } - } - } else { - res = append(res, errors.Required("interfaces", "body", "")) - } - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_patch_responses.go b/api/restapi/operations/data/data_cocsn_interfaces_patch_responses.go deleted file mode 100644 index c54c72088128f679bd8a7e514c649163e2e8709d..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_patch_responses.go +++ /dev/null @@ -1,156 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// DataCocsnInterfacesPatchNoContentCode is the HTTP code returned for type DataCocsnInterfacesPatchNoContent -const DataCocsnInterfacesPatchNoContentCode int = 204 - -/*DataCocsnInterfacesPatchNoContent container interfaces updated - -swagger:response dataCocsnInterfacesPatchNoContent -*/ -type DataCocsnInterfacesPatchNoContent struct { -} - -// NewDataCocsnInterfacesPatchNoContent creates DataCocsnInterfacesPatchNoContent with default headers values -func NewDataCocsnInterfacesPatchNoContent() *DataCocsnInterfacesPatchNoContent { - - return &DataCocsnInterfacesPatchNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesPatchNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DataCocsnInterfacesPatchBadRequestCode is the HTTP code returned for type DataCocsnInterfacesPatchBadRequest -const DataCocsnInterfacesPatchBadRequestCode int = 400 - -/*DataCocsnInterfacesPatchBadRequest Bad Request - -swagger:response dataCocsnInterfacesPatchBadRequest -*/ -type DataCocsnInterfacesPatchBadRequest struct { -} - -// NewDataCocsnInterfacesPatchBadRequest creates DataCocsnInterfacesPatchBadRequest with default headers values -func NewDataCocsnInterfacesPatchBadRequest() *DataCocsnInterfacesPatchBadRequest { - - return &DataCocsnInterfacesPatchBadRequest{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesPatchBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// DataCocsnInterfacesPatchUnauthorizedCode is the HTTP code returned for type DataCocsnInterfacesPatchUnauthorized -const DataCocsnInterfacesPatchUnauthorizedCode int = 401 - -/*DataCocsnInterfacesPatchUnauthorized Unauthorized - -swagger:response dataCocsnInterfacesPatchUnauthorized -*/ -type DataCocsnInterfacesPatchUnauthorized struct { -} - -// NewDataCocsnInterfacesPatchUnauthorized creates DataCocsnInterfacesPatchUnauthorized with default headers values -func NewDataCocsnInterfacesPatchUnauthorized() *DataCocsnInterfacesPatchUnauthorized { - - return &DataCocsnInterfacesPatchUnauthorized{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesPatchUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(401) -} - -// DataCocsnInterfacesPatchNotFoundCode is the HTTP code returned for type DataCocsnInterfacesPatchNotFound -const DataCocsnInterfacesPatchNotFoundCode int = 404 - -/*DataCocsnInterfacesPatchNotFound Not Found - -swagger:response dataCocsnInterfacesPatchNotFound -*/ -type DataCocsnInterfacesPatchNotFound struct { -} - -// NewDataCocsnInterfacesPatchNotFound creates DataCocsnInterfacesPatchNotFound with default headers values -func NewDataCocsnInterfacesPatchNotFound() *DataCocsnInterfacesPatchNotFound { - - return &DataCocsnInterfacesPatchNotFound{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesPatchNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(404) -} - -// DataCocsnInterfacesPatchMethodNotAllowedCode is the HTTP code returned for type DataCocsnInterfacesPatchMethodNotAllowed -const DataCocsnInterfacesPatchMethodNotAllowedCode int = 405 - -/*DataCocsnInterfacesPatchMethodNotAllowed Method Not Allowed - -swagger:response dataCocsnInterfacesPatchMethodNotAllowed -*/ -type DataCocsnInterfacesPatchMethodNotAllowed struct { -} - -// NewDataCocsnInterfacesPatchMethodNotAllowed creates DataCocsnInterfacesPatchMethodNotAllowed with default headers values -func NewDataCocsnInterfacesPatchMethodNotAllowed() *DataCocsnInterfacesPatchMethodNotAllowed { - - return &DataCocsnInterfacesPatchMethodNotAllowed{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesPatchMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(405) -} - -// DataCocsnInterfacesPatchConflictCode is the HTTP code returned for type DataCocsnInterfacesPatchConflict -const DataCocsnInterfacesPatchConflictCode int = 409 - -/*DataCocsnInterfacesPatchConflict Conflict - -swagger:response dataCocsnInterfacesPatchConflict -*/ -type DataCocsnInterfacesPatchConflict struct { -} - -// NewDataCocsnInterfacesPatchConflict creates DataCocsnInterfacesPatchConflict with default headers values -func NewDataCocsnInterfacesPatchConflict() *DataCocsnInterfacesPatchConflict { - - return &DataCocsnInterfacesPatchConflict{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesPatchConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_patch_urlbuilder.go b/api/restapi/operations/data/data_cocsn_interfaces_patch_urlbuilder.go deleted file mode 100644 index 7e3bbf6dc579c527f434734c9dd44c3ceece3e88..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_patch_urlbuilder.go +++ /dev/null @@ -1,87 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" -) - -// DataCocsnInterfacesPatchURL generates an URL for the data cocsn interfaces patch operation -type DataCocsnInterfacesPatchURL struct { - _basePath string -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnInterfacesPatchURL) WithBasePath(bp string) *DataCocsnInterfacesPatchURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnInterfacesPatchURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DataCocsnInterfacesPatchURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/cocsn:interfaces" - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnInterfacesPatchURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DataCocsnInterfacesPatchURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnInterfacesPatchURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnInterfacesPatchURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnInterfacesPatchURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DataCocsnInterfacesPatchURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_post.go b/api/restapi/operations/data/data_cocsn_interfaces_post.go deleted file mode 100644 index 8d72bde035589fa70e72228af787e3f9b9f5db35..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_post.go +++ /dev/null @@ -1,71 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataCocsnInterfacesPostHandlerFunc turns a function with the right signature into a data cocsn interfaces post handler -type DataCocsnInterfacesPostHandlerFunc func(DataCocsnInterfacesPostParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataCocsnInterfacesPostHandlerFunc) Handle(params DataCocsnInterfacesPostParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataCocsnInterfacesPostHandler interface for that can handle valid data cocsn interfaces post params -type DataCocsnInterfacesPostHandler interface { - Handle(DataCocsnInterfacesPostParams, interface{}) middleware.Responder -} - -// NewDataCocsnInterfacesPost creates a new http.Handler for the data cocsn interfaces post operation -func NewDataCocsnInterfacesPost(ctx *middleware.Context, handler DataCocsnInterfacesPostHandler) *DataCocsnInterfacesPost { - return &DataCocsnInterfacesPost{Context: ctx, Handler: handler} -} - -/*DataCocsnInterfacesPost swagger:route POST /data/cocsn:interfaces data post dataCocsnInterfacesPost - -DataCocsnInterfacesPost data cocsn interfaces post API - -*/ -type DataCocsnInterfacesPost struct { - Context *middleware.Context - Handler DataCocsnInterfacesPostHandler -} - -func (o *DataCocsnInterfacesPost) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataCocsnInterfacesPostParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_post_parameters.go b/api/restapi/operations/data/data_cocsn_interfaces_post_parameters.go deleted file mode 100644 index b1efaafd4630fa311213af5914655576a7a75949..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_post_parameters.go +++ /dev/null @@ -1,77 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "io" - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - - "code.fbi.h-da.de/cocsn/cocsn-api/api/models" -) - -// NewDataCocsnInterfacesPostParams creates a new DataCocsnInterfacesPostParams object -// no default values defined in spec. -func NewDataCocsnInterfacesPostParams() DataCocsnInterfacesPostParams { - - return DataCocsnInterfacesPostParams{} -} - -// DataCocsnInterfacesPostParams contains all the bound params for the data cocsn interfaces post operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_interfaces_post -type DataCocsnInterfacesPostParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /* - Required: true - In: body - */ - Interfaces *models.DataCocsnInterfacesPost -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnInterfacesPostParams() beforehand. -func (o *DataCocsnInterfacesPostParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if runtime.HasBody(r) { - defer r.Body.Close() - var body models.DataCocsnInterfacesPost - if err := route.Consumer.Consume(r.Body, &body); err != nil { - if err == io.EOF { - res = append(res, errors.Required("interfaces", "body", "")) - } else { - res = append(res, errors.NewParseError("interfaces", "body", "", err)) - } - } else { - // validate body object - if err := body.Validate(route.Formats); err != nil { - res = append(res, err) - } - - if len(res) == 0 { - o.Interfaces = &body - } - } - } else { - res = append(res, errors.Required("interfaces", "body", "")) - } - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_post_responses.go b/api/restapi/operations/data/data_cocsn_interfaces_post_responses.go deleted file mode 100644 index ffe7b77e036beca7a02a63cc2264aeb312069979..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_post_responses.go +++ /dev/null @@ -1,180 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// DataCocsnInterfacesPostCreatedCode is the HTTP code returned for type DataCocsnInterfacesPostCreated -const DataCocsnInterfacesPostCreatedCode int = 201 - -/*DataCocsnInterfacesPostCreated container interfaces created - -swagger:response dataCocsnInterfacesPostCreated -*/ -type DataCocsnInterfacesPostCreated struct { -} - -// NewDataCocsnInterfacesPostCreated creates DataCocsnInterfacesPostCreated with default headers values -func NewDataCocsnInterfacesPostCreated() *DataCocsnInterfacesPostCreated { - - return &DataCocsnInterfacesPostCreated{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesPostCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(201) -} - -// DataCocsnInterfacesPostNoContentCode is the HTTP code returned for type DataCocsnInterfacesPostNoContent -const DataCocsnInterfacesPostNoContentCode int = 204 - -/*DataCocsnInterfacesPostNoContent No Content - -swagger:response dataCocsnInterfacesPostNoContent -*/ -type DataCocsnInterfacesPostNoContent struct { -} - -// NewDataCocsnInterfacesPostNoContent creates DataCocsnInterfacesPostNoContent with default headers values -func NewDataCocsnInterfacesPostNoContent() *DataCocsnInterfacesPostNoContent { - - return &DataCocsnInterfacesPostNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesPostNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DataCocsnInterfacesPostBadRequestCode is the HTTP code returned for type DataCocsnInterfacesPostBadRequest -const DataCocsnInterfacesPostBadRequestCode int = 400 - -/*DataCocsnInterfacesPostBadRequest Bad Request - -swagger:response dataCocsnInterfacesPostBadRequest -*/ -type DataCocsnInterfacesPostBadRequest struct { -} - -// NewDataCocsnInterfacesPostBadRequest creates DataCocsnInterfacesPostBadRequest with default headers values -func NewDataCocsnInterfacesPostBadRequest() *DataCocsnInterfacesPostBadRequest { - - return &DataCocsnInterfacesPostBadRequest{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesPostBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// DataCocsnInterfacesPostUnauthorizedCode is the HTTP code returned for type DataCocsnInterfacesPostUnauthorized -const DataCocsnInterfacesPostUnauthorizedCode int = 401 - -/*DataCocsnInterfacesPostUnauthorized Unauthorized - -swagger:response dataCocsnInterfacesPostUnauthorized -*/ -type DataCocsnInterfacesPostUnauthorized struct { -} - -// NewDataCocsnInterfacesPostUnauthorized creates DataCocsnInterfacesPostUnauthorized with default headers values -func NewDataCocsnInterfacesPostUnauthorized() *DataCocsnInterfacesPostUnauthorized { - - return &DataCocsnInterfacesPostUnauthorized{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesPostUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(401) -} - -// DataCocsnInterfacesPostNotFoundCode is the HTTP code returned for type DataCocsnInterfacesPostNotFound -const DataCocsnInterfacesPostNotFoundCode int = 404 - -/*DataCocsnInterfacesPostNotFound Not Found - -swagger:response dataCocsnInterfacesPostNotFound -*/ -type DataCocsnInterfacesPostNotFound struct { -} - -// NewDataCocsnInterfacesPostNotFound creates DataCocsnInterfacesPostNotFound with default headers values -func NewDataCocsnInterfacesPostNotFound() *DataCocsnInterfacesPostNotFound { - - return &DataCocsnInterfacesPostNotFound{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesPostNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(404) -} - -// DataCocsnInterfacesPostMethodNotAllowedCode is the HTTP code returned for type DataCocsnInterfacesPostMethodNotAllowed -const DataCocsnInterfacesPostMethodNotAllowedCode int = 405 - -/*DataCocsnInterfacesPostMethodNotAllowed Method Not Allowed - -swagger:response dataCocsnInterfacesPostMethodNotAllowed -*/ -type DataCocsnInterfacesPostMethodNotAllowed struct { -} - -// NewDataCocsnInterfacesPostMethodNotAllowed creates DataCocsnInterfacesPostMethodNotAllowed with default headers values -func NewDataCocsnInterfacesPostMethodNotAllowed() *DataCocsnInterfacesPostMethodNotAllowed { - - return &DataCocsnInterfacesPostMethodNotAllowed{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesPostMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(405) -} - -// DataCocsnInterfacesPostConflictCode is the HTTP code returned for type DataCocsnInterfacesPostConflict -const DataCocsnInterfacesPostConflictCode int = 409 - -/*DataCocsnInterfacesPostConflict Conflict - -swagger:response dataCocsnInterfacesPostConflict -*/ -type DataCocsnInterfacesPostConflict struct { -} - -// NewDataCocsnInterfacesPostConflict creates DataCocsnInterfacesPostConflict with default headers values -func NewDataCocsnInterfacesPostConflict() *DataCocsnInterfacesPostConflict { - - return &DataCocsnInterfacesPostConflict{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesPostConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_post_urlbuilder.go b/api/restapi/operations/data/data_cocsn_interfaces_post_urlbuilder.go deleted file mode 100644 index b64c1c30e474819b68a4d2b0cd382ca760b6344a..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_post_urlbuilder.go +++ /dev/null @@ -1,87 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" -) - -// DataCocsnInterfacesPostURL generates an URL for the data cocsn interfaces post operation -type DataCocsnInterfacesPostURL struct { - _basePath string -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnInterfacesPostURL) WithBasePath(bp string) *DataCocsnInterfacesPostURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnInterfacesPostURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DataCocsnInterfacesPostURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/cocsn:interfaces" - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnInterfacesPostURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DataCocsnInterfacesPostURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnInterfacesPostURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnInterfacesPostURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnInterfacesPostURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DataCocsnInterfacesPostURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_put.go b/api/restapi/operations/data/data_cocsn_interfaces_put.go deleted file mode 100644 index b7780360dc5693c00c939fd783a2e7a80e1e1c9e..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_put.go +++ /dev/null @@ -1,71 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataCocsnInterfacesPutHandlerFunc turns a function with the right signature into a data cocsn interfaces put handler -type DataCocsnInterfacesPutHandlerFunc func(DataCocsnInterfacesPutParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataCocsnInterfacesPutHandlerFunc) Handle(params DataCocsnInterfacesPutParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataCocsnInterfacesPutHandler interface for that can handle valid data cocsn interfaces put params -type DataCocsnInterfacesPutHandler interface { - Handle(DataCocsnInterfacesPutParams, interface{}) middleware.Responder -} - -// NewDataCocsnInterfacesPut creates a new http.Handler for the data cocsn interfaces put operation -func NewDataCocsnInterfacesPut(ctx *middleware.Context, handler DataCocsnInterfacesPutHandler) *DataCocsnInterfacesPut { - return &DataCocsnInterfacesPut{Context: ctx, Handler: handler} -} - -/*DataCocsnInterfacesPut swagger:route PUT /data/cocsn:interfaces data put dataCocsnInterfacesPut - -DataCocsnInterfacesPut data cocsn interfaces put API - -*/ -type DataCocsnInterfacesPut struct { - Context *middleware.Context - Handler DataCocsnInterfacesPutHandler -} - -func (o *DataCocsnInterfacesPut) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataCocsnInterfacesPutParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_put_parameters.go b/api/restapi/operations/data/data_cocsn_interfaces_put_parameters.go deleted file mode 100644 index 9d0f464c5e8b9ba0f3eb3ad5c2b698fcb366f996..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_put_parameters.go +++ /dev/null @@ -1,77 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "io" - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - - "code.fbi.h-da.de/cocsn/cocsn-api/api/models" -) - -// NewDataCocsnInterfacesPutParams creates a new DataCocsnInterfacesPutParams object -// no default values defined in spec. -func NewDataCocsnInterfacesPutParams() DataCocsnInterfacesPutParams { - - return DataCocsnInterfacesPutParams{} -} - -// DataCocsnInterfacesPutParams contains all the bound params for the data cocsn interfaces put operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_interfaces_put -type DataCocsnInterfacesPutParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /* - Required: true - In: body - */ - Interfaces *models.DataCocsnInterfaces -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnInterfacesPutParams() beforehand. -func (o *DataCocsnInterfacesPutParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if runtime.HasBody(r) { - defer r.Body.Close() - var body models.DataCocsnInterfaces - if err := route.Consumer.Consume(r.Body, &body); err != nil { - if err == io.EOF { - res = append(res, errors.Required("interfaces", "body", "")) - } else { - res = append(res, errors.NewParseError("interfaces", "body", "", err)) - } - } else { - // validate body object - if err := body.Validate(route.Formats); err != nil { - res = append(res, err) - } - - if len(res) == 0 { - o.Interfaces = &body - } - } - } else { - res = append(res, errors.Required("interfaces", "body", "")) - } - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_put_responses.go b/api/restapi/operations/data/data_cocsn_interfaces_put_responses.go deleted file mode 100644 index f07f2b8a3b1552992d29268a90dcd3cd04f1f00d..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_put_responses.go +++ /dev/null @@ -1,180 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// DataCocsnInterfacesPutCreatedCode is the HTTP code returned for type DataCocsnInterfacesPutCreated -const DataCocsnInterfacesPutCreatedCode int = 201 - -/*DataCocsnInterfacesPutCreated container interfaces created or replaced - -swagger:response dataCocsnInterfacesPutCreated -*/ -type DataCocsnInterfacesPutCreated struct { -} - -// NewDataCocsnInterfacesPutCreated creates DataCocsnInterfacesPutCreated with default headers values -func NewDataCocsnInterfacesPutCreated() *DataCocsnInterfacesPutCreated { - - return &DataCocsnInterfacesPutCreated{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesPutCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(201) -} - -// DataCocsnInterfacesPutNoContentCode is the HTTP code returned for type DataCocsnInterfacesPutNoContent -const DataCocsnInterfacesPutNoContentCode int = 204 - -/*DataCocsnInterfacesPutNoContent No Content - -swagger:response dataCocsnInterfacesPutNoContent -*/ -type DataCocsnInterfacesPutNoContent struct { -} - -// NewDataCocsnInterfacesPutNoContent creates DataCocsnInterfacesPutNoContent with default headers values -func NewDataCocsnInterfacesPutNoContent() *DataCocsnInterfacesPutNoContent { - - return &DataCocsnInterfacesPutNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesPutNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DataCocsnInterfacesPutBadRequestCode is the HTTP code returned for type DataCocsnInterfacesPutBadRequest -const DataCocsnInterfacesPutBadRequestCode int = 400 - -/*DataCocsnInterfacesPutBadRequest Bad Request - -swagger:response dataCocsnInterfacesPutBadRequest -*/ -type DataCocsnInterfacesPutBadRequest struct { -} - -// NewDataCocsnInterfacesPutBadRequest creates DataCocsnInterfacesPutBadRequest with default headers values -func NewDataCocsnInterfacesPutBadRequest() *DataCocsnInterfacesPutBadRequest { - - return &DataCocsnInterfacesPutBadRequest{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesPutBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// DataCocsnInterfacesPutUnauthorizedCode is the HTTP code returned for type DataCocsnInterfacesPutUnauthorized -const DataCocsnInterfacesPutUnauthorizedCode int = 401 - -/*DataCocsnInterfacesPutUnauthorized Unauthorized - -swagger:response dataCocsnInterfacesPutUnauthorized -*/ -type DataCocsnInterfacesPutUnauthorized struct { -} - -// NewDataCocsnInterfacesPutUnauthorized creates DataCocsnInterfacesPutUnauthorized with default headers values -func NewDataCocsnInterfacesPutUnauthorized() *DataCocsnInterfacesPutUnauthorized { - - return &DataCocsnInterfacesPutUnauthorized{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesPutUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(401) -} - -// DataCocsnInterfacesPutNotFoundCode is the HTTP code returned for type DataCocsnInterfacesPutNotFound -const DataCocsnInterfacesPutNotFoundCode int = 404 - -/*DataCocsnInterfacesPutNotFound Not Found - -swagger:response dataCocsnInterfacesPutNotFound -*/ -type DataCocsnInterfacesPutNotFound struct { -} - -// NewDataCocsnInterfacesPutNotFound creates DataCocsnInterfacesPutNotFound with default headers values -func NewDataCocsnInterfacesPutNotFound() *DataCocsnInterfacesPutNotFound { - - return &DataCocsnInterfacesPutNotFound{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesPutNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(404) -} - -// DataCocsnInterfacesPutMethodNotAllowedCode is the HTTP code returned for type DataCocsnInterfacesPutMethodNotAllowed -const DataCocsnInterfacesPutMethodNotAllowedCode int = 405 - -/*DataCocsnInterfacesPutMethodNotAllowed Method Not Allowed - -swagger:response dataCocsnInterfacesPutMethodNotAllowed -*/ -type DataCocsnInterfacesPutMethodNotAllowed struct { -} - -// NewDataCocsnInterfacesPutMethodNotAllowed creates DataCocsnInterfacesPutMethodNotAllowed with default headers values -func NewDataCocsnInterfacesPutMethodNotAllowed() *DataCocsnInterfacesPutMethodNotAllowed { - - return &DataCocsnInterfacesPutMethodNotAllowed{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesPutMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(405) -} - -// DataCocsnInterfacesPutConflictCode is the HTTP code returned for type DataCocsnInterfacesPutConflict -const DataCocsnInterfacesPutConflictCode int = 409 - -/*DataCocsnInterfacesPutConflict Conflict - -swagger:response dataCocsnInterfacesPutConflict -*/ -type DataCocsnInterfacesPutConflict struct { -} - -// NewDataCocsnInterfacesPutConflict creates DataCocsnInterfacesPutConflict with default headers values -func NewDataCocsnInterfacesPutConflict() *DataCocsnInterfacesPutConflict { - - return &DataCocsnInterfacesPutConflict{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesPutConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_put_urlbuilder.go b/api/restapi/operations/data/data_cocsn_interfaces_put_urlbuilder.go deleted file mode 100644 index 6d8efa8a5c0d9b6aa18f9a496969e819f2f07957..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_put_urlbuilder.go +++ /dev/null @@ -1,87 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" -) - -// DataCocsnInterfacesPutURL generates an URL for the data cocsn interfaces put operation -type DataCocsnInterfacesPutURL struct { - _basePath string -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnInterfacesPutURL) WithBasePath(bp string) *DataCocsnInterfacesPutURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnInterfacesPutURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DataCocsnInterfacesPutURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/cocsn:interfaces" - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnInterfacesPutURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DataCocsnInterfacesPutURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnInterfacesPutURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnInterfacesPutURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnInterfacesPutURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DataCocsnInterfacesPutURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/operations/data/data_cocsn_routes_delete.go b/api/restapi/operations/data/data_cocsn_routes_delete.go deleted file mode 100644 index a4532eee3e206e7e986bd6b453470c401c59b382..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataCocsnRoutesDeleteHandlerFunc turns a function with the right signature into a data cocsn routes delete handler -type DataCocsnRoutesDeleteHandlerFunc func(DataCocsnRoutesDeleteParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataCocsnRoutesDeleteHandlerFunc) Handle(params DataCocsnRoutesDeleteParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataCocsnRoutesDeleteHandler interface for that can handle valid data cocsn routes delete params -type DataCocsnRoutesDeleteHandler interface { - Handle(DataCocsnRoutesDeleteParams, interface{}) middleware.Responder -} - -// NewDataCocsnRoutesDelete creates a new http.Handler for the data cocsn routes delete operation -func NewDataCocsnRoutesDelete(ctx *middleware.Context, handler DataCocsnRoutesDeleteHandler) *DataCocsnRoutesDelete { - return &DataCocsnRoutesDelete{Context: ctx, Handler: handler} -} - -/*DataCocsnRoutesDelete swagger:route DELETE /data/cocsn:routes data delete dataCocsnRoutesDelete - -DataCocsnRoutesDelete data cocsn routes delete API - -*/ -type DataCocsnRoutesDelete struct { - Context *middleware.Context - Handler DataCocsnRoutesDeleteHandler -} - -func (o *DataCocsnRoutesDelete) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataCocsnRoutesDeleteParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_cocsn_routes_delete_parameters.go b/api/restapi/operations/data/data_cocsn_routes_delete_parameters.go deleted file mode 100644 index 96f2bddb8452b1dba601626a7ed587047f61fc57..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_delete_parameters.go +++ /dev/null @@ -1,45 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime/middleware" -) - -// NewDataCocsnRoutesDeleteParams creates a new DataCocsnRoutesDeleteParams object -// no default values defined in spec. -func NewDataCocsnRoutesDeleteParams() DataCocsnRoutesDeleteParams { - - return DataCocsnRoutesDeleteParams{} -} - -// DataCocsnRoutesDeleteParams contains all the bound params for the data cocsn routes delete operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_routes_delete -type DataCocsnRoutesDeleteParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnRoutesDeleteParams() beforehand. -func (o *DataCocsnRoutesDeleteParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_routes_delete_responses.go b/api/restapi/operations/data/data_cocsn_routes_delete_responses.go deleted file mode 100644 index bdd918a82d4a5adc2f361734facce8dd62ed248f..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_delete_responses.go +++ /dev/null @@ -1,36 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// DataCocsnRoutesDeleteNoContentCode is the HTTP code returned for type DataCocsnRoutesDeleteNoContent -const DataCocsnRoutesDeleteNoContentCode int = 204 - -/*DataCocsnRoutesDeleteNoContent No Content - -swagger:response dataCocsnRoutesDeleteNoContent -*/ -type DataCocsnRoutesDeleteNoContent struct { -} - -// NewDataCocsnRoutesDeleteNoContent creates DataCocsnRoutesDeleteNoContent with default headers values -func NewDataCocsnRoutesDeleteNoContent() *DataCocsnRoutesDeleteNoContent { - - return &DataCocsnRoutesDeleteNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesDeleteNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} diff --git a/api/restapi/operations/data/data_cocsn_routes_delete_urlbuilder.go b/api/restapi/operations/data/data_cocsn_routes_delete_urlbuilder.go deleted file mode 100644 index 33ee37a1c64f51bfc9bb629569605e6d39e8d1d9..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_delete_urlbuilder.go +++ /dev/null @@ -1,87 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" -) - -// DataCocsnRoutesDeleteURL generates an URL for the data cocsn routes delete operation -type DataCocsnRoutesDeleteURL struct { - _basePath string -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnRoutesDeleteURL) WithBasePath(bp string) *DataCocsnRoutesDeleteURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnRoutesDeleteURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DataCocsnRoutesDeleteURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/cocsn:routes" - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnRoutesDeleteURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DataCocsnRoutesDeleteURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnRoutesDeleteURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnRoutesDeleteURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnRoutesDeleteURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DataCocsnRoutesDeleteURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/operations/data/data_cocsn_routes_get.go b/api/restapi/operations/data/data_cocsn_routes_get.go deleted file mode 100644 index 1e9a4cad4d27d1135790a09698870cd6cbccbfcf..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_get.go +++ /dev/null @@ -1,71 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataCocsnRoutesGetHandlerFunc turns a function with the right signature into a data cocsn routes get handler -type DataCocsnRoutesGetHandlerFunc func(DataCocsnRoutesGetParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataCocsnRoutesGetHandlerFunc) Handle(params DataCocsnRoutesGetParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataCocsnRoutesGetHandler interface for that can handle valid data cocsn routes get params -type DataCocsnRoutesGetHandler interface { - Handle(DataCocsnRoutesGetParams, interface{}) middleware.Responder -} - -// NewDataCocsnRoutesGet creates a new http.Handler for the data cocsn routes get operation -func NewDataCocsnRoutesGet(ctx *middleware.Context, handler DataCocsnRoutesGetHandler) *DataCocsnRoutesGet { - return &DataCocsnRoutesGet{Context: ctx, Handler: handler} -} - -/*DataCocsnRoutesGet swagger:route GET /data/cocsn:routes data get dataCocsnRoutesGet - -DataCocsnRoutesGet data cocsn routes get API - -*/ -type DataCocsnRoutesGet struct { - Context *middleware.Context - Handler DataCocsnRoutesGetHandler -} - -func (o *DataCocsnRoutesGet) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataCocsnRoutesGetParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_cocsn_routes_get_parameters.go b/api/restapi/operations/data/data_cocsn_routes_get_parameters.go deleted file mode 100644 index 566ed9e6e4c05ef62b4f0081b213e22782f7eb87..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_get_parameters.go +++ /dev/null @@ -1,235 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// NewDataCocsnRoutesGetParams creates a new DataCocsnRoutesGetParams object -// with the default values initialized. -func NewDataCocsnRoutesGetParams() DataCocsnRoutesGetParams { - - var ( - // initialize parameters with default values - - contentDefault = string("config") - - withDefaultsDefault = string("report-all") - ) - - return DataCocsnRoutesGetParams{ - Content: &contentDefault, - - WithDefaults: &withDefaultsDefault, - } -} - -// DataCocsnRoutesGetParams contains all the bound params for the data cocsn routes get operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_routes_get -type DataCocsnRoutesGetParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*controlling descendant nodes in response - In: query - Default: "config" - */ - Content *string - /*limit the depth of nodes in response - In: query - */ - Depth *uint16 - /*optionally identify specific data nodes in response - In: query - */ - Fields *string - /*xpath expression to filter data nodes in response - In: query - */ - Filter *string - /*controlling default values in response - In: query - Default: "report-all" - */ - WithDefaults *string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnRoutesGetParams() beforehand. -func (o *DataCocsnRoutesGetParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - qs := runtime.Values(r.URL.Query()) - - qContent, qhkContent, _ := qs.GetOK("content") - if err := o.bindContent(qContent, qhkContent, route.Formats); err != nil { - res = append(res, err) - } - - qDepth, qhkDepth, _ := qs.GetOK("depth") - if err := o.bindDepth(qDepth, qhkDepth, route.Formats); err != nil { - res = append(res, err) - } - - qFields, qhkFields, _ := qs.GetOK("fields") - if err := o.bindFields(qFields, qhkFields, route.Formats); err != nil { - res = append(res, err) - } - - qFilter, qhkFilter, _ := qs.GetOK("filter") - if err := o.bindFilter(qFilter, qhkFilter, route.Formats); err != nil { - res = append(res, err) - } - - qWithDefaults, qhkWithDefaults, _ := qs.GetOK("with-defaults") - if err := o.bindWithDefaults(qWithDefaults, qhkWithDefaults, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindContent binds and validates parameter Content from query. -func (o *DataCocsnRoutesGetParams) bindContent(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - // Default values have been previously initialized by NewDataCocsnRoutesGetParams() - return nil - } - - o.Content = &raw - - if err := o.validateContent(formats); err != nil { - return err - } - - return nil -} - -// validateContent carries on validations for parameter Content -func (o *DataCocsnRoutesGetParams) validateContent(formats strfmt.Registry) error { - - if err := validate.EnumCase("content", "query", *o.Content, []interface{}{"config", "nonconfig", "all"}, true); err != nil { - return err - } - - return nil -} - -// bindDepth binds and validates parameter Depth from query. -func (o *DataCocsnRoutesGetParams) bindDepth(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - value, err := swag.ConvertUint16(raw) - if err != nil { - return errors.InvalidType("depth", "query", "uint16", raw) - } - o.Depth = &value - - return nil -} - -// bindFields binds and validates parameter Fields from query. -func (o *DataCocsnRoutesGetParams) bindFields(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - o.Fields = &raw - - return nil -} - -// bindFilter binds and validates parameter Filter from query. -func (o *DataCocsnRoutesGetParams) bindFilter(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - o.Filter = &raw - - return nil -} - -// bindWithDefaults binds and validates parameter WithDefaults from query. -func (o *DataCocsnRoutesGetParams) bindWithDefaults(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - // Default values have been previously initialized by NewDataCocsnRoutesGetParams() - return nil - } - - o.WithDefaults = &raw - - if err := o.validateWithDefaults(formats); err != nil { - return err - } - - return nil -} - -// validateWithDefaults carries on validations for parameter WithDefaults -func (o *DataCocsnRoutesGetParams) validateWithDefaults(formats strfmt.Registry) error { - - if err := validate.EnumCase("with-defaults", "query", *o.WithDefaults, []interface{}{"report-all", "trim", "explicit", "report-all-tagged"}, true); err != nil { - return err - } - - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_routes_get_responses.go b/api/restapi/operations/data/data_cocsn_routes_get_responses.go deleted file mode 100644 index d9162bd5972eca9165dcc6401d6bc78476b78286..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_get_responses.go +++ /dev/null @@ -1,202 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" - - "code.fbi.h-da.de/cocsn/cocsn-api/api/models" -) - -// DataCocsnRoutesGetOKCode is the HTTP code returned for type DataCocsnRoutesGetOK -const DataCocsnRoutesGetOKCode int = 200 - -/*DataCocsnRoutesGetOK OK - -swagger:response dataCocsnRoutesGetOK -*/ -type DataCocsnRoutesGetOK struct { - - /* - In: Body - */ - Payload *models.DataCocsnRoutes `json:"body,omitempty"` -} - -// NewDataCocsnRoutesGetOK creates DataCocsnRoutesGetOK with default headers values -func NewDataCocsnRoutesGetOK() *DataCocsnRoutesGetOK { - - return &DataCocsnRoutesGetOK{} -} - -// WithPayload adds the payload to the data cocsn routes get o k response -func (o *DataCocsnRoutesGetOK) WithPayload(payload *models.DataCocsnRoutes) *DataCocsnRoutesGetOK { - o.Payload = payload - return o -} - -// SetPayload sets the payload to the data cocsn routes get o k response -func (o *DataCocsnRoutesGetOK) SetPayload(payload *models.DataCocsnRoutes) { - o.Payload = payload -} - -// WriteResponse to the client -func (o *DataCocsnRoutesGetOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.WriteHeader(200) - if o.Payload != nil { - payload := o.Payload - if err := producer.Produce(rw, payload); err != nil { - panic(err) // let the recovery middleware deal with this - } - } -} - -// DataCocsnRoutesGetNoContentCode is the HTTP code returned for type DataCocsnRoutesGetNoContent -const DataCocsnRoutesGetNoContentCode int = 204 - -/*DataCocsnRoutesGetNoContent No Content - -swagger:response dataCocsnRoutesGetNoContent -*/ -type DataCocsnRoutesGetNoContent struct { -} - -// NewDataCocsnRoutesGetNoContent creates DataCocsnRoutesGetNoContent with default headers values -func NewDataCocsnRoutesGetNoContent() *DataCocsnRoutesGetNoContent { - - return &DataCocsnRoutesGetNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesGetNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DataCocsnRoutesGetBadRequestCode is the HTTP code returned for type DataCocsnRoutesGetBadRequest -const DataCocsnRoutesGetBadRequestCode int = 400 - -/*DataCocsnRoutesGetBadRequest Bad Request - -swagger:response dataCocsnRoutesGetBadRequest -*/ -type DataCocsnRoutesGetBadRequest struct { -} - -// NewDataCocsnRoutesGetBadRequest creates DataCocsnRoutesGetBadRequest with default headers values -func NewDataCocsnRoutesGetBadRequest() *DataCocsnRoutesGetBadRequest { - - return &DataCocsnRoutesGetBadRequest{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesGetBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// DataCocsnRoutesGetUnauthorizedCode is the HTTP code returned for type DataCocsnRoutesGetUnauthorized -const DataCocsnRoutesGetUnauthorizedCode int = 401 - -/*DataCocsnRoutesGetUnauthorized Unauthorized - -swagger:response dataCocsnRoutesGetUnauthorized -*/ -type DataCocsnRoutesGetUnauthorized struct { -} - -// NewDataCocsnRoutesGetUnauthorized creates DataCocsnRoutesGetUnauthorized with default headers values -func NewDataCocsnRoutesGetUnauthorized() *DataCocsnRoutesGetUnauthorized { - - return &DataCocsnRoutesGetUnauthorized{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesGetUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(401) -} - -// DataCocsnRoutesGetNotFoundCode is the HTTP code returned for type DataCocsnRoutesGetNotFound -const DataCocsnRoutesGetNotFoundCode int = 404 - -/*DataCocsnRoutesGetNotFound Not Found - -swagger:response dataCocsnRoutesGetNotFound -*/ -type DataCocsnRoutesGetNotFound struct { -} - -// NewDataCocsnRoutesGetNotFound creates DataCocsnRoutesGetNotFound with default headers values -func NewDataCocsnRoutesGetNotFound() *DataCocsnRoutesGetNotFound { - - return &DataCocsnRoutesGetNotFound{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesGetNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(404) -} - -// DataCocsnRoutesGetMethodNotAllowedCode is the HTTP code returned for type DataCocsnRoutesGetMethodNotAllowed -const DataCocsnRoutesGetMethodNotAllowedCode int = 405 - -/*DataCocsnRoutesGetMethodNotAllowed Method Not Allowed - -swagger:response dataCocsnRoutesGetMethodNotAllowed -*/ -type DataCocsnRoutesGetMethodNotAllowed struct { -} - -// NewDataCocsnRoutesGetMethodNotAllowed creates DataCocsnRoutesGetMethodNotAllowed with default headers values -func NewDataCocsnRoutesGetMethodNotAllowed() *DataCocsnRoutesGetMethodNotAllowed { - - return &DataCocsnRoutesGetMethodNotAllowed{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesGetMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(405) -} - -// DataCocsnRoutesGetConflictCode is the HTTP code returned for type DataCocsnRoutesGetConflict -const DataCocsnRoutesGetConflictCode int = 409 - -/*DataCocsnRoutesGetConflict Conflict - -swagger:response dataCocsnRoutesGetConflict -*/ -type DataCocsnRoutesGetConflict struct { -} - -// NewDataCocsnRoutesGetConflict creates DataCocsnRoutesGetConflict with default headers values -func NewDataCocsnRoutesGetConflict() *DataCocsnRoutesGetConflict { - - return &DataCocsnRoutesGetConflict{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesGetConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/api/restapi/operations/data/data_cocsn_routes_get_urlbuilder.go b/api/restapi/operations/data/data_cocsn_routes_get_urlbuilder.go deleted file mode 100644 index 0bb2c6696a3a95c2c16b1c898280344c5a379904..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_get_urlbuilder.go +++ /dev/null @@ -1,141 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - - "github.com/go-openapi/swag" -) - -// DataCocsnRoutesGetURL generates an URL for the data cocsn routes get operation -type DataCocsnRoutesGetURL struct { - Content *string - Depth *uint16 - Fields *string - Filter *string - WithDefaults *string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnRoutesGetURL) WithBasePath(bp string) *DataCocsnRoutesGetURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnRoutesGetURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DataCocsnRoutesGetURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/cocsn:routes" - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - qs := make(url.Values) - - var contentQ string - if o.Content != nil { - contentQ = *o.Content - } - if contentQ != "" { - qs.Set("content", contentQ) - } - - var depthQ string - if o.Depth != nil { - depthQ = swag.FormatUint16(*o.Depth) - } - if depthQ != "" { - qs.Set("depth", depthQ) - } - - var fieldsQ string - if o.Fields != nil { - fieldsQ = *o.Fields - } - if fieldsQ != "" { - qs.Set("fields", fieldsQ) - } - - var filterQ string - if o.Filter != nil { - filterQ = *o.Filter - } - if filterQ != "" { - qs.Set("filter", filterQ) - } - - var withDefaultsQ string - if o.WithDefaults != nil { - withDefaultsQ = *o.WithDefaults - } - if withDefaultsQ != "" { - qs.Set("with-defaults", withDefaultsQ) - } - - _result.RawQuery = qs.Encode() - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnRoutesGetURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DataCocsnRoutesGetURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnRoutesGetURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnRoutesGetURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnRoutesGetURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DataCocsnRoutesGetURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/operations/data/data_cocsn_routes_patch.go b/api/restapi/operations/data/data_cocsn_routes_patch.go deleted file mode 100644 index 9060fa0a53983062d349ada09920756bc5fdbaa4..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_patch.go +++ /dev/null @@ -1,71 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataCocsnRoutesPatchHandlerFunc turns a function with the right signature into a data cocsn routes patch handler -type DataCocsnRoutesPatchHandlerFunc func(DataCocsnRoutesPatchParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataCocsnRoutesPatchHandlerFunc) Handle(params DataCocsnRoutesPatchParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataCocsnRoutesPatchHandler interface for that can handle valid data cocsn routes patch params -type DataCocsnRoutesPatchHandler interface { - Handle(DataCocsnRoutesPatchParams, interface{}) middleware.Responder -} - -// NewDataCocsnRoutesPatch creates a new http.Handler for the data cocsn routes patch operation -func NewDataCocsnRoutesPatch(ctx *middleware.Context, handler DataCocsnRoutesPatchHandler) *DataCocsnRoutesPatch { - return &DataCocsnRoutesPatch{Context: ctx, Handler: handler} -} - -/*DataCocsnRoutesPatch swagger:route PATCH /data/cocsn:routes data patch dataCocsnRoutesPatch - -DataCocsnRoutesPatch data cocsn routes patch API - -*/ -type DataCocsnRoutesPatch struct { - Context *middleware.Context - Handler DataCocsnRoutesPatchHandler -} - -func (o *DataCocsnRoutesPatch) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataCocsnRoutesPatchParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_cocsn_routes_patch_parameters.go b/api/restapi/operations/data/data_cocsn_routes_patch_parameters.go deleted file mode 100644 index ce180fcf98f4041db81a1a44320744949009b74f..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_patch_parameters.go +++ /dev/null @@ -1,77 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "io" - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - - "code.fbi.h-da.de/cocsn/cocsn-api/api/models" -) - -// NewDataCocsnRoutesPatchParams creates a new DataCocsnRoutesPatchParams object -// no default values defined in spec. -func NewDataCocsnRoutesPatchParams() DataCocsnRoutesPatchParams { - - return DataCocsnRoutesPatchParams{} -} - -// DataCocsnRoutesPatchParams contains all the bound params for the data cocsn routes patch operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_routes_patch -type DataCocsnRoutesPatchParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /* - Required: true - In: body - */ - Routes *models.DataCocsnRoutes -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnRoutesPatchParams() beforehand. -func (o *DataCocsnRoutesPatchParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if runtime.HasBody(r) { - defer r.Body.Close() - var body models.DataCocsnRoutes - if err := route.Consumer.Consume(r.Body, &body); err != nil { - if err == io.EOF { - res = append(res, errors.Required("routes", "body", "")) - } else { - res = append(res, errors.NewParseError("routes", "body", "", err)) - } - } else { - // validate body object - if err := body.Validate(route.Formats); err != nil { - res = append(res, err) - } - - if len(res) == 0 { - o.Routes = &body - } - } - } else { - res = append(res, errors.Required("routes", "body", "")) - } - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_routes_patch_responses.go b/api/restapi/operations/data/data_cocsn_routes_patch_responses.go deleted file mode 100644 index a889f3a931b83d40c3f27db3044ab408597f0571..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_patch_responses.go +++ /dev/null @@ -1,156 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// DataCocsnRoutesPatchNoContentCode is the HTTP code returned for type DataCocsnRoutesPatchNoContent -const DataCocsnRoutesPatchNoContentCode int = 204 - -/*DataCocsnRoutesPatchNoContent container routes updated - -swagger:response dataCocsnRoutesPatchNoContent -*/ -type DataCocsnRoutesPatchNoContent struct { -} - -// NewDataCocsnRoutesPatchNoContent creates DataCocsnRoutesPatchNoContent with default headers values -func NewDataCocsnRoutesPatchNoContent() *DataCocsnRoutesPatchNoContent { - - return &DataCocsnRoutesPatchNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesPatchNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DataCocsnRoutesPatchBadRequestCode is the HTTP code returned for type DataCocsnRoutesPatchBadRequest -const DataCocsnRoutesPatchBadRequestCode int = 400 - -/*DataCocsnRoutesPatchBadRequest Bad Request - -swagger:response dataCocsnRoutesPatchBadRequest -*/ -type DataCocsnRoutesPatchBadRequest struct { -} - -// NewDataCocsnRoutesPatchBadRequest creates DataCocsnRoutesPatchBadRequest with default headers values -func NewDataCocsnRoutesPatchBadRequest() *DataCocsnRoutesPatchBadRequest { - - return &DataCocsnRoutesPatchBadRequest{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesPatchBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// DataCocsnRoutesPatchUnauthorizedCode is the HTTP code returned for type DataCocsnRoutesPatchUnauthorized -const DataCocsnRoutesPatchUnauthorizedCode int = 401 - -/*DataCocsnRoutesPatchUnauthorized Unauthorized - -swagger:response dataCocsnRoutesPatchUnauthorized -*/ -type DataCocsnRoutesPatchUnauthorized struct { -} - -// NewDataCocsnRoutesPatchUnauthorized creates DataCocsnRoutesPatchUnauthorized with default headers values -func NewDataCocsnRoutesPatchUnauthorized() *DataCocsnRoutesPatchUnauthorized { - - return &DataCocsnRoutesPatchUnauthorized{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesPatchUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(401) -} - -// DataCocsnRoutesPatchNotFoundCode is the HTTP code returned for type DataCocsnRoutesPatchNotFound -const DataCocsnRoutesPatchNotFoundCode int = 404 - -/*DataCocsnRoutesPatchNotFound Not Found - -swagger:response dataCocsnRoutesPatchNotFound -*/ -type DataCocsnRoutesPatchNotFound struct { -} - -// NewDataCocsnRoutesPatchNotFound creates DataCocsnRoutesPatchNotFound with default headers values -func NewDataCocsnRoutesPatchNotFound() *DataCocsnRoutesPatchNotFound { - - return &DataCocsnRoutesPatchNotFound{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesPatchNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(404) -} - -// DataCocsnRoutesPatchMethodNotAllowedCode is the HTTP code returned for type DataCocsnRoutesPatchMethodNotAllowed -const DataCocsnRoutesPatchMethodNotAllowedCode int = 405 - -/*DataCocsnRoutesPatchMethodNotAllowed Method Not Allowed - -swagger:response dataCocsnRoutesPatchMethodNotAllowed -*/ -type DataCocsnRoutesPatchMethodNotAllowed struct { -} - -// NewDataCocsnRoutesPatchMethodNotAllowed creates DataCocsnRoutesPatchMethodNotAllowed with default headers values -func NewDataCocsnRoutesPatchMethodNotAllowed() *DataCocsnRoutesPatchMethodNotAllowed { - - return &DataCocsnRoutesPatchMethodNotAllowed{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesPatchMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(405) -} - -// DataCocsnRoutesPatchConflictCode is the HTTP code returned for type DataCocsnRoutesPatchConflict -const DataCocsnRoutesPatchConflictCode int = 409 - -/*DataCocsnRoutesPatchConflict Conflict - -swagger:response dataCocsnRoutesPatchConflict -*/ -type DataCocsnRoutesPatchConflict struct { -} - -// NewDataCocsnRoutesPatchConflict creates DataCocsnRoutesPatchConflict with default headers values -func NewDataCocsnRoutesPatchConflict() *DataCocsnRoutesPatchConflict { - - return &DataCocsnRoutesPatchConflict{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesPatchConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/api/restapi/operations/data/data_cocsn_routes_patch_urlbuilder.go b/api/restapi/operations/data/data_cocsn_routes_patch_urlbuilder.go deleted file mode 100644 index 80f2eadcaceacd135ce255f42160b7a766090be6..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_patch_urlbuilder.go +++ /dev/null @@ -1,87 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" -) - -// DataCocsnRoutesPatchURL generates an URL for the data cocsn routes patch operation -type DataCocsnRoutesPatchURL struct { - _basePath string -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnRoutesPatchURL) WithBasePath(bp string) *DataCocsnRoutesPatchURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnRoutesPatchURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DataCocsnRoutesPatchURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/cocsn:routes" - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnRoutesPatchURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DataCocsnRoutesPatchURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnRoutesPatchURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnRoutesPatchURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnRoutesPatchURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DataCocsnRoutesPatchURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/operations/data/data_cocsn_routes_post.go b/api/restapi/operations/data/data_cocsn_routes_post.go deleted file mode 100644 index 3c000a4ebca32af287f2a2cae6a8e0fe74f92a1e..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_post.go +++ /dev/null @@ -1,71 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataCocsnRoutesPostHandlerFunc turns a function with the right signature into a data cocsn routes post handler -type DataCocsnRoutesPostHandlerFunc func(DataCocsnRoutesPostParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataCocsnRoutesPostHandlerFunc) Handle(params DataCocsnRoutesPostParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataCocsnRoutesPostHandler interface for that can handle valid data cocsn routes post params -type DataCocsnRoutesPostHandler interface { - Handle(DataCocsnRoutesPostParams, interface{}) middleware.Responder -} - -// NewDataCocsnRoutesPost creates a new http.Handler for the data cocsn routes post operation -func NewDataCocsnRoutesPost(ctx *middleware.Context, handler DataCocsnRoutesPostHandler) *DataCocsnRoutesPost { - return &DataCocsnRoutesPost{Context: ctx, Handler: handler} -} - -/*DataCocsnRoutesPost swagger:route POST /data/cocsn:routes data post dataCocsnRoutesPost - -DataCocsnRoutesPost data cocsn routes post API - -*/ -type DataCocsnRoutesPost struct { - Context *middleware.Context - Handler DataCocsnRoutesPostHandler -} - -func (o *DataCocsnRoutesPost) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataCocsnRoutesPostParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_cocsn_routes_post_parameters.go b/api/restapi/operations/data/data_cocsn_routes_post_parameters.go deleted file mode 100644 index afb237f2f04c0c4c08f4fd3ad13c196a83116251..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_post_parameters.go +++ /dev/null @@ -1,77 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "io" - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - - "code.fbi.h-da.de/cocsn/cocsn-api/api/models" -) - -// NewDataCocsnRoutesPostParams creates a new DataCocsnRoutesPostParams object -// no default values defined in spec. -func NewDataCocsnRoutesPostParams() DataCocsnRoutesPostParams { - - return DataCocsnRoutesPostParams{} -} - -// DataCocsnRoutesPostParams contains all the bound params for the data cocsn routes post operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_routes_post -type DataCocsnRoutesPostParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /* - Required: true - In: body - */ - Routes *models.DataCocsnRoutesPost -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnRoutesPostParams() beforehand. -func (o *DataCocsnRoutesPostParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if runtime.HasBody(r) { - defer r.Body.Close() - var body models.DataCocsnRoutesPost - if err := route.Consumer.Consume(r.Body, &body); err != nil { - if err == io.EOF { - res = append(res, errors.Required("routes", "body", "")) - } else { - res = append(res, errors.NewParseError("routes", "body", "", err)) - } - } else { - // validate body object - if err := body.Validate(route.Formats); err != nil { - res = append(res, err) - } - - if len(res) == 0 { - o.Routes = &body - } - } - } else { - res = append(res, errors.Required("routes", "body", "")) - } - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_routes_post_responses.go b/api/restapi/operations/data/data_cocsn_routes_post_responses.go deleted file mode 100644 index 09cbb4c99f8dcb0348f77af82b91d754021e90a7..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_post_responses.go +++ /dev/null @@ -1,180 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// DataCocsnRoutesPostCreatedCode is the HTTP code returned for type DataCocsnRoutesPostCreated -const DataCocsnRoutesPostCreatedCode int = 201 - -/*DataCocsnRoutesPostCreated container routes created - -swagger:response dataCocsnRoutesPostCreated -*/ -type DataCocsnRoutesPostCreated struct { -} - -// NewDataCocsnRoutesPostCreated creates DataCocsnRoutesPostCreated with default headers values -func NewDataCocsnRoutesPostCreated() *DataCocsnRoutesPostCreated { - - return &DataCocsnRoutesPostCreated{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesPostCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(201) -} - -// DataCocsnRoutesPostNoContentCode is the HTTP code returned for type DataCocsnRoutesPostNoContent -const DataCocsnRoutesPostNoContentCode int = 204 - -/*DataCocsnRoutesPostNoContent No Content - -swagger:response dataCocsnRoutesPostNoContent -*/ -type DataCocsnRoutesPostNoContent struct { -} - -// NewDataCocsnRoutesPostNoContent creates DataCocsnRoutesPostNoContent with default headers values -func NewDataCocsnRoutesPostNoContent() *DataCocsnRoutesPostNoContent { - - return &DataCocsnRoutesPostNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesPostNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DataCocsnRoutesPostBadRequestCode is the HTTP code returned for type DataCocsnRoutesPostBadRequest -const DataCocsnRoutesPostBadRequestCode int = 400 - -/*DataCocsnRoutesPostBadRequest Bad Request - -swagger:response dataCocsnRoutesPostBadRequest -*/ -type DataCocsnRoutesPostBadRequest struct { -} - -// NewDataCocsnRoutesPostBadRequest creates DataCocsnRoutesPostBadRequest with default headers values -func NewDataCocsnRoutesPostBadRequest() *DataCocsnRoutesPostBadRequest { - - return &DataCocsnRoutesPostBadRequest{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesPostBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// DataCocsnRoutesPostUnauthorizedCode is the HTTP code returned for type DataCocsnRoutesPostUnauthorized -const DataCocsnRoutesPostUnauthorizedCode int = 401 - -/*DataCocsnRoutesPostUnauthorized Unauthorized - -swagger:response dataCocsnRoutesPostUnauthorized -*/ -type DataCocsnRoutesPostUnauthorized struct { -} - -// NewDataCocsnRoutesPostUnauthorized creates DataCocsnRoutesPostUnauthorized with default headers values -func NewDataCocsnRoutesPostUnauthorized() *DataCocsnRoutesPostUnauthorized { - - return &DataCocsnRoutesPostUnauthorized{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesPostUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(401) -} - -// DataCocsnRoutesPostNotFoundCode is the HTTP code returned for type DataCocsnRoutesPostNotFound -const DataCocsnRoutesPostNotFoundCode int = 404 - -/*DataCocsnRoutesPostNotFound Not Found - -swagger:response dataCocsnRoutesPostNotFound -*/ -type DataCocsnRoutesPostNotFound struct { -} - -// NewDataCocsnRoutesPostNotFound creates DataCocsnRoutesPostNotFound with default headers values -func NewDataCocsnRoutesPostNotFound() *DataCocsnRoutesPostNotFound { - - return &DataCocsnRoutesPostNotFound{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesPostNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(404) -} - -// DataCocsnRoutesPostMethodNotAllowedCode is the HTTP code returned for type DataCocsnRoutesPostMethodNotAllowed -const DataCocsnRoutesPostMethodNotAllowedCode int = 405 - -/*DataCocsnRoutesPostMethodNotAllowed Method Not Allowed - -swagger:response dataCocsnRoutesPostMethodNotAllowed -*/ -type DataCocsnRoutesPostMethodNotAllowed struct { -} - -// NewDataCocsnRoutesPostMethodNotAllowed creates DataCocsnRoutesPostMethodNotAllowed with default headers values -func NewDataCocsnRoutesPostMethodNotAllowed() *DataCocsnRoutesPostMethodNotAllowed { - - return &DataCocsnRoutesPostMethodNotAllowed{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesPostMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(405) -} - -// DataCocsnRoutesPostConflictCode is the HTTP code returned for type DataCocsnRoutesPostConflict -const DataCocsnRoutesPostConflictCode int = 409 - -/*DataCocsnRoutesPostConflict Conflict - -swagger:response dataCocsnRoutesPostConflict -*/ -type DataCocsnRoutesPostConflict struct { -} - -// NewDataCocsnRoutesPostConflict creates DataCocsnRoutesPostConflict with default headers values -func NewDataCocsnRoutesPostConflict() *DataCocsnRoutesPostConflict { - - return &DataCocsnRoutesPostConflict{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesPostConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/api/restapi/operations/data/data_cocsn_routes_post_urlbuilder.go b/api/restapi/operations/data/data_cocsn_routes_post_urlbuilder.go deleted file mode 100644 index 43936805bfb1b56194fd1ab235fd8c1b2ca36165..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_post_urlbuilder.go +++ /dev/null @@ -1,87 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" -) - -// DataCocsnRoutesPostURL generates an URL for the data cocsn routes post operation -type DataCocsnRoutesPostURL struct { - _basePath string -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnRoutesPostURL) WithBasePath(bp string) *DataCocsnRoutesPostURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnRoutesPostURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DataCocsnRoutesPostURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/cocsn:routes" - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnRoutesPostURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DataCocsnRoutesPostURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnRoutesPostURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnRoutesPostURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnRoutesPostURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DataCocsnRoutesPostURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/operations/data/data_cocsn_routes_put.go b/api/restapi/operations/data/data_cocsn_routes_put.go deleted file mode 100644 index bc72c9cc47deecb72ad7c4334a98ae78e316ace6..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_put.go +++ /dev/null @@ -1,71 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataCocsnRoutesPutHandlerFunc turns a function with the right signature into a data cocsn routes put handler -type DataCocsnRoutesPutHandlerFunc func(DataCocsnRoutesPutParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataCocsnRoutesPutHandlerFunc) Handle(params DataCocsnRoutesPutParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataCocsnRoutesPutHandler interface for that can handle valid data cocsn routes put params -type DataCocsnRoutesPutHandler interface { - Handle(DataCocsnRoutesPutParams, interface{}) middleware.Responder -} - -// NewDataCocsnRoutesPut creates a new http.Handler for the data cocsn routes put operation -func NewDataCocsnRoutesPut(ctx *middleware.Context, handler DataCocsnRoutesPutHandler) *DataCocsnRoutesPut { - return &DataCocsnRoutesPut{Context: ctx, Handler: handler} -} - -/*DataCocsnRoutesPut swagger:route PUT /data/cocsn:routes data put dataCocsnRoutesPut - -DataCocsnRoutesPut data cocsn routes put API - -*/ -type DataCocsnRoutesPut struct { - Context *middleware.Context - Handler DataCocsnRoutesPutHandler -} - -func (o *DataCocsnRoutesPut) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataCocsnRoutesPutParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_cocsn_routes_put_parameters.go b/api/restapi/operations/data/data_cocsn_routes_put_parameters.go deleted file mode 100644 index 5e53fd6f5a696471d05b07bfda9ce820fff02cc2..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_put_parameters.go +++ /dev/null @@ -1,77 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "io" - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - - "code.fbi.h-da.de/cocsn/cocsn-api/api/models" -) - -// NewDataCocsnRoutesPutParams creates a new DataCocsnRoutesPutParams object -// no default values defined in spec. -func NewDataCocsnRoutesPutParams() DataCocsnRoutesPutParams { - - return DataCocsnRoutesPutParams{} -} - -// DataCocsnRoutesPutParams contains all the bound params for the data cocsn routes put operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_routes_put -type DataCocsnRoutesPutParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /* - Required: true - In: body - */ - Routes *models.DataCocsnRoutes -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnRoutesPutParams() beforehand. -func (o *DataCocsnRoutesPutParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if runtime.HasBody(r) { - defer r.Body.Close() - var body models.DataCocsnRoutes - if err := route.Consumer.Consume(r.Body, &body); err != nil { - if err == io.EOF { - res = append(res, errors.Required("routes", "body", "")) - } else { - res = append(res, errors.NewParseError("routes", "body", "", err)) - } - } else { - // validate body object - if err := body.Validate(route.Formats); err != nil { - res = append(res, err) - } - - if len(res) == 0 { - o.Routes = &body - } - } - } else { - res = append(res, errors.Required("routes", "body", "")) - } - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_routes_put_responses.go b/api/restapi/operations/data/data_cocsn_routes_put_responses.go deleted file mode 100644 index 6f5442247a7a7e99a080525f199e5f60ad55a5e1..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_put_responses.go +++ /dev/null @@ -1,180 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// DataCocsnRoutesPutCreatedCode is the HTTP code returned for type DataCocsnRoutesPutCreated -const DataCocsnRoutesPutCreatedCode int = 201 - -/*DataCocsnRoutesPutCreated container routes created or replaced - -swagger:response dataCocsnRoutesPutCreated -*/ -type DataCocsnRoutesPutCreated struct { -} - -// NewDataCocsnRoutesPutCreated creates DataCocsnRoutesPutCreated with default headers values -func NewDataCocsnRoutesPutCreated() *DataCocsnRoutesPutCreated { - - return &DataCocsnRoutesPutCreated{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesPutCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(201) -} - -// DataCocsnRoutesPutNoContentCode is the HTTP code returned for type DataCocsnRoutesPutNoContent -const DataCocsnRoutesPutNoContentCode int = 204 - -/*DataCocsnRoutesPutNoContent No Content - -swagger:response dataCocsnRoutesPutNoContent -*/ -type DataCocsnRoutesPutNoContent struct { -} - -// NewDataCocsnRoutesPutNoContent creates DataCocsnRoutesPutNoContent with default headers values -func NewDataCocsnRoutesPutNoContent() *DataCocsnRoutesPutNoContent { - - return &DataCocsnRoutesPutNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesPutNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DataCocsnRoutesPutBadRequestCode is the HTTP code returned for type DataCocsnRoutesPutBadRequest -const DataCocsnRoutesPutBadRequestCode int = 400 - -/*DataCocsnRoutesPutBadRequest Bad Request - -swagger:response dataCocsnRoutesPutBadRequest -*/ -type DataCocsnRoutesPutBadRequest struct { -} - -// NewDataCocsnRoutesPutBadRequest creates DataCocsnRoutesPutBadRequest with default headers values -func NewDataCocsnRoutesPutBadRequest() *DataCocsnRoutesPutBadRequest { - - return &DataCocsnRoutesPutBadRequest{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesPutBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// DataCocsnRoutesPutUnauthorizedCode is the HTTP code returned for type DataCocsnRoutesPutUnauthorized -const DataCocsnRoutesPutUnauthorizedCode int = 401 - -/*DataCocsnRoutesPutUnauthorized Unauthorized - -swagger:response dataCocsnRoutesPutUnauthorized -*/ -type DataCocsnRoutesPutUnauthorized struct { -} - -// NewDataCocsnRoutesPutUnauthorized creates DataCocsnRoutesPutUnauthorized with default headers values -func NewDataCocsnRoutesPutUnauthorized() *DataCocsnRoutesPutUnauthorized { - - return &DataCocsnRoutesPutUnauthorized{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesPutUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(401) -} - -// DataCocsnRoutesPutNotFoundCode is the HTTP code returned for type DataCocsnRoutesPutNotFound -const DataCocsnRoutesPutNotFoundCode int = 404 - -/*DataCocsnRoutesPutNotFound Not Found - -swagger:response dataCocsnRoutesPutNotFound -*/ -type DataCocsnRoutesPutNotFound struct { -} - -// NewDataCocsnRoutesPutNotFound creates DataCocsnRoutesPutNotFound with default headers values -func NewDataCocsnRoutesPutNotFound() *DataCocsnRoutesPutNotFound { - - return &DataCocsnRoutesPutNotFound{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesPutNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(404) -} - -// DataCocsnRoutesPutMethodNotAllowedCode is the HTTP code returned for type DataCocsnRoutesPutMethodNotAllowed -const DataCocsnRoutesPutMethodNotAllowedCode int = 405 - -/*DataCocsnRoutesPutMethodNotAllowed Method Not Allowed - -swagger:response dataCocsnRoutesPutMethodNotAllowed -*/ -type DataCocsnRoutesPutMethodNotAllowed struct { -} - -// NewDataCocsnRoutesPutMethodNotAllowed creates DataCocsnRoutesPutMethodNotAllowed with default headers values -func NewDataCocsnRoutesPutMethodNotAllowed() *DataCocsnRoutesPutMethodNotAllowed { - - return &DataCocsnRoutesPutMethodNotAllowed{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesPutMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(405) -} - -// DataCocsnRoutesPutConflictCode is the HTTP code returned for type DataCocsnRoutesPutConflict -const DataCocsnRoutesPutConflictCode int = 409 - -/*DataCocsnRoutesPutConflict Conflict - -swagger:response dataCocsnRoutesPutConflict -*/ -type DataCocsnRoutesPutConflict struct { -} - -// NewDataCocsnRoutesPutConflict creates DataCocsnRoutesPutConflict with default headers values -func NewDataCocsnRoutesPutConflict() *DataCocsnRoutesPutConflict { - - return &DataCocsnRoutesPutConflict{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesPutConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/api/restapi/operations/data/data_cocsn_routes_put_urlbuilder.go b/api/restapi/operations/data/data_cocsn_routes_put_urlbuilder.go deleted file mode 100644 index a2f576d1c05faea699cddc71809c654995789e33..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_put_urlbuilder.go +++ /dev/null @@ -1,87 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" -) - -// DataCocsnRoutesPutURL generates an URL for the data cocsn routes put operation -type DataCocsnRoutesPutURL struct { - _basePath string -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnRoutesPutURL) WithBasePath(bp string) *DataCocsnRoutesPutURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnRoutesPutURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DataCocsnRoutesPutURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/cocsn:routes" - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnRoutesPutURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DataCocsnRoutesPutURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnRoutesPutURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnRoutesPutURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnRoutesPutURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DataCocsnRoutesPutURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_delete.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_delete.go deleted file mode 100644 index 2cfc3f88142a64b17eab6592d4f35f16de586758..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataCocsnRoutesRouteRouteDestinationDeleteHandlerFunc turns a function with the right signature into a data cocsn routes route route destination delete handler -type DataCocsnRoutesRouteRouteDestinationDeleteHandlerFunc func(DataCocsnRoutesRouteRouteDestinationDeleteParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataCocsnRoutesRouteRouteDestinationDeleteHandlerFunc) Handle(params DataCocsnRoutesRouteRouteDestinationDeleteParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataCocsnRoutesRouteRouteDestinationDeleteHandler interface for that can handle valid data cocsn routes route route destination delete params -type DataCocsnRoutesRouteRouteDestinationDeleteHandler interface { - Handle(DataCocsnRoutesRouteRouteDestinationDeleteParams, interface{}) middleware.Responder -} - -// NewDataCocsnRoutesRouteRouteDestinationDelete creates a new http.Handler for the data cocsn routes route route destination delete operation -func NewDataCocsnRoutesRouteRouteDestinationDelete(ctx *middleware.Context, handler DataCocsnRoutesRouteRouteDestinationDeleteHandler) *DataCocsnRoutesRouteRouteDestinationDelete { - return &DataCocsnRoutesRouteRouteDestinationDelete{Context: ctx, Handler: handler} -} - -/*DataCocsnRoutesRouteRouteDestinationDelete swagger:route DELETE /data/cocsn:routes/route={route-destination} data delete dataCocsnRoutesRouteRouteDestinationDelete - -DataCocsnRoutesRouteRouteDestinationDelete data cocsn routes route route destination delete API - -*/ -type DataCocsnRoutesRouteRouteDestinationDelete struct { - Context *middleware.Context - Handler DataCocsnRoutesRouteRouteDestinationDeleteHandler -} - -func (o *DataCocsnRoutesRouteRouteDestinationDelete) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataCocsnRoutesRouteRouteDestinationDeleteParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_delete_parameters.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_delete_parameters.go deleted file mode 100644 index 5a0f4d3f5a46aa13f2b9f4b5941e815bf3ff01b4..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_delete_parameters.go +++ /dev/null @@ -1,72 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" -) - -// NewDataCocsnRoutesRouteRouteDestinationDeleteParams creates a new DataCocsnRoutesRouteRouteDestinationDeleteParams object -// no default values defined in spec. -func NewDataCocsnRoutesRouteRouteDestinationDeleteParams() DataCocsnRoutesRouteRouteDestinationDeleteParams { - - return DataCocsnRoutesRouteRouteDestinationDeleteParams{} -} - -// DataCocsnRoutesRouteRouteDestinationDeleteParams contains all the bound params for the data cocsn routes route route destination delete operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_routes_route_route_destination_delete -type DataCocsnRoutesRouteRouteDestinationDeleteParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*Route destination. IP network - Required: true - In: path - */ - RouteDestination string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnRoutesRouteRouteDestinationDeleteParams() beforehand. -func (o *DataCocsnRoutesRouteRouteDestinationDeleteParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - rRouteDestination, rhkRouteDestination, _ := route.Params.GetOK("route-destination") - if err := o.bindRouteDestination(rRouteDestination, rhkRouteDestination, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindRouteDestination binds and validates parameter RouteDestination from path. -func (o *DataCocsnRoutesRouteRouteDestinationDeleteParams) bindRouteDestination(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.RouteDestination = raw - - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_delete_responses.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_delete_responses.go deleted file mode 100644 index 3236962b5d4c978d77bb4130df33231c967dffd4..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_delete_responses.go +++ /dev/null @@ -1,36 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// DataCocsnRoutesRouteRouteDestinationDeleteNoContentCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationDeleteNoContent -const DataCocsnRoutesRouteRouteDestinationDeleteNoContentCode int = 204 - -/*DataCocsnRoutesRouteRouteDestinationDeleteNoContent No Content - -swagger:response dataCocsnRoutesRouteRouteDestinationDeleteNoContent -*/ -type DataCocsnRoutesRouteRouteDestinationDeleteNoContent struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationDeleteNoContent creates DataCocsnRoutesRouteRouteDestinationDeleteNoContent with default headers values -func NewDataCocsnRoutesRouteRouteDestinationDeleteNoContent() *DataCocsnRoutesRouteRouteDestinationDeleteNoContent { - - return &DataCocsnRoutesRouteRouteDestinationDeleteNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationDeleteNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_delete_urlbuilder.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_delete_urlbuilder.go deleted file mode 100644 index ff67f3106bb74de0d11ead438f36eb74f05f96c6..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_delete_urlbuilder.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" -) - -// DataCocsnRoutesRouteRouteDestinationDeleteURL generates an URL for the data cocsn routes route route destination delete operation -type DataCocsnRoutesRouteRouteDestinationDeleteURL struct { - RouteDestination string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnRoutesRouteRouteDestinationDeleteURL) WithBasePath(bp string) *DataCocsnRoutesRouteRouteDestinationDeleteURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnRoutesRouteRouteDestinationDeleteURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DataCocsnRoutesRouteRouteDestinationDeleteURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/cocsn:routes/route={route-destination}" - - routeDestination := o.RouteDestination - if routeDestination != "" { - _path = strings.Replace(_path, "{route-destination}", routeDestination, -1) - } else { - return nil, errors.New("routeDestination is required on DataCocsnRoutesRouteRouteDestinationDeleteURL") - } - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnRoutesRouteRouteDestinationDeleteURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DataCocsnRoutesRouteRouteDestinationDeleteURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnRoutesRouteRouteDestinationDeleteURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnRoutesRouteRouteDestinationDeleteURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnRoutesRouteRouteDestinationDeleteURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DataCocsnRoutesRouteRouteDestinationDeleteURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_delete.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_delete.go deleted file mode 100644 index cc462301ab02da142ca75aff272a32df21a7109d..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_delete.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataCocsnRoutesRouteRouteDestinationDestinationDeleteHandlerFunc turns a function with the right signature into a data cocsn routes route route destination destination delete handler -type DataCocsnRoutesRouteRouteDestinationDestinationDeleteHandlerFunc func(DataCocsnRoutesRouteRouteDestinationDestinationDeleteParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataCocsnRoutesRouteRouteDestinationDestinationDeleteHandlerFunc) Handle(params DataCocsnRoutesRouteRouteDestinationDestinationDeleteParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataCocsnRoutesRouteRouteDestinationDestinationDeleteHandler interface for that can handle valid data cocsn routes route route destination destination delete params -type DataCocsnRoutesRouteRouteDestinationDestinationDeleteHandler interface { - Handle(DataCocsnRoutesRouteRouteDestinationDestinationDeleteParams, interface{}) middleware.Responder -} - -// NewDataCocsnRoutesRouteRouteDestinationDestinationDelete creates a new http.Handler for the data cocsn routes route route destination destination delete operation -func NewDataCocsnRoutesRouteRouteDestinationDestinationDelete(ctx *middleware.Context, handler DataCocsnRoutesRouteRouteDestinationDestinationDeleteHandler) *DataCocsnRoutesRouteRouteDestinationDestinationDelete { - return &DataCocsnRoutesRouteRouteDestinationDestinationDelete{Context: ctx, Handler: handler} -} - -/*DataCocsnRoutesRouteRouteDestinationDestinationDelete swagger:route DELETE /data/cocsn:routes/route={route-destination}/destination data delete dataCocsnRoutesRouteRouteDestinationDestinationDelete - -Route destination. IP network - -Route destination. IP network - -*/ -type DataCocsnRoutesRouteRouteDestinationDestinationDelete struct { - Context *middleware.Context - Handler DataCocsnRoutesRouteRouteDestinationDestinationDeleteHandler -} - -func (o *DataCocsnRoutesRouteRouteDestinationDestinationDelete) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataCocsnRoutesRouteRouteDestinationDestinationDeleteParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_delete_parameters.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_delete_parameters.go deleted file mode 100644 index 679e25746c0110d19e2994ecf40d91ff3f99e42a..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_delete_parameters.go +++ /dev/null @@ -1,72 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" -) - -// NewDataCocsnRoutesRouteRouteDestinationDestinationDeleteParams creates a new DataCocsnRoutesRouteRouteDestinationDestinationDeleteParams object -// no default values defined in spec. -func NewDataCocsnRoutesRouteRouteDestinationDestinationDeleteParams() DataCocsnRoutesRouteRouteDestinationDestinationDeleteParams { - - return DataCocsnRoutesRouteRouteDestinationDestinationDeleteParams{} -} - -// DataCocsnRoutesRouteRouteDestinationDestinationDeleteParams contains all the bound params for the data cocsn routes route route destination destination delete operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_routes_route_route_destination_destination_delete -type DataCocsnRoutesRouteRouteDestinationDestinationDeleteParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*Route destination. IP network - Required: true - In: path - */ - RouteDestination string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnRoutesRouteRouteDestinationDestinationDeleteParams() beforehand. -func (o *DataCocsnRoutesRouteRouteDestinationDestinationDeleteParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - rRouteDestination, rhkRouteDestination, _ := route.Params.GetOK("route-destination") - if err := o.bindRouteDestination(rRouteDestination, rhkRouteDestination, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindRouteDestination binds and validates parameter RouteDestination from path. -func (o *DataCocsnRoutesRouteRouteDestinationDestinationDeleteParams) bindRouteDestination(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.RouteDestination = raw - - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_delete_responses.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_delete_responses.go deleted file mode 100644 index 167d2c0637d545e1797df21f96685880152cd4e8..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_delete_responses.go +++ /dev/null @@ -1,36 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// DataCocsnRoutesRouteRouteDestinationDestinationDeleteNoContentCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationDestinationDeleteNoContent -const DataCocsnRoutesRouteRouteDestinationDestinationDeleteNoContentCode int = 204 - -/*DataCocsnRoutesRouteRouteDestinationDestinationDeleteNoContent No Content - -swagger:response dataCocsnRoutesRouteRouteDestinationDestinationDeleteNoContent -*/ -type DataCocsnRoutesRouteRouteDestinationDestinationDeleteNoContent struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationDestinationDeleteNoContent creates DataCocsnRoutesRouteRouteDestinationDestinationDeleteNoContent with default headers values -func NewDataCocsnRoutesRouteRouteDestinationDestinationDeleteNoContent() *DataCocsnRoutesRouteRouteDestinationDestinationDeleteNoContent { - - return &DataCocsnRoutesRouteRouteDestinationDestinationDeleteNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationDestinationDeleteNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_delete_urlbuilder.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_delete_urlbuilder.go deleted file mode 100644 index 88534e27375629fe388e1087903b62c91d1b4550..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_delete_urlbuilder.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" -) - -// DataCocsnRoutesRouteRouteDestinationDestinationDeleteURL generates an URL for the data cocsn routes route route destination destination delete operation -type DataCocsnRoutesRouteRouteDestinationDestinationDeleteURL struct { - RouteDestination string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnRoutesRouteRouteDestinationDestinationDeleteURL) WithBasePath(bp string) *DataCocsnRoutesRouteRouteDestinationDestinationDeleteURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnRoutesRouteRouteDestinationDestinationDeleteURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DataCocsnRoutesRouteRouteDestinationDestinationDeleteURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/cocsn:routes/route={route-destination}/destination" - - routeDestination := o.RouteDestination - if routeDestination != "" { - _path = strings.Replace(_path, "{route-destination}", routeDestination, -1) - } else { - return nil, errors.New("routeDestination is required on DataCocsnRoutesRouteRouteDestinationDestinationDeleteURL") - } - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnRoutesRouteRouteDestinationDestinationDeleteURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DataCocsnRoutesRouteRouteDestinationDestinationDeleteURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnRoutesRouteRouteDestinationDestinationDeleteURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnRoutesRouteRouteDestinationDestinationDeleteURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnRoutesRouteRouteDestinationDestinationDeleteURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DataCocsnRoutesRouteRouteDestinationDestinationDeleteURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_get.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_get.go deleted file mode 100644 index 5582bf5462781d4ef525f6fd970bedb3f87c2d44..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_get.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataCocsnRoutesRouteRouteDestinationDestinationGetHandlerFunc turns a function with the right signature into a data cocsn routes route route destination destination get handler -type DataCocsnRoutesRouteRouteDestinationDestinationGetHandlerFunc func(DataCocsnRoutesRouteRouteDestinationDestinationGetParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataCocsnRoutesRouteRouteDestinationDestinationGetHandlerFunc) Handle(params DataCocsnRoutesRouteRouteDestinationDestinationGetParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataCocsnRoutesRouteRouteDestinationDestinationGetHandler interface for that can handle valid data cocsn routes route route destination destination get params -type DataCocsnRoutesRouteRouteDestinationDestinationGetHandler interface { - Handle(DataCocsnRoutesRouteRouteDestinationDestinationGetParams, interface{}) middleware.Responder -} - -// NewDataCocsnRoutesRouteRouteDestinationDestinationGet creates a new http.Handler for the data cocsn routes route route destination destination get operation -func NewDataCocsnRoutesRouteRouteDestinationDestinationGet(ctx *middleware.Context, handler DataCocsnRoutesRouteRouteDestinationDestinationGetHandler) *DataCocsnRoutesRouteRouteDestinationDestinationGet { - return &DataCocsnRoutesRouteRouteDestinationDestinationGet{Context: ctx, Handler: handler} -} - -/*DataCocsnRoutesRouteRouteDestinationDestinationGet swagger:route GET /data/cocsn:routes/route={route-destination}/destination data get dataCocsnRoutesRouteRouteDestinationDestinationGet - -Route destination. IP network - -Route destination. IP network - -*/ -type DataCocsnRoutesRouteRouteDestinationDestinationGet struct { - Context *middleware.Context - Handler DataCocsnRoutesRouteRouteDestinationDestinationGetHandler -} - -func (o *DataCocsnRoutesRouteRouteDestinationDestinationGet) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataCocsnRoutesRouteRouteDestinationDestinationGetParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_get_parameters.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_get_parameters.go deleted file mode 100644 index dfb0de0ac1a8efc501b599ad39108b8ee6c273e8..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_get_parameters.go +++ /dev/null @@ -1,260 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// NewDataCocsnRoutesRouteRouteDestinationDestinationGetParams creates a new DataCocsnRoutesRouteRouteDestinationDestinationGetParams object -// with the default values initialized. -func NewDataCocsnRoutesRouteRouteDestinationDestinationGetParams() DataCocsnRoutesRouteRouteDestinationDestinationGetParams { - - var ( - // initialize parameters with default values - - contentDefault = string("config") - - withDefaultsDefault = string("report-all") - ) - - return DataCocsnRoutesRouteRouteDestinationDestinationGetParams{ - Content: &contentDefault, - - WithDefaults: &withDefaultsDefault, - } -} - -// DataCocsnRoutesRouteRouteDestinationDestinationGetParams contains all the bound params for the data cocsn routes route route destination destination get operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_routes_route_route_destination_destination_get -type DataCocsnRoutesRouteRouteDestinationDestinationGetParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*controlling descendant nodes in response - In: query - Default: "config" - */ - Content *string - /*limit the depth of nodes in response - In: query - */ - Depth *uint16 - /*optionally identify specific data nodes in response - In: query - */ - Fields *string - /*xpath expression to filter data nodes in response - In: query - */ - Filter *string - /*Route destination. IP network - Required: true - In: path - */ - RouteDestination string - /*controlling default values in response - In: query - Default: "report-all" - */ - WithDefaults *string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnRoutesRouteRouteDestinationDestinationGetParams() beforehand. -func (o *DataCocsnRoutesRouteRouteDestinationDestinationGetParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - qs := runtime.Values(r.URL.Query()) - - qContent, qhkContent, _ := qs.GetOK("content") - if err := o.bindContent(qContent, qhkContent, route.Formats); err != nil { - res = append(res, err) - } - - qDepth, qhkDepth, _ := qs.GetOK("depth") - if err := o.bindDepth(qDepth, qhkDepth, route.Formats); err != nil { - res = append(res, err) - } - - qFields, qhkFields, _ := qs.GetOK("fields") - if err := o.bindFields(qFields, qhkFields, route.Formats); err != nil { - res = append(res, err) - } - - qFilter, qhkFilter, _ := qs.GetOK("filter") - if err := o.bindFilter(qFilter, qhkFilter, route.Formats); err != nil { - res = append(res, err) - } - - rRouteDestination, rhkRouteDestination, _ := route.Params.GetOK("route-destination") - if err := o.bindRouteDestination(rRouteDestination, rhkRouteDestination, route.Formats); err != nil { - res = append(res, err) - } - - qWithDefaults, qhkWithDefaults, _ := qs.GetOK("with-defaults") - if err := o.bindWithDefaults(qWithDefaults, qhkWithDefaults, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindContent binds and validates parameter Content from query. -func (o *DataCocsnRoutesRouteRouteDestinationDestinationGetParams) bindContent(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - // Default values have been previously initialized by NewDataCocsnRoutesRouteRouteDestinationDestinationGetParams() - return nil - } - - o.Content = &raw - - if err := o.validateContent(formats); err != nil { - return err - } - - return nil -} - -// validateContent carries on validations for parameter Content -func (o *DataCocsnRoutesRouteRouteDestinationDestinationGetParams) validateContent(formats strfmt.Registry) error { - - if err := validate.EnumCase("content", "query", *o.Content, []interface{}{"config", "nonconfig", "all"}, true); err != nil { - return err - } - - return nil -} - -// bindDepth binds and validates parameter Depth from query. -func (o *DataCocsnRoutesRouteRouteDestinationDestinationGetParams) bindDepth(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - value, err := swag.ConvertUint16(raw) - if err != nil { - return errors.InvalidType("depth", "query", "uint16", raw) - } - o.Depth = &value - - return nil -} - -// bindFields binds and validates parameter Fields from query. -func (o *DataCocsnRoutesRouteRouteDestinationDestinationGetParams) bindFields(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - o.Fields = &raw - - return nil -} - -// bindFilter binds and validates parameter Filter from query. -func (o *DataCocsnRoutesRouteRouteDestinationDestinationGetParams) bindFilter(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - o.Filter = &raw - - return nil -} - -// bindRouteDestination binds and validates parameter RouteDestination from path. -func (o *DataCocsnRoutesRouteRouteDestinationDestinationGetParams) bindRouteDestination(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.RouteDestination = raw - - return nil -} - -// bindWithDefaults binds and validates parameter WithDefaults from query. -func (o *DataCocsnRoutesRouteRouteDestinationDestinationGetParams) bindWithDefaults(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - // Default values have been previously initialized by NewDataCocsnRoutesRouteRouteDestinationDestinationGetParams() - return nil - } - - o.WithDefaults = &raw - - if err := o.validateWithDefaults(formats); err != nil { - return err - } - - return nil -} - -// validateWithDefaults carries on validations for parameter WithDefaults -func (o *DataCocsnRoutesRouteRouteDestinationDestinationGetParams) validateWithDefaults(formats strfmt.Registry) error { - - if err := validate.EnumCase("with-defaults", "query", *o.WithDefaults, []interface{}{"report-all", "trim", "explicit", "report-all-tagged"}, true); err != nil { - return err - } - - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_get_responses.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_get_responses.go deleted file mode 100644 index 8b77bd477d8119815d19f2c4855f2d677ee1ab33..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_get_responses.go +++ /dev/null @@ -1,202 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" - - "code.fbi.h-da.de/cocsn/cocsn-api/api/models" -) - -// DataCocsnRoutesRouteRouteDestinationDestinationGetOKCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationDestinationGetOK -const DataCocsnRoutesRouteRouteDestinationDestinationGetOKCode int = 200 - -/*DataCocsnRoutesRouteRouteDestinationDestinationGetOK Route destination. IP network - -swagger:response dataCocsnRoutesRouteRouteDestinationDestinationGetOK -*/ -type DataCocsnRoutesRouteRouteDestinationDestinationGetOK struct { - - /* - In: Body - */ - Payload *models.DataCocsnRoutesRouteRouteDestinationDestination `json:"body,omitempty"` -} - -// NewDataCocsnRoutesRouteRouteDestinationDestinationGetOK creates DataCocsnRoutesRouteRouteDestinationDestinationGetOK with default headers values -func NewDataCocsnRoutesRouteRouteDestinationDestinationGetOK() *DataCocsnRoutesRouteRouteDestinationDestinationGetOK { - - return &DataCocsnRoutesRouteRouteDestinationDestinationGetOK{} -} - -// WithPayload adds the payload to the data cocsn routes route route destination destination get o k response -func (o *DataCocsnRoutesRouteRouteDestinationDestinationGetOK) WithPayload(payload *models.DataCocsnRoutesRouteRouteDestinationDestination) *DataCocsnRoutesRouteRouteDestinationDestinationGetOK { - o.Payload = payload - return o -} - -// SetPayload sets the payload to the data cocsn routes route route destination destination get o k response -func (o *DataCocsnRoutesRouteRouteDestinationDestinationGetOK) SetPayload(payload *models.DataCocsnRoutesRouteRouteDestinationDestination) { - o.Payload = payload -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationDestinationGetOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.WriteHeader(200) - if o.Payload != nil { - payload := o.Payload - if err := producer.Produce(rw, payload); err != nil { - panic(err) // let the recovery middleware deal with this - } - } -} - -// DataCocsnRoutesRouteRouteDestinationDestinationGetNoContentCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationDestinationGetNoContent -const DataCocsnRoutesRouteRouteDestinationDestinationGetNoContentCode int = 204 - -/*DataCocsnRoutesRouteRouteDestinationDestinationGetNoContent No Content - -swagger:response dataCocsnRoutesRouteRouteDestinationDestinationGetNoContent -*/ -type DataCocsnRoutesRouteRouteDestinationDestinationGetNoContent struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationDestinationGetNoContent creates DataCocsnRoutesRouteRouteDestinationDestinationGetNoContent with default headers values -func NewDataCocsnRoutesRouteRouteDestinationDestinationGetNoContent() *DataCocsnRoutesRouteRouteDestinationDestinationGetNoContent { - - return &DataCocsnRoutesRouteRouteDestinationDestinationGetNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationDestinationGetNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DataCocsnRoutesRouteRouteDestinationDestinationGetBadRequestCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationDestinationGetBadRequest -const DataCocsnRoutesRouteRouteDestinationDestinationGetBadRequestCode int = 400 - -/*DataCocsnRoutesRouteRouteDestinationDestinationGetBadRequest Bad Request - -swagger:response dataCocsnRoutesRouteRouteDestinationDestinationGetBadRequest -*/ -type DataCocsnRoutesRouteRouteDestinationDestinationGetBadRequest struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationDestinationGetBadRequest creates DataCocsnRoutesRouteRouteDestinationDestinationGetBadRequest with default headers values -func NewDataCocsnRoutesRouteRouteDestinationDestinationGetBadRequest() *DataCocsnRoutesRouteRouteDestinationDestinationGetBadRequest { - - return &DataCocsnRoutesRouteRouteDestinationDestinationGetBadRequest{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationDestinationGetBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// DataCocsnRoutesRouteRouteDestinationDestinationGetUnauthorizedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationDestinationGetUnauthorized -const DataCocsnRoutesRouteRouteDestinationDestinationGetUnauthorizedCode int = 401 - -/*DataCocsnRoutesRouteRouteDestinationDestinationGetUnauthorized Unauthorized - -swagger:response dataCocsnRoutesRouteRouteDestinationDestinationGetUnauthorized -*/ -type DataCocsnRoutesRouteRouteDestinationDestinationGetUnauthorized struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationDestinationGetUnauthorized creates DataCocsnRoutesRouteRouteDestinationDestinationGetUnauthorized with default headers values -func NewDataCocsnRoutesRouteRouteDestinationDestinationGetUnauthorized() *DataCocsnRoutesRouteRouteDestinationDestinationGetUnauthorized { - - return &DataCocsnRoutesRouteRouteDestinationDestinationGetUnauthorized{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationDestinationGetUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(401) -} - -// DataCocsnRoutesRouteRouteDestinationDestinationGetNotFoundCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationDestinationGetNotFound -const DataCocsnRoutesRouteRouteDestinationDestinationGetNotFoundCode int = 404 - -/*DataCocsnRoutesRouteRouteDestinationDestinationGetNotFound Not Found - -swagger:response dataCocsnRoutesRouteRouteDestinationDestinationGetNotFound -*/ -type DataCocsnRoutesRouteRouteDestinationDestinationGetNotFound struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationDestinationGetNotFound creates DataCocsnRoutesRouteRouteDestinationDestinationGetNotFound with default headers values -func NewDataCocsnRoutesRouteRouteDestinationDestinationGetNotFound() *DataCocsnRoutesRouteRouteDestinationDestinationGetNotFound { - - return &DataCocsnRoutesRouteRouteDestinationDestinationGetNotFound{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationDestinationGetNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(404) -} - -// DataCocsnRoutesRouteRouteDestinationDestinationGetMethodNotAllowedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationDestinationGetMethodNotAllowed -const DataCocsnRoutesRouteRouteDestinationDestinationGetMethodNotAllowedCode int = 405 - -/*DataCocsnRoutesRouteRouteDestinationDestinationGetMethodNotAllowed Method Not Allowed - -swagger:response dataCocsnRoutesRouteRouteDestinationDestinationGetMethodNotAllowed -*/ -type DataCocsnRoutesRouteRouteDestinationDestinationGetMethodNotAllowed struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationDestinationGetMethodNotAllowed creates DataCocsnRoutesRouteRouteDestinationDestinationGetMethodNotAllowed with default headers values -func NewDataCocsnRoutesRouteRouteDestinationDestinationGetMethodNotAllowed() *DataCocsnRoutesRouteRouteDestinationDestinationGetMethodNotAllowed { - - return &DataCocsnRoutesRouteRouteDestinationDestinationGetMethodNotAllowed{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationDestinationGetMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(405) -} - -// DataCocsnRoutesRouteRouteDestinationDestinationGetConflictCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationDestinationGetConflict -const DataCocsnRoutesRouteRouteDestinationDestinationGetConflictCode int = 409 - -/*DataCocsnRoutesRouteRouteDestinationDestinationGetConflict Conflict - -swagger:response dataCocsnRoutesRouteRouteDestinationDestinationGetConflict -*/ -type DataCocsnRoutesRouteRouteDestinationDestinationGetConflict struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationDestinationGetConflict creates DataCocsnRoutesRouteRouteDestinationDestinationGetConflict with default headers values -func NewDataCocsnRoutesRouteRouteDestinationDestinationGetConflict() *DataCocsnRoutesRouteRouteDestinationDestinationGetConflict { - - return &DataCocsnRoutesRouteRouteDestinationDestinationGetConflict{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationDestinationGetConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_get_urlbuilder.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_get_urlbuilder.go deleted file mode 100644 index bfa9ed92c0770160541aecc85de8fcdfbd2d15d4..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_get_urlbuilder.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" - - "github.com/go-openapi/swag" -) - -// DataCocsnRoutesRouteRouteDestinationDestinationGetURL generates an URL for the data cocsn routes route route destination destination get operation -type DataCocsnRoutesRouteRouteDestinationDestinationGetURL struct { - RouteDestination string - - Content *string - Depth *uint16 - Fields *string - Filter *string - WithDefaults *string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnRoutesRouteRouteDestinationDestinationGetURL) WithBasePath(bp string) *DataCocsnRoutesRouteRouteDestinationDestinationGetURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnRoutesRouteRouteDestinationDestinationGetURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DataCocsnRoutesRouteRouteDestinationDestinationGetURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/cocsn:routes/route={route-destination}/destination" - - routeDestination := o.RouteDestination - if routeDestination != "" { - _path = strings.Replace(_path, "{route-destination}", routeDestination, -1) - } else { - return nil, errors.New("routeDestination is required on DataCocsnRoutesRouteRouteDestinationDestinationGetURL") - } - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - qs := make(url.Values) - - var contentQ string - if o.Content != nil { - contentQ = *o.Content - } - if contentQ != "" { - qs.Set("content", contentQ) - } - - var depthQ string - if o.Depth != nil { - depthQ = swag.FormatUint16(*o.Depth) - } - if depthQ != "" { - qs.Set("depth", depthQ) - } - - var fieldsQ string - if o.Fields != nil { - fieldsQ = *o.Fields - } - if fieldsQ != "" { - qs.Set("fields", fieldsQ) - } - - var filterQ string - if o.Filter != nil { - filterQ = *o.Filter - } - if filterQ != "" { - qs.Set("filter", filterQ) - } - - var withDefaultsQ string - if o.WithDefaults != nil { - withDefaultsQ = *o.WithDefaults - } - if withDefaultsQ != "" { - qs.Set("with-defaults", withDefaultsQ) - } - - _result.RawQuery = qs.Encode() - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnRoutesRouteRouteDestinationDestinationGetURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DataCocsnRoutesRouteRouteDestinationDestinationGetURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnRoutesRouteRouteDestinationDestinationGetURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnRoutesRouteRouteDestinationDestinationGetURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnRoutesRouteRouteDestinationDestinationGetURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DataCocsnRoutesRouteRouteDestinationDestinationGetURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_patch.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_patch.go deleted file mode 100644 index 5789ae9ea7d16cd9e28996a5506d94e21cc319ad..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_patch.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataCocsnRoutesRouteRouteDestinationDestinationPatchHandlerFunc turns a function with the right signature into a data cocsn routes route route destination destination patch handler -type DataCocsnRoutesRouteRouteDestinationDestinationPatchHandlerFunc func(DataCocsnRoutesRouteRouteDestinationDestinationPatchParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataCocsnRoutesRouteRouteDestinationDestinationPatchHandlerFunc) Handle(params DataCocsnRoutesRouteRouteDestinationDestinationPatchParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataCocsnRoutesRouteRouteDestinationDestinationPatchHandler interface for that can handle valid data cocsn routes route route destination destination patch params -type DataCocsnRoutesRouteRouteDestinationDestinationPatchHandler interface { - Handle(DataCocsnRoutesRouteRouteDestinationDestinationPatchParams, interface{}) middleware.Responder -} - -// NewDataCocsnRoutesRouteRouteDestinationDestinationPatch creates a new http.Handler for the data cocsn routes route route destination destination patch operation -func NewDataCocsnRoutesRouteRouteDestinationDestinationPatch(ctx *middleware.Context, handler DataCocsnRoutesRouteRouteDestinationDestinationPatchHandler) *DataCocsnRoutesRouteRouteDestinationDestinationPatch { - return &DataCocsnRoutesRouteRouteDestinationDestinationPatch{Context: ctx, Handler: handler} -} - -/*DataCocsnRoutesRouteRouteDestinationDestinationPatch swagger:route PATCH /data/cocsn:routes/route={route-destination}/destination data patch dataCocsnRoutesRouteRouteDestinationDestinationPatch - -Route destination. IP network - -Route destination. IP network - -*/ -type DataCocsnRoutesRouteRouteDestinationDestinationPatch struct { - Context *middleware.Context - Handler DataCocsnRoutesRouteRouteDestinationDestinationPatchHandler -} - -func (o *DataCocsnRoutesRouteRouteDestinationDestinationPatch) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataCocsnRoutesRouteRouteDestinationDestinationPatchParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_patch_parameters.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_patch_parameters.go deleted file mode 100644 index 9953707e08576d7cd5b0a6431c3fc04167af544a..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_patch_parameters.go +++ /dev/null @@ -1,103 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "io" - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - - "code.fbi.h-da.de/cocsn/cocsn-api/api/models" -) - -// NewDataCocsnRoutesRouteRouteDestinationDestinationPatchParams creates a new DataCocsnRoutesRouteRouteDestinationDestinationPatchParams object -// no default values defined in spec. -func NewDataCocsnRoutesRouteRouteDestinationDestinationPatchParams() DataCocsnRoutesRouteRouteDestinationDestinationPatchParams { - - return DataCocsnRoutesRouteRouteDestinationDestinationPatchParams{} -} - -// DataCocsnRoutesRouteRouteDestinationDestinationPatchParams contains all the bound params for the data cocsn routes route route destination destination patch operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_routes_route_route_destination_destination_patch -type DataCocsnRoutesRouteRouteDestinationDestinationPatchParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*Route destination. IP network - Required: true - In: body - */ - Destination *models.DataCocsnRoutesRouteRouteDestinationDestination - /*Route destination. IP network - Required: true - In: path - */ - RouteDestination string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnRoutesRouteRouteDestinationDestinationPatchParams() beforehand. -func (o *DataCocsnRoutesRouteRouteDestinationDestinationPatchParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if runtime.HasBody(r) { - defer r.Body.Close() - var body models.DataCocsnRoutesRouteRouteDestinationDestination - if err := route.Consumer.Consume(r.Body, &body); err != nil { - if err == io.EOF { - res = append(res, errors.Required("destination", "body", "")) - } else { - res = append(res, errors.NewParseError("destination", "body", "", err)) - } - } else { - // validate body object - if err := body.Validate(route.Formats); err != nil { - res = append(res, err) - } - - if len(res) == 0 { - o.Destination = &body - } - } - } else { - res = append(res, errors.Required("destination", "body", "")) - } - rRouteDestination, rhkRouteDestination, _ := route.Params.GetOK("route-destination") - if err := o.bindRouteDestination(rRouteDestination, rhkRouteDestination, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindRouteDestination binds and validates parameter RouteDestination from path. -func (o *DataCocsnRoutesRouteRouteDestinationDestinationPatchParams) bindRouteDestination(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.RouteDestination = raw - - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_patch_responses.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_patch_responses.go deleted file mode 100644 index b923bb953803068f55ff0a6ed614b003bf8d1460..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_patch_responses.go +++ /dev/null @@ -1,156 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// DataCocsnRoutesRouteRouteDestinationDestinationPatchNoContentCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationDestinationPatchNoContent -const DataCocsnRoutesRouteRouteDestinationDestinationPatchNoContentCode int = 204 - -/*DataCocsnRoutesRouteRouteDestinationDestinationPatchNoContent leaf destination updated - -swagger:response dataCocsnRoutesRouteRouteDestinationDestinationPatchNoContent -*/ -type DataCocsnRoutesRouteRouteDestinationDestinationPatchNoContent struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationDestinationPatchNoContent creates DataCocsnRoutesRouteRouteDestinationDestinationPatchNoContent with default headers values -func NewDataCocsnRoutesRouteRouteDestinationDestinationPatchNoContent() *DataCocsnRoutesRouteRouteDestinationDestinationPatchNoContent { - - return &DataCocsnRoutesRouteRouteDestinationDestinationPatchNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationDestinationPatchNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DataCocsnRoutesRouteRouteDestinationDestinationPatchBadRequestCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationDestinationPatchBadRequest -const DataCocsnRoutesRouteRouteDestinationDestinationPatchBadRequestCode int = 400 - -/*DataCocsnRoutesRouteRouteDestinationDestinationPatchBadRequest Bad Request - -swagger:response dataCocsnRoutesRouteRouteDestinationDestinationPatchBadRequest -*/ -type DataCocsnRoutesRouteRouteDestinationDestinationPatchBadRequest struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationDestinationPatchBadRequest creates DataCocsnRoutesRouteRouteDestinationDestinationPatchBadRequest with default headers values -func NewDataCocsnRoutesRouteRouteDestinationDestinationPatchBadRequest() *DataCocsnRoutesRouteRouteDestinationDestinationPatchBadRequest { - - return &DataCocsnRoutesRouteRouteDestinationDestinationPatchBadRequest{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationDestinationPatchBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// DataCocsnRoutesRouteRouteDestinationDestinationPatchUnauthorizedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationDestinationPatchUnauthorized -const DataCocsnRoutesRouteRouteDestinationDestinationPatchUnauthorizedCode int = 401 - -/*DataCocsnRoutesRouteRouteDestinationDestinationPatchUnauthorized Unauthorized - -swagger:response dataCocsnRoutesRouteRouteDestinationDestinationPatchUnauthorized -*/ -type DataCocsnRoutesRouteRouteDestinationDestinationPatchUnauthorized struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationDestinationPatchUnauthorized creates DataCocsnRoutesRouteRouteDestinationDestinationPatchUnauthorized with default headers values -func NewDataCocsnRoutesRouteRouteDestinationDestinationPatchUnauthorized() *DataCocsnRoutesRouteRouteDestinationDestinationPatchUnauthorized { - - return &DataCocsnRoutesRouteRouteDestinationDestinationPatchUnauthorized{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationDestinationPatchUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(401) -} - -// DataCocsnRoutesRouteRouteDestinationDestinationPatchNotFoundCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationDestinationPatchNotFound -const DataCocsnRoutesRouteRouteDestinationDestinationPatchNotFoundCode int = 404 - -/*DataCocsnRoutesRouteRouteDestinationDestinationPatchNotFound Not Found - -swagger:response dataCocsnRoutesRouteRouteDestinationDestinationPatchNotFound -*/ -type DataCocsnRoutesRouteRouteDestinationDestinationPatchNotFound struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationDestinationPatchNotFound creates DataCocsnRoutesRouteRouteDestinationDestinationPatchNotFound with default headers values -func NewDataCocsnRoutesRouteRouteDestinationDestinationPatchNotFound() *DataCocsnRoutesRouteRouteDestinationDestinationPatchNotFound { - - return &DataCocsnRoutesRouteRouteDestinationDestinationPatchNotFound{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationDestinationPatchNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(404) -} - -// DataCocsnRoutesRouteRouteDestinationDestinationPatchMethodNotAllowedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationDestinationPatchMethodNotAllowed -const DataCocsnRoutesRouteRouteDestinationDestinationPatchMethodNotAllowedCode int = 405 - -/*DataCocsnRoutesRouteRouteDestinationDestinationPatchMethodNotAllowed Method Not Allowed - -swagger:response dataCocsnRoutesRouteRouteDestinationDestinationPatchMethodNotAllowed -*/ -type DataCocsnRoutesRouteRouteDestinationDestinationPatchMethodNotAllowed struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationDestinationPatchMethodNotAllowed creates DataCocsnRoutesRouteRouteDestinationDestinationPatchMethodNotAllowed with default headers values -func NewDataCocsnRoutesRouteRouteDestinationDestinationPatchMethodNotAllowed() *DataCocsnRoutesRouteRouteDestinationDestinationPatchMethodNotAllowed { - - return &DataCocsnRoutesRouteRouteDestinationDestinationPatchMethodNotAllowed{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationDestinationPatchMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(405) -} - -// DataCocsnRoutesRouteRouteDestinationDestinationPatchConflictCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationDestinationPatchConflict -const DataCocsnRoutesRouteRouteDestinationDestinationPatchConflictCode int = 409 - -/*DataCocsnRoutesRouteRouteDestinationDestinationPatchConflict Conflict - -swagger:response dataCocsnRoutesRouteRouteDestinationDestinationPatchConflict -*/ -type DataCocsnRoutesRouteRouteDestinationDestinationPatchConflict struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationDestinationPatchConflict creates DataCocsnRoutesRouteRouteDestinationDestinationPatchConflict with default headers values -func NewDataCocsnRoutesRouteRouteDestinationDestinationPatchConflict() *DataCocsnRoutesRouteRouteDestinationDestinationPatchConflict { - - return &DataCocsnRoutesRouteRouteDestinationDestinationPatchConflict{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationDestinationPatchConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_patch_urlbuilder.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_patch_urlbuilder.go deleted file mode 100644 index 0a348f2ad9e344883fdfb0de19992ee95f234dbb..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_patch_urlbuilder.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" -) - -// DataCocsnRoutesRouteRouteDestinationDestinationPatchURL generates an URL for the data cocsn routes route route destination destination patch operation -type DataCocsnRoutesRouteRouteDestinationDestinationPatchURL struct { - RouteDestination string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnRoutesRouteRouteDestinationDestinationPatchURL) WithBasePath(bp string) *DataCocsnRoutesRouteRouteDestinationDestinationPatchURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnRoutesRouteRouteDestinationDestinationPatchURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DataCocsnRoutesRouteRouteDestinationDestinationPatchURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/cocsn:routes/route={route-destination}/destination" - - routeDestination := o.RouteDestination - if routeDestination != "" { - _path = strings.Replace(_path, "{route-destination}", routeDestination, -1) - } else { - return nil, errors.New("routeDestination is required on DataCocsnRoutesRouteRouteDestinationDestinationPatchURL") - } - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnRoutesRouteRouteDestinationDestinationPatchURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DataCocsnRoutesRouteRouteDestinationDestinationPatchURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnRoutesRouteRouteDestinationDestinationPatchURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnRoutesRouteRouteDestinationDestinationPatchURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnRoutesRouteRouteDestinationDestinationPatchURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DataCocsnRoutesRouteRouteDestinationDestinationPatchURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_put.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_put.go deleted file mode 100644 index 3adb78688a0e241e7591c3f2f5590c27c5f375bf..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_put.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataCocsnRoutesRouteRouteDestinationDestinationPutHandlerFunc turns a function with the right signature into a data cocsn routes route route destination destination put handler -type DataCocsnRoutesRouteRouteDestinationDestinationPutHandlerFunc func(DataCocsnRoutesRouteRouteDestinationDestinationPutParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataCocsnRoutesRouteRouteDestinationDestinationPutHandlerFunc) Handle(params DataCocsnRoutesRouteRouteDestinationDestinationPutParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataCocsnRoutesRouteRouteDestinationDestinationPutHandler interface for that can handle valid data cocsn routes route route destination destination put params -type DataCocsnRoutesRouteRouteDestinationDestinationPutHandler interface { - Handle(DataCocsnRoutesRouteRouteDestinationDestinationPutParams, interface{}) middleware.Responder -} - -// NewDataCocsnRoutesRouteRouteDestinationDestinationPut creates a new http.Handler for the data cocsn routes route route destination destination put operation -func NewDataCocsnRoutesRouteRouteDestinationDestinationPut(ctx *middleware.Context, handler DataCocsnRoutesRouteRouteDestinationDestinationPutHandler) *DataCocsnRoutesRouteRouteDestinationDestinationPut { - return &DataCocsnRoutesRouteRouteDestinationDestinationPut{Context: ctx, Handler: handler} -} - -/*DataCocsnRoutesRouteRouteDestinationDestinationPut swagger:route PUT /data/cocsn:routes/route={route-destination}/destination data put dataCocsnRoutesRouteRouteDestinationDestinationPut - -Route destination. IP network - -Route destination. IP network - -*/ -type DataCocsnRoutesRouteRouteDestinationDestinationPut struct { - Context *middleware.Context - Handler DataCocsnRoutesRouteRouteDestinationDestinationPutHandler -} - -func (o *DataCocsnRoutesRouteRouteDestinationDestinationPut) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataCocsnRoutesRouteRouteDestinationDestinationPutParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_put_parameters.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_put_parameters.go deleted file mode 100644 index 67abe9068a2a51ec7e3dfa2b6476d9a6bbe90fd8..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_put_parameters.go +++ /dev/null @@ -1,103 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "io" - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - - "code.fbi.h-da.de/cocsn/cocsn-api/api/models" -) - -// NewDataCocsnRoutesRouteRouteDestinationDestinationPutParams creates a new DataCocsnRoutesRouteRouteDestinationDestinationPutParams object -// no default values defined in spec. -func NewDataCocsnRoutesRouteRouteDestinationDestinationPutParams() DataCocsnRoutesRouteRouteDestinationDestinationPutParams { - - return DataCocsnRoutesRouteRouteDestinationDestinationPutParams{} -} - -// DataCocsnRoutesRouteRouteDestinationDestinationPutParams contains all the bound params for the data cocsn routes route route destination destination put operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_routes_route_route_destination_destination_put -type DataCocsnRoutesRouteRouteDestinationDestinationPutParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*Route destination. IP network - Required: true - In: body - */ - Destination *models.DataCocsnRoutesRouteRouteDestinationDestination - /*Route destination. IP network - Required: true - In: path - */ - RouteDestination string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnRoutesRouteRouteDestinationDestinationPutParams() beforehand. -func (o *DataCocsnRoutesRouteRouteDestinationDestinationPutParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if runtime.HasBody(r) { - defer r.Body.Close() - var body models.DataCocsnRoutesRouteRouteDestinationDestination - if err := route.Consumer.Consume(r.Body, &body); err != nil { - if err == io.EOF { - res = append(res, errors.Required("destination", "body", "")) - } else { - res = append(res, errors.NewParseError("destination", "body", "", err)) - } - } else { - // validate body object - if err := body.Validate(route.Formats); err != nil { - res = append(res, err) - } - - if len(res) == 0 { - o.Destination = &body - } - } - } else { - res = append(res, errors.Required("destination", "body", "")) - } - rRouteDestination, rhkRouteDestination, _ := route.Params.GetOK("route-destination") - if err := o.bindRouteDestination(rRouteDestination, rhkRouteDestination, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindRouteDestination binds and validates parameter RouteDestination from path. -func (o *DataCocsnRoutesRouteRouteDestinationDestinationPutParams) bindRouteDestination(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.RouteDestination = raw - - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_put_responses.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_put_responses.go deleted file mode 100644 index bfe9de053765d2db83a46e5b4c79af275952641f..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_put_responses.go +++ /dev/null @@ -1,180 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// DataCocsnRoutesRouteRouteDestinationDestinationPutCreatedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationDestinationPutCreated -const DataCocsnRoutesRouteRouteDestinationDestinationPutCreatedCode int = 201 - -/*DataCocsnRoutesRouteRouteDestinationDestinationPutCreated leaf destination created or replaced - -swagger:response dataCocsnRoutesRouteRouteDestinationDestinationPutCreated -*/ -type DataCocsnRoutesRouteRouteDestinationDestinationPutCreated struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationDestinationPutCreated creates DataCocsnRoutesRouteRouteDestinationDestinationPutCreated with default headers values -func NewDataCocsnRoutesRouteRouteDestinationDestinationPutCreated() *DataCocsnRoutesRouteRouteDestinationDestinationPutCreated { - - return &DataCocsnRoutesRouteRouteDestinationDestinationPutCreated{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationDestinationPutCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(201) -} - -// DataCocsnRoutesRouteRouteDestinationDestinationPutNoContentCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationDestinationPutNoContent -const DataCocsnRoutesRouteRouteDestinationDestinationPutNoContentCode int = 204 - -/*DataCocsnRoutesRouteRouteDestinationDestinationPutNoContent No Content - -swagger:response dataCocsnRoutesRouteRouteDestinationDestinationPutNoContent -*/ -type DataCocsnRoutesRouteRouteDestinationDestinationPutNoContent struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationDestinationPutNoContent creates DataCocsnRoutesRouteRouteDestinationDestinationPutNoContent with default headers values -func NewDataCocsnRoutesRouteRouteDestinationDestinationPutNoContent() *DataCocsnRoutesRouteRouteDestinationDestinationPutNoContent { - - return &DataCocsnRoutesRouteRouteDestinationDestinationPutNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationDestinationPutNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DataCocsnRoutesRouteRouteDestinationDestinationPutBadRequestCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationDestinationPutBadRequest -const DataCocsnRoutesRouteRouteDestinationDestinationPutBadRequestCode int = 400 - -/*DataCocsnRoutesRouteRouteDestinationDestinationPutBadRequest Bad Request - -swagger:response dataCocsnRoutesRouteRouteDestinationDestinationPutBadRequest -*/ -type DataCocsnRoutesRouteRouteDestinationDestinationPutBadRequest struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationDestinationPutBadRequest creates DataCocsnRoutesRouteRouteDestinationDestinationPutBadRequest with default headers values -func NewDataCocsnRoutesRouteRouteDestinationDestinationPutBadRequest() *DataCocsnRoutesRouteRouteDestinationDestinationPutBadRequest { - - return &DataCocsnRoutesRouteRouteDestinationDestinationPutBadRequest{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationDestinationPutBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// DataCocsnRoutesRouteRouteDestinationDestinationPutUnauthorizedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationDestinationPutUnauthorized -const DataCocsnRoutesRouteRouteDestinationDestinationPutUnauthorizedCode int = 401 - -/*DataCocsnRoutesRouteRouteDestinationDestinationPutUnauthorized Unauthorized - -swagger:response dataCocsnRoutesRouteRouteDestinationDestinationPutUnauthorized -*/ -type DataCocsnRoutesRouteRouteDestinationDestinationPutUnauthorized struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationDestinationPutUnauthorized creates DataCocsnRoutesRouteRouteDestinationDestinationPutUnauthorized with default headers values -func NewDataCocsnRoutesRouteRouteDestinationDestinationPutUnauthorized() *DataCocsnRoutesRouteRouteDestinationDestinationPutUnauthorized { - - return &DataCocsnRoutesRouteRouteDestinationDestinationPutUnauthorized{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationDestinationPutUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(401) -} - -// DataCocsnRoutesRouteRouteDestinationDestinationPutNotFoundCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationDestinationPutNotFound -const DataCocsnRoutesRouteRouteDestinationDestinationPutNotFoundCode int = 404 - -/*DataCocsnRoutesRouteRouteDestinationDestinationPutNotFound Not Found - -swagger:response dataCocsnRoutesRouteRouteDestinationDestinationPutNotFound -*/ -type DataCocsnRoutesRouteRouteDestinationDestinationPutNotFound struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationDestinationPutNotFound creates DataCocsnRoutesRouteRouteDestinationDestinationPutNotFound with default headers values -func NewDataCocsnRoutesRouteRouteDestinationDestinationPutNotFound() *DataCocsnRoutesRouteRouteDestinationDestinationPutNotFound { - - return &DataCocsnRoutesRouteRouteDestinationDestinationPutNotFound{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationDestinationPutNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(404) -} - -// DataCocsnRoutesRouteRouteDestinationDestinationPutMethodNotAllowedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationDestinationPutMethodNotAllowed -const DataCocsnRoutesRouteRouteDestinationDestinationPutMethodNotAllowedCode int = 405 - -/*DataCocsnRoutesRouteRouteDestinationDestinationPutMethodNotAllowed Method Not Allowed - -swagger:response dataCocsnRoutesRouteRouteDestinationDestinationPutMethodNotAllowed -*/ -type DataCocsnRoutesRouteRouteDestinationDestinationPutMethodNotAllowed struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationDestinationPutMethodNotAllowed creates DataCocsnRoutesRouteRouteDestinationDestinationPutMethodNotAllowed with default headers values -func NewDataCocsnRoutesRouteRouteDestinationDestinationPutMethodNotAllowed() *DataCocsnRoutesRouteRouteDestinationDestinationPutMethodNotAllowed { - - return &DataCocsnRoutesRouteRouteDestinationDestinationPutMethodNotAllowed{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationDestinationPutMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(405) -} - -// DataCocsnRoutesRouteRouteDestinationDestinationPutConflictCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationDestinationPutConflict -const DataCocsnRoutesRouteRouteDestinationDestinationPutConflictCode int = 409 - -/*DataCocsnRoutesRouteRouteDestinationDestinationPutConflict Conflict - -swagger:response dataCocsnRoutesRouteRouteDestinationDestinationPutConflict -*/ -type DataCocsnRoutesRouteRouteDestinationDestinationPutConflict struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationDestinationPutConflict creates DataCocsnRoutesRouteRouteDestinationDestinationPutConflict with default headers values -func NewDataCocsnRoutesRouteRouteDestinationDestinationPutConflict() *DataCocsnRoutesRouteRouteDestinationDestinationPutConflict { - - return &DataCocsnRoutesRouteRouteDestinationDestinationPutConflict{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationDestinationPutConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_put_urlbuilder.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_put_urlbuilder.go deleted file mode 100644 index 3d4adf9d3c926b579b66761bedd6266145b52b8c..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_put_urlbuilder.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" -) - -// DataCocsnRoutesRouteRouteDestinationDestinationPutURL generates an URL for the data cocsn routes route route destination destination put operation -type DataCocsnRoutesRouteRouteDestinationDestinationPutURL struct { - RouteDestination string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnRoutesRouteRouteDestinationDestinationPutURL) WithBasePath(bp string) *DataCocsnRoutesRouteRouteDestinationDestinationPutURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnRoutesRouteRouteDestinationDestinationPutURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DataCocsnRoutesRouteRouteDestinationDestinationPutURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/cocsn:routes/route={route-destination}/destination" - - routeDestination := o.RouteDestination - if routeDestination != "" { - _path = strings.Replace(_path, "{route-destination}", routeDestination, -1) - } else { - return nil, errors.New("routeDestination is required on DataCocsnRoutesRouteRouteDestinationDestinationPutURL") - } - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnRoutesRouteRouteDestinationDestinationPutURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DataCocsnRoutesRouteRouteDestinationDestinationPutURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnRoutesRouteRouteDestinationDestinationPutURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnRoutesRouteRouteDestinationDestinationPutURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnRoutesRouteRouteDestinationDestinationPutURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DataCocsnRoutesRouteRouteDestinationDestinationPutURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_delete.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_delete.go deleted file mode 100644 index c7631df3eff57cbcdfc4f5cf549a7612efa56bbd..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_delete.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataCocsnRoutesRouteRouteDestinationExpireDeleteHandlerFunc turns a function with the right signature into a data cocsn routes route route destination expire delete handler -type DataCocsnRoutesRouteRouteDestinationExpireDeleteHandlerFunc func(DataCocsnRoutesRouteRouteDestinationExpireDeleteParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataCocsnRoutesRouteRouteDestinationExpireDeleteHandlerFunc) Handle(params DataCocsnRoutesRouteRouteDestinationExpireDeleteParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataCocsnRoutesRouteRouteDestinationExpireDeleteHandler interface for that can handle valid data cocsn routes route route destination expire delete params -type DataCocsnRoutesRouteRouteDestinationExpireDeleteHandler interface { - Handle(DataCocsnRoutesRouteRouteDestinationExpireDeleteParams, interface{}) middleware.Responder -} - -// NewDataCocsnRoutesRouteRouteDestinationExpireDelete creates a new http.Handler for the data cocsn routes route route destination expire delete operation -func NewDataCocsnRoutesRouteRouteDestinationExpireDelete(ctx *middleware.Context, handler DataCocsnRoutesRouteRouteDestinationExpireDeleteHandler) *DataCocsnRoutesRouteRouteDestinationExpireDelete { - return &DataCocsnRoutesRouteRouteDestinationExpireDelete{Context: ctx, Handler: handler} -} - -/*DataCocsnRoutesRouteRouteDestinationExpireDelete swagger:route DELETE /data/cocsn:routes/route={route-destination}/expire data delete dataCocsnRoutesRouteRouteDestinationExpireDelete - -Expiration timer of the route - -Expiration timer of the route - -*/ -type DataCocsnRoutesRouteRouteDestinationExpireDelete struct { - Context *middleware.Context - Handler DataCocsnRoutesRouteRouteDestinationExpireDeleteHandler -} - -func (o *DataCocsnRoutesRouteRouteDestinationExpireDelete) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataCocsnRoutesRouteRouteDestinationExpireDeleteParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_delete_parameters.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_delete_parameters.go deleted file mode 100644 index 0ec95071a7c8093f2e802147b22c3733d5d309b4..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_delete_parameters.go +++ /dev/null @@ -1,72 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" -) - -// NewDataCocsnRoutesRouteRouteDestinationExpireDeleteParams creates a new DataCocsnRoutesRouteRouteDestinationExpireDeleteParams object -// no default values defined in spec. -func NewDataCocsnRoutesRouteRouteDestinationExpireDeleteParams() DataCocsnRoutesRouteRouteDestinationExpireDeleteParams { - - return DataCocsnRoutesRouteRouteDestinationExpireDeleteParams{} -} - -// DataCocsnRoutesRouteRouteDestinationExpireDeleteParams contains all the bound params for the data cocsn routes route route destination expire delete operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_routes_route_route_destination_expire_delete -type DataCocsnRoutesRouteRouteDestinationExpireDeleteParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*Route destination. IP network - Required: true - In: path - */ - RouteDestination string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnRoutesRouteRouteDestinationExpireDeleteParams() beforehand. -func (o *DataCocsnRoutesRouteRouteDestinationExpireDeleteParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - rRouteDestination, rhkRouteDestination, _ := route.Params.GetOK("route-destination") - if err := o.bindRouteDestination(rRouteDestination, rhkRouteDestination, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindRouteDestination binds and validates parameter RouteDestination from path. -func (o *DataCocsnRoutesRouteRouteDestinationExpireDeleteParams) bindRouteDestination(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.RouteDestination = raw - - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_delete_responses.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_delete_responses.go deleted file mode 100644 index 17c46fe740ade6f13bbaa8c190c16d268fa7a440..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_delete_responses.go +++ /dev/null @@ -1,36 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// DataCocsnRoutesRouteRouteDestinationExpireDeleteNoContentCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationExpireDeleteNoContent -const DataCocsnRoutesRouteRouteDestinationExpireDeleteNoContentCode int = 204 - -/*DataCocsnRoutesRouteRouteDestinationExpireDeleteNoContent No Content - -swagger:response dataCocsnRoutesRouteRouteDestinationExpireDeleteNoContent -*/ -type DataCocsnRoutesRouteRouteDestinationExpireDeleteNoContent struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationExpireDeleteNoContent creates DataCocsnRoutesRouteRouteDestinationExpireDeleteNoContent with default headers values -func NewDataCocsnRoutesRouteRouteDestinationExpireDeleteNoContent() *DataCocsnRoutesRouteRouteDestinationExpireDeleteNoContent { - - return &DataCocsnRoutesRouteRouteDestinationExpireDeleteNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationExpireDeleteNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_delete_urlbuilder.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_delete_urlbuilder.go deleted file mode 100644 index 92aaca1bc8a9fad9f0405a29a8abc103cfac62c0..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_delete_urlbuilder.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" -) - -// DataCocsnRoutesRouteRouteDestinationExpireDeleteURL generates an URL for the data cocsn routes route route destination expire delete operation -type DataCocsnRoutesRouteRouteDestinationExpireDeleteURL struct { - RouteDestination string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnRoutesRouteRouteDestinationExpireDeleteURL) WithBasePath(bp string) *DataCocsnRoutesRouteRouteDestinationExpireDeleteURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnRoutesRouteRouteDestinationExpireDeleteURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DataCocsnRoutesRouteRouteDestinationExpireDeleteURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/cocsn:routes/route={route-destination}/expire" - - routeDestination := o.RouteDestination - if routeDestination != "" { - _path = strings.Replace(_path, "{route-destination}", routeDestination, -1) - } else { - return nil, errors.New("routeDestination is required on DataCocsnRoutesRouteRouteDestinationExpireDeleteURL") - } - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnRoutesRouteRouteDestinationExpireDeleteURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DataCocsnRoutesRouteRouteDestinationExpireDeleteURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnRoutesRouteRouteDestinationExpireDeleteURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnRoutesRouteRouteDestinationExpireDeleteURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnRoutesRouteRouteDestinationExpireDeleteURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DataCocsnRoutesRouteRouteDestinationExpireDeleteURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_get.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_get.go deleted file mode 100644 index e72009960ba4d4d104bba5d67c3638fb7d232196..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_get.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataCocsnRoutesRouteRouteDestinationExpireGetHandlerFunc turns a function with the right signature into a data cocsn routes route route destination expire get handler -type DataCocsnRoutesRouteRouteDestinationExpireGetHandlerFunc func(DataCocsnRoutesRouteRouteDestinationExpireGetParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataCocsnRoutesRouteRouteDestinationExpireGetHandlerFunc) Handle(params DataCocsnRoutesRouteRouteDestinationExpireGetParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataCocsnRoutesRouteRouteDestinationExpireGetHandler interface for that can handle valid data cocsn routes route route destination expire get params -type DataCocsnRoutesRouteRouteDestinationExpireGetHandler interface { - Handle(DataCocsnRoutesRouteRouteDestinationExpireGetParams, interface{}) middleware.Responder -} - -// NewDataCocsnRoutesRouteRouteDestinationExpireGet creates a new http.Handler for the data cocsn routes route route destination expire get operation -func NewDataCocsnRoutesRouteRouteDestinationExpireGet(ctx *middleware.Context, handler DataCocsnRoutesRouteRouteDestinationExpireGetHandler) *DataCocsnRoutesRouteRouteDestinationExpireGet { - return &DataCocsnRoutesRouteRouteDestinationExpireGet{Context: ctx, Handler: handler} -} - -/*DataCocsnRoutesRouteRouteDestinationExpireGet swagger:route GET /data/cocsn:routes/route={route-destination}/expire data get dataCocsnRoutesRouteRouteDestinationExpireGet - -Expiration timer of the route - -Expiration timer of the route - -*/ -type DataCocsnRoutesRouteRouteDestinationExpireGet struct { - Context *middleware.Context - Handler DataCocsnRoutesRouteRouteDestinationExpireGetHandler -} - -func (o *DataCocsnRoutesRouteRouteDestinationExpireGet) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataCocsnRoutesRouteRouteDestinationExpireGetParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_get_parameters.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_get_parameters.go deleted file mode 100644 index b21c59e47bee47ff332042388cb2768308029f5b..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_get_parameters.go +++ /dev/null @@ -1,260 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// NewDataCocsnRoutesRouteRouteDestinationExpireGetParams creates a new DataCocsnRoutesRouteRouteDestinationExpireGetParams object -// with the default values initialized. -func NewDataCocsnRoutesRouteRouteDestinationExpireGetParams() DataCocsnRoutesRouteRouteDestinationExpireGetParams { - - var ( - // initialize parameters with default values - - contentDefault = string("config") - - withDefaultsDefault = string("report-all") - ) - - return DataCocsnRoutesRouteRouteDestinationExpireGetParams{ - Content: &contentDefault, - - WithDefaults: &withDefaultsDefault, - } -} - -// DataCocsnRoutesRouteRouteDestinationExpireGetParams contains all the bound params for the data cocsn routes route route destination expire get operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_routes_route_route_destination_expire_get -type DataCocsnRoutesRouteRouteDestinationExpireGetParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*controlling descendant nodes in response - In: query - Default: "config" - */ - Content *string - /*limit the depth of nodes in response - In: query - */ - Depth *uint16 - /*optionally identify specific data nodes in response - In: query - */ - Fields *string - /*xpath expression to filter data nodes in response - In: query - */ - Filter *string - /*Route destination. IP network - Required: true - In: path - */ - RouteDestination string - /*controlling default values in response - In: query - Default: "report-all" - */ - WithDefaults *string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnRoutesRouteRouteDestinationExpireGetParams() beforehand. -func (o *DataCocsnRoutesRouteRouteDestinationExpireGetParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - qs := runtime.Values(r.URL.Query()) - - qContent, qhkContent, _ := qs.GetOK("content") - if err := o.bindContent(qContent, qhkContent, route.Formats); err != nil { - res = append(res, err) - } - - qDepth, qhkDepth, _ := qs.GetOK("depth") - if err := o.bindDepth(qDepth, qhkDepth, route.Formats); err != nil { - res = append(res, err) - } - - qFields, qhkFields, _ := qs.GetOK("fields") - if err := o.bindFields(qFields, qhkFields, route.Formats); err != nil { - res = append(res, err) - } - - qFilter, qhkFilter, _ := qs.GetOK("filter") - if err := o.bindFilter(qFilter, qhkFilter, route.Formats); err != nil { - res = append(res, err) - } - - rRouteDestination, rhkRouteDestination, _ := route.Params.GetOK("route-destination") - if err := o.bindRouteDestination(rRouteDestination, rhkRouteDestination, route.Formats); err != nil { - res = append(res, err) - } - - qWithDefaults, qhkWithDefaults, _ := qs.GetOK("with-defaults") - if err := o.bindWithDefaults(qWithDefaults, qhkWithDefaults, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindContent binds and validates parameter Content from query. -func (o *DataCocsnRoutesRouteRouteDestinationExpireGetParams) bindContent(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - // Default values have been previously initialized by NewDataCocsnRoutesRouteRouteDestinationExpireGetParams() - return nil - } - - o.Content = &raw - - if err := o.validateContent(formats); err != nil { - return err - } - - return nil -} - -// validateContent carries on validations for parameter Content -func (o *DataCocsnRoutesRouteRouteDestinationExpireGetParams) validateContent(formats strfmt.Registry) error { - - if err := validate.EnumCase("content", "query", *o.Content, []interface{}{"config", "nonconfig", "all"}, true); err != nil { - return err - } - - return nil -} - -// bindDepth binds and validates parameter Depth from query. -func (o *DataCocsnRoutesRouteRouteDestinationExpireGetParams) bindDepth(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - value, err := swag.ConvertUint16(raw) - if err != nil { - return errors.InvalidType("depth", "query", "uint16", raw) - } - o.Depth = &value - - return nil -} - -// bindFields binds and validates parameter Fields from query. -func (o *DataCocsnRoutesRouteRouteDestinationExpireGetParams) bindFields(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - o.Fields = &raw - - return nil -} - -// bindFilter binds and validates parameter Filter from query. -func (o *DataCocsnRoutesRouteRouteDestinationExpireGetParams) bindFilter(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - o.Filter = &raw - - return nil -} - -// bindRouteDestination binds and validates parameter RouteDestination from path. -func (o *DataCocsnRoutesRouteRouteDestinationExpireGetParams) bindRouteDestination(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.RouteDestination = raw - - return nil -} - -// bindWithDefaults binds and validates parameter WithDefaults from query. -func (o *DataCocsnRoutesRouteRouteDestinationExpireGetParams) bindWithDefaults(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - // Default values have been previously initialized by NewDataCocsnRoutesRouteRouteDestinationExpireGetParams() - return nil - } - - o.WithDefaults = &raw - - if err := o.validateWithDefaults(formats); err != nil { - return err - } - - return nil -} - -// validateWithDefaults carries on validations for parameter WithDefaults -func (o *DataCocsnRoutesRouteRouteDestinationExpireGetParams) validateWithDefaults(formats strfmt.Registry) error { - - if err := validate.EnumCase("with-defaults", "query", *o.WithDefaults, []interface{}{"report-all", "trim", "explicit", "report-all-tagged"}, true); err != nil { - return err - } - - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_get_responses.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_get_responses.go deleted file mode 100644 index 9dff415edac0358f79975795f8fa7c3a70c8ffb6..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_get_responses.go +++ /dev/null @@ -1,202 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" - - "code.fbi.h-da.de/cocsn/cocsn-api/api/models" -) - -// DataCocsnRoutesRouteRouteDestinationExpireGetOKCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationExpireGetOK -const DataCocsnRoutesRouteRouteDestinationExpireGetOKCode int = 200 - -/*DataCocsnRoutesRouteRouteDestinationExpireGetOK Expiration timer of the route - -swagger:response dataCocsnRoutesRouteRouteDestinationExpireGetOK -*/ -type DataCocsnRoutesRouteRouteDestinationExpireGetOK struct { - - /* - In: Body - */ - Payload *models.DataCocsnRoutesRouteRouteDestinationExpire `json:"body,omitempty"` -} - -// NewDataCocsnRoutesRouteRouteDestinationExpireGetOK creates DataCocsnRoutesRouteRouteDestinationExpireGetOK with default headers values -func NewDataCocsnRoutesRouteRouteDestinationExpireGetOK() *DataCocsnRoutesRouteRouteDestinationExpireGetOK { - - return &DataCocsnRoutesRouteRouteDestinationExpireGetOK{} -} - -// WithPayload adds the payload to the data cocsn routes route route destination expire get o k response -func (o *DataCocsnRoutesRouteRouteDestinationExpireGetOK) WithPayload(payload *models.DataCocsnRoutesRouteRouteDestinationExpire) *DataCocsnRoutesRouteRouteDestinationExpireGetOK { - o.Payload = payload - return o -} - -// SetPayload sets the payload to the data cocsn routes route route destination expire get o k response -func (o *DataCocsnRoutesRouteRouteDestinationExpireGetOK) SetPayload(payload *models.DataCocsnRoutesRouteRouteDestinationExpire) { - o.Payload = payload -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationExpireGetOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.WriteHeader(200) - if o.Payload != nil { - payload := o.Payload - if err := producer.Produce(rw, payload); err != nil { - panic(err) // let the recovery middleware deal with this - } - } -} - -// DataCocsnRoutesRouteRouteDestinationExpireGetNoContentCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationExpireGetNoContent -const DataCocsnRoutesRouteRouteDestinationExpireGetNoContentCode int = 204 - -/*DataCocsnRoutesRouteRouteDestinationExpireGetNoContent No Content - -swagger:response dataCocsnRoutesRouteRouteDestinationExpireGetNoContent -*/ -type DataCocsnRoutesRouteRouteDestinationExpireGetNoContent struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationExpireGetNoContent creates DataCocsnRoutesRouteRouteDestinationExpireGetNoContent with default headers values -func NewDataCocsnRoutesRouteRouteDestinationExpireGetNoContent() *DataCocsnRoutesRouteRouteDestinationExpireGetNoContent { - - return &DataCocsnRoutesRouteRouteDestinationExpireGetNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationExpireGetNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DataCocsnRoutesRouteRouteDestinationExpireGetBadRequestCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationExpireGetBadRequest -const DataCocsnRoutesRouteRouteDestinationExpireGetBadRequestCode int = 400 - -/*DataCocsnRoutesRouteRouteDestinationExpireGetBadRequest Bad Request - -swagger:response dataCocsnRoutesRouteRouteDestinationExpireGetBadRequest -*/ -type DataCocsnRoutesRouteRouteDestinationExpireGetBadRequest struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationExpireGetBadRequest creates DataCocsnRoutesRouteRouteDestinationExpireGetBadRequest with default headers values -func NewDataCocsnRoutesRouteRouteDestinationExpireGetBadRequest() *DataCocsnRoutesRouteRouteDestinationExpireGetBadRequest { - - return &DataCocsnRoutesRouteRouteDestinationExpireGetBadRequest{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationExpireGetBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// DataCocsnRoutesRouteRouteDestinationExpireGetUnauthorizedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationExpireGetUnauthorized -const DataCocsnRoutesRouteRouteDestinationExpireGetUnauthorizedCode int = 401 - -/*DataCocsnRoutesRouteRouteDestinationExpireGetUnauthorized Unauthorized - -swagger:response dataCocsnRoutesRouteRouteDestinationExpireGetUnauthorized -*/ -type DataCocsnRoutesRouteRouteDestinationExpireGetUnauthorized struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationExpireGetUnauthorized creates DataCocsnRoutesRouteRouteDestinationExpireGetUnauthorized with default headers values -func NewDataCocsnRoutesRouteRouteDestinationExpireGetUnauthorized() *DataCocsnRoutesRouteRouteDestinationExpireGetUnauthorized { - - return &DataCocsnRoutesRouteRouteDestinationExpireGetUnauthorized{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationExpireGetUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(401) -} - -// DataCocsnRoutesRouteRouteDestinationExpireGetNotFoundCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationExpireGetNotFound -const DataCocsnRoutesRouteRouteDestinationExpireGetNotFoundCode int = 404 - -/*DataCocsnRoutesRouteRouteDestinationExpireGetNotFound Not Found - -swagger:response dataCocsnRoutesRouteRouteDestinationExpireGetNotFound -*/ -type DataCocsnRoutesRouteRouteDestinationExpireGetNotFound struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationExpireGetNotFound creates DataCocsnRoutesRouteRouteDestinationExpireGetNotFound with default headers values -func NewDataCocsnRoutesRouteRouteDestinationExpireGetNotFound() *DataCocsnRoutesRouteRouteDestinationExpireGetNotFound { - - return &DataCocsnRoutesRouteRouteDestinationExpireGetNotFound{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationExpireGetNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(404) -} - -// DataCocsnRoutesRouteRouteDestinationExpireGetMethodNotAllowedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationExpireGetMethodNotAllowed -const DataCocsnRoutesRouteRouteDestinationExpireGetMethodNotAllowedCode int = 405 - -/*DataCocsnRoutesRouteRouteDestinationExpireGetMethodNotAllowed Method Not Allowed - -swagger:response dataCocsnRoutesRouteRouteDestinationExpireGetMethodNotAllowed -*/ -type DataCocsnRoutesRouteRouteDestinationExpireGetMethodNotAllowed struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationExpireGetMethodNotAllowed creates DataCocsnRoutesRouteRouteDestinationExpireGetMethodNotAllowed with default headers values -func NewDataCocsnRoutesRouteRouteDestinationExpireGetMethodNotAllowed() *DataCocsnRoutesRouteRouteDestinationExpireGetMethodNotAllowed { - - return &DataCocsnRoutesRouteRouteDestinationExpireGetMethodNotAllowed{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationExpireGetMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(405) -} - -// DataCocsnRoutesRouteRouteDestinationExpireGetConflictCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationExpireGetConflict -const DataCocsnRoutesRouteRouteDestinationExpireGetConflictCode int = 409 - -/*DataCocsnRoutesRouteRouteDestinationExpireGetConflict Conflict - -swagger:response dataCocsnRoutesRouteRouteDestinationExpireGetConflict -*/ -type DataCocsnRoutesRouteRouteDestinationExpireGetConflict struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationExpireGetConflict creates DataCocsnRoutesRouteRouteDestinationExpireGetConflict with default headers values -func NewDataCocsnRoutesRouteRouteDestinationExpireGetConflict() *DataCocsnRoutesRouteRouteDestinationExpireGetConflict { - - return &DataCocsnRoutesRouteRouteDestinationExpireGetConflict{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationExpireGetConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_get_urlbuilder.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_get_urlbuilder.go deleted file mode 100644 index e88045a3684ff26d03f919f001465d35175b9a08..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_get_urlbuilder.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" - - "github.com/go-openapi/swag" -) - -// DataCocsnRoutesRouteRouteDestinationExpireGetURL generates an URL for the data cocsn routes route route destination expire get operation -type DataCocsnRoutesRouteRouteDestinationExpireGetURL struct { - RouteDestination string - - Content *string - Depth *uint16 - Fields *string - Filter *string - WithDefaults *string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnRoutesRouteRouteDestinationExpireGetURL) WithBasePath(bp string) *DataCocsnRoutesRouteRouteDestinationExpireGetURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnRoutesRouteRouteDestinationExpireGetURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DataCocsnRoutesRouteRouteDestinationExpireGetURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/cocsn:routes/route={route-destination}/expire" - - routeDestination := o.RouteDestination - if routeDestination != "" { - _path = strings.Replace(_path, "{route-destination}", routeDestination, -1) - } else { - return nil, errors.New("routeDestination is required on DataCocsnRoutesRouteRouteDestinationExpireGetURL") - } - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - qs := make(url.Values) - - var contentQ string - if o.Content != nil { - contentQ = *o.Content - } - if contentQ != "" { - qs.Set("content", contentQ) - } - - var depthQ string - if o.Depth != nil { - depthQ = swag.FormatUint16(*o.Depth) - } - if depthQ != "" { - qs.Set("depth", depthQ) - } - - var fieldsQ string - if o.Fields != nil { - fieldsQ = *o.Fields - } - if fieldsQ != "" { - qs.Set("fields", fieldsQ) - } - - var filterQ string - if o.Filter != nil { - filterQ = *o.Filter - } - if filterQ != "" { - qs.Set("filter", filterQ) - } - - var withDefaultsQ string - if o.WithDefaults != nil { - withDefaultsQ = *o.WithDefaults - } - if withDefaultsQ != "" { - qs.Set("with-defaults", withDefaultsQ) - } - - _result.RawQuery = qs.Encode() - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnRoutesRouteRouteDestinationExpireGetURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DataCocsnRoutesRouteRouteDestinationExpireGetURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnRoutesRouteRouteDestinationExpireGetURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnRoutesRouteRouteDestinationExpireGetURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnRoutesRouteRouteDestinationExpireGetURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DataCocsnRoutesRouteRouteDestinationExpireGetURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_patch.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_patch.go deleted file mode 100644 index 0dffb69f478e04662d005365128d03aaf536735b..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_patch.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataCocsnRoutesRouteRouteDestinationExpirePatchHandlerFunc turns a function with the right signature into a data cocsn routes route route destination expire patch handler -type DataCocsnRoutesRouteRouteDestinationExpirePatchHandlerFunc func(DataCocsnRoutesRouteRouteDestinationExpirePatchParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataCocsnRoutesRouteRouteDestinationExpirePatchHandlerFunc) Handle(params DataCocsnRoutesRouteRouteDestinationExpirePatchParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataCocsnRoutesRouteRouteDestinationExpirePatchHandler interface for that can handle valid data cocsn routes route route destination expire patch params -type DataCocsnRoutesRouteRouteDestinationExpirePatchHandler interface { - Handle(DataCocsnRoutesRouteRouteDestinationExpirePatchParams, interface{}) middleware.Responder -} - -// NewDataCocsnRoutesRouteRouteDestinationExpirePatch creates a new http.Handler for the data cocsn routes route route destination expire patch operation -func NewDataCocsnRoutesRouteRouteDestinationExpirePatch(ctx *middleware.Context, handler DataCocsnRoutesRouteRouteDestinationExpirePatchHandler) *DataCocsnRoutesRouteRouteDestinationExpirePatch { - return &DataCocsnRoutesRouteRouteDestinationExpirePatch{Context: ctx, Handler: handler} -} - -/*DataCocsnRoutesRouteRouteDestinationExpirePatch swagger:route PATCH /data/cocsn:routes/route={route-destination}/expire data patch dataCocsnRoutesRouteRouteDestinationExpirePatch - -Expiration timer of the route - -Expiration timer of the route - -*/ -type DataCocsnRoutesRouteRouteDestinationExpirePatch struct { - Context *middleware.Context - Handler DataCocsnRoutesRouteRouteDestinationExpirePatchHandler -} - -func (o *DataCocsnRoutesRouteRouteDestinationExpirePatch) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataCocsnRoutesRouteRouteDestinationExpirePatchParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_patch_parameters.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_patch_parameters.go deleted file mode 100644 index bf1c07f865d3e18ec67f9019644447c96cf3c1f9..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_patch_parameters.go +++ /dev/null @@ -1,103 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "io" - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - - "code.fbi.h-da.de/cocsn/cocsn-api/api/models" -) - -// NewDataCocsnRoutesRouteRouteDestinationExpirePatchParams creates a new DataCocsnRoutesRouteRouteDestinationExpirePatchParams object -// no default values defined in spec. -func NewDataCocsnRoutesRouteRouteDestinationExpirePatchParams() DataCocsnRoutesRouteRouteDestinationExpirePatchParams { - - return DataCocsnRoutesRouteRouteDestinationExpirePatchParams{} -} - -// DataCocsnRoutesRouteRouteDestinationExpirePatchParams contains all the bound params for the data cocsn routes route route destination expire patch operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_routes_route_route_destination_expire_patch -type DataCocsnRoutesRouteRouteDestinationExpirePatchParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*Expiration timer of the route - Required: true - In: body - */ - Expire *models.DataCocsnRoutesRouteRouteDestinationExpire - /*Route destination. IP network - Required: true - In: path - */ - RouteDestination string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnRoutesRouteRouteDestinationExpirePatchParams() beforehand. -func (o *DataCocsnRoutesRouteRouteDestinationExpirePatchParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if runtime.HasBody(r) { - defer r.Body.Close() - var body models.DataCocsnRoutesRouteRouteDestinationExpire - if err := route.Consumer.Consume(r.Body, &body); err != nil { - if err == io.EOF { - res = append(res, errors.Required("expire", "body", "")) - } else { - res = append(res, errors.NewParseError("expire", "body", "", err)) - } - } else { - // validate body object - if err := body.Validate(route.Formats); err != nil { - res = append(res, err) - } - - if len(res) == 0 { - o.Expire = &body - } - } - } else { - res = append(res, errors.Required("expire", "body", "")) - } - rRouteDestination, rhkRouteDestination, _ := route.Params.GetOK("route-destination") - if err := o.bindRouteDestination(rRouteDestination, rhkRouteDestination, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindRouteDestination binds and validates parameter RouteDestination from path. -func (o *DataCocsnRoutesRouteRouteDestinationExpirePatchParams) bindRouteDestination(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.RouteDestination = raw - - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_patch_responses.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_patch_responses.go deleted file mode 100644 index 8ee95f6c1afbd92d7bbfebf2ff7abd157e0ff282..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_patch_responses.go +++ /dev/null @@ -1,156 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// DataCocsnRoutesRouteRouteDestinationExpirePatchNoContentCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationExpirePatchNoContent -const DataCocsnRoutesRouteRouteDestinationExpirePatchNoContentCode int = 204 - -/*DataCocsnRoutesRouteRouteDestinationExpirePatchNoContent leaf expire updated - -swagger:response dataCocsnRoutesRouteRouteDestinationExpirePatchNoContent -*/ -type DataCocsnRoutesRouteRouteDestinationExpirePatchNoContent struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationExpirePatchNoContent creates DataCocsnRoutesRouteRouteDestinationExpirePatchNoContent with default headers values -func NewDataCocsnRoutesRouteRouteDestinationExpirePatchNoContent() *DataCocsnRoutesRouteRouteDestinationExpirePatchNoContent { - - return &DataCocsnRoutesRouteRouteDestinationExpirePatchNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationExpirePatchNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DataCocsnRoutesRouteRouteDestinationExpirePatchBadRequestCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationExpirePatchBadRequest -const DataCocsnRoutesRouteRouteDestinationExpirePatchBadRequestCode int = 400 - -/*DataCocsnRoutesRouteRouteDestinationExpirePatchBadRequest Bad Request - -swagger:response dataCocsnRoutesRouteRouteDestinationExpirePatchBadRequest -*/ -type DataCocsnRoutesRouteRouteDestinationExpirePatchBadRequest struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationExpirePatchBadRequest creates DataCocsnRoutesRouteRouteDestinationExpirePatchBadRequest with default headers values -func NewDataCocsnRoutesRouteRouteDestinationExpirePatchBadRequest() *DataCocsnRoutesRouteRouteDestinationExpirePatchBadRequest { - - return &DataCocsnRoutesRouteRouteDestinationExpirePatchBadRequest{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationExpirePatchBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// DataCocsnRoutesRouteRouteDestinationExpirePatchUnauthorizedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationExpirePatchUnauthorized -const DataCocsnRoutesRouteRouteDestinationExpirePatchUnauthorizedCode int = 401 - -/*DataCocsnRoutesRouteRouteDestinationExpirePatchUnauthorized Unauthorized - -swagger:response dataCocsnRoutesRouteRouteDestinationExpirePatchUnauthorized -*/ -type DataCocsnRoutesRouteRouteDestinationExpirePatchUnauthorized struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationExpirePatchUnauthorized creates DataCocsnRoutesRouteRouteDestinationExpirePatchUnauthorized with default headers values -func NewDataCocsnRoutesRouteRouteDestinationExpirePatchUnauthorized() *DataCocsnRoutesRouteRouteDestinationExpirePatchUnauthorized { - - return &DataCocsnRoutesRouteRouteDestinationExpirePatchUnauthorized{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationExpirePatchUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(401) -} - -// DataCocsnRoutesRouteRouteDestinationExpirePatchNotFoundCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationExpirePatchNotFound -const DataCocsnRoutesRouteRouteDestinationExpirePatchNotFoundCode int = 404 - -/*DataCocsnRoutesRouteRouteDestinationExpirePatchNotFound Not Found - -swagger:response dataCocsnRoutesRouteRouteDestinationExpirePatchNotFound -*/ -type DataCocsnRoutesRouteRouteDestinationExpirePatchNotFound struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationExpirePatchNotFound creates DataCocsnRoutesRouteRouteDestinationExpirePatchNotFound with default headers values -func NewDataCocsnRoutesRouteRouteDestinationExpirePatchNotFound() *DataCocsnRoutesRouteRouteDestinationExpirePatchNotFound { - - return &DataCocsnRoutesRouteRouteDestinationExpirePatchNotFound{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationExpirePatchNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(404) -} - -// DataCocsnRoutesRouteRouteDestinationExpirePatchMethodNotAllowedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationExpirePatchMethodNotAllowed -const DataCocsnRoutesRouteRouteDestinationExpirePatchMethodNotAllowedCode int = 405 - -/*DataCocsnRoutesRouteRouteDestinationExpirePatchMethodNotAllowed Method Not Allowed - -swagger:response dataCocsnRoutesRouteRouteDestinationExpirePatchMethodNotAllowed -*/ -type DataCocsnRoutesRouteRouteDestinationExpirePatchMethodNotAllowed struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationExpirePatchMethodNotAllowed creates DataCocsnRoutesRouteRouteDestinationExpirePatchMethodNotAllowed with default headers values -func NewDataCocsnRoutesRouteRouteDestinationExpirePatchMethodNotAllowed() *DataCocsnRoutesRouteRouteDestinationExpirePatchMethodNotAllowed { - - return &DataCocsnRoutesRouteRouteDestinationExpirePatchMethodNotAllowed{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationExpirePatchMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(405) -} - -// DataCocsnRoutesRouteRouteDestinationExpirePatchConflictCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationExpirePatchConflict -const DataCocsnRoutesRouteRouteDestinationExpirePatchConflictCode int = 409 - -/*DataCocsnRoutesRouteRouteDestinationExpirePatchConflict Conflict - -swagger:response dataCocsnRoutesRouteRouteDestinationExpirePatchConflict -*/ -type DataCocsnRoutesRouteRouteDestinationExpirePatchConflict struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationExpirePatchConflict creates DataCocsnRoutesRouteRouteDestinationExpirePatchConflict with default headers values -func NewDataCocsnRoutesRouteRouteDestinationExpirePatchConflict() *DataCocsnRoutesRouteRouteDestinationExpirePatchConflict { - - return &DataCocsnRoutesRouteRouteDestinationExpirePatchConflict{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationExpirePatchConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_patch_urlbuilder.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_patch_urlbuilder.go deleted file mode 100644 index d6e08bc7e49f41bb3b37a9d2e3b48939c1905832..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_patch_urlbuilder.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" -) - -// DataCocsnRoutesRouteRouteDestinationExpirePatchURL generates an URL for the data cocsn routes route route destination expire patch operation -type DataCocsnRoutesRouteRouteDestinationExpirePatchURL struct { - RouteDestination string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnRoutesRouteRouteDestinationExpirePatchURL) WithBasePath(bp string) *DataCocsnRoutesRouteRouteDestinationExpirePatchURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnRoutesRouteRouteDestinationExpirePatchURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DataCocsnRoutesRouteRouteDestinationExpirePatchURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/cocsn:routes/route={route-destination}/expire" - - routeDestination := o.RouteDestination - if routeDestination != "" { - _path = strings.Replace(_path, "{route-destination}", routeDestination, -1) - } else { - return nil, errors.New("routeDestination is required on DataCocsnRoutesRouteRouteDestinationExpirePatchURL") - } - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnRoutesRouteRouteDestinationExpirePatchURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DataCocsnRoutesRouteRouteDestinationExpirePatchURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnRoutesRouteRouteDestinationExpirePatchURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnRoutesRouteRouteDestinationExpirePatchURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnRoutesRouteRouteDestinationExpirePatchURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DataCocsnRoutesRouteRouteDestinationExpirePatchURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_put.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_put.go deleted file mode 100644 index 6cd3db0a73b721aa36124194b7916f70871178f7..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_put.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataCocsnRoutesRouteRouteDestinationExpirePutHandlerFunc turns a function with the right signature into a data cocsn routes route route destination expire put handler -type DataCocsnRoutesRouteRouteDestinationExpirePutHandlerFunc func(DataCocsnRoutesRouteRouteDestinationExpirePutParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataCocsnRoutesRouteRouteDestinationExpirePutHandlerFunc) Handle(params DataCocsnRoutesRouteRouteDestinationExpirePutParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataCocsnRoutesRouteRouteDestinationExpirePutHandler interface for that can handle valid data cocsn routes route route destination expire put params -type DataCocsnRoutesRouteRouteDestinationExpirePutHandler interface { - Handle(DataCocsnRoutesRouteRouteDestinationExpirePutParams, interface{}) middleware.Responder -} - -// NewDataCocsnRoutesRouteRouteDestinationExpirePut creates a new http.Handler for the data cocsn routes route route destination expire put operation -func NewDataCocsnRoutesRouteRouteDestinationExpirePut(ctx *middleware.Context, handler DataCocsnRoutesRouteRouteDestinationExpirePutHandler) *DataCocsnRoutesRouteRouteDestinationExpirePut { - return &DataCocsnRoutesRouteRouteDestinationExpirePut{Context: ctx, Handler: handler} -} - -/*DataCocsnRoutesRouteRouteDestinationExpirePut swagger:route PUT /data/cocsn:routes/route={route-destination}/expire data put dataCocsnRoutesRouteRouteDestinationExpirePut - -Expiration timer of the route - -Expiration timer of the route - -*/ -type DataCocsnRoutesRouteRouteDestinationExpirePut struct { - Context *middleware.Context - Handler DataCocsnRoutesRouteRouteDestinationExpirePutHandler -} - -func (o *DataCocsnRoutesRouteRouteDestinationExpirePut) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataCocsnRoutesRouteRouteDestinationExpirePutParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_put_parameters.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_put_parameters.go deleted file mode 100644 index 85b342831a93e02f1a3418dfc5eab9ab68e611c9..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_put_parameters.go +++ /dev/null @@ -1,103 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "io" - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - - "code.fbi.h-da.de/cocsn/cocsn-api/api/models" -) - -// NewDataCocsnRoutesRouteRouteDestinationExpirePutParams creates a new DataCocsnRoutesRouteRouteDestinationExpirePutParams object -// no default values defined in spec. -func NewDataCocsnRoutesRouteRouteDestinationExpirePutParams() DataCocsnRoutesRouteRouteDestinationExpirePutParams { - - return DataCocsnRoutesRouteRouteDestinationExpirePutParams{} -} - -// DataCocsnRoutesRouteRouteDestinationExpirePutParams contains all the bound params for the data cocsn routes route route destination expire put operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_routes_route_route_destination_expire_put -type DataCocsnRoutesRouteRouteDestinationExpirePutParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*Expiration timer of the route - Required: true - In: body - */ - Expire *models.DataCocsnRoutesRouteRouteDestinationExpire - /*Route destination. IP network - Required: true - In: path - */ - RouteDestination string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnRoutesRouteRouteDestinationExpirePutParams() beforehand. -func (o *DataCocsnRoutesRouteRouteDestinationExpirePutParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if runtime.HasBody(r) { - defer r.Body.Close() - var body models.DataCocsnRoutesRouteRouteDestinationExpire - if err := route.Consumer.Consume(r.Body, &body); err != nil { - if err == io.EOF { - res = append(res, errors.Required("expire", "body", "")) - } else { - res = append(res, errors.NewParseError("expire", "body", "", err)) - } - } else { - // validate body object - if err := body.Validate(route.Formats); err != nil { - res = append(res, err) - } - - if len(res) == 0 { - o.Expire = &body - } - } - } else { - res = append(res, errors.Required("expire", "body", "")) - } - rRouteDestination, rhkRouteDestination, _ := route.Params.GetOK("route-destination") - if err := o.bindRouteDestination(rRouteDestination, rhkRouteDestination, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindRouteDestination binds and validates parameter RouteDestination from path. -func (o *DataCocsnRoutesRouteRouteDestinationExpirePutParams) bindRouteDestination(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.RouteDestination = raw - - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_put_responses.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_put_responses.go deleted file mode 100644 index cff8e39b01735280cee2a53461d98db6cb457271..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_put_responses.go +++ /dev/null @@ -1,180 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// DataCocsnRoutesRouteRouteDestinationExpirePutCreatedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationExpirePutCreated -const DataCocsnRoutesRouteRouteDestinationExpirePutCreatedCode int = 201 - -/*DataCocsnRoutesRouteRouteDestinationExpirePutCreated leaf expire created or replaced - -swagger:response dataCocsnRoutesRouteRouteDestinationExpirePutCreated -*/ -type DataCocsnRoutesRouteRouteDestinationExpirePutCreated struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationExpirePutCreated creates DataCocsnRoutesRouteRouteDestinationExpirePutCreated with default headers values -func NewDataCocsnRoutesRouteRouteDestinationExpirePutCreated() *DataCocsnRoutesRouteRouteDestinationExpirePutCreated { - - return &DataCocsnRoutesRouteRouteDestinationExpirePutCreated{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationExpirePutCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(201) -} - -// DataCocsnRoutesRouteRouteDestinationExpirePutNoContentCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationExpirePutNoContent -const DataCocsnRoutesRouteRouteDestinationExpirePutNoContentCode int = 204 - -/*DataCocsnRoutesRouteRouteDestinationExpirePutNoContent No Content - -swagger:response dataCocsnRoutesRouteRouteDestinationExpirePutNoContent -*/ -type DataCocsnRoutesRouteRouteDestinationExpirePutNoContent struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationExpirePutNoContent creates DataCocsnRoutesRouteRouteDestinationExpirePutNoContent with default headers values -func NewDataCocsnRoutesRouteRouteDestinationExpirePutNoContent() *DataCocsnRoutesRouteRouteDestinationExpirePutNoContent { - - return &DataCocsnRoutesRouteRouteDestinationExpirePutNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationExpirePutNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DataCocsnRoutesRouteRouteDestinationExpirePutBadRequestCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationExpirePutBadRequest -const DataCocsnRoutesRouteRouteDestinationExpirePutBadRequestCode int = 400 - -/*DataCocsnRoutesRouteRouteDestinationExpirePutBadRequest Bad Request - -swagger:response dataCocsnRoutesRouteRouteDestinationExpirePutBadRequest -*/ -type DataCocsnRoutesRouteRouteDestinationExpirePutBadRequest struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationExpirePutBadRequest creates DataCocsnRoutesRouteRouteDestinationExpirePutBadRequest with default headers values -func NewDataCocsnRoutesRouteRouteDestinationExpirePutBadRequest() *DataCocsnRoutesRouteRouteDestinationExpirePutBadRequest { - - return &DataCocsnRoutesRouteRouteDestinationExpirePutBadRequest{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationExpirePutBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// DataCocsnRoutesRouteRouteDestinationExpirePutUnauthorizedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationExpirePutUnauthorized -const DataCocsnRoutesRouteRouteDestinationExpirePutUnauthorizedCode int = 401 - -/*DataCocsnRoutesRouteRouteDestinationExpirePutUnauthorized Unauthorized - -swagger:response dataCocsnRoutesRouteRouteDestinationExpirePutUnauthorized -*/ -type DataCocsnRoutesRouteRouteDestinationExpirePutUnauthorized struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationExpirePutUnauthorized creates DataCocsnRoutesRouteRouteDestinationExpirePutUnauthorized with default headers values -func NewDataCocsnRoutesRouteRouteDestinationExpirePutUnauthorized() *DataCocsnRoutesRouteRouteDestinationExpirePutUnauthorized { - - return &DataCocsnRoutesRouteRouteDestinationExpirePutUnauthorized{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationExpirePutUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(401) -} - -// DataCocsnRoutesRouteRouteDestinationExpirePutNotFoundCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationExpirePutNotFound -const DataCocsnRoutesRouteRouteDestinationExpirePutNotFoundCode int = 404 - -/*DataCocsnRoutesRouteRouteDestinationExpirePutNotFound Not Found - -swagger:response dataCocsnRoutesRouteRouteDestinationExpirePutNotFound -*/ -type DataCocsnRoutesRouteRouteDestinationExpirePutNotFound struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationExpirePutNotFound creates DataCocsnRoutesRouteRouteDestinationExpirePutNotFound with default headers values -func NewDataCocsnRoutesRouteRouteDestinationExpirePutNotFound() *DataCocsnRoutesRouteRouteDestinationExpirePutNotFound { - - return &DataCocsnRoutesRouteRouteDestinationExpirePutNotFound{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationExpirePutNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(404) -} - -// DataCocsnRoutesRouteRouteDestinationExpirePutMethodNotAllowedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationExpirePutMethodNotAllowed -const DataCocsnRoutesRouteRouteDestinationExpirePutMethodNotAllowedCode int = 405 - -/*DataCocsnRoutesRouteRouteDestinationExpirePutMethodNotAllowed Method Not Allowed - -swagger:response dataCocsnRoutesRouteRouteDestinationExpirePutMethodNotAllowed -*/ -type DataCocsnRoutesRouteRouteDestinationExpirePutMethodNotAllowed struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationExpirePutMethodNotAllowed creates DataCocsnRoutesRouteRouteDestinationExpirePutMethodNotAllowed with default headers values -func NewDataCocsnRoutesRouteRouteDestinationExpirePutMethodNotAllowed() *DataCocsnRoutesRouteRouteDestinationExpirePutMethodNotAllowed { - - return &DataCocsnRoutesRouteRouteDestinationExpirePutMethodNotAllowed{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationExpirePutMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(405) -} - -// DataCocsnRoutesRouteRouteDestinationExpirePutConflictCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationExpirePutConflict -const DataCocsnRoutesRouteRouteDestinationExpirePutConflictCode int = 409 - -/*DataCocsnRoutesRouteRouteDestinationExpirePutConflict Conflict - -swagger:response dataCocsnRoutesRouteRouteDestinationExpirePutConflict -*/ -type DataCocsnRoutesRouteRouteDestinationExpirePutConflict struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationExpirePutConflict creates DataCocsnRoutesRouteRouteDestinationExpirePutConflict with default headers values -func NewDataCocsnRoutesRouteRouteDestinationExpirePutConflict() *DataCocsnRoutesRouteRouteDestinationExpirePutConflict { - - return &DataCocsnRoutesRouteRouteDestinationExpirePutConflict{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationExpirePutConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_put_urlbuilder.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_put_urlbuilder.go deleted file mode 100644 index 7468eee60ba6dbd2bec2057b43d73e3e3eb1e431..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_put_urlbuilder.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" -) - -// DataCocsnRoutesRouteRouteDestinationExpirePutURL generates an URL for the data cocsn routes route route destination expire put operation -type DataCocsnRoutesRouteRouteDestinationExpirePutURL struct { - RouteDestination string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnRoutesRouteRouteDestinationExpirePutURL) WithBasePath(bp string) *DataCocsnRoutesRouteRouteDestinationExpirePutURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnRoutesRouteRouteDestinationExpirePutURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DataCocsnRoutesRouteRouteDestinationExpirePutURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/cocsn:routes/route={route-destination}/expire" - - routeDestination := o.RouteDestination - if routeDestination != "" { - _path = strings.Replace(_path, "{route-destination}", routeDestination, -1) - } else { - return nil, errors.New("routeDestination is required on DataCocsnRoutesRouteRouteDestinationExpirePutURL") - } - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnRoutesRouteRouteDestinationExpirePutURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DataCocsnRoutesRouteRouteDestinationExpirePutURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnRoutesRouteRouteDestinationExpirePutURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnRoutesRouteRouteDestinationExpirePutURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnRoutesRouteRouteDestinationExpirePutURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DataCocsnRoutesRouteRouteDestinationExpirePutURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_delete.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_delete.go deleted file mode 100644 index 7121a241bea8d2f6e7da5228feee47de63ea6299..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_delete.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataCocsnRoutesRouteRouteDestinationFlagsDeleteHandlerFunc turns a function with the right signature into a data cocsn routes route route destination flags delete handler -type DataCocsnRoutesRouteRouteDestinationFlagsDeleteHandlerFunc func(DataCocsnRoutesRouteRouteDestinationFlagsDeleteParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataCocsnRoutesRouteRouteDestinationFlagsDeleteHandlerFunc) Handle(params DataCocsnRoutesRouteRouteDestinationFlagsDeleteParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataCocsnRoutesRouteRouteDestinationFlagsDeleteHandler interface for that can handle valid data cocsn routes route route destination flags delete params -type DataCocsnRoutesRouteRouteDestinationFlagsDeleteHandler interface { - Handle(DataCocsnRoutesRouteRouteDestinationFlagsDeleteParams, interface{}) middleware.Responder -} - -// NewDataCocsnRoutesRouteRouteDestinationFlagsDelete creates a new http.Handler for the data cocsn routes route route destination flags delete operation -func NewDataCocsnRoutesRouteRouteDestinationFlagsDelete(ctx *middleware.Context, handler DataCocsnRoutesRouteRouteDestinationFlagsDeleteHandler) *DataCocsnRoutesRouteRouteDestinationFlagsDelete { - return &DataCocsnRoutesRouteRouteDestinationFlagsDelete{Context: ctx, Handler: handler} -} - -/*DataCocsnRoutesRouteRouteDestinationFlagsDelete swagger:route DELETE /data/cocsn:routes/route={route-destination}/flags data delete dataCocsnRoutesRouteRouteDestinationFlagsDelete - -Flags of the route - -Flags of the route - -*/ -type DataCocsnRoutesRouteRouteDestinationFlagsDelete struct { - Context *middleware.Context - Handler DataCocsnRoutesRouteRouteDestinationFlagsDeleteHandler -} - -func (o *DataCocsnRoutesRouteRouteDestinationFlagsDelete) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataCocsnRoutesRouteRouteDestinationFlagsDeleteParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_delete_parameters.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_delete_parameters.go deleted file mode 100644 index c81973097c1fdf5591c3c6d616fc4f21977446bc..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_delete_parameters.go +++ /dev/null @@ -1,72 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" -) - -// NewDataCocsnRoutesRouteRouteDestinationFlagsDeleteParams creates a new DataCocsnRoutesRouteRouteDestinationFlagsDeleteParams object -// no default values defined in spec. -func NewDataCocsnRoutesRouteRouteDestinationFlagsDeleteParams() DataCocsnRoutesRouteRouteDestinationFlagsDeleteParams { - - return DataCocsnRoutesRouteRouteDestinationFlagsDeleteParams{} -} - -// DataCocsnRoutesRouteRouteDestinationFlagsDeleteParams contains all the bound params for the data cocsn routes route route destination flags delete operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_routes_route_route_destination_flags_delete -type DataCocsnRoutesRouteRouteDestinationFlagsDeleteParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*Route destination. IP network - Required: true - In: path - */ - RouteDestination string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnRoutesRouteRouteDestinationFlagsDeleteParams() beforehand. -func (o *DataCocsnRoutesRouteRouteDestinationFlagsDeleteParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - rRouteDestination, rhkRouteDestination, _ := route.Params.GetOK("route-destination") - if err := o.bindRouteDestination(rRouteDestination, rhkRouteDestination, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindRouteDestination binds and validates parameter RouteDestination from path. -func (o *DataCocsnRoutesRouteRouteDestinationFlagsDeleteParams) bindRouteDestination(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.RouteDestination = raw - - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_delete_responses.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_delete_responses.go deleted file mode 100644 index b8b1db5cc7ee374f12f3ad100741e69b403c8d06..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_delete_responses.go +++ /dev/null @@ -1,36 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// DataCocsnRoutesRouteRouteDestinationFlagsDeleteNoContentCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationFlagsDeleteNoContent -const DataCocsnRoutesRouteRouteDestinationFlagsDeleteNoContentCode int = 204 - -/*DataCocsnRoutesRouteRouteDestinationFlagsDeleteNoContent No Content - -swagger:response dataCocsnRoutesRouteRouteDestinationFlagsDeleteNoContent -*/ -type DataCocsnRoutesRouteRouteDestinationFlagsDeleteNoContent struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationFlagsDeleteNoContent creates DataCocsnRoutesRouteRouteDestinationFlagsDeleteNoContent with default headers values -func NewDataCocsnRoutesRouteRouteDestinationFlagsDeleteNoContent() *DataCocsnRoutesRouteRouteDestinationFlagsDeleteNoContent { - - return &DataCocsnRoutesRouteRouteDestinationFlagsDeleteNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationFlagsDeleteNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_delete_urlbuilder.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_delete_urlbuilder.go deleted file mode 100644 index 404dce0622ae1d48ed31e1b65fee24f3667bd299..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_delete_urlbuilder.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" -) - -// DataCocsnRoutesRouteRouteDestinationFlagsDeleteURL generates an URL for the data cocsn routes route route destination flags delete operation -type DataCocsnRoutesRouteRouteDestinationFlagsDeleteURL struct { - RouteDestination string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnRoutesRouteRouteDestinationFlagsDeleteURL) WithBasePath(bp string) *DataCocsnRoutesRouteRouteDestinationFlagsDeleteURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnRoutesRouteRouteDestinationFlagsDeleteURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DataCocsnRoutesRouteRouteDestinationFlagsDeleteURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/cocsn:routes/route={route-destination}/flags" - - routeDestination := o.RouteDestination - if routeDestination != "" { - _path = strings.Replace(_path, "{route-destination}", routeDestination, -1) - } else { - return nil, errors.New("routeDestination is required on DataCocsnRoutesRouteRouteDestinationFlagsDeleteURL") - } - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnRoutesRouteRouteDestinationFlagsDeleteURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DataCocsnRoutesRouteRouteDestinationFlagsDeleteURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnRoutesRouteRouteDestinationFlagsDeleteURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnRoutesRouteRouteDestinationFlagsDeleteURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnRoutesRouteRouteDestinationFlagsDeleteURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DataCocsnRoutesRouteRouteDestinationFlagsDeleteURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_get.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_get.go deleted file mode 100644 index 5d0ad7edcdda5b82e47d0aacfb978ebb5544bef5..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_get.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataCocsnRoutesRouteRouteDestinationFlagsGetHandlerFunc turns a function with the right signature into a data cocsn routes route route destination flags get handler -type DataCocsnRoutesRouteRouteDestinationFlagsGetHandlerFunc func(DataCocsnRoutesRouteRouteDestinationFlagsGetParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataCocsnRoutesRouteRouteDestinationFlagsGetHandlerFunc) Handle(params DataCocsnRoutesRouteRouteDestinationFlagsGetParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataCocsnRoutesRouteRouteDestinationFlagsGetHandler interface for that can handle valid data cocsn routes route route destination flags get params -type DataCocsnRoutesRouteRouteDestinationFlagsGetHandler interface { - Handle(DataCocsnRoutesRouteRouteDestinationFlagsGetParams, interface{}) middleware.Responder -} - -// NewDataCocsnRoutesRouteRouteDestinationFlagsGet creates a new http.Handler for the data cocsn routes route route destination flags get operation -func NewDataCocsnRoutesRouteRouteDestinationFlagsGet(ctx *middleware.Context, handler DataCocsnRoutesRouteRouteDestinationFlagsGetHandler) *DataCocsnRoutesRouteRouteDestinationFlagsGet { - return &DataCocsnRoutesRouteRouteDestinationFlagsGet{Context: ctx, Handler: handler} -} - -/*DataCocsnRoutesRouteRouteDestinationFlagsGet swagger:route GET /data/cocsn:routes/route={route-destination}/flags data get dataCocsnRoutesRouteRouteDestinationFlagsGet - -Flags of the route - -Flags of the route - -*/ -type DataCocsnRoutesRouteRouteDestinationFlagsGet struct { - Context *middleware.Context - Handler DataCocsnRoutesRouteRouteDestinationFlagsGetHandler -} - -func (o *DataCocsnRoutesRouteRouteDestinationFlagsGet) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataCocsnRoutesRouteRouteDestinationFlagsGetParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_get_parameters.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_get_parameters.go deleted file mode 100644 index 35f66ff16c154f767befdefe0c40f59902ee596c..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_get_parameters.go +++ /dev/null @@ -1,260 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// NewDataCocsnRoutesRouteRouteDestinationFlagsGetParams creates a new DataCocsnRoutesRouteRouteDestinationFlagsGetParams object -// with the default values initialized. -func NewDataCocsnRoutesRouteRouteDestinationFlagsGetParams() DataCocsnRoutesRouteRouteDestinationFlagsGetParams { - - var ( - // initialize parameters with default values - - contentDefault = string("config") - - withDefaultsDefault = string("report-all") - ) - - return DataCocsnRoutesRouteRouteDestinationFlagsGetParams{ - Content: &contentDefault, - - WithDefaults: &withDefaultsDefault, - } -} - -// DataCocsnRoutesRouteRouteDestinationFlagsGetParams contains all the bound params for the data cocsn routes route route destination flags get operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_routes_route_route_destination_flags_get -type DataCocsnRoutesRouteRouteDestinationFlagsGetParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*controlling descendant nodes in response - In: query - Default: "config" - */ - Content *string - /*limit the depth of nodes in response - In: query - */ - Depth *uint16 - /*optionally identify specific data nodes in response - In: query - */ - Fields *string - /*xpath expression to filter data nodes in response - In: query - */ - Filter *string - /*Route destination. IP network - Required: true - In: path - */ - RouteDestination string - /*controlling default values in response - In: query - Default: "report-all" - */ - WithDefaults *string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnRoutesRouteRouteDestinationFlagsGetParams() beforehand. -func (o *DataCocsnRoutesRouteRouteDestinationFlagsGetParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - qs := runtime.Values(r.URL.Query()) - - qContent, qhkContent, _ := qs.GetOK("content") - if err := o.bindContent(qContent, qhkContent, route.Formats); err != nil { - res = append(res, err) - } - - qDepth, qhkDepth, _ := qs.GetOK("depth") - if err := o.bindDepth(qDepth, qhkDepth, route.Formats); err != nil { - res = append(res, err) - } - - qFields, qhkFields, _ := qs.GetOK("fields") - if err := o.bindFields(qFields, qhkFields, route.Formats); err != nil { - res = append(res, err) - } - - qFilter, qhkFilter, _ := qs.GetOK("filter") - if err := o.bindFilter(qFilter, qhkFilter, route.Formats); err != nil { - res = append(res, err) - } - - rRouteDestination, rhkRouteDestination, _ := route.Params.GetOK("route-destination") - if err := o.bindRouteDestination(rRouteDestination, rhkRouteDestination, route.Formats); err != nil { - res = append(res, err) - } - - qWithDefaults, qhkWithDefaults, _ := qs.GetOK("with-defaults") - if err := o.bindWithDefaults(qWithDefaults, qhkWithDefaults, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindContent binds and validates parameter Content from query. -func (o *DataCocsnRoutesRouteRouteDestinationFlagsGetParams) bindContent(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - // Default values have been previously initialized by NewDataCocsnRoutesRouteRouteDestinationFlagsGetParams() - return nil - } - - o.Content = &raw - - if err := o.validateContent(formats); err != nil { - return err - } - - return nil -} - -// validateContent carries on validations for parameter Content -func (o *DataCocsnRoutesRouteRouteDestinationFlagsGetParams) validateContent(formats strfmt.Registry) error { - - if err := validate.EnumCase("content", "query", *o.Content, []interface{}{"config", "nonconfig", "all"}, true); err != nil { - return err - } - - return nil -} - -// bindDepth binds and validates parameter Depth from query. -func (o *DataCocsnRoutesRouteRouteDestinationFlagsGetParams) bindDepth(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - value, err := swag.ConvertUint16(raw) - if err != nil { - return errors.InvalidType("depth", "query", "uint16", raw) - } - o.Depth = &value - - return nil -} - -// bindFields binds and validates parameter Fields from query. -func (o *DataCocsnRoutesRouteRouteDestinationFlagsGetParams) bindFields(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - o.Fields = &raw - - return nil -} - -// bindFilter binds and validates parameter Filter from query. -func (o *DataCocsnRoutesRouteRouteDestinationFlagsGetParams) bindFilter(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - o.Filter = &raw - - return nil -} - -// bindRouteDestination binds and validates parameter RouteDestination from path. -func (o *DataCocsnRoutesRouteRouteDestinationFlagsGetParams) bindRouteDestination(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.RouteDestination = raw - - return nil -} - -// bindWithDefaults binds and validates parameter WithDefaults from query. -func (o *DataCocsnRoutesRouteRouteDestinationFlagsGetParams) bindWithDefaults(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - // Default values have been previously initialized by NewDataCocsnRoutesRouteRouteDestinationFlagsGetParams() - return nil - } - - o.WithDefaults = &raw - - if err := o.validateWithDefaults(formats); err != nil { - return err - } - - return nil -} - -// validateWithDefaults carries on validations for parameter WithDefaults -func (o *DataCocsnRoutesRouteRouteDestinationFlagsGetParams) validateWithDefaults(formats strfmt.Registry) error { - - if err := validate.EnumCase("with-defaults", "query", *o.WithDefaults, []interface{}{"report-all", "trim", "explicit", "report-all-tagged"}, true); err != nil { - return err - } - - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_get_responses.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_get_responses.go deleted file mode 100644 index 190a6568317c9957ee73a55adc20d0f06edb0086..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_get_responses.go +++ /dev/null @@ -1,202 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" - - "code.fbi.h-da.de/cocsn/cocsn-api/api/models" -) - -// DataCocsnRoutesRouteRouteDestinationFlagsGetOKCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationFlagsGetOK -const DataCocsnRoutesRouteRouteDestinationFlagsGetOKCode int = 200 - -/*DataCocsnRoutesRouteRouteDestinationFlagsGetOK Flags of the route - -swagger:response dataCocsnRoutesRouteRouteDestinationFlagsGetOK -*/ -type DataCocsnRoutesRouteRouteDestinationFlagsGetOK struct { - - /* - In: Body - */ - Payload *models.DataCocsnRoutesRouteRouteDestinationFlags `json:"body,omitempty"` -} - -// NewDataCocsnRoutesRouteRouteDestinationFlagsGetOK creates DataCocsnRoutesRouteRouteDestinationFlagsGetOK with default headers values -func NewDataCocsnRoutesRouteRouteDestinationFlagsGetOK() *DataCocsnRoutesRouteRouteDestinationFlagsGetOK { - - return &DataCocsnRoutesRouteRouteDestinationFlagsGetOK{} -} - -// WithPayload adds the payload to the data cocsn routes route route destination flags get o k response -func (o *DataCocsnRoutesRouteRouteDestinationFlagsGetOK) WithPayload(payload *models.DataCocsnRoutesRouteRouteDestinationFlags) *DataCocsnRoutesRouteRouteDestinationFlagsGetOK { - o.Payload = payload - return o -} - -// SetPayload sets the payload to the data cocsn routes route route destination flags get o k response -func (o *DataCocsnRoutesRouteRouteDestinationFlagsGetOK) SetPayload(payload *models.DataCocsnRoutesRouteRouteDestinationFlags) { - o.Payload = payload -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationFlagsGetOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.WriteHeader(200) - if o.Payload != nil { - payload := o.Payload - if err := producer.Produce(rw, payload); err != nil { - panic(err) // let the recovery middleware deal with this - } - } -} - -// DataCocsnRoutesRouteRouteDestinationFlagsGetNoContentCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationFlagsGetNoContent -const DataCocsnRoutesRouteRouteDestinationFlagsGetNoContentCode int = 204 - -/*DataCocsnRoutesRouteRouteDestinationFlagsGetNoContent No Content - -swagger:response dataCocsnRoutesRouteRouteDestinationFlagsGetNoContent -*/ -type DataCocsnRoutesRouteRouteDestinationFlagsGetNoContent struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationFlagsGetNoContent creates DataCocsnRoutesRouteRouteDestinationFlagsGetNoContent with default headers values -func NewDataCocsnRoutesRouteRouteDestinationFlagsGetNoContent() *DataCocsnRoutesRouteRouteDestinationFlagsGetNoContent { - - return &DataCocsnRoutesRouteRouteDestinationFlagsGetNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationFlagsGetNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DataCocsnRoutesRouteRouteDestinationFlagsGetBadRequestCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationFlagsGetBadRequest -const DataCocsnRoutesRouteRouteDestinationFlagsGetBadRequestCode int = 400 - -/*DataCocsnRoutesRouteRouteDestinationFlagsGetBadRequest Bad Request - -swagger:response dataCocsnRoutesRouteRouteDestinationFlagsGetBadRequest -*/ -type DataCocsnRoutesRouteRouteDestinationFlagsGetBadRequest struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationFlagsGetBadRequest creates DataCocsnRoutesRouteRouteDestinationFlagsGetBadRequest with default headers values -func NewDataCocsnRoutesRouteRouteDestinationFlagsGetBadRequest() *DataCocsnRoutesRouteRouteDestinationFlagsGetBadRequest { - - return &DataCocsnRoutesRouteRouteDestinationFlagsGetBadRequest{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationFlagsGetBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// DataCocsnRoutesRouteRouteDestinationFlagsGetUnauthorizedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationFlagsGetUnauthorized -const DataCocsnRoutesRouteRouteDestinationFlagsGetUnauthorizedCode int = 401 - -/*DataCocsnRoutesRouteRouteDestinationFlagsGetUnauthorized Unauthorized - -swagger:response dataCocsnRoutesRouteRouteDestinationFlagsGetUnauthorized -*/ -type DataCocsnRoutesRouteRouteDestinationFlagsGetUnauthorized struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationFlagsGetUnauthorized creates DataCocsnRoutesRouteRouteDestinationFlagsGetUnauthorized with default headers values -func NewDataCocsnRoutesRouteRouteDestinationFlagsGetUnauthorized() *DataCocsnRoutesRouteRouteDestinationFlagsGetUnauthorized { - - return &DataCocsnRoutesRouteRouteDestinationFlagsGetUnauthorized{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationFlagsGetUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(401) -} - -// DataCocsnRoutesRouteRouteDestinationFlagsGetNotFoundCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationFlagsGetNotFound -const DataCocsnRoutesRouteRouteDestinationFlagsGetNotFoundCode int = 404 - -/*DataCocsnRoutesRouteRouteDestinationFlagsGetNotFound Not Found - -swagger:response dataCocsnRoutesRouteRouteDestinationFlagsGetNotFound -*/ -type DataCocsnRoutesRouteRouteDestinationFlagsGetNotFound struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationFlagsGetNotFound creates DataCocsnRoutesRouteRouteDestinationFlagsGetNotFound with default headers values -func NewDataCocsnRoutesRouteRouteDestinationFlagsGetNotFound() *DataCocsnRoutesRouteRouteDestinationFlagsGetNotFound { - - return &DataCocsnRoutesRouteRouteDestinationFlagsGetNotFound{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationFlagsGetNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(404) -} - -// DataCocsnRoutesRouteRouteDestinationFlagsGetMethodNotAllowedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationFlagsGetMethodNotAllowed -const DataCocsnRoutesRouteRouteDestinationFlagsGetMethodNotAllowedCode int = 405 - -/*DataCocsnRoutesRouteRouteDestinationFlagsGetMethodNotAllowed Method Not Allowed - -swagger:response dataCocsnRoutesRouteRouteDestinationFlagsGetMethodNotAllowed -*/ -type DataCocsnRoutesRouteRouteDestinationFlagsGetMethodNotAllowed struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationFlagsGetMethodNotAllowed creates DataCocsnRoutesRouteRouteDestinationFlagsGetMethodNotAllowed with default headers values -func NewDataCocsnRoutesRouteRouteDestinationFlagsGetMethodNotAllowed() *DataCocsnRoutesRouteRouteDestinationFlagsGetMethodNotAllowed { - - return &DataCocsnRoutesRouteRouteDestinationFlagsGetMethodNotAllowed{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationFlagsGetMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(405) -} - -// DataCocsnRoutesRouteRouteDestinationFlagsGetConflictCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationFlagsGetConflict -const DataCocsnRoutesRouteRouteDestinationFlagsGetConflictCode int = 409 - -/*DataCocsnRoutesRouteRouteDestinationFlagsGetConflict Conflict - -swagger:response dataCocsnRoutesRouteRouteDestinationFlagsGetConflict -*/ -type DataCocsnRoutesRouteRouteDestinationFlagsGetConflict struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationFlagsGetConflict creates DataCocsnRoutesRouteRouteDestinationFlagsGetConflict with default headers values -func NewDataCocsnRoutesRouteRouteDestinationFlagsGetConflict() *DataCocsnRoutesRouteRouteDestinationFlagsGetConflict { - - return &DataCocsnRoutesRouteRouteDestinationFlagsGetConflict{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationFlagsGetConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_get_urlbuilder.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_get_urlbuilder.go deleted file mode 100644 index 2148573b80fcaebcc16d95d6d24cd8395468c267..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_get_urlbuilder.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" - - "github.com/go-openapi/swag" -) - -// DataCocsnRoutesRouteRouteDestinationFlagsGetURL generates an URL for the data cocsn routes route route destination flags get operation -type DataCocsnRoutesRouteRouteDestinationFlagsGetURL struct { - RouteDestination string - - Content *string - Depth *uint16 - Fields *string - Filter *string - WithDefaults *string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnRoutesRouteRouteDestinationFlagsGetURL) WithBasePath(bp string) *DataCocsnRoutesRouteRouteDestinationFlagsGetURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnRoutesRouteRouteDestinationFlagsGetURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DataCocsnRoutesRouteRouteDestinationFlagsGetURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/cocsn:routes/route={route-destination}/flags" - - routeDestination := o.RouteDestination - if routeDestination != "" { - _path = strings.Replace(_path, "{route-destination}", routeDestination, -1) - } else { - return nil, errors.New("routeDestination is required on DataCocsnRoutesRouteRouteDestinationFlagsGetURL") - } - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - qs := make(url.Values) - - var contentQ string - if o.Content != nil { - contentQ = *o.Content - } - if contentQ != "" { - qs.Set("content", contentQ) - } - - var depthQ string - if o.Depth != nil { - depthQ = swag.FormatUint16(*o.Depth) - } - if depthQ != "" { - qs.Set("depth", depthQ) - } - - var fieldsQ string - if o.Fields != nil { - fieldsQ = *o.Fields - } - if fieldsQ != "" { - qs.Set("fields", fieldsQ) - } - - var filterQ string - if o.Filter != nil { - filterQ = *o.Filter - } - if filterQ != "" { - qs.Set("filter", filterQ) - } - - var withDefaultsQ string - if o.WithDefaults != nil { - withDefaultsQ = *o.WithDefaults - } - if withDefaultsQ != "" { - qs.Set("with-defaults", withDefaultsQ) - } - - _result.RawQuery = qs.Encode() - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnRoutesRouteRouteDestinationFlagsGetURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DataCocsnRoutesRouteRouteDestinationFlagsGetURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnRoutesRouteRouteDestinationFlagsGetURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnRoutesRouteRouteDestinationFlagsGetURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnRoutesRouteRouteDestinationFlagsGetURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DataCocsnRoutesRouteRouteDestinationFlagsGetURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_patch.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_patch.go deleted file mode 100644 index 6a1a89b2fe44317eb987810e4f693de22aa09513..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_patch.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataCocsnRoutesRouteRouteDestinationFlagsPatchHandlerFunc turns a function with the right signature into a data cocsn routes route route destination flags patch handler -type DataCocsnRoutesRouteRouteDestinationFlagsPatchHandlerFunc func(DataCocsnRoutesRouteRouteDestinationFlagsPatchParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataCocsnRoutesRouteRouteDestinationFlagsPatchHandlerFunc) Handle(params DataCocsnRoutesRouteRouteDestinationFlagsPatchParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataCocsnRoutesRouteRouteDestinationFlagsPatchHandler interface for that can handle valid data cocsn routes route route destination flags patch params -type DataCocsnRoutesRouteRouteDestinationFlagsPatchHandler interface { - Handle(DataCocsnRoutesRouteRouteDestinationFlagsPatchParams, interface{}) middleware.Responder -} - -// NewDataCocsnRoutesRouteRouteDestinationFlagsPatch creates a new http.Handler for the data cocsn routes route route destination flags patch operation -func NewDataCocsnRoutesRouteRouteDestinationFlagsPatch(ctx *middleware.Context, handler DataCocsnRoutesRouteRouteDestinationFlagsPatchHandler) *DataCocsnRoutesRouteRouteDestinationFlagsPatch { - return &DataCocsnRoutesRouteRouteDestinationFlagsPatch{Context: ctx, Handler: handler} -} - -/*DataCocsnRoutesRouteRouteDestinationFlagsPatch swagger:route PATCH /data/cocsn:routes/route={route-destination}/flags data patch dataCocsnRoutesRouteRouteDestinationFlagsPatch - -Flags of the route - -Flags of the route - -*/ -type DataCocsnRoutesRouteRouteDestinationFlagsPatch struct { - Context *middleware.Context - Handler DataCocsnRoutesRouteRouteDestinationFlagsPatchHandler -} - -func (o *DataCocsnRoutesRouteRouteDestinationFlagsPatch) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataCocsnRoutesRouteRouteDestinationFlagsPatchParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_patch_parameters.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_patch_parameters.go deleted file mode 100644 index 0524bcfb7b5ce8b669f7f525915afe04f075c95d..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_patch_parameters.go +++ /dev/null @@ -1,103 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "io" - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - - "code.fbi.h-da.de/cocsn/cocsn-api/api/models" -) - -// NewDataCocsnRoutesRouteRouteDestinationFlagsPatchParams creates a new DataCocsnRoutesRouteRouteDestinationFlagsPatchParams object -// no default values defined in spec. -func NewDataCocsnRoutesRouteRouteDestinationFlagsPatchParams() DataCocsnRoutesRouteRouteDestinationFlagsPatchParams { - - return DataCocsnRoutesRouteRouteDestinationFlagsPatchParams{} -} - -// DataCocsnRoutesRouteRouteDestinationFlagsPatchParams contains all the bound params for the data cocsn routes route route destination flags patch operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_routes_route_route_destination_flags_patch -type DataCocsnRoutesRouteRouteDestinationFlagsPatchParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*Flags of the route - Required: true - In: body - */ - Flags *models.DataCocsnRoutesRouteRouteDestinationFlags - /*Route destination. IP network - Required: true - In: path - */ - RouteDestination string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnRoutesRouteRouteDestinationFlagsPatchParams() beforehand. -func (o *DataCocsnRoutesRouteRouteDestinationFlagsPatchParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if runtime.HasBody(r) { - defer r.Body.Close() - var body models.DataCocsnRoutesRouteRouteDestinationFlags - if err := route.Consumer.Consume(r.Body, &body); err != nil { - if err == io.EOF { - res = append(res, errors.Required("flags", "body", "")) - } else { - res = append(res, errors.NewParseError("flags", "body", "", err)) - } - } else { - // validate body object - if err := body.Validate(route.Formats); err != nil { - res = append(res, err) - } - - if len(res) == 0 { - o.Flags = &body - } - } - } else { - res = append(res, errors.Required("flags", "body", "")) - } - rRouteDestination, rhkRouteDestination, _ := route.Params.GetOK("route-destination") - if err := o.bindRouteDestination(rRouteDestination, rhkRouteDestination, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindRouteDestination binds and validates parameter RouteDestination from path. -func (o *DataCocsnRoutesRouteRouteDestinationFlagsPatchParams) bindRouteDestination(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.RouteDestination = raw - - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_patch_responses.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_patch_responses.go deleted file mode 100644 index 3cfd0b2f108ac789697bef811c718b8c9cab1456..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_patch_responses.go +++ /dev/null @@ -1,156 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// DataCocsnRoutesRouteRouteDestinationFlagsPatchNoContentCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationFlagsPatchNoContent -const DataCocsnRoutesRouteRouteDestinationFlagsPatchNoContentCode int = 204 - -/*DataCocsnRoutesRouteRouteDestinationFlagsPatchNoContent leaf flags updated - -swagger:response dataCocsnRoutesRouteRouteDestinationFlagsPatchNoContent -*/ -type DataCocsnRoutesRouteRouteDestinationFlagsPatchNoContent struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationFlagsPatchNoContent creates DataCocsnRoutesRouteRouteDestinationFlagsPatchNoContent with default headers values -func NewDataCocsnRoutesRouteRouteDestinationFlagsPatchNoContent() *DataCocsnRoutesRouteRouteDestinationFlagsPatchNoContent { - - return &DataCocsnRoutesRouteRouteDestinationFlagsPatchNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationFlagsPatchNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DataCocsnRoutesRouteRouteDestinationFlagsPatchBadRequestCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationFlagsPatchBadRequest -const DataCocsnRoutesRouteRouteDestinationFlagsPatchBadRequestCode int = 400 - -/*DataCocsnRoutesRouteRouteDestinationFlagsPatchBadRequest Bad Request - -swagger:response dataCocsnRoutesRouteRouteDestinationFlagsPatchBadRequest -*/ -type DataCocsnRoutesRouteRouteDestinationFlagsPatchBadRequest struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationFlagsPatchBadRequest creates DataCocsnRoutesRouteRouteDestinationFlagsPatchBadRequest with default headers values -func NewDataCocsnRoutesRouteRouteDestinationFlagsPatchBadRequest() *DataCocsnRoutesRouteRouteDestinationFlagsPatchBadRequest { - - return &DataCocsnRoutesRouteRouteDestinationFlagsPatchBadRequest{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationFlagsPatchBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// DataCocsnRoutesRouteRouteDestinationFlagsPatchUnauthorizedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationFlagsPatchUnauthorized -const DataCocsnRoutesRouteRouteDestinationFlagsPatchUnauthorizedCode int = 401 - -/*DataCocsnRoutesRouteRouteDestinationFlagsPatchUnauthorized Unauthorized - -swagger:response dataCocsnRoutesRouteRouteDestinationFlagsPatchUnauthorized -*/ -type DataCocsnRoutesRouteRouteDestinationFlagsPatchUnauthorized struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationFlagsPatchUnauthorized creates DataCocsnRoutesRouteRouteDestinationFlagsPatchUnauthorized with default headers values -func NewDataCocsnRoutesRouteRouteDestinationFlagsPatchUnauthorized() *DataCocsnRoutesRouteRouteDestinationFlagsPatchUnauthorized { - - return &DataCocsnRoutesRouteRouteDestinationFlagsPatchUnauthorized{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationFlagsPatchUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(401) -} - -// DataCocsnRoutesRouteRouteDestinationFlagsPatchNotFoundCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationFlagsPatchNotFound -const DataCocsnRoutesRouteRouteDestinationFlagsPatchNotFoundCode int = 404 - -/*DataCocsnRoutesRouteRouteDestinationFlagsPatchNotFound Not Found - -swagger:response dataCocsnRoutesRouteRouteDestinationFlagsPatchNotFound -*/ -type DataCocsnRoutesRouteRouteDestinationFlagsPatchNotFound struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationFlagsPatchNotFound creates DataCocsnRoutesRouteRouteDestinationFlagsPatchNotFound with default headers values -func NewDataCocsnRoutesRouteRouteDestinationFlagsPatchNotFound() *DataCocsnRoutesRouteRouteDestinationFlagsPatchNotFound { - - return &DataCocsnRoutesRouteRouteDestinationFlagsPatchNotFound{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationFlagsPatchNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(404) -} - -// DataCocsnRoutesRouteRouteDestinationFlagsPatchMethodNotAllowedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationFlagsPatchMethodNotAllowed -const DataCocsnRoutesRouteRouteDestinationFlagsPatchMethodNotAllowedCode int = 405 - -/*DataCocsnRoutesRouteRouteDestinationFlagsPatchMethodNotAllowed Method Not Allowed - -swagger:response dataCocsnRoutesRouteRouteDestinationFlagsPatchMethodNotAllowed -*/ -type DataCocsnRoutesRouteRouteDestinationFlagsPatchMethodNotAllowed struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationFlagsPatchMethodNotAllowed creates DataCocsnRoutesRouteRouteDestinationFlagsPatchMethodNotAllowed with default headers values -func NewDataCocsnRoutesRouteRouteDestinationFlagsPatchMethodNotAllowed() *DataCocsnRoutesRouteRouteDestinationFlagsPatchMethodNotAllowed { - - return &DataCocsnRoutesRouteRouteDestinationFlagsPatchMethodNotAllowed{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationFlagsPatchMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(405) -} - -// DataCocsnRoutesRouteRouteDestinationFlagsPatchConflictCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationFlagsPatchConflict -const DataCocsnRoutesRouteRouteDestinationFlagsPatchConflictCode int = 409 - -/*DataCocsnRoutesRouteRouteDestinationFlagsPatchConflict Conflict - -swagger:response dataCocsnRoutesRouteRouteDestinationFlagsPatchConflict -*/ -type DataCocsnRoutesRouteRouteDestinationFlagsPatchConflict struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationFlagsPatchConflict creates DataCocsnRoutesRouteRouteDestinationFlagsPatchConflict with default headers values -func NewDataCocsnRoutesRouteRouteDestinationFlagsPatchConflict() *DataCocsnRoutesRouteRouteDestinationFlagsPatchConflict { - - return &DataCocsnRoutesRouteRouteDestinationFlagsPatchConflict{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationFlagsPatchConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_patch_urlbuilder.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_patch_urlbuilder.go deleted file mode 100644 index 03e126f957d8bc7be05bdae05a851f2786fd15bc..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_patch_urlbuilder.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" -) - -// DataCocsnRoutesRouteRouteDestinationFlagsPatchURL generates an URL for the data cocsn routes route route destination flags patch operation -type DataCocsnRoutesRouteRouteDestinationFlagsPatchURL struct { - RouteDestination string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnRoutesRouteRouteDestinationFlagsPatchURL) WithBasePath(bp string) *DataCocsnRoutesRouteRouteDestinationFlagsPatchURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnRoutesRouteRouteDestinationFlagsPatchURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DataCocsnRoutesRouteRouteDestinationFlagsPatchURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/cocsn:routes/route={route-destination}/flags" - - routeDestination := o.RouteDestination - if routeDestination != "" { - _path = strings.Replace(_path, "{route-destination}", routeDestination, -1) - } else { - return nil, errors.New("routeDestination is required on DataCocsnRoutesRouteRouteDestinationFlagsPatchURL") - } - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnRoutesRouteRouteDestinationFlagsPatchURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DataCocsnRoutesRouteRouteDestinationFlagsPatchURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnRoutesRouteRouteDestinationFlagsPatchURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnRoutesRouteRouteDestinationFlagsPatchURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnRoutesRouteRouteDestinationFlagsPatchURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DataCocsnRoutesRouteRouteDestinationFlagsPatchURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_put.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_put.go deleted file mode 100644 index cb38a82c3755d69d23224eba8864d0097c682b0b..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_put.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataCocsnRoutesRouteRouteDestinationFlagsPutHandlerFunc turns a function with the right signature into a data cocsn routes route route destination flags put handler -type DataCocsnRoutesRouteRouteDestinationFlagsPutHandlerFunc func(DataCocsnRoutesRouteRouteDestinationFlagsPutParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataCocsnRoutesRouteRouteDestinationFlagsPutHandlerFunc) Handle(params DataCocsnRoutesRouteRouteDestinationFlagsPutParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataCocsnRoutesRouteRouteDestinationFlagsPutHandler interface for that can handle valid data cocsn routes route route destination flags put params -type DataCocsnRoutesRouteRouteDestinationFlagsPutHandler interface { - Handle(DataCocsnRoutesRouteRouteDestinationFlagsPutParams, interface{}) middleware.Responder -} - -// NewDataCocsnRoutesRouteRouteDestinationFlagsPut creates a new http.Handler for the data cocsn routes route route destination flags put operation -func NewDataCocsnRoutesRouteRouteDestinationFlagsPut(ctx *middleware.Context, handler DataCocsnRoutesRouteRouteDestinationFlagsPutHandler) *DataCocsnRoutesRouteRouteDestinationFlagsPut { - return &DataCocsnRoutesRouteRouteDestinationFlagsPut{Context: ctx, Handler: handler} -} - -/*DataCocsnRoutesRouteRouteDestinationFlagsPut swagger:route PUT /data/cocsn:routes/route={route-destination}/flags data put dataCocsnRoutesRouteRouteDestinationFlagsPut - -Flags of the route - -Flags of the route - -*/ -type DataCocsnRoutesRouteRouteDestinationFlagsPut struct { - Context *middleware.Context - Handler DataCocsnRoutesRouteRouteDestinationFlagsPutHandler -} - -func (o *DataCocsnRoutesRouteRouteDestinationFlagsPut) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataCocsnRoutesRouteRouteDestinationFlagsPutParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_put_parameters.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_put_parameters.go deleted file mode 100644 index f160031bf8a0e4dec68207e0d75f6225ab602ace..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_put_parameters.go +++ /dev/null @@ -1,103 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "io" - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - - "code.fbi.h-da.de/cocsn/cocsn-api/api/models" -) - -// NewDataCocsnRoutesRouteRouteDestinationFlagsPutParams creates a new DataCocsnRoutesRouteRouteDestinationFlagsPutParams object -// no default values defined in spec. -func NewDataCocsnRoutesRouteRouteDestinationFlagsPutParams() DataCocsnRoutesRouteRouteDestinationFlagsPutParams { - - return DataCocsnRoutesRouteRouteDestinationFlagsPutParams{} -} - -// DataCocsnRoutesRouteRouteDestinationFlagsPutParams contains all the bound params for the data cocsn routes route route destination flags put operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_routes_route_route_destination_flags_put -type DataCocsnRoutesRouteRouteDestinationFlagsPutParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*Flags of the route - Required: true - In: body - */ - Flags *models.DataCocsnRoutesRouteRouteDestinationFlags - /*Route destination. IP network - Required: true - In: path - */ - RouteDestination string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnRoutesRouteRouteDestinationFlagsPutParams() beforehand. -func (o *DataCocsnRoutesRouteRouteDestinationFlagsPutParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if runtime.HasBody(r) { - defer r.Body.Close() - var body models.DataCocsnRoutesRouteRouteDestinationFlags - if err := route.Consumer.Consume(r.Body, &body); err != nil { - if err == io.EOF { - res = append(res, errors.Required("flags", "body", "")) - } else { - res = append(res, errors.NewParseError("flags", "body", "", err)) - } - } else { - // validate body object - if err := body.Validate(route.Formats); err != nil { - res = append(res, err) - } - - if len(res) == 0 { - o.Flags = &body - } - } - } else { - res = append(res, errors.Required("flags", "body", "")) - } - rRouteDestination, rhkRouteDestination, _ := route.Params.GetOK("route-destination") - if err := o.bindRouteDestination(rRouteDestination, rhkRouteDestination, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindRouteDestination binds and validates parameter RouteDestination from path. -func (o *DataCocsnRoutesRouteRouteDestinationFlagsPutParams) bindRouteDestination(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.RouteDestination = raw - - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_put_responses.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_put_responses.go deleted file mode 100644 index c51f70916e6ccb32ae491eca0798f1cd50a1cae3..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_put_responses.go +++ /dev/null @@ -1,180 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// DataCocsnRoutesRouteRouteDestinationFlagsPutCreatedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationFlagsPutCreated -const DataCocsnRoutesRouteRouteDestinationFlagsPutCreatedCode int = 201 - -/*DataCocsnRoutesRouteRouteDestinationFlagsPutCreated leaf flags created or replaced - -swagger:response dataCocsnRoutesRouteRouteDestinationFlagsPutCreated -*/ -type DataCocsnRoutesRouteRouteDestinationFlagsPutCreated struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationFlagsPutCreated creates DataCocsnRoutesRouteRouteDestinationFlagsPutCreated with default headers values -func NewDataCocsnRoutesRouteRouteDestinationFlagsPutCreated() *DataCocsnRoutesRouteRouteDestinationFlagsPutCreated { - - return &DataCocsnRoutesRouteRouteDestinationFlagsPutCreated{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationFlagsPutCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(201) -} - -// DataCocsnRoutesRouteRouteDestinationFlagsPutNoContentCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationFlagsPutNoContent -const DataCocsnRoutesRouteRouteDestinationFlagsPutNoContentCode int = 204 - -/*DataCocsnRoutesRouteRouteDestinationFlagsPutNoContent No Content - -swagger:response dataCocsnRoutesRouteRouteDestinationFlagsPutNoContent -*/ -type DataCocsnRoutesRouteRouteDestinationFlagsPutNoContent struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationFlagsPutNoContent creates DataCocsnRoutesRouteRouteDestinationFlagsPutNoContent with default headers values -func NewDataCocsnRoutesRouteRouteDestinationFlagsPutNoContent() *DataCocsnRoutesRouteRouteDestinationFlagsPutNoContent { - - return &DataCocsnRoutesRouteRouteDestinationFlagsPutNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationFlagsPutNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DataCocsnRoutesRouteRouteDestinationFlagsPutBadRequestCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationFlagsPutBadRequest -const DataCocsnRoutesRouteRouteDestinationFlagsPutBadRequestCode int = 400 - -/*DataCocsnRoutesRouteRouteDestinationFlagsPutBadRequest Bad Request - -swagger:response dataCocsnRoutesRouteRouteDestinationFlagsPutBadRequest -*/ -type DataCocsnRoutesRouteRouteDestinationFlagsPutBadRequest struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationFlagsPutBadRequest creates DataCocsnRoutesRouteRouteDestinationFlagsPutBadRequest with default headers values -func NewDataCocsnRoutesRouteRouteDestinationFlagsPutBadRequest() *DataCocsnRoutesRouteRouteDestinationFlagsPutBadRequest { - - return &DataCocsnRoutesRouteRouteDestinationFlagsPutBadRequest{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationFlagsPutBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// DataCocsnRoutesRouteRouteDestinationFlagsPutUnauthorizedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationFlagsPutUnauthorized -const DataCocsnRoutesRouteRouteDestinationFlagsPutUnauthorizedCode int = 401 - -/*DataCocsnRoutesRouteRouteDestinationFlagsPutUnauthorized Unauthorized - -swagger:response dataCocsnRoutesRouteRouteDestinationFlagsPutUnauthorized -*/ -type DataCocsnRoutesRouteRouteDestinationFlagsPutUnauthorized struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationFlagsPutUnauthorized creates DataCocsnRoutesRouteRouteDestinationFlagsPutUnauthorized with default headers values -func NewDataCocsnRoutesRouteRouteDestinationFlagsPutUnauthorized() *DataCocsnRoutesRouteRouteDestinationFlagsPutUnauthorized { - - return &DataCocsnRoutesRouteRouteDestinationFlagsPutUnauthorized{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationFlagsPutUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(401) -} - -// DataCocsnRoutesRouteRouteDestinationFlagsPutNotFoundCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationFlagsPutNotFound -const DataCocsnRoutesRouteRouteDestinationFlagsPutNotFoundCode int = 404 - -/*DataCocsnRoutesRouteRouteDestinationFlagsPutNotFound Not Found - -swagger:response dataCocsnRoutesRouteRouteDestinationFlagsPutNotFound -*/ -type DataCocsnRoutesRouteRouteDestinationFlagsPutNotFound struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationFlagsPutNotFound creates DataCocsnRoutesRouteRouteDestinationFlagsPutNotFound with default headers values -func NewDataCocsnRoutesRouteRouteDestinationFlagsPutNotFound() *DataCocsnRoutesRouteRouteDestinationFlagsPutNotFound { - - return &DataCocsnRoutesRouteRouteDestinationFlagsPutNotFound{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationFlagsPutNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(404) -} - -// DataCocsnRoutesRouteRouteDestinationFlagsPutMethodNotAllowedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationFlagsPutMethodNotAllowed -const DataCocsnRoutesRouteRouteDestinationFlagsPutMethodNotAllowedCode int = 405 - -/*DataCocsnRoutesRouteRouteDestinationFlagsPutMethodNotAllowed Method Not Allowed - -swagger:response dataCocsnRoutesRouteRouteDestinationFlagsPutMethodNotAllowed -*/ -type DataCocsnRoutesRouteRouteDestinationFlagsPutMethodNotAllowed struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationFlagsPutMethodNotAllowed creates DataCocsnRoutesRouteRouteDestinationFlagsPutMethodNotAllowed with default headers values -func NewDataCocsnRoutesRouteRouteDestinationFlagsPutMethodNotAllowed() *DataCocsnRoutesRouteRouteDestinationFlagsPutMethodNotAllowed { - - return &DataCocsnRoutesRouteRouteDestinationFlagsPutMethodNotAllowed{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationFlagsPutMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(405) -} - -// DataCocsnRoutesRouteRouteDestinationFlagsPutConflictCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationFlagsPutConflict -const DataCocsnRoutesRouteRouteDestinationFlagsPutConflictCode int = 409 - -/*DataCocsnRoutesRouteRouteDestinationFlagsPutConflict Conflict - -swagger:response dataCocsnRoutesRouteRouteDestinationFlagsPutConflict -*/ -type DataCocsnRoutesRouteRouteDestinationFlagsPutConflict struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationFlagsPutConflict creates DataCocsnRoutesRouteRouteDestinationFlagsPutConflict with default headers values -func NewDataCocsnRoutesRouteRouteDestinationFlagsPutConflict() *DataCocsnRoutesRouteRouteDestinationFlagsPutConflict { - - return &DataCocsnRoutesRouteRouteDestinationFlagsPutConflict{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationFlagsPutConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_put_urlbuilder.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_put_urlbuilder.go deleted file mode 100644 index 3042cebf2d5698a53236f2d6f4c037cb17b1b6b9..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_put_urlbuilder.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" -) - -// DataCocsnRoutesRouteRouteDestinationFlagsPutURL generates an URL for the data cocsn routes route route destination flags put operation -type DataCocsnRoutesRouteRouteDestinationFlagsPutURL struct { - RouteDestination string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnRoutesRouteRouteDestinationFlagsPutURL) WithBasePath(bp string) *DataCocsnRoutesRouteRouteDestinationFlagsPutURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnRoutesRouteRouteDestinationFlagsPutURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DataCocsnRoutesRouteRouteDestinationFlagsPutURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/cocsn:routes/route={route-destination}/flags" - - routeDestination := o.RouteDestination - if routeDestination != "" { - _path = strings.Replace(_path, "{route-destination}", routeDestination, -1) - } else { - return nil, errors.New("routeDestination is required on DataCocsnRoutesRouteRouteDestinationFlagsPutURL") - } - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnRoutesRouteRouteDestinationFlagsPutURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DataCocsnRoutesRouteRouteDestinationFlagsPutURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnRoutesRouteRouteDestinationFlagsPutURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnRoutesRouteRouteDestinationFlagsPutURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnRoutesRouteRouteDestinationFlagsPutURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DataCocsnRoutesRouteRouteDestinationFlagsPutURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_delete.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_delete.go deleted file mode 100644 index a70782631ff66ee59e31a44867098c7ceea2c48d..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_delete.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataCocsnRoutesRouteRouteDestinationGatewayDeleteHandlerFunc turns a function with the right signature into a data cocsn routes route route destination gateway delete handler -type DataCocsnRoutesRouteRouteDestinationGatewayDeleteHandlerFunc func(DataCocsnRoutesRouteRouteDestinationGatewayDeleteParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataCocsnRoutesRouteRouteDestinationGatewayDeleteHandlerFunc) Handle(params DataCocsnRoutesRouteRouteDestinationGatewayDeleteParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataCocsnRoutesRouteRouteDestinationGatewayDeleteHandler interface for that can handle valid data cocsn routes route route destination gateway delete params -type DataCocsnRoutesRouteRouteDestinationGatewayDeleteHandler interface { - Handle(DataCocsnRoutesRouteRouteDestinationGatewayDeleteParams, interface{}) middleware.Responder -} - -// NewDataCocsnRoutesRouteRouteDestinationGatewayDelete creates a new http.Handler for the data cocsn routes route route destination gateway delete operation -func NewDataCocsnRoutesRouteRouteDestinationGatewayDelete(ctx *middleware.Context, handler DataCocsnRoutesRouteRouteDestinationGatewayDeleteHandler) *DataCocsnRoutesRouteRouteDestinationGatewayDelete { - return &DataCocsnRoutesRouteRouteDestinationGatewayDelete{Context: ctx, Handler: handler} -} - -/*DataCocsnRoutesRouteRouteDestinationGatewayDelete swagger:route DELETE /data/cocsn:routes/route={route-destination}/gateway data delete dataCocsnRoutesRouteRouteDestinationGatewayDelete - -Route gateway. IP address or host name - -Route gateway. IP address or host name - -*/ -type DataCocsnRoutesRouteRouteDestinationGatewayDelete struct { - Context *middleware.Context - Handler DataCocsnRoutesRouteRouteDestinationGatewayDeleteHandler -} - -func (o *DataCocsnRoutesRouteRouteDestinationGatewayDelete) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataCocsnRoutesRouteRouteDestinationGatewayDeleteParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_delete_parameters.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_delete_parameters.go deleted file mode 100644 index f32fa96f9a722669bfedee1b6ced8ebd571a358a..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_delete_parameters.go +++ /dev/null @@ -1,72 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" -) - -// NewDataCocsnRoutesRouteRouteDestinationGatewayDeleteParams creates a new DataCocsnRoutesRouteRouteDestinationGatewayDeleteParams object -// no default values defined in spec. -func NewDataCocsnRoutesRouteRouteDestinationGatewayDeleteParams() DataCocsnRoutesRouteRouteDestinationGatewayDeleteParams { - - return DataCocsnRoutesRouteRouteDestinationGatewayDeleteParams{} -} - -// DataCocsnRoutesRouteRouteDestinationGatewayDeleteParams contains all the bound params for the data cocsn routes route route destination gateway delete operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_routes_route_route_destination_gateway_delete -type DataCocsnRoutesRouteRouteDestinationGatewayDeleteParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*Route destination. IP network - Required: true - In: path - */ - RouteDestination string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnRoutesRouteRouteDestinationGatewayDeleteParams() beforehand. -func (o *DataCocsnRoutesRouteRouteDestinationGatewayDeleteParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - rRouteDestination, rhkRouteDestination, _ := route.Params.GetOK("route-destination") - if err := o.bindRouteDestination(rRouteDestination, rhkRouteDestination, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindRouteDestination binds and validates parameter RouteDestination from path. -func (o *DataCocsnRoutesRouteRouteDestinationGatewayDeleteParams) bindRouteDestination(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.RouteDestination = raw - - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_delete_responses.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_delete_responses.go deleted file mode 100644 index 5aadf29694420c3b87c46c720cc5919aa430bda4..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_delete_responses.go +++ /dev/null @@ -1,36 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// DataCocsnRoutesRouteRouteDestinationGatewayDeleteNoContentCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationGatewayDeleteNoContent -const DataCocsnRoutesRouteRouteDestinationGatewayDeleteNoContentCode int = 204 - -/*DataCocsnRoutesRouteRouteDestinationGatewayDeleteNoContent No Content - -swagger:response dataCocsnRoutesRouteRouteDestinationGatewayDeleteNoContent -*/ -type DataCocsnRoutesRouteRouteDestinationGatewayDeleteNoContent struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationGatewayDeleteNoContent creates DataCocsnRoutesRouteRouteDestinationGatewayDeleteNoContent with default headers values -func NewDataCocsnRoutesRouteRouteDestinationGatewayDeleteNoContent() *DataCocsnRoutesRouteRouteDestinationGatewayDeleteNoContent { - - return &DataCocsnRoutesRouteRouteDestinationGatewayDeleteNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationGatewayDeleteNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_delete_urlbuilder.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_delete_urlbuilder.go deleted file mode 100644 index 764c077ab043759df8f964d8b2bb3a16698e174e..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_delete_urlbuilder.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" -) - -// DataCocsnRoutesRouteRouteDestinationGatewayDeleteURL generates an URL for the data cocsn routes route route destination gateway delete operation -type DataCocsnRoutesRouteRouteDestinationGatewayDeleteURL struct { - RouteDestination string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnRoutesRouteRouteDestinationGatewayDeleteURL) WithBasePath(bp string) *DataCocsnRoutesRouteRouteDestinationGatewayDeleteURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnRoutesRouteRouteDestinationGatewayDeleteURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DataCocsnRoutesRouteRouteDestinationGatewayDeleteURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/cocsn:routes/route={route-destination}/gateway" - - routeDestination := o.RouteDestination - if routeDestination != "" { - _path = strings.Replace(_path, "{route-destination}", routeDestination, -1) - } else { - return nil, errors.New("routeDestination is required on DataCocsnRoutesRouteRouteDestinationGatewayDeleteURL") - } - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnRoutesRouteRouteDestinationGatewayDeleteURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DataCocsnRoutesRouteRouteDestinationGatewayDeleteURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnRoutesRouteRouteDestinationGatewayDeleteURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnRoutesRouteRouteDestinationGatewayDeleteURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnRoutesRouteRouteDestinationGatewayDeleteURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DataCocsnRoutesRouteRouteDestinationGatewayDeleteURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_get.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_get.go deleted file mode 100644 index 4f5e112d8688f2c196ec64b831d9ac277d3e8b22..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_get.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataCocsnRoutesRouteRouteDestinationGatewayGetHandlerFunc turns a function with the right signature into a data cocsn routes route route destination gateway get handler -type DataCocsnRoutesRouteRouteDestinationGatewayGetHandlerFunc func(DataCocsnRoutesRouteRouteDestinationGatewayGetParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataCocsnRoutesRouteRouteDestinationGatewayGetHandlerFunc) Handle(params DataCocsnRoutesRouteRouteDestinationGatewayGetParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataCocsnRoutesRouteRouteDestinationGatewayGetHandler interface for that can handle valid data cocsn routes route route destination gateway get params -type DataCocsnRoutesRouteRouteDestinationGatewayGetHandler interface { - Handle(DataCocsnRoutesRouteRouteDestinationGatewayGetParams, interface{}) middleware.Responder -} - -// NewDataCocsnRoutesRouteRouteDestinationGatewayGet creates a new http.Handler for the data cocsn routes route route destination gateway get operation -func NewDataCocsnRoutesRouteRouteDestinationGatewayGet(ctx *middleware.Context, handler DataCocsnRoutesRouteRouteDestinationGatewayGetHandler) *DataCocsnRoutesRouteRouteDestinationGatewayGet { - return &DataCocsnRoutesRouteRouteDestinationGatewayGet{Context: ctx, Handler: handler} -} - -/*DataCocsnRoutesRouteRouteDestinationGatewayGet swagger:route GET /data/cocsn:routes/route={route-destination}/gateway data get dataCocsnRoutesRouteRouteDestinationGatewayGet - -Route gateway. IP address or host name - -Route gateway. IP address or host name - -*/ -type DataCocsnRoutesRouteRouteDestinationGatewayGet struct { - Context *middleware.Context - Handler DataCocsnRoutesRouteRouteDestinationGatewayGetHandler -} - -func (o *DataCocsnRoutesRouteRouteDestinationGatewayGet) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataCocsnRoutesRouteRouteDestinationGatewayGetParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_get_parameters.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_get_parameters.go deleted file mode 100644 index 94a496631765681fb66af04b940e6d60ade8b8ed..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_get_parameters.go +++ /dev/null @@ -1,260 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// NewDataCocsnRoutesRouteRouteDestinationGatewayGetParams creates a new DataCocsnRoutesRouteRouteDestinationGatewayGetParams object -// with the default values initialized. -func NewDataCocsnRoutesRouteRouteDestinationGatewayGetParams() DataCocsnRoutesRouteRouteDestinationGatewayGetParams { - - var ( - // initialize parameters with default values - - contentDefault = string("config") - - withDefaultsDefault = string("report-all") - ) - - return DataCocsnRoutesRouteRouteDestinationGatewayGetParams{ - Content: &contentDefault, - - WithDefaults: &withDefaultsDefault, - } -} - -// DataCocsnRoutesRouteRouteDestinationGatewayGetParams contains all the bound params for the data cocsn routes route route destination gateway get operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_routes_route_route_destination_gateway_get -type DataCocsnRoutesRouteRouteDestinationGatewayGetParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*controlling descendant nodes in response - In: query - Default: "config" - */ - Content *string - /*limit the depth of nodes in response - In: query - */ - Depth *uint16 - /*optionally identify specific data nodes in response - In: query - */ - Fields *string - /*xpath expression to filter data nodes in response - In: query - */ - Filter *string - /*Route destination. IP network - Required: true - In: path - */ - RouteDestination string - /*controlling default values in response - In: query - Default: "report-all" - */ - WithDefaults *string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnRoutesRouteRouteDestinationGatewayGetParams() beforehand. -func (o *DataCocsnRoutesRouteRouteDestinationGatewayGetParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - qs := runtime.Values(r.URL.Query()) - - qContent, qhkContent, _ := qs.GetOK("content") - if err := o.bindContent(qContent, qhkContent, route.Formats); err != nil { - res = append(res, err) - } - - qDepth, qhkDepth, _ := qs.GetOK("depth") - if err := o.bindDepth(qDepth, qhkDepth, route.Formats); err != nil { - res = append(res, err) - } - - qFields, qhkFields, _ := qs.GetOK("fields") - if err := o.bindFields(qFields, qhkFields, route.Formats); err != nil { - res = append(res, err) - } - - qFilter, qhkFilter, _ := qs.GetOK("filter") - if err := o.bindFilter(qFilter, qhkFilter, route.Formats); err != nil { - res = append(res, err) - } - - rRouteDestination, rhkRouteDestination, _ := route.Params.GetOK("route-destination") - if err := o.bindRouteDestination(rRouteDestination, rhkRouteDestination, route.Formats); err != nil { - res = append(res, err) - } - - qWithDefaults, qhkWithDefaults, _ := qs.GetOK("with-defaults") - if err := o.bindWithDefaults(qWithDefaults, qhkWithDefaults, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindContent binds and validates parameter Content from query. -func (o *DataCocsnRoutesRouteRouteDestinationGatewayGetParams) bindContent(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - // Default values have been previously initialized by NewDataCocsnRoutesRouteRouteDestinationGatewayGetParams() - return nil - } - - o.Content = &raw - - if err := o.validateContent(formats); err != nil { - return err - } - - return nil -} - -// validateContent carries on validations for parameter Content -func (o *DataCocsnRoutesRouteRouteDestinationGatewayGetParams) validateContent(formats strfmt.Registry) error { - - if err := validate.EnumCase("content", "query", *o.Content, []interface{}{"config", "nonconfig", "all"}, true); err != nil { - return err - } - - return nil -} - -// bindDepth binds and validates parameter Depth from query. -func (o *DataCocsnRoutesRouteRouteDestinationGatewayGetParams) bindDepth(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - value, err := swag.ConvertUint16(raw) - if err != nil { - return errors.InvalidType("depth", "query", "uint16", raw) - } - o.Depth = &value - - return nil -} - -// bindFields binds and validates parameter Fields from query. -func (o *DataCocsnRoutesRouteRouteDestinationGatewayGetParams) bindFields(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - o.Fields = &raw - - return nil -} - -// bindFilter binds and validates parameter Filter from query. -func (o *DataCocsnRoutesRouteRouteDestinationGatewayGetParams) bindFilter(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - o.Filter = &raw - - return nil -} - -// bindRouteDestination binds and validates parameter RouteDestination from path. -func (o *DataCocsnRoutesRouteRouteDestinationGatewayGetParams) bindRouteDestination(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.RouteDestination = raw - - return nil -} - -// bindWithDefaults binds and validates parameter WithDefaults from query. -func (o *DataCocsnRoutesRouteRouteDestinationGatewayGetParams) bindWithDefaults(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - // Default values have been previously initialized by NewDataCocsnRoutesRouteRouteDestinationGatewayGetParams() - return nil - } - - o.WithDefaults = &raw - - if err := o.validateWithDefaults(formats); err != nil { - return err - } - - return nil -} - -// validateWithDefaults carries on validations for parameter WithDefaults -func (o *DataCocsnRoutesRouteRouteDestinationGatewayGetParams) validateWithDefaults(formats strfmt.Registry) error { - - if err := validate.EnumCase("with-defaults", "query", *o.WithDefaults, []interface{}{"report-all", "trim", "explicit", "report-all-tagged"}, true); err != nil { - return err - } - - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_get_responses.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_get_responses.go deleted file mode 100644 index 29b34e402a2ab4170b7d7ecac2ebcbd9c6cd135f..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_get_responses.go +++ /dev/null @@ -1,202 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" - - "code.fbi.h-da.de/cocsn/cocsn-api/api/models" -) - -// DataCocsnRoutesRouteRouteDestinationGatewayGetOKCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationGatewayGetOK -const DataCocsnRoutesRouteRouteDestinationGatewayGetOKCode int = 200 - -/*DataCocsnRoutesRouteRouteDestinationGatewayGetOK Route gateway. IP address or host name - -swagger:response dataCocsnRoutesRouteRouteDestinationGatewayGetOK -*/ -type DataCocsnRoutesRouteRouteDestinationGatewayGetOK struct { - - /* - In: Body - */ - Payload *models.DataCocsnRoutesRouteRouteDestinationGateway `json:"body,omitempty"` -} - -// NewDataCocsnRoutesRouteRouteDestinationGatewayGetOK creates DataCocsnRoutesRouteRouteDestinationGatewayGetOK with default headers values -func NewDataCocsnRoutesRouteRouteDestinationGatewayGetOK() *DataCocsnRoutesRouteRouteDestinationGatewayGetOK { - - return &DataCocsnRoutesRouteRouteDestinationGatewayGetOK{} -} - -// WithPayload adds the payload to the data cocsn routes route route destination gateway get o k response -func (o *DataCocsnRoutesRouteRouteDestinationGatewayGetOK) WithPayload(payload *models.DataCocsnRoutesRouteRouteDestinationGateway) *DataCocsnRoutesRouteRouteDestinationGatewayGetOK { - o.Payload = payload - return o -} - -// SetPayload sets the payload to the data cocsn routes route route destination gateway get o k response -func (o *DataCocsnRoutesRouteRouteDestinationGatewayGetOK) SetPayload(payload *models.DataCocsnRoutesRouteRouteDestinationGateway) { - o.Payload = payload -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationGatewayGetOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.WriteHeader(200) - if o.Payload != nil { - payload := o.Payload - if err := producer.Produce(rw, payload); err != nil { - panic(err) // let the recovery middleware deal with this - } - } -} - -// DataCocsnRoutesRouteRouteDestinationGatewayGetNoContentCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationGatewayGetNoContent -const DataCocsnRoutesRouteRouteDestinationGatewayGetNoContentCode int = 204 - -/*DataCocsnRoutesRouteRouteDestinationGatewayGetNoContent No Content - -swagger:response dataCocsnRoutesRouteRouteDestinationGatewayGetNoContent -*/ -type DataCocsnRoutesRouteRouteDestinationGatewayGetNoContent struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationGatewayGetNoContent creates DataCocsnRoutesRouteRouteDestinationGatewayGetNoContent with default headers values -func NewDataCocsnRoutesRouteRouteDestinationGatewayGetNoContent() *DataCocsnRoutesRouteRouteDestinationGatewayGetNoContent { - - return &DataCocsnRoutesRouteRouteDestinationGatewayGetNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationGatewayGetNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DataCocsnRoutesRouteRouteDestinationGatewayGetBadRequestCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationGatewayGetBadRequest -const DataCocsnRoutesRouteRouteDestinationGatewayGetBadRequestCode int = 400 - -/*DataCocsnRoutesRouteRouteDestinationGatewayGetBadRequest Bad Request - -swagger:response dataCocsnRoutesRouteRouteDestinationGatewayGetBadRequest -*/ -type DataCocsnRoutesRouteRouteDestinationGatewayGetBadRequest struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationGatewayGetBadRequest creates DataCocsnRoutesRouteRouteDestinationGatewayGetBadRequest with default headers values -func NewDataCocsnRoutesRouteRouteDestinationGatewayGetBadRequest() *DataCocsnRoutesRouteRouteDestinationGatewayGetBadRequest { - - return &DataCocsnRoutesRouteRouteDestinationGatewayGetBadRequest{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationGatewayGetBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// DataCocsnRoutesRouteRouteDestinationGatewayGetUnauthorizedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationGatewayGetUnauthorized -const DataCocsnRoutesRouteRouteDestinationGatewayGetUnauthorizedCode int = 401 - -/*DataCocsnRoutesRouteRouteDestinationGatewayGetUnauthorized Unauthorized - -swagger:response dataCocsnRoutesRouteRouteDestinationGatewayGetUnauthorized -*/ -type DataCocsnRoutesRouteRouteDestinationGatewayGetUnauthorized struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationGatewayGetUnauthorized creates DataCocsnRoutesRouteRouteDestinationGatewayGetUnauthorized with default headers values -func NewDataCocsnRoutesRouteRouteDestinationGatewayGetUnauthorized() *DataCocsnRoutesRouteRouteDestinationGatewayGetUnauthorized { - - return &DataCocsnRoutesRouteRouteDestinationGatewayGetUnauthorized{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationGatewayGetUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(401) -} - -// DataCocsnRoutesRouteRouteDestinationGatewayGetNotFoundCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationGatewayGetNotFound -const DataCocsnRoutesRouteRouteDestinationGatewayGetNotFoundCode int = 404 - -/*DataCocsnRoutesRouteRouteDestinationGatewayGetNotFound Not Found - -swagger:response dataCocsnRoutesRouteRouteDestinationGatewayGetNotFound -*/ -type DataCocsnRoutesRouteRouteDestinationGatewayGetNotFound struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationGatewayGetNotFound creates DataCocsnRoutesRouteRouteDestinationGatewayGetNotFound with default headers values -func NewDataCocsnRoutesRouteRouteDestinationGatewayGetNotFound() *DataCocsnRoutesRouteRouteDestinationGatewayGetNotFound { - - return &DataCocsnRoutesRouteRouteDestinationGatewayGetNotFound{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationGatewayGetNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(404) -} - -// DataCocsnRoutesRouteRouteDestinationGatewayGetMethodNotAllowedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationGatewayGetMethodNotAllowed -const DataCocsnRoutesRouteRouteDestinationGatewayGetMethodNotAllowedCode int = 405 - -/*DataCocsnRoutesRouteRouteDestinationGatewayGetMethodNotAllowed Method Not Allowed - -swagger:response dataCocsnRoutesRouteRouteDestinationGatewayGetMethodNotAllowed -*/ -type DataCocsnRoutesRouteRouteDestinationGatewayGetMethodNotAllowed struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationGatewayGetMethodNotAllowed creates DataCocsnRoutesRouteRouteDestinationGatewayGetMethodNotAllowed with default headers values -func NewDataCocsnRoutesRouteRouteDestinationGatewayGetMethodNotAllowed() *DataCocsnRoutesRouteRouteDestinationGatewayGetMethodNotAllowed { - - return &DataCocsnRoutesRouteRouteDestinationGatewayGetMethodNotAllowed{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationGatewayGetMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(405) -} - -// DataCocsnRoutesRouteRouteDestinationGatewayGetConflictCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationGatewayGetConflict -const DataCocsnRoutesRouteRouteDestinationGatewayGetConflictCode int = 409 - -/*DataCocsnRoutesRouteRouteDestinationGatewayGetConflict Conflict - -swagger:response dataCocsnRoutesRouteRouteDestinationGatewayGetConflict -*/ -type DataCocsnRoutesRouteRouteDestinationGatewayGetConflict struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationGatewayGetConflict creates DataCocsnRoutesRouteRouteDestinationGatewayGetConflict with default headers values -func NewDataCocsnRoutesRouteRouteDestinationGatewayGetConflict() *DataCocsnRoutesRouteRouteDestinationGatewayGetConflict { - - return &DataCocsnRoutesRouteRouteDestinationGatewayGetConflict{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationGatewayGetConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_get_urlbuilder.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_get_urlbuilder.go deleted file mode 100644 index 797fb02f1b10a35495b318be66ed1ccbe3e59c37..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_get_urlbuilder.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" - - "github.com/go-openapi/swag" -) - -// DataCocsnRoutesRouteRouteDestinationGatewayGetURL generates an URL for the data cocsn routes route route destination gateway get operation -type DataCocsnRoutesRouteRouteDestinationGatewayGetURL struct { - RouteDestination string - - Content *string - Depth *uint16 - Fields *string - Filter *string - WithDefaults *string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnRoutesRouteRouteDestinationGatewayGetURL) WithBasePath(bp string) *DataCocsnRoutesRouteRouteDestinationGatewayGetURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnRoutesRouteRouteDestinationGatewayGetURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DataCocsnRoutesRouteRouteDestinationGatewayGetURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/cocsn:routes/route={route-destination}/gateway" - - routeDestination := o.RouteDestination - if routeDestination != "" { - _path = strings.Replace(_path, "{route-destination}", routeDestination, -1) - } else { - return nil, errors.New("routeDestination is required on DataCocsnRoutesRouteRouteDestinationGatewayGetURL") - } - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - qs := make(url.Values) - - var contentQ string - if o.Content != nil { - contentQ = *o.Content - } - if contentQ != "" { - qs.Set("content", contentQ) - } - - var depthQ string - if o.Depth != nil { - depthQ = swag.FormatUint16(*o.Depth) - } - if depthQ != "" { - qs.Set("depth", depthQ) - } - - var fieldsQ string - if o.Fields != nil { - fieldsQ = *o.Fields - } - if fieldsQ != "" { - qs.Set("fields", fieldsQ) - } - - var filterQ string - if o.Filter != nil { - filterQ = *o.Filter - } - if filterQ != "" { - qs.Set("filter", filterQ) - } - - var withDefaultsQ string - if o.WithDefaults != nil { - withDefaultsQ = *o.WithDefaults - } - if withDefaultsQ != "" { - qs.Set("with-defaults", withDefaultsQ) - } - - _result.RawQuery = qs.Encode() - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnRoutesRouteRouteDestinationGatewayGetURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DataCocsnRoutesRouteRouteDestinationGatewayGetURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnRoutesRouteRouteDestinationGatewayGetURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnRoutesRouteRouteDestinationGatewayGetURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnRoutesRouteRouteDestinationGatewayGetURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DataCocsnRoutesRouteRouteDestinationGatewayGetURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_patch.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_patch.go deleted file mode 100644 index 44b2d6d89d18e3dfeb3b40aed7e7063664e3b5ba..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_patch.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataCocsnRoutesRouteRouteDestinationGatewayPatchHandlerFunc turns a function with the right signature into a data cocsn routes route route destination gateway patch handler -type DataCocsnRoutesRouteRouteDestinationGatewayPatchHandlerFunc func(DataCocsnRoutesRouteRouteDestinationGatewayPatchParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataCocsnRoutesRouteRouteDestinationGatewayPatchHandlerFunc) Handle(params DataCocsnRoutesRouteRouteDestinationGatewayPatchParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataCocsnRoutesRouteRouteDestinationGatewayPatchHandler interface for that can handle valid data cocsn routes route route destination gateway patch params -type DataCocsnRoutesRouteRouteDestinationGatewayPatchHandler interface { - Handle(DataCocsnRoutesRouteRouteDestinationGatewayPatchParams, interface{}) middleware.Responder -} - -// NewDataCocsnRoutesRouteRouteDestinationGatewayPatch creates a new http.Handler for the data cocsn routes route route destination gateway patch operation -func NewDataCocsnRoutesRouteRouteDestinationGatewayPatch(ctx *middleware.Context, handler DataCocsnRoutesRouteRouteDestinationGatewayPatchHandler) *DataCocsnRoutesRouteRouteDestinationGatewayPatch { - return &DataCocsnRoutesRouteRouteDestinationGatewayPatch{Context: ctx, Handler: handler} -} - -/*DataCocsnRoutesRouteRouteDestinationGatewayPatch swagger:route PATCH /data/cocsn:routes/route={route-destination}/gateway data patch dataCocsnRoutesRouteRouteDestinationGatewayPatch - -Route gateway. IP address or host name - -Route gateway. IP address or host name - -*/ -type DataCocsnRoutesRouteRouteDestinationGatewayPatch struct { - Context *middleware.Context - Handler DataCocsnRoutesRouteRouteDestinationGatewayPatchHandler -} - -func (o *DataCocsnRoutesRouteRouteDestinationGatewayPatch) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataCocsnRoutesRouteRouteDestinationGatewayPatchParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_patch_parameters.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_patch_parameters.go deleted file mode 100644 index 41eef3801f1c6334b5e5d02ebb265b5f231b6c55..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_patch_parameters.go +++ /dev/null @@ -1,103 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "io" - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - - "code.fbi.h-da.de/cocsn/cocsn-api/api/models" -) - -// NewDataCocsnRoutesRouteRouteDestinationGatewayPatchParams creates a new DataCocsnRoutesRouteRouteDestinationGatewayPatchParams object -// no default values defined in spec. -func NewDataCocsnRoutesRouteRouteDestinationGatewayPatchParams() DataCocsnRoutesRouteRouteDestinationGatewayPatchParams { - - return DataCocsnRoutesRouteRouteDestinationGatewayPatchParams{} -} - -// DataCocsnRoutesRouteRouteDestinationGatewayPatchParams contains all the bound params for the data cocsn routes route route destination gateway patch operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_routes_route_route_destination_gateway_patch -type DataCocsnRoutesRouteRouteDestinationGatewayPatchParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*Route gateway. IP address or host name - Required: true - In: body - */ - Gateway *models.DataCocsnRoutesRouteRouteDestinationGateway - /*Route destination. IP network - Required: true - In: path - */ - RouteDestination string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnRoutesRouteRouteDestinationGatewayPatchParams() beforehand. -func (o *DataCocsnRoutesRouteRouteDestinationGatewayPatchParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if runtime.HasBody(r) { - defer r.Body.Close() - var body models.DataCocsnRoutesRouteRouteDestinationGateway - if err := route.Consumer.Consume(r.Body, &body); err != nil { - if err == io.EOF { - res = append(res, errors.Required("gateway", "body", "")) - } else { - res = append(res, errors.NewParseError("gateway", "body", "", err)) - } - } else { - // validate body object - if err := body.Validate(route.Formats); err != nil { - res = append(res, err) - } - - if len(res) == 0 { - o.Gateway = &body - } - } - } else { - res = append(res, errors.Required("gateway", "body", "")) - } - rRouteDestination, rhkRouteDestination, _ := route.Params.GetOK("route-destination") - if err := o.bindRouteDestination(rRouteDestination, rhkRouteDestination, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindRouteDestination binds and validates parameter RouteDestination from path. -func (o *DataCocsnRoutesRouteRouteDestinationGatewayPatchParams) bindRouteDestination(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.RouteDestination = raw - - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_patch_responses.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_patch_responses.go deleted file mode 100644 index fe2bd52169178403c5739544cc995564200d5990..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_patch_responses.go +++ /dev/null @@ -1,156 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// DataCocsnRoutesRouteRouteDestinationGatewayPatchNoContentCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationGatewayPatchNoContent -const DataCocsnRoutesRouteRouteDestinationGatewayPatchNoContentCode int = 204 - -/*DataCocsnRoutesRouteRouteDestinationGatewayPatchNoContent leaf gateway updated - -swagger:response dataCocsnRoutesRouteRouteDestinationGatewayPatchNoContent -*/ -type DataCocsnRoutesRouteRouteDestinationGatewayPatchNoContent struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationGatewayPatchNoContent creates DataCocsnRoutesRouteRouteDestinationGatewayPatchNoContent with default headers values -func NewDataCocsnRoutesRouteRouteDestinationGatewayPatchNoContent() *DataCocsnRoutesRouteRouteDestinationGatewayPatchNoContent { - - return &DataCocsnRoutesRouteRouteDestinationGatewayPatchNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationGatewayPatchNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DataCocsnRoutesRouteRouteDestinationGatewayPatchBadRequestCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationGatewayPatchBadRequest -const DataCocsnRoutesRouteRouteDestinationGatewayPatchBadRequestCode int = 400 - -/*DataCocsnRoutesRouteRouteDestinationGatewayPatchBadRequest Bad Request - -swagger:response dataCocsnRoutesRouteRouteDestinationGatewayPatchBadRequest -*/ -type DataCocsnRoutesRouteRouteDestinationGatewayPatchBadRequest struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationGatewayPatchBadRequest creates DataCocsnRoutesRouteRouteDestinationGatewayPatchBadRequest with default headers values -func NewDataCocsnRoutesRouteRouteDestinationGatewayPatchBadRequest() *DataCocsnRoutesRouteRouteDestinationGatewayPatchBadRequest { - - return &DataCocsnRoutesRouteRouteDestinationGatewayPatchBadRequest{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationGatewayPatchBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// DataCocsnRoutesRouteRouteDestinationGatewayPatchUnauthorizedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationGatewayPatchUnauthorized -const DataCocsnRoutesRouteRouteDestinationGatewayPatchUnauthorizedCode int = 401 - -/*DataCocsnRoutesRouteRouteDestinationGatewayPatchUnauthorized Unauthorized - -swagger:response dataCocsnRoutesRouteRouteDestinationGatewayPatchUnauthorized -*/ -type DataCocsnRoutesRouteRouteDestinationGatewayPatchUnauthorized struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationGatewayPatchUnauthorized creates DataCocsnRoutesRouteRouteDestinationGatewayPatchUnauthorized with default headers values -func NewDataCocsnRoutesRouteRouteDestinationGatewayPatchUnauthorized() *DataCocsnRoutesRouteRouteDestinationGatewayPatchUnauthorized { - - return &DataCocsnRoutesRouteRouteDestinationGatewayPatchUnauthorized{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationGatewayPatchUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(401) -} - -// DataCocsnRoutesRouteRouteDestinationGatewayPatchNotFoundCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationGatewayPatchNotFound -const DataCocsnRoutesRouteRouteDestinationGatewayPatchNotFoundCode int = 404 - -/*DataCocsnRoutesRouteRouteDestinationGatewayPatchNotFound Not Found - -swagger:response dataCocsnRoutesRouteRouteDestinationGatewayPatchNotFound -*/ -type DataCocsnRoutesRouteRouteDestinationGatewayPatchNotFound struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationGatewayPatchNotFound creates DataCocsnRoutesRouteRouteDestinationGatewayPatchNotFound with default headers values -func NewDataCocsnRoutesRouteRouteDestinationGatewayPatchNotFound() *DataCocsnRoutesRouteRouteDestinationGatewayPatchNotFound { - - return &DataCocsnRoutesRouteRouteDestinationGatewayPatchNotFound{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationGatewayPatchNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(404) -} - -// DataCocsnRoutesRouteRouteDestinationGatewayPatchMethodNotAllowedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationGatewayPatchMethodNotAllowed -const DataCocsnRoutesRouteRouteDestinationGatewayPatchMethodNotAllowedCode int = 405 - -/*DataCocsnRoutesRouteRouteDestinationGatewayPatchMethodNotAllowed Method Not Allowed - -swagger:response dataCocsnRoutesRouteRouteDestinationGatewayPatchMethodNotAllowed -*/ -type DataCocsnRoutesRouteRouteDestinationGatewayPatchMethodNotAllowed struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationGatewayPatchMethodNotAllowed creates DataCocsnRoutesRouteRouteDestinationGatewayPatchMethodNotAllowed with default headers values -func NewDataCocsnRoutesRouteRouteDestinationGatewayPatchMethodNotAllowed() *DataCocsnRoutesRouteRouteDestinationGatewayPatchMethodNotAllowed { - - return &DataCocsnRoutesRouteRouteDestinationGatewayPatchMethodNotAllowed{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationGatewayPatchMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(405) -} - -// DataCocsnRoutesRouteRouteDestinationGatewayPatchConflictCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationGatewayPatchConflict -const DataCocsnRoutesRouteRouteDestinationGatewayPatchConflictCode int = 409 - -/*DataCocsnRoutesRouteRouteDestinationGatewayPatchConflict Conflict - -swagger:response dataCocsnRoutesRouteRouteDestinationGatewayPatchConflict -*/ -type DataCocsnRoutesRouteRouteDestinationGatewayPatchConflict struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationGatewayPatchConflict creates DataCocsnRoutesRouteRouteDestinationGatewayPatchConflict with default headers values -func NewDataCocsnRoutesRouteRouteDestinationGatewayPatchConflict() *DataCocsnRoutesRouteRouteDestinationGatewayPatchConflict { - - return &DataCocsnRoutesRouteRouteDestinationGatewayPatchConflict{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationGatewayPatchConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_patch_urlbuilder.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_patch_urlbuilder.go deleted file mode 100644 index 96135e13aa2ce3ecf751234baed139e4e73307a5..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_patch_urlbuilder.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" -) - -// DataCocsnRoutesRouteRouteDestinationGatewayPatchURL generates an URL for the data cocsn routes route route destination gateway patch operation -type DataCocsnRoutesRouteRouteDestinationGatewayPatchURL struct { - RouteDestination string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnRoutesRouteRouteDestinationGatewayPatchURL) WithBasePath(bp string) *DataCocsnRoutesRouteRouteDestinationGatewayPatchURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnRoutesRouteRouteDestinationGatewayPatchURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DataCocsnRoutesRouteRouteDestinationGatewayPatchURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/cocsn:routes/route={route-destination}/gateway" - - routeDestination := o.RouteDestination - if routeDestination != "" { - _path = strings.Replace(_path, "{route-destination}", routeDestination, -1) - } else { - return nil, errors.New("routeDestination is required on DataCocsnRoutesRouteRouteDestinationGatewayPatchURL") - } - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnRoutesRouteRouteDestinationGatewayPatchURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DataCocsnRoutesRouteRouteDestinationGatewayPatchURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnRoutesRouteRouteDestinationGatewayPatchURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnRoutesRouteRouteDestinationGatewayPatchURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnRoutesRouteRouteDestinationGatewayPatchURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DataCocsnRoutesRouteRouteDestinationGatewayPatchURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_put.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_put.go deleted file mode 100644 index 9655b0002631f2717aff3a2d8f8944d7d0d6df85..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_put.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataCocsnRoutesRouteRouteDestinationGatewayPutHandlerFunc turns a function with the right signature into a data cocsn routes route route destination gateway put handler -type DataCocsnRoutesRouteRouteDestinationGatewayPutHandlerFunc func(DataCocsnRoutesRouteRouteDestinationGatewayPutParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataCocsnRoutesRouteRouteDestinationGatewayPutHandlerFunc) Handle(params DataCocsnRoutesRouteRouteDestinationGatewayPutParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataCocsnRoutesRouteRouteDestinationGatewayPutHandler interface for that can handle valid data cocsn routes route route destination gateway put params -type DataCocsnRoutesRouteRouteDestinationGatewayPutHandler interface { - Handle(DataCocsnRoutesRouteRouteDestinationGatewayPutParams, interface{}) middleware.Responder -} - -// NewDataCocsnRoutesRouteRouteDestinationGatewayPut creates a new http.Handler for the data cocsn routes route route destination gateway put operation -func NewDataCocsnRoutesRouteRouteDestinationGatewayPut(ctx *middleware.Context, handler DataCocsnRoutesRouteRouteDestinationGatewayPutHandler) *DataCocsnRoutesRouteRouteDestinationGatewayPut { - return &DataCocsnRoutesRouteRouteDestinationGatewayPut{Context: ctx, Handler: handler} -} - -/*DataCocsnRoutesRouteRouteDestinationGatewayPut swagger:route PUT /data/cocsn:routes/route={route-destination}/gateway data put dataCocsnRoutesRouteRouteDestinationGatewayPut - -Route gateway. IP address or host name - -Route gateway. IP address or host name - -*/ -type DataCocsnRoutesRouteRouteDestinationGatewayPut struct { - Context *middleware.Context - Handler DataCocsnRoutesRouteRouteDestinationGatewayPutHandler -} - -func (o *DataCocsnRoutesRouteRouteDestinationGatewayPut) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataCocsnRoutesRouteRouteDestinationGatewayPutParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_put_parameters.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_put_parameters.go deleted file mode 100644 index 9726fb2286ece9cd5a19094e408e5358499072b0..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_put_parameters.go +++ /dev/null @@ -1,103 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "io" - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - - "code.fbi.h-da.de/cocsn/cocsn-api/api/models" -) - -// NewDataCocsnRoutesRouteRouteDestinationGatewayPutParams creates a new DataCocsnRoutesRouteRouteDestinationGatewayPutParams object -// no default values defined in spec. -func NewDataCocsnRoutesRouteRouteDestinationGatewayPutParams() DataCocsnRoutesRouteRouteDestinationGatewayPutParams { - - return DataCocsnRoutesRouteRouteDestinationGatewayPutParams{} -} - -// DataCocsnRoutesRouteRouteDestinationGatewayPutParams contains all the bound params for the data cocsn routes route route destination gateway put operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_routes_route_route_destination_gateway_put -type DataCocsnRoutesRouteRouteDestinationGatewayPutParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*Route gateway. IP address or host name - Required: true - In: body - */ - Gateway *models.DataCocsnRoutesRouteRouteDestinationGateway - /*Route destination. IP network - Required: true - In: path - */ - RouteDestination string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnRoutesRouteRouteDestinationGatewayPutParams() beforehand. -func (o *DataCocsnRoutesRouteRouteDestinationGatewayPutParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if runtime.HasBody(r) { - defer r.Body.Close() - var body models.DataCocsnRoutesRouteRouteDestinationGateway - if err := route.Consumer.Consume(r.Body, &body); err != nil { - if err == io.EOF { - res = append(res, errors.Required("gateway", "body", "")) - } else { - res = append(res, errors.NewParseError("gateway", "body", "", err)) - } - } else { - // validate body object - if err := body.Validate(route.Formats); err != nil { - res = append(res, err) - } - - if len(res) == 0 { - o.Gateway = &body - } - } - } else { - res = append(res, errors.Required("gateway", "body", "")) - } - rRouteDestination, rhkRouteDestination, _ := route.Params.GetOK("route-destination") - if err := o.bindRouteDestination(rRouteDestination, rhkRouteDestination, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindRouteDestination binds and validates parameter RouteDestination from path. -func (o *DataCocsnRoutesRouteRouteDestinationGatewayPutParams) bindRouteDestination(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.RouteDestination = raw - - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_put_responses.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_put_responses.go deleted file mode 100644 index d6e7ae3746ad426a965f5c1812d565567cd16a87..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_put_responses.go +++ /dev/null @@ -1,180 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// DataCocsnRoutesRouteRouteDestinationGatewayPutCreatedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationGatewayPutCreated -const DataCocsnRoutesRouteRouteDestinationGatewayPutCreatedCode int = 201 - -/*DataCocsnRoutesRouteRouteDestinationGatewayPutCreated leaf gateway created or replaced - -swagger:response dataCocsnRoutesRouteRouteDestinationGatewayPutCreated -*/ -type DataCocsnRoutesRouteRouteDestinationGatewayPutCreated struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationGatewayPutCreated creates DataCocsnRoutesRouteRouteDestinationGatewayPutCreated with default headers values -func NewDataCocsnRoutesRouteRouteDestinationGatewayPutCreated() *DataCocsnRoutesRouteRouteDestinationGatewayPutCreated { - - return &DataCocsnRoutesRouteRouteDestinationGatewayPutCreated{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationGatewayPutCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(201) -} - -// DataCocsnRoutesRouteRouteDestinationGatewayPutNoContentCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationGatewayPutNoContent -const DataCocsnRoutesRouteRouteDestinationGatewayPutNoContentCode int = 204 - -/*DataCocsnRoutesRouteRouteDestinationGatewayPutNoContent No Content - -swagger:response dataCocsnRoutesRouteRouteDestinationGatewayPutNoContent -*/ -type DataCocsnRoutesRouteRouteDestinationGatewayPutNoContent struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationGatewayPutNoContent creates DataCocsnRoutesRouteRouteDestinationGatewayPutNoContent with default headers values -func NewDataCocsnRoutesRouteRouteDestinationGatewayPutNoContent() *DataCocsnRoutesRouteRouteDestinationGatewayPutNoContent { - - return &DataCocsnRoutesRouteRouteDestinationGatewayPutNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationGatewayPutNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DataCocsnRoutesRouteRouteDestinationGatewayPutBadRequestCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationGatewayPutBadRequest -const DataCocsnRoutesRouteRouteDestinationGatewayPutBadRequestCode int = 400 - -/*DataCocsnRoutesRouteRouteDestinationGatewayPutBadRequest Bad Request - -swagger:response dataCocsnRoutesRouteRouteDestinationGatewayPutBadRequest -*/ -type DataCocsnRoutesRouteRouteDestinationGatewayPutBadRequest struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationGatewayPutBadRequest creates DataCocsnRoutesRouteRouteDestinationGatewayPutBadRequest with default headers values -func NewDataCocsnRoutesRouteRouteDestinationGatewayPutBadRequest() *DataCocsnRoutesRouteRouteDestinationGatewayPutBadRequest { - - return &DataCocsnRoutesRouteRouteDestinationGatewayPutBadRequest{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationGatewayPutBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// DataCocsnRoutesRouteRouteDestinationGatewayPutUnauthorizedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationGatewayPutUnauthorized -const DataCocsnRoutesRouteRouteDestinationGatewayPutUnauthorizedCode int = 401 - -/*DataCocsnRoutesRouteRouteDestinationGatewayPutUnauthorized Unauthorized - -swagger:response dataCocsnRoutesRouteRouteDestinationGatewayPutUnauthorized -*/ -type DataCocsnRoutesRouteRouteDestinationGatewayPutUnauthorized struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationGatewayPutUnauthorized creates DataCocsnRoutesRouteRouteDestinationGatewayPutUnauthorized with default headers values -func NewDataCocsnRoutesRouteRouteDestinationGatewayPutUnauthorized() *DataCocsnRoutesRouteRouteDestinationGatewayPutUnauthorized { - - return &DataCocsnRoutesRouteRouteDestinationGatewayPutUnauthorized{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationGatewayPutUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(401) -} - -// DataCocsnRoutesRouteRouteDestinationGatewayPutNotFoundCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationGatewayPutNotFound -const DataCocsnRoutesRouteRouteDestinationGatewayPutNotFoundCode int = 404 - -/*DataCocsnRoutesRouteRouteDestinationGatewayPutNotFound Not Found - -swagger:response dataCocsnRoutesRouteRouteDestinationGatewayPutNotFound -*/ -type DataCocsnRoutesRouteRouteDestinationGatewayPutNotFound struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationGatewayPutNotFound creates DataCocsnRoutesRouteRouteDestinationGatewayPutNotFound with default headers values -func NewDataCocsnRoutesRouteRouteDestinationGatewayPutNotFound() *DataCocsnRoutesRouteRouteDestinationGatewayPutNotFound { - - return &DataCocsnRoutesRouteRouteDestinationGatewayPutNotFound{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationGatewayPutNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(404) -} - -// DataCocsnRoutesRouteRouteDestinationGatewayPutMethodNotAllowedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationGatewayPutMethodNotAllowed -const DataCocsnRoutesRouteRouteDestinationGatewayPutMethodNotAllowedCode int = 405 - -/*DataCocsnRoutesRouteRouteDestinationGatewayPutMethodNotAllowed Method Not Allowed - -swagger:response dataCocsnRoutesRouteRouteDestinationGatewayPutMethodNotAllowed -*/ -type DataCocsnRoutesRouteRouteDestinationGatewayPutMethodNotAllowed struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationGatewayPutMethodNotAllowed creates DataCocsnRoutesRouteRouteDestinationGatewayPutMethodNotAllowed with default headers values -func NewDataCocsnRoutesRouteRouteDestinationGatewayPutMethodNotAllowed() *DataCocsnRoutesRouteRouteDestinationGatewayPutMethodNotAllowed { - - return &DataCocsnRoutesRouteRouteDestinationGatewayPutMethodNotAllowed{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationGatewayPutMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(405) -} - -// DataCocsnRoutesRouteRouteDestinationGatewayPutConflictCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationGatewayPutConflict -const DataCocsnRoutesRouteRouteDestinationGatewayPutConflictCode int = 409 - -/*DataCocsnRoutesRouteRouteDestinationGatewayPutConflict Conflict - -swagger:response dataCocsnRoutesRouteRouteDestinationGatewayPutConflict -*/ -type DataCocsnRoutesRouteRouteDestinationGatewayPutConflict struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationGatewayPutConflict creates DataCocsnRoutesRouteRouteDestinationGatewayPutConflict with default headers values -func NewDataCocsnRoutesRouteRouteDestinationGatewayPutConflict() *DataCocsnRoutesRouteRouteDestinationGatewayPutConflict { - - return &DataCocsnRoutesRouteRouteDestinationGatewayPutConflict{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationGatewayPutConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_put_urlbuilder.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_put_urlbuilder.go deleted file mode 100644 index 054844e997f6cb57b4209d39034213df8340e72e..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_put_urlbuilder.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" -) - -// DataCocsnRoutesRouteRouteDestinationGatewayPutURL generates an URL for the data cocsn routes route route destination gateway put operation -type DataCocsnRoutesRouteRouteDestinationGatewayPutURL struct { - RouteDestination string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnRoutesRouteRouteDestinationGatewayPutURL) WithBasePath(bp string) *DataCocsnRoutesRouteRouteDestinationGatewayPutURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnRoutesRouteRouteDestinationGatewayPutURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DataCocsnRoutesRouteRouteDestinationGatewayPutURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/cocsn:routes/route={route-destination}/gateway" - - routeDestination := o.RouteDestination - if routeDestination != "" { - _path = strings.Replace(_path, "{route-destination}", routeDestination, -1) - } else { - return nil, errors.New("routeDestination is required on DataCocsnRoutesRouteRouteDestinationGatewayPutURL") - } - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnRoutesRouteRouteDestinationGatewayPutURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DataCocsnRoutesRouteRouteDestinationGatewayPutURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnRoutesRouteRouteDestinationGatewayPutURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnRoutesRouteRouteDestinationGatewayPutURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnRoutesRouteRouteDestinationGatewayPutURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DataCocsnRoutesRouteRouteDestinationGatewayPutURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_get.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_get.go deleted file mode 100644 index ebb27e3807d7a2fa81aca7ecb93aa9efee8bd615..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_get.go +++ /dev/null @@ -1,71 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataCocsnRoutesRouteRouteDestinationGetHandlerFunc turns a function with the right signature into a data cocsn routes route route destination get handler -type DataCocsnRoutesRouteRouteDestinationGetHandlerFunc func(DataCocsnRoutesRouteRouteDestinationGetParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataCocsnRoutesRouteRouteDestinationGetHandlerFunc) Handle(params DataCocsnRoutesRouteRouteDestinationGetParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataCocsnRoutesRouteRouteDestinationGetHandler interface for that can handle valid data cocsn routes route route destination get params -type DataCocsnRoutesRouteRouteDestinationGetHandler interface { - Handle(DataCocsnRoutesRouteRouteDestinationGetParams, interface{}) middleware.Responder -} - -// NewDataCocsnRoutesRouteRouteDestinationGet creates a new http.Handler for the data cocsn routes route route destination get operation -func NewDataCocsnRoutesRouteRouteDestinationGet(ctx *middleware.Context, handler DataCocsnRoutesRouteRouteDestinationGetHandler) *DataCocsnRoutesRouteRouteDestinationGet { - return &DataCocsnRoutesRouteRouteDestinationGet{Context: ctx, Handler: handler} -} - -/*DataCocsnRoutesRouteRouteDestinationGet swagger:route GET /data/cocsn:routes/route={route-destination} data get dataCocsnRoutesRouteRouteDestinationGet - -DataCocsnRoutesRouteRouteDestinationGet data cocsn routes route route destination get API - -*/ -type DataCocsnRoutesRouteRouteDestinationGet struct { - Context *middleware.Context - Handler DataCocsnRoutesRouteRouteDestinationGetHandler -} - -func (o *DataCocsnRoutesRouteRouteDestinationGet) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataCocsnRoutesRouteRouteDestinationGetParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_get_parameters.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_get_parameters.go deleted file mode 100644 index 8bd7d72010dd25441b0469804c2808c111147bc3..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_get_parameters.go +++ /dev/null @@ -1,260 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// NewDataCocsnRoutesRouteRouteDestinationGetParams creates a new DataCocsnRoutesRouteRouteDestinationGetParams object -// with the default values initialized. -func NewDataCocsnRoutesRouteRouteDestinationGetParams() DataCocsnRoutesRouteRouteDestinationGetParams { - - var ( - // initialize parameters with default values - - contentDefault = string("config") - - withDefaultsDefault = string("report-all") - ) - - return DataCocsnRoutesRouteRouteDestinationGetParams{ - Content: &contentDefault, - - WithDefaults: &withDefaultsDefault, - } -} - -// DataCocsnRoutesRouteRouteDestinationGetParams contains all the bound params for the data cocsn routes route route destination get operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_routes_route_route_destination_get -type DataCocsnRoutesRouteRouteDestinationGetParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*controlling descendant nodes in response - In: query - Default: "config" - */ - Content *string - /*limit the depth of nodes in response - In: query - */ - Depth *uint16 - /*optionally identify specific data nodes in response - In: query - */ - Fields *string - /*xpath expression to filter data nodes in response - In: query - */ - Filter *string - /*Route destination. IP network - Required: true - In: path - */ - RouteDestination string - /*controlling default values in response - In: query - Default: "report-all" - */ - WithDefaults *string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnRoutesRouteRouteDestinationGetParams() beforehand. -func (o *DataCocsnRoutesRouteRouteDestinationGetParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - qs := runtime.Values(r.URL.Query()) - - qContent, qhkContent, _ := qs.GetOK("content") - if err := o.bindContent(qContent, qhkContent, route.Formats); err != nil { - res = append(res, err) - } - - qDepth, qhkDepth, _ := qs.GetOK("depth") - if err := o.bindDepth(qDepth, qhkDepth, route.Formats); err != nil { - res = append(res, err) - } - - qFields, qhkFields, _ := qs.GetOK("fields") - if err := o.bindFields(qFields, qhkFields, route.Formats); err != nil { - res = append(res, err) - } - - qFilter, qhkFilter, _ := qs.GetOK("filter") - if err := o.bindFilter(qFilter, qhkFilter, route.Formats); err != nil { - res = append(res, err) - } - - rRouteDestination, rhkRouteDestination, _ := route.Params.GetOK("route-destination") - if err := o.bindRouteDestination(rRouteDestination, rhkRouteDestination, route.Formats); err != nil { - res = append(res, err) - } - - qWithDefaults, qhkWithDefaults, _ := qs.GetOK("with-defaults") - if err := o.bindWithDefaults(qWithDefaults, qhkWithDefaults, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindContent binds and validates parameter Content from query. -func (o *DataCocsnRoutesRouteRouteDestinationGetParams) bindContent(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - // Default values have been previously initialized by NewDataCocsnRoutesRouteRouteDestinationGetParams() - return nil - } - - o.Content = &raw - - if err := o.validateContent(formats); err != nil { - return err - } - - return nil -} - -// validateContent carries on validations for parameter Content -func (o *DataCocsnRoutesRouteRouteDestinationGetParams) validateContent(formats strfmt.Registry) error { - - if err := validate.EnumCase("content", "query", *o.Content, []interface{}{"config", "nonconfig", "all"}, true); err != nil { - return err - } - - return nil -} - -// bindDepth binds and validates parameter Depth from query. -func (o *DataCocsnRoutesRouteRouteDestinationGetParams) bindDepth(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - value, err := swag.ConvertUint16(raw) - if err != nil { - return errors.InvalidType("depth", "query", "uint16", raw) - } - o.Depth = &value - - return nil -} - -// bindFields binds and validates parameter Fields from query. -func (o *DataCocsnRoutesRouteRouteDestinationGetParams) bindFields(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - o.Fields = &raw - - return nil -} - -// bindFilter binds and validates parameter Filter from query. -func (o *DataCocsnRoutesRouteRouteDestinationGetParams) bindFilter(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - o.Filter = &raw - - return nil -} - -// bindRouteDestination binds and validates parameter RouteDestination from path. -func (o *DataCocsnRoutesRouteRouteDestinationGetParams) bindRouteDestination(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.RouteDestination = raw - - return nil -} - -// bindWithDefaults binds and validates parameter WithDefaults from query. -func (o *DataCocsnRoutesRouteRouteDestinationGetParams) bindWithDefaults(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - // Default values have been previously initialized by NewDataCocsnRoutesRouteRouteDestinationGetParams() - return nil - } - - o.WithDefaults = &raw - - if err := o.validateWithDefaults(formats); err != nil { - return err - } - - return nil -} - -// validateWithDefaults carries on validations for parameter WithDefaults -func (o *DataCocsnRoutesRouteRouteDestinationGetParams) validateWithDefaults(formats strfmt.Registry) error { - - if err := validate.EnumCase("with-defaults", "query", *o.WithDefaults, []interface{}{"report-all", "trim", "explicit", "report-all-tagged"}, true); err != nil { - return err - } - - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_get_responses.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_get_responses.go deleted file mode 100644 index 47ebca2aa6df60a750c222165ef20b550237da5b..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_get_responses.go +++ /dev/null @@ -1,202 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" - - "code.fbi.h-da.de/cocsn/cocsn-api/api/models" -) - -// DataCocsnRoutesRouteRouteDestinationGetOKCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationGetOK -const DataCocsnRoutesRouteRouteDestinationGetOKCode int = 200 - -/*DataCocsnRoutesRouteRouteDestinationGetOK OK - -swagger:response dataCocsnRoutesRouteRouteDestinationGetOK -*/ -type DataCocsnRoutesRouteRouteDestinationGetOK struct { - - /* - In: Body - */ - Payload *models.DataCocsnRoutesRouteRouteDestination `json:"body,omitempty"` -} - -// NewDataCocsnRoutesRouteRouteDestinationGetOK creates DataCocsnRoutesRouteRouteDestinationGetOK with default headers values -func NewDataCocsnRoutesRouteRouteDestinationGetOK() *DataCocsnRoutesRouteRouteDestinationGetOK { - - return &DataCocsnRoutesRouteRouteDestinationGetOK{} -} - -// WithPayload adds the payload to the data cocsn routes route route destination get o k response -func (o *DataCocsnRoutesRouteRouteDestinationGetOK) WithPayload(payload *models.DataCocsnRoutesRouteRouteDestination) *DataCocsnRoutesRouteRouteDestinationGetOK { - o.Payload = payload - return o -} - -// SetPayload sets the payload to the data cocsn routes route route destination get o k response -func (o *DataCocsnRoutesRouteRouteDestinationGetOK) SetPayload(payload *models.DataCocsnRoutesRouteRouteDestination) { - o.Payload = payload -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationGetOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.WriteHeader(200) - if o.Payload != nil { - payload := o.Payload - if err := producer.Produce(rw, payload); err != nil { - panic(err) // let the recovery middleware deal with this - } - } -} - -// DataCocsnRoutesRouteRouteDestinationGetNoContentCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationGetNoContent -const DataCocsnRoutesRouteRouteDestinationGetNoContentCode int = 204 - -/*DataCocsnRoutesRouteRouteDestinationGetNoContent No Content - -swagger:response dataCocsnRoutesRouteRouteDestinationGetNoContent -*/ -type DataCocsnRoutesRouteRouteDestinationGetNoContent struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationGetNoContent creates DataCocsnRoutesRouteRouteDestinationGetNoContent with default headers values -func NewDataCocsnRoutesRouteRouteDestinationGetNoContent() *DataCocsnRoutesRouteRouteDestinationGetNoContent { - - return &DataCocsnRoutesRouteRouteDestinationGetNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationGetNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DataCocsnRoutesRouteRouteDestinationGetBadRequestCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationGetBadRequest -const DataCocsnRoutesRouteRouteDestinationGetBadRequestCode int = 400 - -/*DataCocsnRoutesRouteRouteDestinationGetBadRequest Bad Request - -swagger:response dataCocsnRoutesRouteRouteDestinationGetBadRequest -*/ -type DataCocsnRoutesRouteRouteDestinationGetBadRequest struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationGetBadRequest creates DataCocsnRoutesRouteRouteDestinationGetBadRequest with default headers values -func NewDataCocsnRoutesRouteRouteDestinationGetBadRequest() *DataCocsnRoutesRouteRouteDestinationGetBadRequest { - - return &DataCocsnRoutesRouteRouteDestinationGetBadRequest{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationGetBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// DataCocsnRoutesRouteRouteDestinationGetUnauthorizedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationGetUnauthorized -const DataCocsnRoutesRouteRouteDestinationGetUnauthorizedCode int = 401 - -/*DataCocsnRoutesRouteRouteDestinationGetUnauthorized Unauthorized - -swagger:response dataCocsnRoutesRouteRouteDestinationGetUnauthorized -*/ -type DataCocsnRoutesRouteRouteDestinationGetUnauthorized struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationGetUnauthorized creates DataCocsnRoutesRouteRouteDestinationGetUnauthorized with default headers values -func NewDataCocsnRoutesRouteRouteDestinationGetUnauthorized() *DataCocsnRoutesRouteRouteDestinationGetUnauthorized { - - return &DataCocsnRoutesRouteRouteDestinationGetUnauthorized{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationGetUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(401) -} - -// DataCocsnRoutesRouteRouteDestinationGetNotFoundCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationGetNotFound -const DataCocsnRoutesRouteRouteDestinationGetNotFoundCode int = 404 - -/*DataCocsnRoutesRouteRouteDestinationGetNotFound Not Found - -swagger:response dataCocsnRoutesRouteRouteDestinationGetNotFound -*/ -type DataCocsnRoutesRouteRouteDestinationGetNotFound struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationGetNotFound creates DataCocsnRoutesRouteRouteDestinationGetNotFound with default headers values -func NewDataCocsnRoutesRouteRouteDestinationGetNotFound() *DataCocsnRoutesRouteRouteDestinationGetNotFound { - - return &DataCocsnRoutesRouteRouteDestinationGetNotFound{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationGetNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(404) -} - -// DataCocsnRoutesRouteRouteDestinationGetMethodNotAllowedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationGetMethodNotAllowed -const DataCocsnRoutesRouteRouteDestinationGetMethodNotAllowedCode int = 405 - -/*DataCocsnRoutesRouteRouteDestinationGetMethodNotAllowed Method Not Allowed - -swagger:response dataCocsnRoutesRouteRouteDestinationGetMethodNotAllowed -*/ -type DataCocsnRoutesRouteRouteDestinationGetMethodNotAllowed struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationGetMethodNotAllowed creates DataCocsnRoutesRouteRouteDestinationGetMethodNotAllowed with default headers values -func NewDataCocsnRoutesRouteRouteDestinationGetMethodNotAllowed() *DataCocsnRoutesRouteRouteDestinationGetMethodNotAllowed { - - return &DataCocsnRoutesRouteRouteDestinationGetMethodNotAllowed{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationGetMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(405) -} - -// DataCocsnRoutesRouteRouteDestinationGetConflictCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationGetConflict -const DataCocsnRoutesRouteRouteDestinationGetConflictCode int = 409 - -/*DataCocsnRoutesRouteRouteDestinationGetConflict Conflict - -swagger:response dataCocsnRoutesRouteRouteDestinationGetConflict -*/ -type DataCocsnRoutesRouteRouteDestinationGetConflict struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationGetConflict creates DataCocsnRoutesRouteRouteDestinationGetConflict with default headers values -func NewDataCocsnRoutesRouteRouteDestinationGetConflict() *DataCocsnRoutesRouteRouteDestinationGetConflict { - - return &DataCocsnRoutesRouteRouteDestinationGetConflict{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationGetConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_get_urlbuilder.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_get_urlbuilder.go deleted file mode 100644 index 08310ceeaabf64d9df0c0cdc35d7ca539f2333f9..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_get_urlbuilder.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" - - "github.com/go-openapi/swag" -) - -// DataCocsnRoutesRouteRouteDestinationGetURL generates an URL for the data cocsn routes route route destination get operation -type DataCocsnRoutesRouteRouteDestinationGetURL struct { - RouteDestination string - - Content *string - Depth *uint16 - Fields *string - Filter *string - WithDefaults *string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnRoutesRouteRouteDestinationGetURL) WithBasePath(bp string) *DataCocsnRoutesRouteRouteDestinationGetURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnRoutesRouteRouteDestinationGetURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DataCocsnRoutesRouteRouteDestinationGetURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/cocsn:routes/route={route-destination}" - - routeDestination := o.RouteDestination - if routeDestination != "" { - _path = strings.Replace(_path, "{route-destination}", routeDestination, -1) - } else { - return nil, errors.New("routeDestination is required on DataCocsnRoutesRouteRouteDestinationGetURL") - } - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - qs := make(url.Values) - - var contentQ string - if o.Content != nil { - contentQ = *o.Content - } - if contentQ != "" { - qs.Set("content", contentQ) - } - - var depthQ string - if o.Depth != nil { - depthQ = swag.FormatUint16(*o.Depth) - } - if depthQ != "" { - qs.Set("depth", depthQ) - } - - var fieldsQ string - if o.Fields != nil { - fieldsQ = *o.Fields - } - if fieldsQ != "" { - qs.Set("fields", fieldsQ) - } - - var filterQ string - if o.Filter != nil { - filterQ = *o.Filter - } - if filterQ != "" { - qs.Set("filter", filterQ) - } - - var withDefaultsQ string - if o.WithDefaults != nil { - withDefaultsQ = *o.WithDefaults - } - if withDefaultsQ != "" { - qs.Set("with-defaults", withDefaultsQ) - } - - _result.RawQuery = qs.Encode() - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnRoutesRouteRouteDestinationGetURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DataCocsnRoutesRouteRouteDestinationGetURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnRoutesRouteRouteDestinationGetURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnRoutesRouteRouteDestinationGetURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnRoutesRouteRouteDestinationGetURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DataCocsnRoutesRouteRouteDestinationGetURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_delete.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_delete.go deleted file mode 100644 index 3a7e40c64bb9f13b575191c571d001b04013954e..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_delete.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataCocsnRoutesRouteRouteDestinationInterfaceDeleteHandlerFunc turns a function with the right signature into a data cocsn routes route route destination interface delete handler -type DataCocsnRoutesRouteRouteDestinationInterfaceDeleteHandlerFunc func(DataCocsnRoutesRouteRouteDestinationInterfaceDeleteParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataCocsnRoutesRouteRouteDestinationInterfaceDeleteHandlerFunc) Handle(params DataCocsnRoutesRouteRouteDestinationInterfaceDeleteParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataCocsnRoutesRouteRouteDestinationInterfaceDeleteHandler interface for that can handle valid data cocsn routes route route destination interface delete params -type DataCocsnRoutesRouteRouteDestinationInterfaceDeleteHandler interface { - Handle(DataCocsnRoutesRouteRouteDestinationInterfaceDeleteParams, interface{}) middleware.Responder -} - -// NewDataCocsnRoutesRouteRouteDestinationInterfaceDelete creates a new http.Handler for the data cocsn routes route route destination interface delete operation -func NewDataCocsnRoutesRouteRouteDestinationInterfaceDelete(ctx *middleware.Context, handler DataCocsnRoutesRouteRouteDestinationInterfaceDeleteHandler) *DataCocsnRoutesRouteRouteDestinationInterfaceDelete { - return &DataCocsnRoutesRouteRouteDestinationInterfaceDelete{Context: ctx, Handler: handler} -} - -/*DataCocsnRoutesRouteRouteDestinationInterfaceDelete swagger:route DELETE /data/cocsn:routes/route={route-destination}/interface data delete dataCocsnRoutesRouteRouteDestinationInterfaceDelete - -Interface used for the route - -Interface used for the route - -*/ -type DataCocsnRoutesRouteRouteDestinationInterfaceDelete struct { - Context *middleware.Context - Handler DataCocsnRoutesRouteRouteDestinationInterfaceDeleteHandler -} - -func (o *DataCocsnRoutesRouteRouteDestinationInterfaceDelete) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataCocsnRoutesRouteRouteDestinationInterfaceDeleteParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_delete_parameters.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_delete_parameters.go deleted file mode 100644 index 6e040dd47d4f3dbbe489a15fa7979dffb2c4b583..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_delete_parameters.go +++ /dev/null @@ -1,72 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" -) - -// NewDataCocsnRoutesRouteRouteDestinationInterfaceDeleteParams creates a new DataCocsnRoutesRouteRouteDestinationInterfaceDeleteParams object -// no default values defined in spec. -func NewDataCocsnRoutesRouteRouteDestinationInterfaceDeleteParams() DataCocsnRoutesRouteRouteDestinationInterfaceDeleteParams { - - return DataCocsnRoutesRouteRouteDestinationInterfaceDeleteParams{} -} - -// DataCocsnRoutesRouteRouteDestinationInterfaceDeleteParams contains all the bound params for the data cocsn routes route route destination interface delete operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_routes_route_route_destination_interface_delete -type DataCocsnRoutesRouteRouteDestinationInterfaceDeleteParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*Route destination. IP network - Required: true - In: path - */ - RouteDestination string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnRoutesRouteRouteDestinationInterfaceDeleteParams() beforehand. -func (o *DataCocsnRoutesRouteRouteDestinationInterfaceDeleteParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - rRouteDestination, rhkRouteDestination, _ := route.Params.GetOK("route-destination") - if err := o.bindRouteDestination(rRouteDestination, rhkRouteDestination, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindRouteDestination binds and validates parameter RouteDestination from path. -func (o *DataCocsnRoutesRouteRouteDestinationInterfaceDeleteParams) bindRouteDestination(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.RouteDestination = raw - - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_delete_responses.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_delete_responses.go deleted file mode 100644 index b322d808e1170c545c2ac4de1076ab9978150dd3..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_delete_responses.go +++ /dev/null @@ -1,36 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// DataCocsnRoutesRouteRouteDestinationInterfaceDeleteNoContentCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationInterfaceDeleteNoContent -const DataCocsnRoutesRouteRouteDestinationInterfaceDeleteNoContentCode int = 204 - -/*DataCocsnRoutesRouteRouteDestinationInterfaceDeleteNoContent No Content - -swagger:response dataCocsnRoutesRouteRouteDestinationInterfaceDeleteNoContent -*/ -type DataCocsnRoutesRouteRouteDestinationInterfaceDeleteNoContent struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationInterfaceDeleteNoContent creates DataCocsnRoutesRouteRouteDestinationInterfaceDeleteNoContent with default headers values -func NewDataCocsnRoutesRouteRouteDestinationInterfaceDeleteNoContent() *DataCocsnRoutesRouteRouteDestinationInterfaceDeleteNoContent { - - return &DataCocsnRoutesRouteRouteDestinationInterfaceDeleteNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationInterfaceDeleteNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_delete_urlbuilder.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_delete_urlbuilder.go deleted file mode 100644 index 4745864b7ebf2f07d52d18085c0668ea887e3ab3..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_delete_urlbuilder.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" -) - -// DataCocsnRoutesRouteRouteDestinationInterfaceDeleteURL generates an URL for the data cocsn routes route route destination interface delete operation -type DataCocsnRoutesRouteRouteDestinationInterfaceDeleteURL struct { - RouteDestination string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnRoutesRouteRouteDestinationInterfaceDeleteURL) WithBasePath(bp string) *DataCocsnRoutesRouteRouteDestinationInterfaceDeleteURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnRoutesRouteRouteDestinationInterfaceDeleteURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DataCocsnRoutesRouteRouteDestinationInterfaceDeleteURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/cocsn:routes/route={route-destination}/interface" - - routeDestination := o.RouteDestination - if routeDestination != "" { - _path = strings.Replace(_path, "{route-destination}", routeDestination, -1) - } else { - return nil, errors.New("routeDestination is required on DataCocsnRoutesRouteRouteDestinationInterfaceDeleteURL") - } - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnRoutesRouteRouteDestinationInterfaceDeleteURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DataCocsnRoutesRouteRouteDestinationInterfaceDeleteURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnRoutesRouteRouteDestinationInterfaceDeleteURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnRoutesRouteRouteDestinationInterfaceDeleteURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnRoutesRouteRouteDestinationInterfaceDeleteURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DataCocsnRoutesRouteRouteDestinationInterfaceDeleteURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_get.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_get.go deleted file mode 100644 index e9e91d597f9b1b43b088657c155f3283dfb5a937..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_get.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataCocsnRoutesRouteRouteDestinationInterfaceGetHandlerFunc turns a function with the right signature into a data cocsn routes route route destination interface get handler -type DataCocsnRoutesRouteRouteDestinationInterfaceGetHandlerFunc func(DataCocsnRoutesRouteRouteDestinationInterfaceGetParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataCocsnRoutesRouteRouteDestinationInterfaceGetHandlerFunc) Handle(params DataCocsnRoutesRouteRouteDestinationInterfaceGetParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataCocsnRoutesRouteRouteDestinationInterfaceGetHandler interface for that can handle valid data cocsn routes route route destination interface get params -type DataCocsnRoutesRouteRouteDestinationInterfaceGetHandler interface { - Handle(DataCocsnRoutesRouteRouteDestinationInterfaceGetParams, interface{}) middleware.Responder -} - -// NewDataCocsnRoutesRouteRouteDestinationInterfaceGet creates a new http.Handler for the data cocsn routes route route destination interface get operation -func NewDataCocsnRoutesRouteRouteDestinationInterfaceGet(ctx *middleware.Context, handler DataCocsnRoutesRouteRouteDestinationInterfaceGetHandler) *DataCocsnRoutesRouteRouteDestinationInterfaceGet { - return &DataCocsnRoutesRouteRouteDestinationInterfaceGet{Context: ctx, Handler: handler} -} - -/*DataCocsnRoutesRouteRouteDestinationInterfaceGet swagger:route GET /data/cocsn:routes/route={route-destination}/interface data get dataCocsnRoutesRouteRouteDestinationInterfaceGet - -Interface used for the route - -Interface used for the route - -*/ -type DataCocsnRoutesRouteRouteDestinationInterfaceGet struct { - Context *middleware.Context - Handler DataCocsnRoutesRouteRouteDestinationInterfaceGetHandler -} - -func (o *DataCocsnRoutesRouteRouteDestinationInterfaceGet) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataCocsnRoutesRouteRouteDestinationInterfaceGetParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_get_parameters.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_get_parameters.go deleted file mode 100644 index 3c5f7b8890bc50f59d5934556aa29deed7035e74..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_get_parameters.go +++ /dev/null @@ -1,260 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// NewDataCocsnRoutesRouteRouteDestinationInterfaceGetParams creates a new DataCocsnRoutesRouteRouteDestinationInterfaceGetParams object -// with the default values initialized. -func NewDataCocsnRoutesRouteRouteDestinationInterfaceGetParams() DataCocsnRoutesRouteRouteDestinationInterfaceGetParams { - - var ( - // initialize parameters with default values - - contentDefault = string("config") - - withDefaultsDefault = string("report-all") - ) - - return DataCocsnRoutesRouteRouteDestinationInterfaceGetParams{ - Content: &contentDefault, - - WithDefaults: &withDefaultsDefault, - } -} - -// DataCocsnRoutesRouteRouteDestinationInterfaceGetParams contains all the bound params for the data cocsn routes route route destination interface get operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_routes_route_route_destination_interface_get -type DataCocsnRoutesRouteRouteDestinationInterfaceGetParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*controlling descendant nodes in response - In: query - Default: "config" - */ - Content *string - /*limit the depth of nodes in response - In: query - */ - Depth *uint16 - /*optionally identify specific data nodes in response - In: query - */ - Fields *string - /*xpath expression to filter data nodes in response - In: query - */ - Filter *string - /*Route destination. IP network - Required: true - In: path - */ - RouteDestination string - /*controlling default values in response - In: query - Default: "report-all" - */ - WithDefaults *string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnRoutesRouteRouteDestinationInterfaceGetParams() beforehand. -func (o *DataCocsnRoutesRouteRouteDestinationInterfaceGetParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - qs := runtime.Values(r.URL.Query()) - - qContent, qhkContent, _ := qs.GetOK("content") - if err := o.bindContent(qContent, qhkContent, route.Formats); err != nil { - res = append(res, err) - } - - qDepth, qhkDepth, _ := qs.GetOK("depth") - if err := o.bindDepth(qDepth, qhkDepth, route.Formats); err != nil { - res = append(res, err) - } - - qFields, qhkFields, _ := qs.GetOK("fields") - if err := o.bindFields(qFields, qhkFields, route.Formats); err != nil { - res = append(res, err) - } - - qFilter, qhkFilter, _ := qs.GetOK("filter") - if err := o.bindFilter(qFilter, qhkFilter, route.Formats); err != nil { - res = append(res, err) - } - - rRouteDestination, rhkRouteDestination, _ := route.Params.GetOK("route-destination") - if err := o.bindRouteDestination(rRouteDestination, rhkRouteDestination, route.Formats); err != nil { - res = append(res, err) - } - - qWithDefaults, qhkWithDefaults, _ := qs.GetOK("with-defaults") - if err := o.bindWithDefaults(qWithDefaults, qhkWithDefaults, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindContent binds and validates parameter Content from query. -func (o *DataCocsnRoutesRouteRouteDestinationInterfaceGetParams) bindContent(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - // Default values have been previously initialized by NewDataCocsnRoutesRouteRouteDestinationInterfaceGetParams() - return nil - } - - o.Content = &raw - - if err := o.validateContent(formats); err != nil { - return err - } - - return nil -} - -// validateContent carries on validations for parameter Content -func (o *DataCocsnRoutesRouteRouteDestinationInterfaceGetParams) validateContent(formats strfmt.Registry) error { - - if err := validate.EnumCase("content", "query", *o.Content, []interface{}{"config", "nonconfig", "all"}, true); err != nil { - return err - } - - return nil -} - -// bindDepth binds and validates parameter Depth from query. -func (o *DataCocsnRoutesRouteRouteDestinationInterfaceGetParams) bindDepth(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - value, err := swag.ConvertUint16(raw) - if err != nil { - return errors.InvalidType("depth", "query", "uint16", raw) - } - o.Depth = &value - - return nil -} - -// bindFields binds and validates parameter Fields from query. -func (o *DataCocsnRoutesRouteRouteDestinationInterfaceGetParams) bindFields(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - o.Fields = &raw - - return nil -} - -// bindFilter binds and validates parameter Filter from query. -func (o *DataCocsnRoutesRouteRouteDestinationInterfaceGetParams) bindFilter(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - o.Filter = &raw - - return nil -} - -// bindRouteDestination binds and validates parameter RouteDestination from path. -func (o *DataCocsnRoutesRouteRouteDestinationInterfaceGetParams) bindRouteDestination(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.RouteDestination = raw - - return nil -} - -// bindWithDefaults binds and validates parameter WithDefaults from query. -func (o *DataCocsnRoutesRouteRouteDestinationInterfaceGetParams) bindWithDefaults(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - // Default values have been previously initialized by NewDataCocsnRoutesRouteRouteDestinationInterfaceGetParams() - return nil - } - - o.WithDefaults = &raw - - if err := o.validateWithDefaults(formats); err != nil { - return err - } - - return nil -} - -// validateWithDefaults carries on validations for parameter WithDefaults -func (o *DataCocsnRoutesRouteRouteDestinationInterfaceGetParams) validateWithDefaults(formats strfmt.Registry) error { - - if err := validate.EnumCase("with-defaults", "query", *o.WithDefaults, []interface{}{"report-all", "trim", "explicit", "report-all-tagged"}, true); err != nil { - return err - } - - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_get_responses.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_get_responses.go deleted file mode 100644 index dcff89fcb086b65eab532e3437483ce970e9a989..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_get_responses.go +++ /dev/null @@ -1,202 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" - - "code.fbi.h-da.de/cocsn/cocsn-api/api/models" -) - -// DataCocsnRoutesRouteRouteDestinationInterfaceGetOKCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationInterfaceGetOK -const DataCocsnRoutesRouteRouteDestinationInterfaceGetOKCode int = 200 - -/*DataCocsnRoutesRouteRouteDestinationInterfaceGetOK Interface used for the route - -swagger:response dataCocsnRoutesRouteRouteDestinationInterfaceGetOK -*/ -type DataCocsnRoutesRouteRouteDestinationInterfaceGetOK struct { - - /* - In: Body - */ - Payload *models.DataCocsnRoutesRouteRouteDestinationInterface `json:"body,omitempty"` -} - -// NewDataCocsnRoutesRouteRouteDestinationInterfaceGetOK creates DataCocsnRoutesRouteRouteDestinationInterfaceGetOK with default headers values -func NewDataCocsnRoutesRouteRouteDestinationInterfaceGetOK() *DataCocsnRoutesRouteRouteDestinationInterfaceGetOK { - - return &DataCocsnRoutesRouteRouteDestinationInterfaceGetOK{} -} - -// WithPayload adds the payload to the data cocsn routes route route destination interface get o k response -func (o *DataCocsnRoutesRouteRouteDestinationInterfaceGetOK) WithPayload(payload *models.DataCocsnRoutesRouteRouteDestinationInterface) *DataCocsnRoutesRouteRouteDestinationInterfaceGetOK { - o.Payload = payload - return o -} - -// SetPayload sets the payload to the data cocsn routes route route destination interface get o k response -func (o *DataCocsnRoutesRouteRouteDestinationInterfaceGetOK) SetPayload(payload *models.DataCocsnRoutesRouteRouteDestinationInterface) { - o.Payload = payload -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationInterfaceGetOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.WriteHeader(200) - if o.Payload != nil { - payload := o.Payload - if err := producer.Produce(rw, payload); err != nil { - panic(err) // let the recovery middleware deal with this - } - } -} - -// DataCocsnRoutesRouteRouteDestinationInterfaceGetNoContentCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationInterfaceGetNoContent -const DataCocsnRoutesRouteRouteDestinationInterfaceGetNoContentCode int = 204 - -/*DataCocsnRoutesRouteRouteDestinationInterfaceGetNoContent No Content - -swagger:response dataCocsnRoutesRouteRouteDestinationInterfaceGetNoContent -*/ -type DataCocsnRoutesRouteRouteDestinationInterfaceGetNoContent struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationInterfaceGetNoContent creates DataCocsnRoutesRouteRouteDestinationInterfaceGetNoContent with default headers values -func NewDataCocsnRoutesRouteRouteDestinationInterfaceGetNoContent() *DataCocsnRoutesRouteRouteDestinationInterfaceGetNoContent { - - return &DataCocsnRoutesRouteRouteDestinationInterfaceGetNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationInterfaceGetNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DataCocsnRoutesRouteRouteDestinationInterfaceGetBadRequestCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationInterfaceGetBadRequest -const DataCocsnRoutesRouteRouteDestinationInterfaceGetBadRequestCode int = 400 - -/*DataCocsnRoutesRouteRouteDestinationInterfaceGetBadRequest Bad Request - -swagger:response dataCocsnRoutesRouteRouteDestinationInterfaceGetBadRequest -*/ -type DataCocsnRoutesRouteRouteDestinationInterfaceGetBadRequest struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationInterfaceGetBadRequest creates DataCocsnRoutesRouteRouteDestinationInterfaceGetBadRequest with default headers values -func NewDataCocsnRoutesRouteRouteDestinationInterfaceGetBadRequest() *DataCocsnRoutesRouteRouteDestinationInterfaceGetBadRequest { - - return &DataCocsnRoutesRouteRouteDestinationInterfaceGetBadRequest{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationInterfaceGetBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// DataCocsnRoutesRouteRouteDestinationInterfaceGetUnauthorizedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationInterfaceGetUnauthorized -const DataCocsnRoutesRouteRouteDestinationInterfaceGetUnauthorizedCode int = 401 - -/*DataCocsnRoutesRouteRouteDestinationInterfaceGetUnauthorized Unauthorized - -swagger:response dataCocsnRoutesRouteRouteDestinationInterfaceGetUnauthorized -*/ -type DataCocsnRoutesRouteRouteDestinationInterfaceGetUnauthorized struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationInterfaceGetUnauthorized creates DataCocsnRoutesRouteRouteDestinationInterfaceGetUnauthorized with default headers values -func NewDataCocsnRoutesRouteRouteDestinationInterfaceGetUnauthorized() *DataCocsnRoutesRouteRouteDestinationInterfaceGetUnauthorized { - - return &DataCocsnRoutesRouteRouteDestinationInterfaceGetUnauthorized{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationInterfaceGetUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(401) -} - -// DataCocsnRoutesRouteRouteDestinationInterfaceGetNotFoundCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationInterfaceGetNotFound -const DataCocsnRoutesRouteRouteDestinationInterfaceGetNotFoundCode int = 404 - -/*DataCocsnRoutesRouteRouteDestinationInterfaceGetNotFound Not Found - -swagger:response dataCocsnRoutesRouteRouteDestinationInterfaceGetNotFound -*/ -type DataCocsnRoutesRouteRouteDestinationInterfaceGetNotFound struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationInterfaceGetNotFound creates DataCocsnRoutesRouteRouteDestinationInterfaceGetNotFound with default headers values -func NewDataCocsnRoutesRouteRouteDestinationInterfaceGetNotFound() *DataCocsnRoutesRouteRouteDestinationInterfaceGetNotFound { - - return &DataCocsnRoutesRouteRouteDestinationInterfaceGetNotFound{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationInterfaceGetNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(404) -} - -// DataCocsnRoutesRouteRouteDestinationInterfaceGetMethodNotAllowedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationInterfaceGetMethodNotAllowed -const DataCocsnRoutesRouteRouteDestinationInterfaceGetMethodNotAllowedCode int = 405 - -/*DataCocsnRoutesRouteRouteDestinationInterfaceGetMethodNotAllowed Method Not Allowed - -swagger:response dataCocsnRoutesRouteRouteDestinationInterfaceGetMethodNotAllowed -*/ -type DataCocsnRoutesRouteRouteDestinationInterfaceGetMethodNotAllowed struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationInterfaceGetMethodNotAllowed creates DataCocsnRoutesRouteRouteDestinationInterfaceGetMethodNotAllowed with default headers values -func NewDataCocsnRoutesRouteRouteDestinationInterfaceGetMethodNotAllowed() *DataCocsnRoutesRouteRouteDestinationInterfaceGetMethodNotAllowed { - - return &DataCocsnRoutesRouteRouteDestinationInterfaceGetMethodNotAllowed{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationInterfaceGetMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(405) -} - -// DataCocsnRoutesRouteRouteDestinationInterfaceGetConflictCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationInterfaceGetConflict -const DataCocsnRoutesRouteRouteDestinationInterfaceGetConflictCode int = 409 - -/*DataCocsnRoutesRouteRouteDestinationInterfaceGetConflict Conflict - -swagger:response dataCocsnRoutesRouteRouteDestinationInterfaceGetConflict -*/ -type DataCocsnRoutesRouteRouteDestinationInterfaceGetConflict struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationInterfaceGetConflict creates DataCocsnRoutesRouteRouteDestinationInterfaceGetConflict with default headers values -func NewDataCocsnRoutesRouteRouteDestinationInterfaceGetConflict() *DataCocsnRoutesRouteRouteDestinationInterfaceGetConflict { - - return &DataCocsnRoutesRouteRouteDestinationInterfaceGetConflict{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationInterfaceGetConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_get_urlbuilder.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_get_urlbuilder.go deleted file mode 100644 index 88f368218191a0db30807e6c008fd431c2069fdc..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_get_urlbuilder.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" - - "github.com/go-openapi/swag" -) - -// DataCocsnRoutesRouteRouteDestinationInterfaceGetURL generates an URL for the data cocsn routes route route destination interface get operation -type DataCocsnRoutesRouteRouteDestinationInterfaceGetURL struct { - RouteDestination string - - Content *string - Depth *uint16 - Fields *string - Filter *string - WithDefaults *string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnRoutesRouteRouteDestinationInterfaceGetURL) WithBasePath(bp string) *DataCocsnRoutesRouteRouteDestinationInterfaceGetURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnRoutesRouteRouteDestinationInterfaceGetURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DataCocsnRoutesRouteRouteDestinationInterfaceGetURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/cocsn:routes/route={route-destination}/interface" - - routeDestination := o.RouteDestination - if routeDestination != "" { - _path = strings.Replace(_path, "{route-destination}", routeDestination, -1) - } else { - return nil, errors.New("routeDestination is required on DataCocsnRoutesRouteRouteDestinationInterfaceGetURL") - } - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - qs := make(url.Values) - - var contentQ string - if o.Content != nil { - contentQ = *o.Content - } - if contentQ != "" { - qs.Set("content", contentQ) - } - - var depthQ string - if o.Depth != nil { - depthQ = swag.FormatUint16(*o.Depth) - } - if depthQ != "" { - qs.Set("depth", depthQ) - } - - var fieldsQ string - if o.Fields != nil { - fieldsQ = *o.Fields - } - if fieldsQ != "" { - qs.Set("fields", fieldsQ) - } - - var filterQ string - if o.Filter != nil { - filterQ = *o.Filter - } - if filterQ != "" { - qs.Set("filter", filterQ) - } - - var withDefaultsQ string - if o.WithDefaults != nil { - withDefaultsQ = *o.WithDefaults - } - if withDefaultsQ != "" { - qs.Set("with-defaults", withDefaultsQ) - } - - _result.RawQuery = qs.Encode() - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnRoutesRouteRouteDestinationInterfaceGetURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DataCocsnRoutesRouteRouteDestinationInterfaceGetURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnRoutesRouteRouteDestinationInterfaceGetURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnRoutesRouteRouteDestinationInterfaceGetURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnRoutesRouteRouteDestinationInterfaceGetURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DataCocsnRoutesRouteRouteDestinationInterfaceGetURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_patch.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_patch.go deleted file mode 100644 index 702687a037e8f215e9bafd5964d477f003f8af61..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_patch.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataCocsnRoutesRouteRouteDestinationInterfacePatchHandlerFunc turns a function with the right signature into a data cocsn routes route route destination interface patch handler -type DataCocsnRoutesRouteRouteDestinationInterfacePatchHandlerFunc func(DataCocsnRoutesRouteRouteDestinationInterfacePatchParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataCocsnRoutesRouteRouteDestinationInterfacePatchHandlerFunc) Handle(params DataCocsnRoutesRouteRouteDestinationInterfacePatchParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataCocsnRoutesRouteRouteDestinationInterfacePatchHandler interface for that can handle valid data cocsn routes route route destination interface patch params -type DataCocsnRoutesRouteRouteDestinationInterfacePatchHandler interface { - Handle(DataCocsnRoutesRouteRouteDestinationInterfacePatchParams, interface{}) middleware.Responder -} - -// NewDataCocsnRoutesRouteRouteDestinationInterfacePatch creates a new http.Handler for the data cocsn routes route route destination interface patch operation -func NewDataCocsnRoutesRouteRouteDestinationInterfacePatch(ctx *middleware.Context, handler DataCocsnRoutesRouteRouteDestinationInterfacePatchHandler) *DataCocsnRoutesRouteRouteDestinationInterfacePatch { - return &DataCocsnRoutesRouteRouteDestinationInterfacePatch{Context: ctx, Handler: handler} -} - -/*DataCocsnRoutesRouteRouteDestinationInterfacePatch swagger:route PATCH /data/cocsn:routes/route={route-destination}/interface data patch dataCocsnRoutesRouteRouteDestinationInterfacePatch - -Interface used for the route - -Interface used for the route - -*/ -type DataCocsnRoutesRouteRouteDestinationInterfacePatch struct { - Context *middleware.Context - Handler DataCocsnRoutesRouteRouteDestinationInterfacePatchHandler -} - -func (o *DataCocsnRoutesRouteRouteDestinationInterfacePatch) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataCocsnRoutesRouteRouteDestinationInterfacePatchParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_patch_parameters.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_patch_parameters.go deleted file mode 100644 index f5db0653951aee6160415bf287d5c5a57f09af42..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_patch_parameters.go +++ /dev/null @@ -1,103 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "io" - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - - "code.fbi.h-da.de/cocsn/cocsn-api/api/models" -) - -// NewDataCocsnRoutesRouteRouteDestinationInterfacePatchParams creates a new DataCocsnRoutesRouteRouteDestinationInterfacePatchParams object -// no default values defined in spec. -func NewDataCocsnRoutesRouteRouteDestinationInterfacePatchParams() DataCocsnRoutesRouteRouteDestinationInterfacePatchParams { - - return DataCocsnRoutesRouteRouteDestinationInterfacePatchParams{} -} - -// DataCocsnRoutesRouteRouteDestinationInterfacePatchParams contains all the bound params for the data cocsn routes route route destination interface patch operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_routes_route_route_destination_interface_patch -type DataCocsnRoutesRouteRouteDestinationInterfacePatchParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*Interface used for the route - Required: true - In: body - */ - Interface *models.DataCocsnRoutesRouteRouteDestinationInterface - /*Route destination. IP network - Required: true - In: path - */ - RouteDestination string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnRoutesRouteRouteDestinationInterfacePatchParams() beforehand. -func (o *DataCocsnRoutesRouteRouteDestinationInterfacePatchParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if runtime.HasBody(r) { - defer r.Body.Close() - var body models.DataCocsnRoutesRouteRouteDestinationInterface - if err := route.Consumer.Consume(r.Body, &body); err != nil { - if err == io.EOF { - res = append(res, errors.Required("interface", "body", "")) - } else { - res = append(res, errors.NewParseError("interface", "body", "", err)) - } - } else { - // validate body object - if err := body.Validate(route.Formats); err != nil { - res = append(res, err) - } - - if len(res) == 0 { - o.Interface = &body - } - } - } else { - res = append(res, errors.Required("interface", "body", "")) - } - rRouteDestination, rhkRouteDestination, _ := route.Params.GetOK("route-destination") - if err := o.bindRouteDestination(rRouteDestination, rhkRouteDestination, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindRouteDestination binds and validates parameter RouteDestination from path. -func (o *DataCocsnRoutesRouteRouteDestinationInterfacePatchParams) bindRouteDestination(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.RouteDestination = raw - - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_patch_responses.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_patch_responses.go deleted file mode 100644 index 3816ca646ad9706ed63f694a0d6d071dad9dfb89..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_patch_responses.go +++ /dev/null @@ -1,156 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// DataCocsnRoutesRouteRouteDestinationInterfacePatchNoContentCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationInterfacePatchNoContent -const DataCocsnRoutesRouteRouteDestinationInterfacePatchNoContentCode int = 204 - -/*DataCocsnRoutesRouteRouteDestinationInterfacePatchNoContent leaf interface updated - -swagger:response dataCocsnRoutesRouteRouteDestinationInterfacePatchNoContent -*/ -type DataCocsnRoutesRouteRouteDestinationInterfacePatchNoContent struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationInterfacePatchNoContent creates DataCocsnRoutesRouteRouteDestinationInterfacePatchNoContent with default headers values -func NewDataCocsnRoutesRouteRouteDestinationInterfacePatchNoContent() *DataCocsnRoutesRouteRouteDestinationInterfacePatchNoContent { - - return &DataCocsnRoutesRouteRouteDestinationInterfacePatchNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationInterfacePatchNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DataCocsnRoutesRouteRouteDestinationInterfacePatchBadRequestCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationInterfacePatchBadRequest -const DataCocsnRoutesRouteRouteDestinationInterfacePatchBadRequestCode int = 400 - -/*DataCocsnRoutesRouteRouteDestinationInterfacePatchBadRequest Bad Request - -swagger:response dataCocsnRoutesRouteRouteDestinationInterfacePatchBadRequest -*/ -type DataCocsnRoutesRouteRouteDestinationInterfacePatchBadRequest struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationInterfacePatchBadRequest creates DataCocsnRoutesRouteRouteDestinationInterfacePatchBadRequest with default headers values -func NewDataCocsnRoutesRouteRouteDestinationInterfacePatchBadRequest() *DataCocsnRoutesRouteRouteDestinationInterfacePatchBadRequest { - - return &DataCocsnRoutesRouteRouteDestinationInterfacePatchBadRequest{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationInterfacePatchBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// DataCocsnRoutesRouteRouteDestinationInterfacePatchUnauthorizedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationInterfacePatchUnauthorized -const DataCocsnRoutesRouteRouteDestinationInterfacePatchUnauthorizedCode int = 401 - -/*DataCocsnRoutesRouteRouteDestinationInterfacePatchUnauthorized Unauthorized - -swagger:response dataCocsnRoutesRouteRouteDestinationInterfacePatchUnauthorized -*/ -type DataCocsnRoutesRouteRouteDestinationInterfacePatchUnauthorized struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationInterfacePatchUnauthorized creates DataCocsnRoutesRouteRouteDestinationInterfacePatchUnauthorized with default headers values -func NewDataCocsnRoutesRouteRouteDestinationInterfacePatchUnauthorized() *DataCocsnRoutesRouteRouteDestinationInterfacePatchUnauthorized { - - return &DataCocsnRoutesRouteRouteDestinationInterfacePatchUnauthorized{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationInterfacePatchUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(401) -} - -// DataCocsnRoutesRouteRouteDestinationInterfacePatchNotFoundCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationInterfacePatchNotFound -const DataCocsnRoutesRouteRouteDestinationInterfacePatchNotFoundCode int = 404 - -/*DataCocsnRoutesRouteRouteDestinationInterfacePatchNotFound Not Found - -swagger:response dataCocsnRoutesRouteRouteDestinationInterfacePatchNotFound -*/ -type DataCocsnRoutesRouteRouteDestinationInterfacePatchNotFound struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationInterfacePatchNotFound creates DataCocsnRoutesRouteRouteDestinationInterfacePatchNotFound with default headers values -func NewDataCocsnRoutesRouteRouteDestinationInterfacePatchNotFound() *DataCocsnRoutesRouteRouteDestinationInterfacePatchNotFound { - - return &DataCocsnRoutesRouteRouteDestinationInterfacePatchNotFound{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationInterfacePatchNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(404) -} - -// DataCocsnRoutesRouteRouteDestinationInterfacePatchMethodNotAllowedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationInterfacePatchMethodNotAllowed -const DataCocsnRoutesRouteRouteDestinationInterfacePatchMethodNotAllowedCode int = 405 - -/*DataCocsnRoutesRouteRouteDestinationInterfacePatchMethodNotAllowed Method Not Allowed - -swagger:response dataCocsnRoutesRouteRouteDestinationInterfacePatchMethodNotAllowed -*/ -type DataCocsnRoutesRouteRouteDestinationInterfacePatchMethodNotAllowed struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationInterfacePatchMethodNotAllowed creates DataCocsnRoutesRouteRouteDestinationInterfacePatchMethodNotAllowed with default headers values -func NewDataCocsnRoutesRouteRouteDestinationInterfacePatchMethodNotAllowed() *DataCocsnRoutesRouteRouteDestinationInterfacePatchMethodNotAllowed { - - return &DataCocsnRoutesRouteRouteDestinationInterfacePatchMethodNotAllowed{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationInterfacePatchMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(405) -} - -// DataCocsnRoutesRouteRouteDestinationInterfacePatchConflictCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationInterfacePatchConflict -const DataCocsnRoutesRouteRouteDestinationInterfacePatchConflictCode int = 409 - -/*DataCocsnRoutesRouteRouteDestinationInterfacePatchConflict Conflict - -swagger:response dataCocsnRoutesRouteRouteDestinationInterfacePatchConflict -*/ -type DataCocsnRoutesRouteRouteDestinationInterfacePatchConflict struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationInterfacePatchConflict creates DataCocsnRoutesRouteRouteDestinationInterfacePatchConflict with default headers values -func NewDataCocsnRoutesRouteRouteDestinationInterfacePatchConflict() *DataCocsnRoutesRouteRouteDestinationInterfacePatchConflict { - - return &DataCocsnRoutesRouteRouteDestinationInterfacePatchConflict{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationInterfacePatchConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_patch_urlbuilder.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_patch_urlbuilder.go deleted file mode 100644 index e8fb4ad5da764dce5aa6afd0ffeb7803b2424558..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_patch_urlbuilder.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" -) - -// DataCocsnRoutesRouteRouteDestinationInterfacePatchURL generates an URL for the data cocsn routes route route destination interface patch operation -type DataCocsnRoutesRouteRouteDestinationInterfacePatchURL struct { - RouteDestination string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnRoutesRouteRouteDestinationInterfacePatchURL) WithBasePath(bp string) *DataCocsnRoutesRouteRouteDestinationInterfacePatchURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnRoutesRouteRouteDestinationInterfacePatchURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DataCocsnRoutesRouteRouteDestinationInterfacePatchURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/cocsn:routes/route={route-destination}/interface" - - routeDestination := o.RouteDestination - if routeDestination != "" { - _path = strings.Replace(_path, "{route-destination}", routeDestination, -1) - } else { - return nil, errors.New("routeDestination is required on DataCocsnRoutesRouteRouteDestinationInterfacePatchURL") - } - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnRoutesRouteRouteDestinationInterfacePatchURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DataCocsnRoutesRouteRouteDestinationInterfacePatchURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnRoutesRouteRouteDestinationInterfacePatchURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnRoutesRouteRouteDestinationInterfacePatchURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnRoutesRouteRouteDestinationInterfacePatchURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DataCocsnRoutesRouteRouteDestinationInterfacePatchURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_put.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_put.go deleted file mode 100644 index 1d8147b3e5086b987b5d42f12e4dbcdb64018da9..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_put.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataCocsnRoutesRouteRouteDestinationInterfacePutHandlerFunc turns a function with the right signature into a data cocsn routes route route destination interface put handler -type DataCocsnRoutesRouteRouteDestinationInterfacePutHandlerFunc func(DataCocsnRoutesRouteRouteDestinationInterfacePutParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataCocsnRoutesRouteRouteDestinationInterfacePutHandlerFunc) Handle(params DataCocsnRoutesRouteRouteDestinationInterfacePutParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataCocsnRoutesRouteRouteDestinationInterfacePutHandler interface for that can handle valid data cocsn routes route route destination interface put params -type DataCocsnRoutesRouteRouteDestinationInterfacePutHandler interface { - Handle(DataCocsnRoutesRouteRouteDestinationInterfacePutParams, interface{}) middleware.Responder -} - -// NewDataCocsnRoutesRouteRouteDestinationInterfacePut creates a new http.Handler for the data cocsn routes route route destination interface put operation -func NewDataCocsnRoutesRouteRouteDestinationInterfacePut(ctx *middleware.Context, handler DataCocsnRoutesRouteRouteDestinationInterfacePutHandler) *DataCocsnRoutesRouteRouteDestinationInterfacePut { - return &DataCocsnRoutesRouteRouteDestinationInterfacePut{Context: ctx, Handler: handler} -} - -/*DataCocsnRoutesRouteRouteDestinationInterfacePut swagger:route PUT /data/cocsn:routes/route={route-destination}/interface data put dataCocsnRoutesRouteRouteDestinationInterfacePut - -Interface used for the route - -Interface used for the route - -*/ -type DataCocsnRoutesRouteRouteDestinationInterfacePut struct { - Context *middleware.Context - Handler DataCocsnRoutesRouteRouteDestinationInterfacePutHandler -} - -func (o *DataCocsnRoutesRouteRouteDestinationInterfacePut) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataCocsnRoutesRouteRouteDestinationInterfacePutParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_put_parameters.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_put_parameters.go deleted file mode 100644 index b3f558a40b0a82aa6457a35a0e33a808ac4b5b0a..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_put_parameters.go +++ /dev/null @@ -1,103 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "io" - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - - "code.fbi.h-da.de/cocsn/cocsn-api/api/models" -) - -// NewDataCocsnRoutesRouteRouteDestinationInterfacePutParams creates a new DataCocsnRoutesRouteRouteDestinationInterfacePutParams object -// no default values defined in spec. -func NewDataCocsnRoutesRouteRouteDestinationInterfacePutParams() DataCocsnRoutesRouteRouteDestinationInterfacePutParams { - - return DataCocsnRoutesRouteRouteDestinationInterfacePutParams{} -} - -// DataCocsnRoutesRouteRouteDestinationInterfacePutParams contains all the bound params for the data cocsn routes route route destination interface put operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_routes_route_route_destination_interface_put -type DataCocsnRoutesRouteRouteDestinationInterfacePutParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*Interface used for the route - Required: true - In: body - */ - Interface *models.DataCocsnRoutesRouteRouteDestinationInterface - /*Route destination. IP network - Required: true - In: path - */ - RouteDestination string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnRoutesRouteRouteDestinationInterfacePutParams() beforehand. -func (o *DataCocsnRoutesRouteRouteDestinationInterfacePutParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if runtime.HasBody(r) { - defer r.Body.Close() - var body models.DataCocsnRoutesRouteRouteDestinationInterface - if err := route.Consumer.Consume(r.Body, &body); err != nil { - if err == io.EOF { - res = append(res, errors.Required("interface", "body", "")) - } else { - res = append(res, errors.NewParseError("interface", "body", "", err)) - } - } else { - // validate body object - if err := body.Validate(route.Formats); err != nil { - res = append(res, err) - } - - if len(res) == 0 { - o.Interface = &body - } - } - } else { - res = append(res, errors.Required("interface", "body", "")) - } - rRouteDestination, rhkRouteDestination, _ := route.Params.GetOK("route-destination") - if err := o.bindRouteDestination(rRouteDestination, rhkRouteDestination, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindRouteDestination binds and validates parameter RouteDestination from path. -func (o *DataCocsnRoutesRouteRouteDestinationInterfacePutParams) bindRouteDestination(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.RouteDestination = raw - - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_put_responses.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_put_responses.go deleted file mode 100644 index d10af6ad5084dba4482e52c2e8d08f2d58d78615..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_put_responses.go +++ /dev/null @@ -1,180 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// DataCocsnRoutesRouteRouteDestinationInterfacePutCreatedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationInterfacePutCreated -const DataCocsnRoutesRouteRouteDestinationInterfacePutCreatedCode int = 201 - -/*DataCocsnRoutesRouteRouteDestinationInterfacePutCreated leaf interface created or replaced - -swagger:response dataCocsnRoutesRouteRouteDestinationInterfacePutCreated -*/ -type DataCocsnRoutesRouteRouteDestinationInterfacePutCreated struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationInterfacePutCreated creates DataCocsnRoutesRouteRouteDestinationInterfacePutCreated with default headers values -func NewDataCocsnRoutesRouteRouteDestinationInterfacePutCreated() *DataCocsnRoutesRouteRouteDestinationInterfacePutCreated { - - return &DataCocsnRoutesRouteRouteDestinationInterfacePutCreated{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationInterfacePutCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(201) -} - -// DataCocsnRoutesRouteRouteDestinationInterfacePutNoContentCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationInterfacePutNoContent -const DataCocsnRoutesRouteRouteDestinationInterfacePutNoContentCode int = 204 - -/*DataCocsnRoutesRouteRouteDestinationInterfacePutNoContent No Content - -swagger:response dataCocsnRoutesRouteRouteDestinationInterfacePutNoContent -*/ -type DataCocsnRoutesRouteRouteDestinationInterfacePutNoContent struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationInterfacePutNoContent creates DataCocsnRoutesRouteRouteDestinationInterfacePutNoContent with default headers values -func NewDataCocsnRoutesRouteRouteDestinationInterfacePutNoContent() *DataCocsnRoutesRouteRouteDestinationInterfacePutNoContent { - - return &DataCocsnRoutesRouteRouteDestinationInterfacePutNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationInterfacePutNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DataCocsnRoutesRouteRouteDestinationInterfacePutBadRequestCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationInterfacePutBadRequest -const DataCocsnRoutesRouteRouteDestinationInterfacePutBadRequestCode int = 400 - -/*DataCocsnRoutesRouteRouteDestinationInterfacePutBadRequest Bad Request - -swagger:response dataCocsnRoutesRouteRouteDestinationInterfacePutBadRequest -*/ -type DataCocsnRoutesRouteRouteDestinationInterfacePutBadRequest struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationInterfacePutBadRequest creates DataCocsnRoutesRouteRouteDestinationInterfacePutBadRequest with default headers values -func NewDataCocsnRoutesRouteRouteDestinationInterfacePutBadRequest() *DataCocsnRoutesRouteRouteDestinationInterfacePutBadRequest { - - return &DataCocsnRoutesRouteRouteDestinationInterfacePutBadRequest{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationInterfacePutBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// DataCocsnRoutesRouteRouteDestinationInterfacePutUnauthorizedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationInterfacePutUnauthorized -const DataCocsnRoutesRouteRouteDestinationInterfacePutUnauthorizedCode int = 401 - -/*DataCocsnRoutesRouteRouteDestinationInterfacePutUnauthorized Unauthorized - -swagger:response dataCocsnRoutesRouteRouteDestinationInterfacePutUnauthorized -*/ -type DataCocsnRoutesRouteRouteDestinationInterfacePutUnauthorized struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationInterfacePutUnauthorized creates DataCocsnRoutesRouteRouteDestinationInterfacePutUnauthorized with default headers values -func NewDataCocsnRoutesRouteRouteDestinationInterfacePutUnauthorized() *DataCocsnRoutesRouteRouteDestinationInterfacePutUnauthorized { - - return &DataCocsnRoutesRouteRouteDestinationInterfacePutUnauthorized{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationInterfacePutUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(401) -} - -// DataCocsnRoutesRouteRouteDestinationInterfacePutNotFoundCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationInterfacePutNotFound -const DataCocsnRoutesRouteRouteDestinationInterfacePutNotFoundCode int = 404 - -/*DataCocsnRoutesRouteRouteDestinationInterfacePutNotFound Not Found - -swagger:response dataCocsnRoutesRouteRouteDestinationInterfacePutNotFound -*/ -type DataCocsnRoutesRouteRouteDestinationInterfacePutNotFound struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationInterfacePutNotFound creates DataCocsnRoutesRouteRouteDestinationInterfacePutNotFound with default headers values -func NewDataCocsnRoutesRouteRouteDestinationInterfacePutNotFound() *DataCocsnRoutesRouteRouteDestinationInterfacePutNotFound { - - return &DataCocsnRoutesRouteRouteDestinationInterfacePutNotFound{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationInterfacePutNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(404) -} - -// DataCocsnRoutesRouteRouteDestinationInterfacePutMethodNotAllowedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationInterfacePutMethodNotAllowed -const DataCocsnRoutesRouteRouteDestinationInterfacePutMethodNotAllowedCode int = 405 - -/*DataCocsnRoutesRouteRouteDestinationInterfacePutMethodNotAllowed Method Not Allowed - -swagger:response dataCocsnRoutesRouteRouteDestinationInterfacePutMethodNotAllowed -*/ -type DataCocsnRoutesRouteRouteDestinationInterfacePutMethodNotAllowed struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationInterfacePutMethodNotAllowed creates DataCocsnRoutesRouteRouteDestinationInterfacePutMethodNotAllowed with default headers values -func NewDataCocsnRoutesRouteRouteDestinationInterfacePutMethodNotAllowed() *DataCocsnRoutesRouteRouteDestinationInterfacePutMethodNotAllowed { - - return &DataCocsnRoutesRouteRouteDestinationInterfacePutMethodNotAllowed{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationInterfacePutMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(405) -} - -// DataCocsnRoutesRouteRouteDestinationInterfacePutConflictCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationInterfacePutConflict -const DataCocsnRoutesRouteRouteDestinationInterfacePutConflictCode int = 409 - -/*DataCocsnRoutesRouteRouteDestinationInterfacePutConflict Conflict - -swagger:response dataCocsnRoutesRouteRouteDestinationInterfacePutConflict -*/ -type DataCocsnRoutesRouteRouteDestinationInterfacePutConflict struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationInterfacePutConflict creates DataCocsnRoutesRouteRouteDestinationInterfacePutConflict with default headers values -func NewDataCocsnRoutesRouteRouteDestinationInterfacePutConflict() *DataCocsnRoutesRouteRouteDestinationInterfacePutConflict { - - return &DataCocsnRoutesRouteRouteDestinationInterfacePutConflict{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationInterfacePutConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_put_urlbuilder.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_put_urlbuilder.go deleted file mode 100644 index 05d8a1a48ca7dbdd4aa27f9966104680f91266fe..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_put_urlbuilder.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" -) - -// DataCocsnRoutesRouteRouteDestinationInterfacePutURL generates an URL for the data cocsn routes route route destination interface put operation -type DataCocsnRoutesRouteRouteDestinationInterfacePutURL struct { - RouteDestination string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnRoutesRouteRouteDestinationInterfacePutURL) WithBasePath(bp string) *DataCocsnRoutesRouteRouteDestinationInterfacePutURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnRoutesRouteRouteDestinationInterfacePutURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DataCocsnRoutesRouteRouteDestinationInterfacePutURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/cocsn:routes/route={route-destination}/interface" - - routeDestination := o.RouteDestination - if routeDestination != "" { - _path = strings.Replace(_path, "{route-destination}", routeDestination, -1) - } else { - return nil, errors.New("routeDestination is required on DataCocsnRoutesRouteRouteDestinationInterfacePutURL") - } - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnRoutesRouteRouteDestinationInterfacePutURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DataCocsnRoutesRouteRouteDestinationInterfacePutURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnRoutesRouteRouteDestinationInterfacePutURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnRoutesRouteRouteDestinationInterfacePutURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnRoutesRouteRouteDestinationInterfacePutURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DataCocsnRoutesRouteRouteDestinationInterfacePutURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_patch.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_patch.go deleted file mode 100644 index d386f3f0b32a22e8b619f27dea7c7d23325f71b9..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_patch.go +++ /dev/null @@ -1,71 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataCocsnRoutesRouteRouteDestinationPatchHandlerFunc turns a function with the right signature into a data cocsn routes route route destination patch handler -type DataCocsnRoutesRouteRouteDestinationPatchHandlerFunc func(DataCocsnRoutesRouteRouteDestinationPatchParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataCocsnRoutesRouteRouteDestinationPatchHandlerFunc) Handle(params DataCocsnRoutesRouteRouteDestinationPatchParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataCocsnRoutesRouteRouteDestinationPatchHandler interface for that can handle valid data cocsn routes route route destination patch params -type DataCocsnRoutesRouteRouteDestinationPatchHandler interface { - Handle(DataCocsnRoutesRouteRouteDestinationPatchParams, interface{}) middleware.Responder -} - -// NewDataCocsnRoutesRouteRouteDestinationPatch creates a new http.Handler for the data cocsn routes route route destination patch operation -func NewDataCocsnRoutesRouteRouteDestinationPatch(ctx *middleware.Context, handler DataCocsnRoutesRouteRouteDestinationPatchHandler) *DataCocsnRoutesRouteRouteDestinationPatch { - return &DataCocsnRoutesRouteRouteDestinationPatch{Context: ctx, Handler: handler} -} - -/*DataCocsnRoutesRouteRouteDestinationPatch swagger:route PATCH /data/cocsn:routes/route={route-destination} data patch dataCocsnRoutesRouteRouteDestinationPatch - -DataCocsnRoutesRouteRouteDestinationPatch data cocsn routes route route destination patch API - -*/ -type DataCocsnRoutesRouteRouteDestinationPatch struct { - Context *middleware.Context - Handler DataCocsnRoutesRouteRouteDestinationPatchHandler -} - -func (o *DataCocsnRoutesRouteRouteDestinationPatch) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataCocsnRoutesRouteRouteDestinationPatchParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_patch_parameters.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_patch_parameters.go deleted file mode 100644 index ae932348347e206e98e6b92806678bfb330cae1f..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_patch_parameters.go +++ /dev/null @@ -1,103 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "io" - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - - "code.fbi.h-da.de/cocsn/cocsn-api/api/models" -) - -// NewDataCocsnRoutesRouteRouteDestinationPatchParams creates a new DataCocsnRoutesRouteRouteDestinationPatchParams object -// no default values defined in spec. -func NewDataCocsnRoutesRouteRouteDestinationPatchParams() DataCocsnRoutesRouteRouteDestinationPatchParams { - - return DataCocsnRoutesRouteRouteDestinationPatchParams{} -} - -// DataCocsnRoutesRouteRouteDestinationPatchParams contains all the bound params for the data cocsn routes route route destination patch operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_routes_route_route_destination_patch -type DataCocsnRoutesRouteRouteDestinationPatchParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /* - Required: true - In: body - */ - Route *models.DataCocsnRoutesRouteRouteDestination - /*Route destination. IP network - Required: true - In: path - */ - RouteDestination string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnRoutesRouteRouteDestinationPatchParams() beforehand. -func (o *DataCocsnRoutesRouteRouteDestinationPatchParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if runtime.HasBody(r) { - defer r.Body.Close() - var body models.DataCocsnRoutesRouteRouteDestination - if err := route.Consumer.Consume(r.Body, &body); err != nil { - if err == io.EOF { - res = append(res, errors.Required("route", "body", "")) - } else { - res = append(res, errors.NewParseError("route", "body", "", err)) - } - } else { - // validate body object - if err := body.Validate(route.Formats); err != nil { - res = append(res, err) - } - - if len(res) == 0 { - o.Route = &body - } - } - } else { - res = append(res, errors.Required("route", "body", "")) - } - rRouteDestination, rhkRouteDestination, _ := route.Params.GetOK("route-destination") - if err := o.bindRouteDestination(rRouteDestination, rhkRouteDestination, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindRouteDestination binds and validates parameter RouteDestination from path. -func (o *DataCocsnRoutesRouteRouteDestinationPatchParams) bindRouteDestination(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.RouteDestination = raw - - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_patch_responses.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_patch_responses.go deleted file mode 100644 index 1810a07d458ae0db8a6f017dd10f5375a1630f34..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_patch_responses.go +++ /dev/null @@ -1,156 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// DataCocsnRoutesRouteRouteDestinationPatchNoContentCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationPatchNoContent -const DataCocsnRoutesRouteRouteDestinationPatchNoContentCode int = 204 - -/*DataCocsnRoutesRouteRouteDestinationPatchNoContent list route updated - -swagger:response dataCocsnRoutesRouteRouteDestinationPatchNoContent -*/ -type DataCocsnRoutesRouteRouteDestinationPatchNoContent struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationPatchNoContent creates DataCocsnRoutesRouteRouteDestinationPatchNoContent with default headers values -func NewDataCocsnRoutesRouteRouteDestinationPatchNoContent() *DataCocsnRoutesRouteRouteDestinationPatchNoContent { - - return &DataCocsnRoutesRouteRouteDestinationPatchNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationPatchNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DataCocsnRoutesRouteRouteDestinationPatchBadRequestCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationPatchBadRequest -const DataCocsnRoutesRouteRouteDestinationPatchBadRequestCode int = 400 - -/*DataCocsnRoutesRouteRouteDestinationPatchBadRequest Bad Request - -swagger:response dataCocsnRoutesRouteRouteDestinationPatchBadRequest -*/ -type DataCocsnRoutesRouteRouteDestinationPatchBadRequest struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationPatchBadRequest creates DataCocsnRoutesRouteRouteDestinationPatchBadRequest with default headers values -func NewDataCocsnRoutesRouteRouteDestinationPatchBadRequest() *DataCocsnRoutesRouteRouteDestinationPatchBadRequest { - - return &DataCocsnRoutesRouteRouteDestinationPatchBadRequest{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationPatchBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// DataCocsnRoutesRouteRouteDestinationPatchUnauthorizedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationPatchUnauthorized -const DataCocsnRoutesRouteRouteDestinationPatchUnauthorizedCode int = 401 - -/*DataCocsnRoutesRouteRouteDestinationPatchUnauthorized Unauthorized - -swagger:response dataCocsnRoutesRouteRouteDestinationPatchUnauthorized -*/ -type DataCocsnRoutesRouteRouteDestinationPatchUnauthorized struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationPatchUnauthorized creates DataCocsnRoutesRouteRouteDestinationPatchUnauthorized with default headers values -func NewDataCocsnRoutesRouteRouteDestinationPatchUnauthorized() *DataCocsnRoutesRouteRouteDestinationPatchUnauthorized { - - return &DataCocsnRoutesRouteRouteDestinationPatchUnauthorized{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationPatchUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(401) -} - -// DataCocsnRoutesRouteRouteDestinationPatchNotFoundCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationPatchNotFound -const DataCocsnRoutesRouteRouteDestinationPatchNotFoundCode int = 404 - -/*DataCocsnRoutesRouteRouteDestinationPatchNotFound Not Found - -swagger:response dataCocsnRoutesRouteRouteDestinationPatchNotFound -*/ -type DataCocsnRoutesRouteRouteDestinationPatchNotFound struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationPatchNotFound creates DataCocsnRoutesRouteRouteDestinationPatchNotFound with default headers values -func NewDataCocsnRoutesRouteRouteDestinationPatchNotFound() *DataCocsnRoutesRouteRouteDestinationPatchNotFound { - - return &DataCocsnRoutesRouteRouteDestinationPatchNotFound{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationPatchNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(404) -} - -// DataCocsnRoutesRouteRouteDestinationPatchMethodNotAllowedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationPatchMethodNotAllowed -const DataCocsnRoutesRouteRouteDestinationPatchMethodNotAllowedCode int = 405 - -/*DataCocsnRoutesRouteRouteDestinationPatchMethodNotAllowed Method Not Allowed - -swagger:response dataCocsnRoutesRouteRouteDestinationPatchMethodNotAllowed -*/ -type DataCocsnRoutesRouteRouteDestinationPatchMethodNotAllowed struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationPatchMethodNotAllowed creates DataCocsnRoutesRouteRouteDestinationPatchMethodNotAllowed with default headers values -func NewDataCocsnRoutesRouteRouteDestinationPatchMethodNotAllowed() *DataCocsnRoutesRouteRouteDestinationPatchMethodNotAllowed { - - return &DataCocsnRoutesRouteRouteDestinationPatchMethodNotAllowed{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationPatchMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(405) -} - -// DataCocsnRoutesRouteRouteDestinationPatchConflictCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationPatchConflict -const DataCocsnRoutesRouteRouteDestinationPatchConflictCode int = 409 - -/*DataCocsnRoutesRouteRouteDestinationPatchConflict Conflict - -swagger:response dataCocsnRoutesRouteRouteDestinationPatchConflict -*/ -type DataCocsnRoutesRouteRouteDestinationPatchConflict struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationPatchConflict creates DataCocsnRoutesRouteRouteDestinationPatchConflict with default headers values -func NewDataCocsnRoutesRouteRouteDestinationPatchConflict() *DataCocsnRoutesRouteRouteDestinationPatchConflict { - - return &DataCocsnRoutesRouteRouteDestinationPatchConflict{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationPatchConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_patch_urlbuilder.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_patch_urlbuilder.go deleted file mode 100644 index 307933a74af2dbb001ebd64f7ae1972a92b510d9..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_patch_urlbuilder.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" -) - -// DataCocsnRoutesRouteRouteDestinationPatchURL generates an URL for the data cocsn routes route route destination patch operation -type DataCocsnRoutesRouteRouteDestinationPatchURL struct { - RouteDestination string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnRoutesRouteRouteDestinationPatchURL) WithBasePath(bp string) *DataCocsnRoutesRouteRouteDestinationPatchURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnRoutesRouteRouteDestinationPatchURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DataCocsnRoutesRouteRouteDestinationPatchURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/cocsn:routes/route={route-destination}" - - routeDestination := o.RouteDestination - if routeDestination != "" { - _path = strings.Replace(_path, "{route-destination}", routeDestination, -1) - } else { - return nil, errors.New("routeDestination is required on DataCocsnRoutesRouteRouteDestinationPatchURL") - } - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnRoutesRouteRouteDestinationPatchURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DataCocsnRoutesRouteRouteDestinationPatchURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnRoutesRouteRouteDestinationPatchURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnRoutesRouteRouteDestinationPatchURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnRoutesRouteRouteDestinationPatchURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DataCocsnRoutesRouteRouteDestinationPatchURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_put.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_put.go deleted file mode 100644 index 8fc07b25556d7b7322e85ce4564087debd2280e3..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_put.go +++ /dev/null @@ -1,71 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataCocsnRoutesRouteRouteDestinationPutHandlerFunc turns a function with the right signature into a data cocsn routes route route destination put handler -type DataCocsnRoutesRouteRouteDestinationPutHandlerFunc func(DataCocsnRoutesRouteRouteDestinationPutParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataCocsnRoutesRouteRouteDestinationPutHandlerFunc) Handle(params DataCocsnRoutesRouteRouteDestinationPutParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataCocsnRoutesRouteRouteDestinationPutHandler interface for that can handle valid data cocsn routes route route destination put params -type DataCocsnRoutesRouteRouteDestinationPutHandler interface { - Handle(DataCocsnRoutesRouteRouteDestinationPutParams, interface{}) middleware.Responder -} - -// NewDataCocsnRoutesRouteRouteDestinationPut creates a new http.Handler for the data cocsn routes route route destination put operation -func NewDataCocsnRoutesRouteRouteDestinationPut(ctx *middleware.Context, handler DataCocsnRoutesRouteRouteDestinationPutHandler) *DataCocsnRoutesRouteRouteDestinationPut { - return &DataCocsnRoutesRouteRouteDestinationPut{Context: ctx, Handler: handler} -} - -/*DataCocsnRoutesRouteRouteDestinationPut swagger:route PUT /data/cocsn:routes/route={route-destination} data put dataCocsnRoutesRouteRouteDestinationPut - -DataCocsnRoutesRouteRouteDestinationPut data cocsn routes route route destination put API - -*/ -type DataCocsnRoutesRouteRouteDestinationPut struct { - Context *middleware.Context - Handler DataCocsnRoutesRouteRouteDestinationPutHandler -} - -func (o *DataCocsnRoutesRouteRouteDestinationPut) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataCocsnRoutesRouteRouteDestinationPutParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_put_parameters.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_put_parameters.go deleted file mode 100644 index 940cf237ef72f3e4453ad7c7de8646b8322cadf3..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_put_parameters.go +++ /dev/null @@ -1,184 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "io" - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/validate" - - "code.fbi.h-da.de/cocsn/cocsn-api/api/models" -) - -// NewDataCocsnRoutesRouteRouteDestinationPutParams creates a new DataCocsnRoutesRouteRouteDestinationPutParams object -// with the default values initialized. -func NewDataCocsnRoutesRouteRouteDestinationPutParams() DataCocsnRoutesRouteRouteDestinationPutParams { - - var ( - // initialize parameters with default values - - insertDefault = string("first") - ) - - return DataCocsnRoutesRouteRouteDestinationPutParams{ - Insert: &insertDefault, - } -} - -// DataCocsnRoutesRouteRouteDestinationPutParams contains all the bound params for the data cocsn routes route route destination put operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_routes_route_route_destination_put -type DataCocsnRoutesRouteRouteDestinationPutParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*controlling the order when adding new list elements - In: query - Default: "first" - */ - Insert *string - /*used to specify the insertion point - In: query - */ - Point *string - /* - Required: true - In: body - */ - Route *models.DataCocsnRoutesRouteRouteDestination - /*Route destination. IP network - Required: true - In: path - */ - RouteDestination string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnRoutesRouteRouteDestinationPutParams() beforehand. -func (o *DataCocsnRoutesRouteRouteDestinationPutParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - qs := runtime.Values(r.URL.Query()) - - qInsert, qhkInsert, _ := qs.GetOK("insert") - if err := o.bindInsert(qInsert, qhkInsert, route.Formats); err != nil { - res = append(res, err) - } - - qPoint, qhkPoint, _ := qs.GetOK("point") - if err := o.bindPoint(qPoint, qhkPoint, route.Formats); err != nil { - res = append(res, err) - } - - if runtime.HasBody(r) { - defer r.Body.Close() - var body models.DataCocsnRoutesRouteRouteDestination - if err := route.Consumer.Consume(r.Body, &body); err != nil { - if err == io.EOF { - res = append(res, errors.Required("route", "body", "")) - } else { - res = append(res, errors.NewParseError("route", "body", "", err)) - } - } else { - // validate body object - if err := body.Validate(route.Formats); err != nil { - res = append(res, err) - } - - if len(res) == 0 { - o.Route = &body - } - } - } else { - res = append(res, errors.Required("route", "body", "")) - } - rRouteDestination, rhkRouteDestination, _ := route.Params.GetOK("route-destination") - if err := o.bindRouteDestination(rRouteDestination, rhkRouteDestination, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindInsert binds and validates parameter Insert from query. -func (o *DataCocsnRoutesRouteRouteDestinationPutParams) bindInsert(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - // Default values have been previously initialized by NewDataCocsnRoutesRouteRouteDestinationPutParams() - return nil - } - - o.Insert = &raw - - if err := o.validateInsert(formats); err != nil { - return err - } - - return nil -} - -// validateInsert carries on validations for parameter Insert -func (o *DataCocsnRoutesRouteRouteDestinationPutParams) validateInsert(formats strfmt.Registry) error { - - if err := validate.EnumCase("insert", "query", *o.Insert, []interface{}{"first", "last", "before", "after"}, true); err != nil { - return err - } - - return nil -} - -// bindPoint binds and validates parameter Point from query. -func (o *DataCocsnRoutesRouteRouteDestinationPutParams) bindPoint(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - o.Point = &raw - - return nil -} - -// bindRouteDestination binds and validates parameter RouteDestination from path. -func (o *DataCocsnRoutesRouteRouteDestinationPutParams) bindRouteDestination(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.RouteDestination = raw - - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_put_responses.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_put_responses.go deleted file mode 100644 index 0a6edda8a15286349e77a7c5d1f23489beba197d..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_put_responses.go +++ /dev/null @@ -1,180 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// DataCocsnRoutesRouteRouteDestinationPutCreatedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationPutCreated -const DataCocsnRoutesRouteRouteDestinationPutCreatedCode int = 201 - -/*DataCocsnRoutesRouteRouteDestinationPutCreated list route created or replaced - -swagger:response dataCocsnRoutesRouteRouteDestinationPutCreated -*/ -type DataCocsnRoutesRouteRouteDestinationPutCreated struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationPutCreated creates DataCocsnRoutesRouteRouteDestinationPutCreated with default headers values -func NewDataCocsnRoutesRouteRouteDestinationPutCreated() *DataCocsnRoutesRouteRouteDestinationPutCreated { - - return &DataCocsnRoutesRouteRouteDestinationPutCreated{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationPutCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(201) -} - -// DataCocsnRoutesRouteRouteDestinationPutNoContentCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationPutNoContent -const DataCocsnRoutesRouteRouteDestinationPutNoContentCode int = 204 - -/*DataCocsnRoutesRouteRouteDestinationPutNoContent No Content - -swagger:response dataCocsnRoutesRouteRouteDestinationPutNoContent -*/ -type DataCocsnRoutesRouteRouteDestinationPutNoContent struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationPutNoContent creates DataCocsnRoutesRouteRouteDestinationPutNoContent with default headers values -func NewDataCocsnRoutesRouteRouteDestinationPutNoContent() *DataCocsnRoutesRouteRouteDestinationPutNoContent { - - return &DataCocsnRoutesRouteRouteDestinationPutNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationPutNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DataCocsnRoutesRouteRouteDestinationPutBadRequestCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationPutBadRequest -const DataCocsnRoutesRouteRouteDestinationPutBadRequestCode int = 400 - -/*DataCocsnRoutesRouteRouteDestinationPutBadRequest Bad Request - -swagger:response dataCocsnRoutesRouteRouteDestinationPutBadRequest -*/ -type DataCocsnRoutesRouteRouteDestinationPutBadRequest struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationPutBadRequest creates DataCocsnRoutesRouteRouteDestinationPutBadRequest with default headers values -func NewDataCocsnRoutesRouteRouteDestinationPutBadRequest() *DataCocsnRoutesRouteRouteDestinationPutBadRequest { - - return &DataCocsnRoutesRouteRouteDestinationPutBadRequest{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationPutBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// DataCocsnRoutesRouteRouteDestinationPutUnauthorizedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationPutUnauthorized -const DataCocsnRoutesRouteRouteDestinationPutUnauthorizedCode int = 401 - -/*DataCocsnRoutesRouteRouteDestinationPutUnauthorized Unauthorized - -swagger:response dataCocsnRoutesRouteRouteDestinationPutUnauthorized -*/ -type DataCocsnRoutesRouteRouteDestinationPutUnauthorized struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationPutUnauthorized creates DataCocsnRoutesRouteRouteDestinationPutUnauthorized with default headers values -func NewDataCocsnRoutesRouteRouteDestinationPutUnauthorized() *DataCocsnRoutesRouteRouteDestinationPutUnauthorized { - - return &DataCocsnRoutesRouteRouteDestinationPutUnauthorized{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationPutUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(401) -} - -// DataCocsnRoutesRouteRouteDestinationPutNotFoundCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationPutNotFound -const DataCocsnRoutesRouteRouteDestinationPutNotFoundCode int = 404 - -/*DataCocsnRoutesRouteRouteDestinationPutNotFound Not Found - -swagger:response dataCocsnRoutesRouteRouteDestinationPutNotFound -*/ -type DataCocsnRoutesRouteRouteDestinationPutNotFound struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationPutNotFound creates DataCocsnRoutesRouteRouteDestinationPutNotFound with default headers values -func NewDataCocsnRoutesRouteRouteDestinationPutNotFound() *DataCocsnRoutesRouteRouteDestinationPutNotFound { - - return &DataCocsnRoutesRouteRouteDestinationPutNotFound{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationPutNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(404) -} - -// DataCocsnRoutesRouteRouteDestinationPutMethodNotAllowedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationPutMethodNotAllowed -const DataCocsnRoutesRouteRouteDestinationPutMethodNotAllowedCode int = 405 - -/*DataCocsnRoutesRouteRouteDestinationPutMethodNotAllowed Method Not Allowed - -swagger:response dataCocsnRoutesRouteRouteDestinationPutMethodNotAllowed -*/ -type DataCocsnRoutesRouteRouteDestinationPutMethodNotAllowed struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationPutMethodNotAllowed creates DataCocsnRoutesRouteRouteDestinationPutMethodNotAllowed with default headers values -func NewDataCocsnRoutesRouteRouteDestinationPutMethodNotAllowed() *DataCocsnRoutesRouteRouteDestinationPutMethodNotAllowed { - - return &DataCocsnRoutesRouteRouteDestinationPutMethodNotAllowed{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationPutMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(405) -} - -// DataCocsnRoutesRouteRouteDestinationPutConflictCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationPutConflict -const DataCocsnRoutesRouteRouteDestinationPutConflictCode int = 409 - -/*DataCocsnRoutesRouteRouteDestinationPutConflict Conflict - -swagger:response dataCocsnRoutesRouteRouteDestinationPutConflict -*/ -type DataCocsnRoutesRouteRouteDestinationPutConflict struct { -} - -// NewDataCocsnRoutesRouteRouteDestinationPutConflict creates DataCocsnRoutesRouteRouteDestinationPutConflict with default headers values -func NewDataCocsnRoutesRouteRouteDestinationPutConflict() *DataCocsnRoutesRouteRouteDestinationPutConflict { - - return &DataCocsnRoutesRouteRouteDestinationPutConflict{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteRouteDestinationPutConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_put_urlbuilder.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_put_urlbuilder.go deleted file mode 100644 index 97210ce8ff62f821b31914bc33519bd91aa67912..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_put_urlbuilder.go +++ /dev/null @@ -1,122 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" -) - -// DataCocsnRoutesRouteRouteDestinationPutURL generates an URL for the data cocsn routes route route destination put operation -type DataCocsnRoutesRouteRouteDestinationPutURL struct { - RouteDestination string - - Insert *string - Point *string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnRoutesRouteRouteDestinationPutURL) WithBasePath(bp string) *DataCocsnRoutesRouteRouteDestinationPutURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnRoutesRouteRouteDestinationPutURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DataCocsnRoutesRouteRouteDestinationPutURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/cocsn:routes/route={route-destination}" - - routeDestination := o.RouteDestination - if routeDestination != "" { - _path = strings.Replace(_path, "{route-destination}", routeDestination, -1) - } else { - return nil, errors.New("routeDestination is required on DataCocsnRoutesRouteRouteDestinationPutURL") - } - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - qs := make(url.Values) - - var insertQ string - if o.Insert != nil { - insertQ = *o.Insert - } - if insertQ != "" { - qs.Set("insert", insertQ) - } - - var pointQ string - if o.Point != nil { - pointQ = *o.Point - } - if pointQ != "" { - qs.Set("point", pointQ) - } - - _result.RawQuery = qs.Encode() - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnRoutesRouteRouteDestinationPutURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DataCocsnRoutesRouteRouteDestinationPutURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnRoutesRouteRouteDestinationPutURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnRoutesRouteRouteDestinationPutURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnRoutesRouteRouteDestinationPutURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DataCocsnRoutesRouteRouteDestinationPutURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/operations/data/data_get.go b/api/restapi/operations/data/data_get.go deleted file mode 100644 index 284cf651974d4aa4c39e21b57d6fa2cf8428e1a0..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_get.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataGetHandlerFunc turns a function with the right signature into a data get handler -type DataGetHandlerFunc func(DataGetParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataGetHandlerFunc) Handle(params DataGetParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataGetHandler interface for that can handle valid data get params -type DataGetHandler interface { - Handle(DataGetParams, interface{}) middleware.Responder -} - -// NewDataGet creates a new http.Handler for the data get operation -func NewDataGet(ctx *middleware.Context, handler DataGetHandler) *DataGet { - return &DataGet{Context: ctx, Handler: handler} -} - -/*DataGet swagger:route GET /data data get dataGet - -This YANG module represents the CoCSN API - -This YANG module represents the CoCSN API - -*/ -type DataGet struct { - Context *middleware.Context - Handler DataGetHandler -} - -func (o *DataGet) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataGetParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_get_parameters.go b/api/restapi/operations/data/data_get_parameters.go deleted file mode 100644 index 62c7b267793077d333adbbea3d30c6c5efeb9500..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_get_parameters.go +++ /dev/null @@ -1,45 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime/middleware" -) - -// NewDataGetParams creates a new DataGetParams object -// no default values defined in spec. -func NewDataGetParams() DataGetParams { - - return DataGetParams{} -} - -// DataGetParams contains all the bound params for the data get operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_get -type DataGetParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataGetParams() beforehand. -func (o *DataGetParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/restapi/operations/data/data_get_responses.go b/api/restapi/operations/data/data_get_responses.go deleted file mode 100644 index 6a2671991c0f871a9b757e061e4643de7b14cb9d..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_get_responses.go +++ /dev/null @@ -1,202 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" - - "code.fbi.h-da.de/cocsn/cocsn-api/api/models" -) - -// DataGetOKCode is the HTTP code returned for type DataGetOK -const DataGetOKCode int = 200 - -/*DataGetOK This YANG module represents the CoCSN API - -swagger:response dataGetOK -*/ -type DataGetOK struct { - - /* - In: Body - */ - Payload *models.Data `json:"body,omitempty"` -} - -// NewDataGetOK creates DataGetOK with default headers values -func NewDataGetOK() *DataGetOK { - - return &DataGetOK{} -} - -// WithPayload adds the payload to the data get o k response -func (o *DataGetOK) WithPayload(payload *models.Data) *DataGetOK { - o.Payload = payload - return o -} - -// SetPayload sets the payload to the data get o k response -func (o *DataGetOK) SetPayload(payload *models.Data) { - o.Payload = payload -} - -// WriteResponse to the client -func (o *DataGetOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.WriteHeader(200) - if o.Payload != nil { - payload := o.Payload - if err := producer.Produce(rw, payload); err != nil { - panic(err) // let the recovery middleware deal with this - } - } -} - -// DataGetNoContentCode is the HTTP code returned for type DataGetNoContent -const DataGetNoContentCode int = 204 - -/*DataGetNoContent No Content - -swagger:response dataGetNoContent -*/ -type DataGetNoContent struct { -} - -// NewDataGetNoContent creates DataGetNoContent with default headers values -func NewDataGetNoContent() *DataGetNoContent { - - return &DataGetNoContent{} -} - -// WriteResponse to the client -func (o *DataGetNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DataGetBadRequestCode is the HTTP code returned for type DataGetBadRequest -const DataGetBadRequestCode int = 400 - -/*DataGetBadRequest Bad Request - -swagger:response dataGetBadRequest -*/ -type DataGetBadRequest struct { -} - -// NewDataGetBadRequest creates DataGetBadRequest with default headers values -func NewDataGetBadRequest() *DataGetBadRequest { - - return &DataGetBadRequest{} -} - -// WriteResponse to the client -func (o *DataGetBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// DataGetUnauthorizedCode is the HTTP code returned for type DataGetUnauthorized -const DataGetUnauthorizedCode int = 401 - -/*DataGetUnauthorized Unauthorized - -swagger:response dataGetUnauthorized -*/ -type DataGetUnauthorized struct { -} - -// NewDataGetUnauthorized creates DataGetUnauthorized with default headers values -func NewDataGetUnauthorized() *DataGetUnauthorized { - - return &DataGetUnauthorized{} -} - -// WriteResponse to the client -func (o *DataGetUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(401) -} - -// DataGetNotFoundCode is the HTTP code returned for type DataGetNotFound -const DataGetNotFoundCode int = 404 - -/*DataGetNotFound Not Found - -swagger:response dataGetNotFound -*/ -type DataGetNotFound struct { -} - -// NewDataGetNotFound creates DataGetNotFound with default headers values -func NewDataGetNotFound() *DataGetNotFound { - - return &DataGetNotFound{} -} - -// WriteResponse to the client -func (o *DataGetNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(404) -} - -// DataGetMethodNotAllowedCode is the HTTP code returned for type DataGetMethodNotAllowed -const DataGetMethodNotAllowedCode int = 405 - -/*DataGetMethodNotAllowed Method Not Allowed - -swagger:response dataGetMethodNotAllowed -*/ -type DataGetMethodNotAllowed struct { -} - -// NewDataGetMethodNotAllowed creates DataGetMethodNotAllowed with default headers values -func NewDataGetMethodNotAllowed() *DataGetMethodNotAllowed { - - return &DataGetMethodNotAllowed{} -} - -// WriteResponse to the client -func (o *DataGetMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(405) -} - -// DataGetConflictCode is the HTTP code returned for type DataGetConflict -const DataGetConflictCode int = 409 - -/*DataGetConflict Conflict - -swagger:response dataGetConflict -*/ -type DataGetConflict struct { -} - -// NewDataGetConflict creates DataGetConflict with default headers values -func NewDataGetConflict() *DataGetConflict { - - return &DataGetConflict{} -} - -// WriteResponse to the client -func (o *DataGetConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/api/restapi/operations/data/data_get_urlbuilder.go b/api/restapi/operations/data/data_get_urlbuilder.go deleted file mode 100644 index 8113739eb0bb958232f8f08d51088140128ed86d..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_get_urlbuilder.go +++ /dev/null @@ -1,87 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" -) - -// DataGetURL generates an URL for the data get operation -type DataGetURL struct { - _basePath string -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataGetURL) WithBasePath(bp string) *DataGetURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataGetURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DataGetURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data" - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DataGetURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DataGetURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DataGetURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataGetURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DataGetURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DataGetURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/operations/data/data_patch.go b/api/restapi/operations/data/data_patch.go deleted file mode 100644 index db50497a761b206f5898e5f10591e5f89232f3e9..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_patch.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataPatchHandlerFunc turns a function with the right signature into a data patch handler -type DataPatchHandlerFunc func(DataPatchParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataPatchHandlerFunc) Handle(params DataPatchParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataPatchHandler interface for that can handle valid data patch params -type DataPatchHandler interface { - Handle(DataPatchParams, interface{}) middleware.Responder -} - -// NewDataPatch creates a new http.Handler for the data patch operation -func NewDataPatch(ctx *middleware.Context, handler DataPatchHandler) *DataPatch { - return &DataPatch{Context: ctx, Handler: handler} -} - -/*DataPatch swagger:route PATCH /data data patch dataPatch - -This YANG module represents the CoCSN API - -This YANG module represents the CoCSN API - -*/ -type DataPatch struct { - Context *middleware.Context - Handler DataPatchHandler -} - -func (o *DataPatch) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataPatchParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_patch_parameters.go b/api/restapi/operations/data/data_patch_parameters.go deleted file mode 100644 index ecd021ad546873a171dd3a89569b309a346d3075..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_patch_parameters.go +++ /dev/null @@ -1,77 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "io" - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - - "code.fbi.h-da.de/cocsn/cocsn-api/api/models" -) - -// NewDataPatchParams creates a new DataPatchParams object -// no default values defined in spec. -func NewDataPatchParams() DataPatchParams { - - return DataPatchParams{} -} - -// DataPatchParams contains all the bound params for the data patch operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_patch -type DataPatchParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*This YANG module represents the CoCSN API - Required: true - In: body - */ - Data *models.DataPutPatch -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataPatchParams() beforehand. -func (o *DataPatchParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if runtime.HasBody(r) { - defer r.Body.Close() - var body models.DataPutPatch - if err := route.Consumer.Consume(r.Body, &body); err != nil { - if err == io.EOF { - res = append(res, errors.Required("data", "body", "")) - } else { - res = append(res, errors.NewParseError("data", "body", "", err)) - } - } else { - // validate body object - if err := body.Validate(route.Formats); err != nil { - res = append(res, err) - } - - if len(res) == 0 { - o.Data = &body - } - } - } else { - res = append(res, errors.Required("data", "body", "")) - } - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/restapi/operations/data/data_patch_responses.go b/api/restapi/operations/data/data_patch_responses.go deleted file mode 100644 index 9465fe42ff9032f0ea8a9e256990a3c299d8cb76..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_patch_responses.go +++ /dev/null @@ -1,156 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// DataPatchNoContentCode is the HTTP code returned for type DataPatchNoContent -const DataPatchNoContentCode int = 204 - -/*DataPatchNoContent This YANG module represents the CoCSN API - -swagger:response dataPatchNoContent -*/ -type DataPatchNoContent struct { -} - -// NewDataPatchNoContent creates DataPatchNoContent with default headers values -func NewDataPatchNoContent() *DataPatchNoContent { - - return &DataPatchNoContent{} -} - -// WriteResponse to the client -func (o *DataPatchNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DataPatchBadRequestCode is the HTTP code returned for type DataPatchBadRequest -const DataPatchBadRequestCode int = 400 - -/*DataPatchBadRequest Bad Request - -swagger:response dataPatchBadRequest -*/ -type DataPatchBadRequest struct { -} - -// NewDataPatchBadRequest creates DataPatchBadRequest with default headers values -func NewDataPatchBadRequest() *DataPatchBadRequest { - - return &DataPatchBadRequest{} -} - -// WriteResponse to the client -func (o *DataPatchBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// DataPatchUnauthorizedCode is the HTTP code returned for type DataPatchUnauthorized -const DataPatchUnauthorizedCode int = 401 - -/*DataPatchUnauthorized Unauthorized - -swagger:response dataPatchUnauthorized -*/ -type DataPatchUnauthorized struct { -} - -// NewDataPatchUnauthorized creates DataPatchUnauthorized with default headers values -func NewDataPatchUnauthorized() *DataPatchUnauthorized { - - return &DataPatchUnauthorized{} -} - -// WriteResponse to the client -func (o *DataPatchUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(401) -} - -// DataPatchNotFoundCode is the HTTP code returned for type DataPatchNotFound -const DataPatchNotFoundCode int = 404 - -/*DataPatchNotFound Not Found - -swagger:response dataPatchNotFound -*/ -type DataPatchNotFound struct { -} - -// NewDataPatchNotFound creates DataPatchNotFound with default headers values -func NewDataPatchNotFound() *DataPatchNotFound { - - return &DataPatchNotFound{} -} - -// WriteResponse to the client -func (o *DataPatchNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(404) -} - -// DataPatchMethodNotAllowedCode is the HTTP code returned for type DataPatchMethodNotAllowed -const DataPatchMethodNotAllowedCode int = 405 - -/*DataPatchMethodNotAllowed Method Not Allowed - -swagger:response dataPatchMethodNotAllowed -*/ -type DataPatchMethodNotAllowed struct { -} - -// NewDataPatchMethodNotAllowed creates DataPatchMethodNotAllowed with default headers values -func NewDataPatchMethodNotAllowed() *DataPatchMethodNotAllowed { - - return &DataPatchMethodNotAllowed{} -} - -// WriteResponse to the client -func (o *DataPatchMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(405) -} - -// DataPatchConflictCode is the HTTP code returned for type DataPatchConflict -const DataPatchConflictCode int = 409 - -/*DataPatchConflict Conflict - -swagger:response dataPatchConflict -*/ -type DataPatchConflict struct { -} - -// NewDataPatchConflict creates DataPatchConflict with default headers values -func NewDataPatchConflict() *DataPatchConflict { - - return &DataPatchConflict{} -} - -// WriteResponse to the client -func (o *DataPatchConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/api/restapi/operations/data/data_patch_urlbuilder.go b/api/restapi/operations/data/data_patch_urlbuilder.go deleted file mode 100644 index f2bad9776f4d2caab8220bea72d64fada5c06342..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_patch_urlbuilder.go +++ /dev/null @@ -1,87 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" -) - -// DataPatchURL generates an URL for the data patch operation -type DataPatchURL struct { - _basePath string -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataPatchURL) WithBasePath(bp string) *DataPatchURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataPatchURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DataPatchURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data" - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DataPatchURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DataPatchURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DataPatchURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataPatchURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DataPatchURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DataPatchURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/operations/data/data_post.go b/api/restapi/operations/data/data_post.go deleted file mode 100644 index 3f01e573d97f19b2daaa82c1959352a2096f3b58..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_post.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataPostHandlerFunc turns a function with the right signature into a data post handler -type DataPostHandlerFunc func(DataPostParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataPostHandlerFunc) Handle(params DataPostParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataPostHandler interface for that can handle valid data post params -type DataPostHandler interface { - Handle(DataPostParams, interface{}) middleware.Responder -} - -// NewDataPost creates a new http.Handler for the data post operation -func NewDataPost(ctx *middleware.Context, handler DataPostHandler) *DataPost { - return &DataPost{Context: ctx, Handler: handler} -} - -/*DataPost swagger:route POST /data data post dataPost - -This YANG module represents the CoCSN API - -This YANG module represents the CoCSN API - -*/ -type DataPost struct { - Context *middleware.Context - Handler DataPostHandler -} - -func (o *DataPost) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataPostParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_post_parameters.go b/api/restapi/operations/data/data_post_parameters.go deleted file mode 100644 index b6702a14d6b10cb7bd243bab75927566958009c9..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_post_parameters.go +++ /dev/null @@ -1,77 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "io" - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - - "code.fbi.h-da.de/cocsn/cocsn-api/api/models" -) - -// NewDataPostParams creates a new DataPostParams object -// no default values defined in spec. -func NewDataPostParams() DataPostParams { - - return DataPostParams{} -} - -// DataPostParams contains all the bound params for the data post operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_post -type DataPostParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*This YANG module represents the CoCSN API - Required: true - In: body - */ - Data *models.DataPost -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataPostParams() beforehand. -func (o *DataPostParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if runtime.HasBody(r) { - defer r.Body.Close() - var body models.DataPost - if err := route.Consumer.Consume(r.Body, &body); err != nil { - if err == io.EOF { - res = append(res, errors.Required("data", "body", "")) - } else { - res = append(res, errors.NewParseError("data", "body", "", err)) - } - } else { - // validate body object - if err := body.Validate(route.Formats); err != nil { - res = append(res, err) - } - - if len(res) == 0 { - o.Data = &body - } - } - } else { - res = append(res, errors.Required("data", "body", "")) - } - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/restapi/operations/data/data_post_responses.go b/api/restapi/operations/data/data_post_responses.go deleted file mode 100644 index 929236e0f49b5f10916b89fe5efef9fb4efb9004..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_post_responses.go +++ /dev/null @@ -1,156 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// DataPostCreatedCode is the HTTP code returned for type DataPostCreated -const DataPostCreatedCode int = 201 - -/*DataPostCreated This YANG module represents the CoCSN API - -swagger:response dataPostCreated -*/ -type DataPostCreated struct { -} - -// NewDataPostCreated creates DataPostCreated with default headers values -func NewDataPostCreated() *DataPostCreated { - - return &DataPostCreated{} -} - -// WriteResponse to the client -func (o *DataPostCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(201) -} - -// DataPostBadRequestCode is the HTTP code returned for type DataPostBadRequest -const DataPostBadRequestCode int = 400 - -/*DataPostBadRequest Bad Request - -swagger:response dataPostBadRequest -*/ -type DataPostBadRequest struct { -} - -// NewDataPostBadRequest creates DataPostBadRequest with default headers values -func NewDataPostBadRequest() *DataPostBadRequest { - - return &DataPostBadRequest{} -} - -// WriteResponse to the client -func (o *DataPostBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// DataPostUnauthorizedCode is the HTTP code returned for type DataPostUnauthorized -const DataPostUnauthorizedCode int = 401 - -/*DataPostUnauthorized Unauthorized - -swagger:response dataPostUnauthorized -*/ -type DataPostUnauthorized struct { -} - -// NewDataPostUnauthorized creates DataPostUnauthorized with default headers values -func NewDataPostUnauthorized() *DataPostUnauthorized { - - return &DataPostUnauthorized{} -} - -// WriteResponse to the client -func (o *DataPostUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(401) -} - -// DataPostNotFoundCode is the HTTP code returned for type DataPostNotFound -const DataPostNotFoundCode int = 404 - -/*DataPostNotFound Not Found - -swagger:response dataPostNotFound -*/ -type DataPostNotFound struct { -} - -// NewDataPostNotFound creates DataPostNotFound with default headers values -func NewDataPostNotFound() *DataPostNotFound { - - return &DataPostNotFound{} -} - -// WriteResponse to the client -func (o *DataPostNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(404) -} - -// DataPostMethodNotAllowedCode is the HTTP code returned for type DataPostMethodNotAllowed -const DataPostMethodNotAllowedCode int = 405 - -/*DataPostMethodNotAllowed Method Not Allowed - -swagger:response dataPostMethodNotAllowed -*/ -type DataPostMethodNotAllowed struct { -} - -// NewDataPostMethodNotAllowed creates DataPostMethodNotAllowed with default headers values -func NewDataPostMethodNotAllowed() *DataPostMethodNotAllowed { - - return &DataPostMethodNotAllowed{} -} - -// WriteResponse to the client -func (o *DataPostMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(405) -} - -// DataPostConflictCode is the HTTP code returned for type DataPostConflict -const DataPostConflictCode int = 409 - -/*DataPostConflict Conflict - -swagger:response dataPostConflict -*/ -type DataPostConflict struct { -} - -// NewDataPostConflict creates DataPostConflict with default headers values -func NewDataPostConflict() *DataPostConflict { - - return &DataPostConflict{} -} - -// WriteResponse to the client -func (o *DataPostConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/api/restapi/operations/data/data_post_urlbuilder.go b/api/restapi/operations/data/data_post_urlbuilder.go deleted file mode 100644 index 304a1046f9be2c243bf733e5e010deaa91781312..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_post_urlbuilder.go +++ /dev/null @@ -1,87 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" -) - -// DataPostURL generates an URL for the data post operation -type DataPostURL struct { - _basePath string -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataPostURL) WithBasePath(bp string) *DataPostURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataPostURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DataPostURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data" - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DataPostURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DataPostURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DataPostURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataPostURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DataPostURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DataPostURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/operations/data/data_put.go b/api/restapi/operations/data/data_put.go deleted file mode 100644 index c921bc76cf0518f33c78b64505c0ff54423ad72a..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_put.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataPutHandlerFunc turns a function with the right signature into a data put handler -type DataPutHandlerFunc func(DataPutParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataPutHandlerFunc) Handle(params DataPutParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataPutHandler interface for that can handle valid data put params -type DataPutHandler interface { - Handle(DataPutParams, interface{}) middleware.Responder -} - -// NewDataPut creates a new http.Handler for the data put operation -func NewDataPut(ctx *middleware.Context, handler DataPutHandler) *DataPut { - return &DataPut{Context: ctx, Handler: handler} -} - -/*DataPut swagger:route PUT /data data put dataPut - -This YANG module represents the CoCSN API - -This YANG module represents the CoCSN API - -*/ -type DataPut struct { - Context *middleware.Context - Handler DataPutHandler -} - -func (o *DataPut) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataPutParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_put_parameters.go b/api/restapi/operations/data/data_put_parameters.go deleted file mode 100644 index 80e343f8df01e92a2be0f7be21341b8fb88c0bbf..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_put_parameters.go +++ /dev/null @@ -1,77 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "io" - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - - "code.fbi.h-da.de/cocsn/cocsn-api/api/models" -) - -// NewDataPutParams creates a new DataPutParams object -// no default values defined in spec. -func NewDataPutParams() DataPutParams { - - return DataPutParams{} -} - -// DataPutParams contains all the bound params for the data put operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_put -type DataPutParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*This YANG module represents the CoCSN API - Required: true - In: body - */ - Data *models.DataPutPatch -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataPutParams() beforehand. -func (o *DataPutParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if runtime.HasBody(r) { - defer r.Body.Close() - var body models.DataPutPatch - if err := route.Consumer.Consume(r.Body, &body); err != nil { - if err == io.EOF { - res = append(res, errors.Required("data", "body", "")) - } else { - res = append(res, errors.NewParseError("data", "body", "", err)) - } - } else { - // validate body object - if err := body.Validate(route.Formats); err != nil { - res = append(res, err) - } - - if len(res) == 0 { - o.Data = &body - } - } - } else { - res = append(res, errors.Required("data", "body", "")) - } - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/restapi/operations/data/data_put_responses.go b/api/restapi/operations/data/data_put_responses.go deleted file mode 100644 index 2bdaf3ec842563217fad240afd48478a9b2130ae..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_put_responses.go +++ /dev/null @@ -1,156 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// DataPutCreatedCode is the HTTP code returned for type DataPutCreated -const DataPutCreatedCode int = 201 - -/*DataPutCreated This YANG module represents the CoCSN API - -swagger:response dataPutCreated -*/ -type DataPutCreated struct { -} - -// NewDataPutCreated creates DataPutCreated with default headers values -func NewDataPutCreated() *DataPutCreated { - - return &DataPutCreated{} -} - -// WriteResponse to the client -func (o *DataPutCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(201) -} - -// DataPutBadRequestCode is the HTTP code returned for type DataPutBadRequest -const DataPutBadRequestCode int = 400 - -/*DataPutBadRequest Bad Request - -swagger:response dataPutBadRequest -*/ -type DataPutBadRequest struct { -} - -// NewDataPutBadRequest creates DataPutBadRequest with default headers values -func NewDataPutBadRequest() *DataPutBadRequest { - - return &DataPutBadRequest{} -} - -// WriteResponse to the client -func (o *DataPutBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// DataPutUnauthorizedCode is the HTTP code returned for type DataPutUnauthorized -const DataPutUnauthorizedCode int = 401 - -/*DataPutUnauthorized Unauthorized - -swagger:response dataPutUnauthorized -*/ -type DataPutUnauthorized struct { -} - -// NewDataPutUnauthorized creates DataPutUnauthorized with default headers values -func NewDataPutUnauthorized() *DataPutUnauthorized { - - return &DataPutUnauthorized{} -} - -// WriteResponse to the client -func (o *DataPutUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(401) -} - -// DataPutNotFoundCode is the HTTP code returned for type DataPutNotFound -const DataPutNotFoundCode int = 404 - -/*DataPutNotFound Not Found - -swagger:response dataPutNotFound -*/ -type DataPutNotFound struct { -} - -// NewDataPutNotFound creates DataPutNotFound with default headers values -func NewDataPutNotFound() *DataPutNotFound { - - return &DataPutNotFound{} -} - -// WriteResponse to the client -func (o *DataPutNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(404) -} - -// DataPutMethodNotAllowedCode is the HTTP code returned for type DataPutMethodNotAllowed -const DataPutMethodNotAllowedCode int = 405 - -/*DataPutMethodNotAllowed Method Not Allowed - -swagger:response dataPutMethodNotAllowed -*/ -type DataPutMethodNotAllowed struct { -} - -// NewDataPutMethodNotAllowed creates DataPutMethodNotAllowed with default headers values -func NewDataPutMethodNotAllowed() *DataPutMethodNotAllowed { - - return &DataPutMethodNotAllowed{} -} - -// WriteResponse to the client -func (o *DataPutMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(405) -} - -// DataPutConflictCode is the HTTP code returned for type DataPutConflict -const DataPutConflictCode int = 409 - -/*DataPutConflict Conflict - -swagger:response dataPutConflict -*/ -type DataPutConflict struct { -} - -// NewDataPutConflict creates DataPutConflict with default headers values -func NewDataPutConflict() *DataPutConflict { - - return &DataPutConflict{} -} - -// WriteResponse to the client -func (o *DataPutConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/api/restapi/operations/data/data_put_urlbuilder.go b/api/restapi/operations/data/data_put_urlbuilder.go deleted file mode 100644 index b19efecfeecacc40f0aa88416680ef9477931c2d..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_put_urlbuilder.go +++ /dev/null @@ -1,87 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" -) - -// DataPutURL generates an URL for the data put operation -type DataPutURL struct { - _basePath string -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataPutURL) WithBasePath(bp string) *DataPutURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataPutURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DataPutURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data" - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DataPutURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DataPutURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DataPutURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataPutURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DataPutURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DataPutURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/operations/operationsops/operations_get.go b/api/restapi/operations/operationsops/operations_get.go deleted file mode 100644 index b5dbfdbb88079f746b5504e90b5cc01d2edd5302..0000000000000000000000000000000000000000 --- a/api/restapi/operations/operationsops/operations_get.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operationsops - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// OperationsGetHandlerFunc turns a function with the right signature into a operations get handler -type OperationsGetHandlerFunc func(OperationsGetParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn OperationsGetHandlerFunc) Handle(params OperationsGetParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// OperationsGetHandler interface for that can handle valid operations get params -type OperationsGetHandler interface { - Handle(OperationsGetParams, interface{}) middleware.Responder -} - -// NewOperationsGet creates a new http.Handler for the operations get operation -func NewOperationsGet(ctx *middleware.Context, handler OperationsGetHandler) *OperationsGet { - return &OperationsGet{Context: ctx, Handler: handler} -} - -/*OperationsGet swagger:route GET /operations operations get operationsGet - -This YANG module represents the CoCSN API - -This YANG module represents the CoCSN API - -*/ -type OperationsGet struct { - Context *middleware.Context - Handler OperationsGetHandler -} - -func (o *OperationsGet) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewOperationsGetParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/operationsops/operations_get_parameters.go b/api/restapi/operations/operationsops/operations_get_parameters.go deleted file mode 100644 index 0aabf23e178dbbc4cab6cefb47c81ec3347585c4..0000000000000000000000000000000000000000 --- a/api/restapi/operations/operationsops/operations_get_parameters.go +++ /dev/null @@ -1,45 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operationsops - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime/middleware" -) - -// NewOperationsGetParams creates a new OperationsGetParams object -// no default values defined in spec. -func NewOperationsGetParams() OperationsGetParams { - - return OperationsGetParams{} -} - -// OperationsGetParams contains all the bound params for the operations get operation -// typically these are obtained from a http.Request -// -// swagger:parameters operations_get -type OperationsGetParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewOperationsGetParams() beforehand. -func (o *OperationsGetParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/restapi/operations/operationsops/operations_get_responses.go b/api/restapi/operations/operationsops/operations_get_responses.go deleted file mode 100644 index 0930ed755f2e9f1d377dac0add73d241cc4754fa..0000000000000000000000000000000000000000 --- a/api/restapi/operations/operationsops/operations_get_responses.go +++ /dev/null @@ -1,202 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operationsops - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" - - "code.fbi.h-da.de/cocsn/cocsn-api/api/models" -) - -// OperationsGetOKCode is the HTTP code returned for type OperationsGetOK -const OperationsGetOKCode int = 200 - -/*OperationsGetOK This YANG module represents the CoCSN API - -swagger:response operationsGetOK -*/ -type OperationsGetOK struct { - - /* - In: Body - */ - Payload *models.Operations `json:"body,omitempty"` -} - -// NewOperationsGetOK creates OperationsGetOK with default headers values -func NewOperationsGetOK() *OperationsGetOK { - - return &OperationsGetOK{} -} - -// WithPayload adds the payload to the operations get o k response -func (o *OperationsGetOK) WithPayload(payload *models.Operations) *OperationsGetOK { - o.Payload = payload - return o -} - -// SetPayload sets the payload to the operations get o k response -func (o *OperationsGetOK) SetPayload(payload *models.Operations) { - o.Payload = payload -} - -// WriteResponse to the client -func (o *OperationsGetOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.WriteHeader(200) - if o.Payload != nil { - payload := o.Payload - if err := producer.Produce(rw, payload); err != nil { - panic(err) // let the recovery middleware deal with this - } - } -} - -// OperationsGetNoContentCode is the HTTP code returned for type OperationsGetNoContent -const OperationsGetNoContentCode int = 204 - -/*OperationsGetNoContent No Content - -swagger:response operationsGetNoContent -*/ -type OperationsGetNoContent struct { -} - -// NewOperationsGetNoContent creates OperationsGetNoContent with default headers values -func NewOperationsGetNoContent() *OperationsGetNoContent { - - return &OperationsGetNoContent{} -} - -// WriteResponse to the client -func (o *OperationsGetNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// OperationsGetBadRequestCode is the HTTP code returned for type OperationsGetBadRequest -const OperationsGetBadRequestCode int = 400 - -/*OperationsGetBadRequest Bad Request - -swagger:response operationsGetBadRequest -*/ -type OperationsGetBadRequest struct { -} - -// NewOperationsGetBadRequest creates OperationsGetBadRequest with default headers values -func NewOperationsGetBadRequest() *OperationsGetBadRequest { - - return &OperationsGetBadRequest{} -} - -// WriteResponse to the client -func (o *OperationsGetBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// OperationsGetUnauthorizedCode is the HTTP code returned for type OperationsGetUnauthorized -const OperationsGetUnauthorizedCode int = 401 - -/*OperationsGetUnauthorized Unauthorized - -swagger:response operationsGetUnauthorized -*/ -type OperationsGetUnauthorized struct { -} - -// NewOperationsGetUnauthorized creates OperationsGetUnauthorized with default headers values -func NewOperationsGetUnauthorized() *OperationsGetUnauthorized { - - return &OperationsGetUnauthorized{} -} - -// WriteResponse to the client -func (o *OperationsGetUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(401) -} - -// OperationsGetNotFoundCode is the HTTP code returned for type OperationsGetNotFound -const OperationsGetNotFoundCode int = 404 - -/*OperationsGetNotFound Not Found - -swagger:response operationsGetNotFound -*/ -type OperationsGetNotFound struct { -} - -// NewOperationsGetNotFound creates OperationsGetNotFound with default headers values -func NewOperationsGetNotFound() *OperationsGetNotFound { - - return &OperationsGetNotFound{} -} - -// WriteResponse to the client -func (o *OperationsGetNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(404) -} - -// OperationsGetMethodNotAllowedCode is the HTTP code returned for type OperationsGetMethodNotAllowed -const OperationsGetMethodNotAllowedCode int = 405 - -/*OperationsGetMethodNotAllowed Method Not Allowed - -swagger:response operationsGetMethodNotAllowed -*/ -type OperationsGetMethodNotAllowed struct { -} - -// NewOperationsGetMethodNotAllowed creates OperationsGetMethodNotAllowed with default headers values -func NewOperationsGetMethodNotAllowed() *OperationsGetMethodNotAllowed { - - return &OperationsGetMethodNotAllowed{} -} - -// WriteResponse to the client -func (o *OperationsGetMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(405) -} - -// OperationsGetConflictCode is the HTTP code returned for type OperationsGetConflict -const OperationsGetConflictCode int = 409 - -/*OperationsGetConflict Conflict - -swagger:response operationsGetConflict -*/ -type OperationsGetConflict struct { -} - -// NewOperationsGetConflict creates OperationsGetConflict with default headers values -func NewOperationsGetConflict() *OperationsGetConflict { - - return &OperationsGetConflict{} -} - -// WriteResponse to the client -func (o *OperationsGetConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/api/restapi/operations/operationsops/operations_get_urlbuilder.go b/api/restapi/operations/operationsops/operations_get_urlbuilder.go deleted file mode 100644 index f441a3fcf2cf19f8a7a383038112eb69ed2c539c..0000000000000000000000000000000000000000 --- a/api/restapi/operations/operationsops/operations_get_urlbuilder.go +++ /dev/null @@ -1,87 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operationsops - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" -) - -// OperationsGetURL generates an URL for the operations get operation -type OperationsGetURL struct { - _basePath string -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *OperationsGetURL) WithBasePath(bp string) *OperationsGetURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *OperationsGetURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *OperationsGetURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/operations" - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *OperationsGetURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *OperationsGetURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *OperationsGetURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on OperationsGetURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on OperationsGetURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *OperationsGetURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/operations/root/root_get.go b/api/restapi/operations/root/root_get.go deleted file mode 100644 index 72d54c74330b76c182fac3fd67b5ff94d24bdfc5..0000000000000000000000000000000000000000 --- a/api/restapi/operations/root/root_get.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package root - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// RootGetHandlerFunc turns a function with the right signature into a root get handler -type RootGetHandlerFunc func(RootGetParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn RootGetHandlerFunc) Handle(params RootGetParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// RootGetHandler interface for that can handle valid root get params -type RootGetHandler interface { - Handle(RootGetParams, interface{}) middleware.Responder -} - -// NewRootGet creates a new http.Handler for the root get operation -func NewRootGet(ctx *middleware.Context, handler RootGetHandler) *RootGet { - return &RootGet{Context: ctx, Handler: handler} -} - -/*RootGet swagger:route GET / root get rootGet - -This YANG module represents the CoCSN API - -This YANG module represents the CoCSN API - -*/ -type RootGet struct { - Context *middleware.Context - Handler RootGetHandler -} - -func (o *RootGet) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewRootGetParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/root/root_get_parameters.go b/api/restapi/operations/root/root_get_parameters.go deleted file mode 100644 index a75ecda486e4b63d132c1732bd8f94d6ed3f033c..0000000000000000000000000000000000000000 --- a/api/restapi/operations/root/root_get_parameters.go +++ /dev/null @@ -1,45 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package root - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime/middleware" -) - -// NewRootGetParams creates a new RootGetParams object -// no default values defined in spec. -func NewRootGetParams() RootGetParams { - - return RootGetParams{} -} - -// RootGetParams contains all the bound params for the root get operation -// typically these are obtained from a http.Request -// -// swagger:parameters root_get -type RootGetParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewRootGetParams() beforehand. -func (o *RootGetParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/restapi/operations/root/root_get_responses.go b/api/restapi/operations/root/root_get_responses.go deleted file mode 100644 index 2137331672ade18c4dc9198e2495a7cf17a14761..0000000000000000000000000000000000000000 --- a/api/restapi/operations/root/root_get_responses.go +++ /dev/null @@ -1,202 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package root - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" - - "code.fbi.h-da.de/cocsn/cocsn-api/api/models" -) - -// RootGetOKCode is the HTTP code returned for type RootGetOK -const RootGetOKCode int = 200 - -/*RootGetOK This YANG module represents the CoCSN API - -swagger:response rootGetOK -*/ -type RootGetOK struct { - - /* - In: Body - */ - Payload *models.Root `json:"body,omitempty"` -} - -// NewRootGetOK creates RootGetOK with default headers values -func NewRootGetOK() *RootGetOK { - - return &RootGetOK{} -} - -// WithPayload adds the payload to the root get o k response -func (o *RootGetOK) WithPayload(payload *models.Root) *RootGetOK { - o.Payload = payload - return o -} - -// SetPayload sets the payload to the root get o k response -func (o *RootGetOK) SetPayload(payload *models.Root) { - o.Payload = payload -} - -// WriteResponse to the client -func (o *RootGetOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.WriteHeader(200) - if o.Payload != nil { - payload := o.Payload - if err := producer.Produce(rw, payload); err != nil { - panic(err) // let the recovery middleware deal with this - } - } -} - -// RootGetNoContentCode is the HTTP code returned for type RootGetNoContent -const RootGetNoContentCode int = 204 - -/*RootGetNoContent No Content - -swagger:response rootGetNoContent -*/ -type RootGetNoContent struct { -} - -// NewRootGetNoContent creates RootGetNoContent with default headers values -func NewRootGetNoContent() *RootGetNoContent { - - return &RootGetNoContent{} -} - -// WriteResponse to the client -func (o *RootGetNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// RootGetBadRequestCode is the HTTP code returned for type RootGetBadRequest -const RootGetBadRequestCode int = 400 - -/*RootGetBadRequest Bad Request - -swagger:response rootGetBadRequest -*/ -type RootGetBadRequest struct { -} - -// NewRootGetBadRequest creates RootGetBadRequest with default headers values -func NewRootGetBadRequest() *RootGetBadRequest { - - return &RootGetBadRequest{} -} - -// WriteResponse to the client -func (o *RootGetBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// RootGetUnauthorizedCode is the HTTP code returned for type RootGetUnauthorized -const RootGetUnauthorizedCode int = 401 - -/*RootGetUnauthorized Unauthorized - -swagger:response rootGetUnauthorized -*/ -type RootGetUnauthorized struct { -} - -// NewRootGetUnauthorized creates RootGetUnauthorized with default headers values -func NewRootGetUnauthorized() *RootGetUnauthorized { - - return &RootGetUnauthorized{} -} - -// WriteResponse to the client -func (o *RootGetUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(401) -} - -// RootGetNotFoundCode is the HTTP code returned for type RootGetNotFound -const RootGetNotFoundCode int = 404 - -/*RootGetNotFound Not Found - -swagger:response rootGetNotFound -*/ -type RootGetNotFound struct { -} - -// NewRootGetNotFound creates RootGetNotFound with default headers values -func NewRootGetNotFound() *RootGetNotFound { - - return &RootGetNotFound{} -} - -// WriteResponse to the client -func (o *RootGetNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(404) -} - -// RootGetMethodNotAllowedCode is the HTTP code returned for type RootGetMethodNotAllowed -const RootGetMethodNotAllowedCode int = 405 - -/*RootGetMethodNotAllowed Method Not Allowed - -swagger:response rootGetMethodNotAllowed -*/ -type RootGetMethodNotAllowed struct { -} - -// NewRootGetMethodNotAllowed creates RootGetMethodNotAllowed with default headers values -func NewRootGetMethodNotAllowed() *RootGetMethodNotAllowed { - - return &RootGetMethodNotAllowed{} -} - -// WriteResponse to the client -func (o *RootGetMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(405) -} - -// RootGetConflictCode is the HTTP code returned for type RootGetConflict -const RootGetConflictCode int = 409 - -/*RootGetConflict Conflict - -swagger:response rootGetConflict -*/ -type RootGetConflict struct { -} - -// NewRootGetConflict creates RootGetConflict with default headers values -func NewRootGetConflict() *RootGetConflict { - - return &RootGetConflict{} -} - -// WriteResponse to the client -func (o *RootGetConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/api/restapi/operations/root/root_get_urlbuilder.go b/api/restapi/operations/root/root_get_urlbuilder.go deleted file mode 100644 index c749a9fec618fb3d7848309513a14ff486444982..0000000000000000000000000000000000000000 --- a/api/restapi/operations/root/root_get_urlbuilder.go +++ /dev/null @@ -1,87 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package root - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" -) - -// RootGetURL generates an URL for the root get operation -type RootGetURL struct { - _basePath string -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *RootGetURL) WithBasePath(bp string) *RootGetURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *RootGetURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *RootGetURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/" - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *RootGetURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *RootGetURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *RootGetURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on RootGetURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on RootGetURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *RootGetURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/operations/yang_library_version/yang_library_version_get.go b/api/restapi/operations/yang_library_version/yang_library_version_get.go deleted file mode 100644 index c2e9b8058f43de510c3ff9adc34fa8de3bbb64da..0000000000000000000000000000000000000000 --- a/api/restapi/operations/yang_library_version/yang_library_version_get.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package yang_library_version - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// YangLibraryVersionGetHandlerFunc turns a function with the right signature into a yang library version get handler -type YangLibraryVersionGetHandlerFunc func(YangLibraryVersionGetParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn YangLibraryVersionGetHandlerFunc) Handle(params YangLibraryVersionGetParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// YangLibraryVersionGetHandler interface for that can handle valid yang library version get params -type YangLibraryVersionGetHandler interface { - Handle(YangLibraryVersionGetParams, interface{}) middleware.Responder -} - -// NewYangLibraryVersionGet creates a new http.Handler for the yang library version get operation -func NewYangLibraryVersionGet(ctx *middleware.Context, handler YangLibraryVersionGetHandler) *YangLibraryVersionGet { - return &YangLibraryVersionGet{Context: ctx, Handler: handler} -} - -/*YangLibraryVersionGet swagger:route GET /yang-library-version yang-library-version get yangLibraryVersionGet - -This YANG module represents the CoCSN API - -This YANG module represents the CoCSN API - -*/ -type YangLibraryVersionGet struct { - Context *middleware.Context - Handler YangLibraryVersionGetHandler -} - -func (o *YangLibraryVersionGet) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewYangLibraryVersionGetParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/yang_library_version/yang_library_version_get_parameters.go b/api/restapi/operations/yang_library_version/yang_library_version_get_parameters.go deleted file mode 100644 index 34ebb4e75fdeeefbdec122ac2203297c64f04b20..0000000000000000000000000000000000000000 --- a/api/restapi/operations/yang_library_version/yang_library_version_get_parameters.go +++ /dev/null @@ -1,45 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package yang_library_version - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime/middleware" -) - -// NewYangLibraryVersionGetParams creates a new YangLibraryVersionGetParams object -// no default values defined in spec. -func NewYangLibraryVersionGetParams() YangLibraryVersionGetParams { - - return YangLibraryVersionGetParams{} -} - -// YangLibraryVersionGetParams contains all the bound params for the yang library version get operation -// typically these are obtained from a http.Request -// -// swagger:parameters yang_library_version_get -type YangLibraryVersionGetParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewYangLibraryVersionGetParams() beforehand. -func (o *YangLibraryVersionGetParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/restapi/operations/yang_library_version/yang_library_version_get_responses.go b/api/restapi/operations/yang_library_version/yang_library_version_get_responses.go deleted file mode 100644 index 763d8210bff48aea7fcced88bbbcff94f683ec8b..0000000000000000000000000000000000000000 --- a/api/restapi/operations/yang_library_version/yang_library_version_get_responses.go +++ /dev/null @@ -1,202 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package yang_library_version - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" - - "code.fbi.h-da.de/cocsn/cocsn-api/api/models" -) - -// YangLibraryVersionGetOKCode is the HTTP code returned for type YangLibraryVersionGetOK -const YangLibraryVersionGetOKCode int = 200 - -/*YangLibraryVersionGetOK This YANG module represents the CoCSN API - -swagger:response yangLibraryVersionGetOK -*/ -type YangLibraryVersionGetOK struct { - - /* - In: Body - */ - Payload *models.YangLibraryVersion `json:"body,omitempty"` -} - -// NewYangLibraryVersionGetOK creates YangLibraryVersionGetOK with default headers values -func NewYangLibraryVersionGetOK() *YangLibraryVersionGetOK { - - return &YangLibraryVersionGetOK{} -} - -// WithPayload adds the payload to the yang library version get o k response -func (o *YangLibraryVersionGetOK) WithPayload(payload *models.YangLibraryVersion) *YangLibraryVersionGetOK { - o.Payload = payload - return o -} - -// SetPayload sets the payload to the yang library version get o k response -func (o *YangLibraryVersionGetOK) SetPayload(payload *models.YangLibraryVersion) { - o.Payload = payload -} - -// WriteResponse to the client -func (o *YangLibraryVersionGetOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.WriteHeader(200) - if o.Payload != nil { - payload := o.Payload - if err := producer.Produce(rw, payload); err != nil { - panic(err) // let the recovery middleware deal with this - } - } -} - -// YangLibraryVersionGetNoContentCode is the HTTP code returned for type YangLibraryVersionGetNoContent -const YangLibraryVersionGetNoContentCode int = 204 - -/*YangLibraryVersionGetNoContent No Content - -swagger:response yangLibraryVersionGetNoContent -*/ -type YangLibraryVersionGetNoContent struct { -} - -// NewYangLibraryVersionGetNoContent creates YangLibraryVersionGetNoContent with default headers values -func NewYangLibraryVersionGetNoContent() *YangLibraryVersionGetNoContent { - - return &YangLibraryVersionGetNoContent{} -} - -// WriteResponse to the client -func (o *YangLibraryVersionGetNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// YangLibraryVersionGetBadRequestCode is the HTTP code returned for type YangLibraryVersionGetBadRequest -const YangLibraryVersionGetBadRequestCode int = 400 - -/*YangLibraryVersionGetBadRequest Bad Request - -swagger:response yangLibraryVersionGetBadRequest -*/ -type YangLibraryVersionGetBadRequest struct { -} - -// NewYangLibraryVersionGetBadRequest creates YangLibraryVersionGetBadRequest with default headers values -func NewYangLibraryVersionGetBadRequest() *YangLibraryVersionGetBadRequest { - - return &YangLibraryVersionGetBadRequest{} -} - -// WriteResponse to the client -func (o *YangLibraryVersionGetBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// YangLibraryVersionGetUnauthorizedCode is the HTTP code returned for type YangLibraryVersionGetUnauthorized -const YangLibraryVersionGetUnauthorizedCode int = 401 - -/*YangLibraryVersionGetUnauthorized Unauthorized - -swagger:response yangLibraryVersionGetUnauthorized -*/ -type YangLibraryVersionGetUnauthorized struct { -} - -// NewYangLibraryVersionGetUnauthorized creates YangLibraryVersionGetUnauthorized with default headers values -func NewYangLibraryVersionGetUnauthorized() *YangLibraryVersionGetUnauthorized { - - return &YangLibraryVersionGetUnauthorized{} -} - -// WriteResponse to the client -func (o *YangLibraryVersionGetUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(401) -} - -// YangLibraryVersionGetNotFoundCode is the HTTP code returned for type YangLibraryVersionGetNotFound -const YangLibraryVersionGetNotFoundCode int = 404 - -/*YangLibraryVersionGetNotFound Not Found - -swagger:response yangLibraryVersionGetNotFound -*/ -type YangLibraryVersionGetNotFound struct { -} - -// NewYangLibraryVersionGetNotFound creates YangLibraryVersionGetNotFound with default headers values -func NewYangLibraryVersionGetNotFound() *YangLibraryVersionGetNotFound { - - return &YangLibraryVersionGetNotFound{} -} - -// WriteResponse to the client -func (o *YangLibraryVersionGetNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(404) -} - -// YangLibraryVersionGetMethodNotAllowedCode is the HTTP code returned for type YangLibraryVersionGetMethodNotAllowed -const YangLibraryVersionGetMethodNotAllowedCode int = 405 - -/*YangLibraryVersionGetMethodNotAllowed Method Not Allowed - -swagger:response yangLibraryVersionGetMethodNotAllowed -*/ -type YangLibraryVersionGetMethodNotAllowed struct { -} - -// NewYangLibraryVersionGetMethodNotAllowed creates YangLibraryVersionGetMethodNotAllowed with default headers values -func NewYangLibraryVersionGetMethodNotAllowed() *YangLibraryVersionGetMethodNotAllowed { - - return &YangLibraryVersionGetMethodNotAllowed{} -} - -// WriteResponse to the client -func (o *YangLibraryVersionGetMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(405) -} - -// YangLibraryVersionGetConflictCode is the HTTP code returned for type YangLibraryVersionGetConflict -const YangLibraryVersionGetConflictCode int = 409 - -/*YangLibraryVersionGetConflict Conflict - -swagger:response yangLibraryVersionGetConflict -*/ -type YangLibraryVersionGetConflict struct { -} - -// NewYangLibraryVersionGetConflict creates YangLibraryVersionGetConflict with default headers values -func NewYangLibraryVersionGetConflict() *YangLibraryVersionGetConflict { - - return &YangLibraryVersionGetConflict{} -} - -// WriteResponse to the client -func (o *YangLibraryVersionGetConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/api/restapi/operations/yang_library_version/yang_library_version_get_urlbuilder.go b/api/restapi/operations/yang_library_version/yang_library_version_get_urlbuilder.go deleted file mode 100644 index 24d14bde075e9f2bbeb13f69623963d628ab69c4..0000000000000000000000000000000000000000 --- a/api/restapi/operations/yang_library_version/yang_library_version_get_urlbuilder.go +++ /dev/null @@ -1,87 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package yang_library_version - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" -) - -// YangLibraryVersionGetURL generates an URL for the yang library version get operation -type YangLibraryVersionGetURL struct { - _basePath string -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *YangLibraryVersionGetURL) WithBasePath(bp string) *YangLibraryVersionGetURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *YangLibraryVersionGetURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *YangLibraryVersionGetURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/yang-library-version" - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *YangLibraryVersionGetURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *YangLibraryVersionGetURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *YangLibraryVersionGetURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on YangLibraryVersionGetURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on YangLibraryVersionGetURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *YangLibraryVersionGetURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/server.go b/api/restapi/server.go deleted file mode 100644 index fd9da92b0e486cab2240e18d60627d95ac2e8a98..0000000000000000000000000000000000000000 --- a/api/restapi/server.go +++ /dev/null @@ -1,512 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restapi - -import ( - "context" - "crypto/tls" - "crypto/x509" - "errors" - "fmt" - "io/ioutil" - "log" - "net" - "net/http" - "os" - "os/signal" - "strconv" - "sync" - "sync/atomic" - "syscall" - "time" - - "github.com/go-openapi/runtime/flagext" - "github.com/go-openapi/swag" - flags "github.com/jessevdk/go-flags" - "golang.org/x/net/netutil" - - "code.fbi.h-da.de/cocsn/cocsn-api/api/restapi/operations" -) - -const ( - schemeHTTP = "http" - schemeHTTPS = "https" - schemeUnix = "unix" -) - -var defaultSchemes []string - -func init() { - defaultSchemes = []string{ - schemeHTTP, - schemeHTTPS, - } -} - -// NewServer creates a new api cocsn server but does not configure it -func NewServer(api *operations.CocsnAPI) *Server { - s := new(Server) - - s.shutdown = make(chan struct{}) - s.api = api - s.interrupt = make(chan os.Signal, 1) - return s -} - -// ConfigureAPI configures the API and handlers. -func (s *Server) ConfigureAPI() { - if s.api != nil { - s.handler = configureAPI(s.api) - } -} - -// ConfigureFlags configures the additional flags defined by the handlers. Needs to be called before the parser.Parse -func (s *Server) ConfigureFlags() { - if s.api != nil { - configureFlags(s.api) - } -} - -// Server for the cocsn API -type Server struct { - EnabledListeners []string `long:"scheme" description:"the listeners to enable, this can be repeated and defaults to the schemes in the swagger spec"` - CleanupTimeout time.Duration `long:"cleanup-timeout" description:"grace period for which to wait before killing idle connections" default:"10s"` - GracefulTimeout time.Duration `long:"graceful-timeout" description:"grace period for which to wait before shutting down the server" default:"15s"` - MaxHeaderSize flagext.ByteSize `long:"max-header-size" description:"controls the maximum number of bytes the server will read parsing the request header's keys and values, including the request line. It does not limit the size of the request body." default:"1MiB"` - - SocketPath flags.Filename `long:"socket-path" description:"the unix socket to listen on" default:"/var/run/cocsn.sock"` - domainSocketL net.Listener - - Host string `long:"host" description:"the IP to listen on" default:"localhost" env:"HOST"` - Port int `long:"port" description:"the port to listen on for insecure connections, defaults to a random value" env:"PORT"` - ListenLimit int `long:"listen-limit" description:"limit the number of outstanding requests"` - KeepAlive time.Duration `long:"keep-alive" description:"sets the TCP keep-alive timeouts on accepted connections. It prunes dead TCP connections ( e.g. closing laptop mid-download)" default:"3m"` - ReadTimeout time.Duration `long:"read-timeout" description:"maximum duration before timing out read of the request" default:"30s"` - WriteTimeout time.Duration `long:"write-timeout" description:"maximum duration before timing out write of the response" default:"60s"` - httpServerL net.Listener - - TLSHost string `long:"tls-host" description:"the IP to listen on for tls, when not specified it's the same as --host" env:"TLS_HOST"` - TLSPort int `long:"tls-port" description:"the port to listen on for secure connections, defaults to a random value" env:"TLS_PORT"` - TLSCertificate flags.Filename `long:"tls-certificate" description:"the certificate to use for secure connections" env:"TLS_CERTIFICATE"` - TLSCertificateKey flags.Filename `long:"tls-key" description:"the private key to use for secure connections" env:"TLS_PRIVATE_KEY"` - TLSCACertificate flags.Filename `long:"tls-ca" description:"the certificate authority file to be used with mutual tls auth" env:"TLS_CA_CERTIFICATE"` - TLSListenLimit int `long:"tls-listen-limit" description:"limit the number of outstanding requests"` - TLSKeepAlive time.Duration `long:"tls-keep-alive" description:"sets the TCP keep-alive timeouts on accepted connections. It prunes dead TCP connections ( e.g. closing laptop mid-download)"` - TLSReadTimeout time.Duration `long:"tls-read-timeout" description:"maximum duration before timing out read of the request"` - TLSWriteTimeout time.Duration `long:"tls-write-timeout" description:"maximum duration before timing out write of the response"` - httpsServerL net.Listener - - api *operations.CocsnAPI - handler http.Handler - hasListeners bool - shutdown chan struct{} - shuttingDown int32 - interrupted bool - interrupt chan os.Signal -} - -// Logf logs message either via defined user logger or via system one if no user logger is defined. -func (s *Server) Logf(f string, args ...interface{}) { - if s.api != nil && s.api.Logger != nil { - s.api.Logger(f, args...) - } else { - log.Printf(f, args...) - } -} - -// Fatalf logs message either via defined user logger or via system one if no user logger is defined. -// Exits with non-zero status after printing -func (s *Server) Fatalf(f string, args ...interface{}) { - if s.api != nil && s.api.Logger != nil { - s.api.Logger(f, args...) - os.Exit(1) - } else { - log.Fatalf(f, args...) - } -} - -// SetAPI configures the server with the specified API. Needs to be called before Serve -func (s *Server) SetAPI(api *operations.CocsnAPI) { - if api == nil { - s.api = nil - s.handler = nil - return - } - - s.api = api - s.handler = configureAPI(api) -} - -func (s *Server) hasScheme(scheme string) bool { - schemes := s.EnabledListeners - if len(schemes) == 0 { - schemes = defaultSchemes - } - - for _, v := range schemes { - if v == scheme { - return true - } - } - return false -} - -// Serve the api -func (s *Server) Serve() (err error) { - if !s.hasListeners { - if err = s.Listen(); err != nil { - return err - } - } - - // set default handler, if none is set - if s.handler == nil { - if s.api == nil { - return errors.New("can't create the default handler, as no api is set") - } - - s.SetHandler(s.api.Serve(nil)) - } - - wg := new(sync.WaitGroup) - once := new(sync.Once) - signalNotify(s.interrupt) - go handleInterrupt(once, s) - - servers := []*http.Server{} - - if s.hasScheme(schemeUnix) { - domainSocket := new(http.Server) - domainSocket.MaxHeaderBytes = int(s.MaxHeaderSize) - domainSocket.Handler = s.handler - if int64(s.CleanupTimeout) > 0 { - domainSocket.IdleTimeout = s.CleanupTimeout - } - - configureServer(domainSocket, "unix", string(s.SocketPath)) - - servers = append(servers, domainSocket) - wg.Add(1) - s.Logf("Serving cocsn at unix://%s", s.SocketPath) - go func(l net.Listener) { - defer wg.Done() - if err := domainSocket.Serve(l); err != nil && err != http.ErrServerClosed { - s.Fatalf("%v", err) - } - s.Logf("Stopped serving cocsn at unix://%s", s.SocketPath) - }(s.domainSocketL) - } - - if s.hasScheme(schemeHTTP) { - httpServer := new(http.Server) - httpServer.MaxHeaderBytes = int(s.MaxHeaderSize) - httpServer.ReadTimeout = s.ReadTimeout - httpServer.WriteTimeout = s.WriteTimeout - httpServer.SetKeepAlivesEnabled(int64(s.KeepAlive) > 0) - if s.ListenLimit > 0 { - s.httpServerL = netutil.LimitListener(s.httpServerL, s.ListenLimit) - } - - if int64(s.CleanupTimeout) > 0 { - httpServer.IdleTimeout = s.CleanupTimeout - } - - httpServer.Handler = s.handler - - configureServer(httpServer, "http", s.httpServerL.Addr().String()) - - servers = append(servers, httpServer) - wg.Add(1) - s.Logf("Serving cocsn at http://%s", s.httpServerL.Addr()) - go func(l net.Listener) { - defer wg.Done() - if err := httpServer.Serve(l); err != nil && err != http.ErrServerClosed { - s.Fatalf("%v", err) - } - s.Logf("Stopped serving cocsn at http://%s", l.Addr()) - }(s.httpServerL) - } - - if s.hasScheme(schemeHTTPS) { - httpsServer := new(http.Server) - httpsServer.MaxHeaderBytes = int(s.MaxHeaderSize) - httpsServer.ReadTimeout = s.TLSReadTimeout - httpsServer.WriteTimeout = s.TLSWriteTimeout - httpsServer.SetKeepAlivesEnabled(int64(s.TLSKeepAlive) > 0) - if s.TLSListenLimit > 0 { - s.httpsServerL = netutil.LimitListener(s.httpsServerL, s.TLSListenLimit) - } - if int64(s.CleanupTimeout) > 0 { - httpsServer.IdleTimeout = s.CleanupTimeout - } - httpsServer.Handler = s.handler - - // Inspired by https://blog.bracebin.com/achieving-perfect-ssl-labs-score-with-go - httpsServer.TLSConfig = &tls.Config{ - // Causes servers to use Go's default ciphersuite preferences, - // which are tuned to avoid attacks. Does nothing on clients. - PreferServerCipherSuites: true, - // Only use curves which have assembly implementations - // https://github.com/golang/go/tree/master/src/crypto/elliptic - CurvePreferences: []tls.CurveID{tls.CurveP256}, - // Use modern tls mode https://wiki.mozilla.org/Security/Server_Side_TLS#Modern_compatibility - NextProtos: []string{"h2", "http/1.1"}, - // https://www.owasp.org/index.php/Transport_Layer_Protection_Cheat_Sheet#Rule_-_Only_Support_Strong_Protocols - MinVersion: tls.VersionTLS12, - // These ciphersuites support Forward Secrecy: https://en.wikipedia.org/wiki/Forward_secrecy - CipherSuites: []uint16{ - tls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, - tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, - tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, - tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, - tls.TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305, - tls.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305, - }, - } - - // build standard config from server options - if s.TLSCertificate != "" && s.TLSCertificateKey != "" { - httpsServer.TLSConfig.Certificates = make([]tls.Certificate, 1) - httpsServer.TLSConfig.Certificates[0], err = tls.LoadX509KeyPair(string(s.TLSCertificate), string(s.TLSCertificateKey)) - if err != nil { - return err - } - } - - if s.TLSCACertificate != "" { - // include specified CA certificate - caCert, caCertErr := ioutil.ReadFile(string(s.TLSCACertificate)) - if caCertErr != nil { - return caCertErr - } - caCertPool := x509.NewCertPool() - ok := caCertPool.AppendCertsFromPEM(caCert) - if !ok { - return fmt.Errorf("cannot parse CA certificate") - } - httpsServer.TLSConfig.ClientCAs = caCertPool - httpsServer.TLSConfig.ClientAuth = tls.RequireAndVerifyClientCert - } - - // call custom TLS configurator - configureTLS(httpsServer.TLSConfig) - - if len(httpsServer.TLSConfig.Certificates) == 0 && httpsServer.TLSConfig.GetCertificate == nil { - // after standard and custom config are passed, this ends up with no certificate - if s.TLSCertificate == "" { - if s.TLSCertificateKey == "" { - s.Fatalf("the required flags `--tls-certificate` and `--tls-key` were not specified") - } - s.Fatalf("the required flag `--tls-certificate` was not specified") - } - if s.TLSCertificateKey == "" { - s.Fatalf("the required flag `--tls-key` was not specified") - } - // this happens with a wrong custom TLS configurator - s.Fatalf("no certificate was configured for TLS") - } - - // must have at least one certificate or panics - httpsServer.TLSConfig.BuildNameToCertificate() - - configureServer(httpsServer, "https", s.httpsServerL.Addr().String()) - - servers = append(servers, httpsServer) - wg.Add(1) - s.Logf("Serving cocsn at https://%s", s.httpsServerL.Addr()) - go func(l net.Listener) { - defer wg.Done() - if err := httpsServer.Serve(l); err != nil && err != http.ErrServerClosed { - s.Fatalf("%v", err) - } - s.Logf("Stopped serving cocsn at https://%s", l.Addr()) - }(tls.NewListener(s.httpsServerL, httpsServer.TLSConfig)) - } - - wg.Add(1) - go s.handleShutdown(wg, &servers) - - wg.Wait() - return nil -} - -// Listen creates the listeners for the server -func (s *Server) Listen() error { - if s.hasListeners { // already done this - return nil - } - - if s.hasScheme(schemeHTTPS) { - // Use http host if https host wasn't defined - if s.TLSHost == "" { - s.TLSHost = s.Host - } - // Use http listen limit if https listen limit wasn't defined - if s.TLSListenLimit == 0 { - s.TLSListenLimit = s.ListenLimit - } - // Use http tcp keep alive if https tcp keep alive wasn't defined - if int64(s.TLSKeepAlive) == 0 { - s.TLSKeepAlive = s.KeepAlive - } - // Use http read timeout if https read timeout wasn't defined - if int64(s.TLSReadTimeout) == 0 { - s.TLSReadTimeout = s.ReadTimeout - } - // Use http write timeout if https write timeout wasn't defined - if int64(s.TLSWriteTimeout) == 0 { - s.TLSWriteTimeout = s.WriteTimeout - } - } - - if s.hasScheme(schemeUnix) { - domSockListener, err := net.Listen("unix", string(s.SocketPath)) - if err != nil { - return err - } - s.domainSocketL = domSockListener - } - - if s.hasScheme(schemeHTTP) { - listener, err := net.Listen("tcp", net.JoinHostPort(s.Host, strconv.Itoa(s.Port))) - if err != nil { - return err - } - - h, p, err := swag.SplitHostPort(listener.Addr().String()) - if err != nil { - return err - } - s.Host = h - s.Port = p - s.httpServerL = listener - } - - if s.hasScheme(schemeHTTPS) { - tlsListener, err := net.Listen("tcp", net.JoinHostPort(s.TLSHost, strconv.Itoa(s.TLSPort))) - if err != nil { - return err - } - - sh, sp, err := swag.SplitHostPort(tlsListener.Addr().String()) - if err != nil { - return err - } - s.TLSHost = sh - s.TLSPort = sp - s.httpsServerL = tlsListener - } - - s.hasListeners = true - return nil -} - -// Shutdown server and clean up resources -func (s *Server) Shutdown() error { - if atomic.CompareAndSwapInt32(&s.shuttingDown, 0, 1) { - close(s.shutdown) - } - return nil -} - -func (s *Server) handleShutdown(wg *sync.WaitGroup, serversPtr *[]*http.Server) { - // wg.Done must occur last, after s.api.ServerShutdown() - // (to preserve old behaviour) - defer wg.Done() - - <-s.shutdown - - servers := *serversPtr - - ctx, cancel := context.WithTimeout(context.TODO(), s.GracefulTimeout) - defer cancel() - - // first execute the pre-shutdown hook - s.api.PreServerShutdown() - - shutdownChan := make(chan bool) - for i := range servers { - server := servers[i] - go func() { - var success bool - defer func() { - shutdownChan <- success - }() - if err := server.Shutdown(ctx); err != nil { - // Error from closing listeners, or context timeout: - s.Logf("HTTP server Shutdown: %v", err) - } else { - success = true - } - }() - } - - // Wait until all listeners have successfully shut down before calling ServerShutdown - success := true - for range servers { - success = success && <-shutdownChan - } - if success { - s.api.ServerShutdown() - } -} - -// GetHandler returns a handler useful for testing -func (s *Server) GetHandler() http.Handler { - return s.handler -} - -// SetHandler allows for setting a http handler on this server -func (s *Server) SetHandler(handler http.Handler) { - s.handler = handler -} - -// UnixListener returns the domain socket listener -func (s *Server) UnixListener() (net.Listener, error) { - if !s.hasListeners { - if err := s.Listen(); err != nil { - return nil, err - } - } - return s.domainSocketL, nil -} - -// HTTPListener returns the http listener -func (s *Server) HTTPListener() (net.Listener, error) { - if !s.hasListeners { - if err := s.Listen(); err != nil { - return nil, err - } - } - return s.httpServerL, nil -} - -// TLSListener returns the https listener -func (s *Server) TLSListener() (net.Listener, error) { - if !s.hasListeners { - if err := s.Listen(); err != nil { - return nil, err - } - } - return s.httpsServerL, nil -} - -func handleInterrupt(once *sync.Once, s *Server) { - once.Do(func() { - for range s.interrupt { - if s.interrupted { - s.Logf("Server already shutting down") - continue - } - s.interrupted = true - s.Logf("Shutting down... ") - if err := s.Shutdown(); err != nil { - s.Logf("HTTP server Shutdown: %v", err) - } - } - }) -} - -func signalNotify(interrupt chan<- os.Signal) { - signal.Notify(interrupt, syscall.SIGINT, syscall.SIGTERM) -} diff --git a/go.mod b/go.mod index 770e4f7eb470e0e98f5360f8d01fe0db4dd1f21c..cbd29a501f75b17534d448295ccd2999ad4efa5d 100644 --- a/go.mod +++ b/go.mod @@ -3,17 +3,8 @@ module code.fbi.h-da.de/cocsn/api go 1.16 require ( - code.fbi.h-da.de/cocsn/cocsn-api v0.2.0 - github.com/go-openapi/errors v0.20.0 - github.com/go-openapi/loads v0.20.2 - github.com/go-openapi/runtime v0.19.29 - github.com/go-openapi/spec v0.20.3 - github.com/go-openapi/strfmt v0.20.1 - github.com/go-openapi/swag v0.19.15 - github.com/go-openapi/validate v0.20.2 - github.com/jessevdk/go-flags v1.5.0 github.com/openconfig/gnmi v0.0.0-20210527163611-d3a3e30199da - golang.org/x/net v0.0.0-20210614182718-04defd469f4e + golang.org/x/net v0.0.0-20210614182718-04defd469f4e // indirect google.golang.org/grpc v1.38.0 google.golang.org/protobuf v1.26.0 ) diff --git a/go.sum b/go.sum index 76674dfc732c03e78df9f7881faa3d12a39b4947..14433695be9c0678df9e7877e978f303dfc63ee4 100644 --- a/go.sum +++ b/go.sum @@ -1,160 +1,16 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -code.fbi.h-da.de/cocsn/cocsn-api v0.2.0 h1:iqNPedmOIyABu8FnASX/L661tcCQo4Zsr85ZULn44y0= -code.fbi.h-da.de/cocsn/cocsn-api v0.2.0/go.mod h1:LEOmx+JCr2HU1gBNbT8PxGYIR0JwnpFHTJaAvDvY/Q4= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= -github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= -github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= -github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= -github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= -github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= -github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= -github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= -github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef h1:46PFijGLmAjMPwCCCo7Jf0W6f9slllCkkv7vyc1yOSg= -github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= -github.com/aws/aws-sdk-go v1.34.28/go.mod h1:H7NKnBqNVzoTJpGfLrQkkD+ytBA93eiDYi/+8rV9s48= github.com/cenkalti/backoff/v4 v4.0.0/go.mod h1:eEew/i+1Q6OrCDZh3WiXYv3+nJwBASZ8Bog/87DQnVg= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= -github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= -github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= -github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= -github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= -github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= -github.com/go-openapi/analysis v0.19.2/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= -github.com/go-openapi/analysis v0.19.4/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= -github.com/go-openapi/analysis v0.19.5/go.mod h1:hkEAkxagaIvIP7VTn8ygJNkd4kAYON2rCu0v0ObL0AU= -github.com/go-openapi/analysis v0.19.10/go.mod h1:qmhS3VNFxBlquFJ0RGoDtylO9y4pgTAUNE9AEEMdlJQ= -github.com/go-openapi/analysis v0.19.16/go.mod h1:GLInF007N83Ad3m8a/CbQ5TPzdnGT7workfHwuVjNVk= -github.com/go-openapi/analysis v0.20.0 h1:UN09o0kNhleunxW7LR+KnltD0YrJ8FF03pSqvAN3Vro= -github.com/go-openapi/analysis v0.20.0/go.mod h1:BMchjvaHDykmRMsK40iPtvyOfFdMMxlOmQr9FBZk+Og= -github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= -github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= -github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= -github.com/go-openapi/errors v0.19.3/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= -github.com/go-openapi/errors v0.19.6/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= -github.com/go-openapi/errors v0.19.7/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= -github.com/go-openapi/errors v0.19.8/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= -github.com/go-openapi/errors v0.19.9/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= -github.com/go-openapi/errors v0.20.0 h1:Sxpo9PjEHDzhs3FbnGNonvDgWcMW2U7wGTcDDSFSceM= -github.com/go-openapi/errors v0.20.0/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= -github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= -github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= -github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= -github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= -github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= -github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= -github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= -github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= -github.com/go-openapi/jsonreference v0.19.5 h1:1WJP/wi4OjB4iV8KVbH73rQaoialJrqv8gitZLxGLtM= -github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= -github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= -github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= -github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= -github.com/go-openapi/loads v0.19.2/go.mod h1:QAskZPMX5V0C2gvfkGZzJlINuP7Hx/4+ix5jWFxsNPs= -github.com/go-openapi/loads v0.19.3/go.mod h1:YVfqhUCdahYwR3f3iiwQLhicVRvLlU/WO5WPaZvcvSI= -github.com/go-openapi/loads v0.19.5/go.mod h1:dswLCAdonkRufe/gSUC3gN8nTSaB9uaS2es0x5/IbjY= -github.com/go-openapi/loads v0.19.6/go.mod h1:brCsvE6j8mnbmGBh103PT/QLHfbyDxA4hsKvYBNEGVc= -github.com/go-openapi/loads v0.19.7/go.mod h1:brCsvE6j8mnbmGBh103PT/QLHfbyDxA4hsKvYBNEGVc= -github.com/go-openapi/loads v0.20.0/go.mod h1:2LhKquiE513rN5xC6Aan6lYOSddlL8Mp20AW9kpviM4= -github.com/go-openapi/loads v0.20.2 h1:z5p5Xf5wujMxS1y8aP+vxwW5qYT2zdJBbXKmQUG3lcc= -github.com/go-openapi/loads v0.20.2/go.mod h1:hTVUotJ+UonAMMZsvakEgmWKgtulweO9vYP2bQYKA/o= -github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA= -github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64= -github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4= -github.com/go-openapi/runtime v0.19.15/go.mod h1:dhGWCTKRXlAfGnQG0ONViOZpjfg0m2gUt9nTQPQZuoo= -github.com/go-openapi/runtime v0.19.16/go.mod h1:5P9104EJgYcizotuXhEuUrzVc+j1RiSjahULvYmlv98= -github.com/go-openapi/runtime v0.19.24/go.mod h1:Lm9YGCeecBnUUkFTxPC4s1+lwrkJ0pthx8YvyjCfkgk= -github.com/go-openapi/runtime v0.19.29 h1:5IIvCaIDbxetN674vX9eOxvoZ9mYGQ16fV1Q0VSG+NA= -github.com/go-openapi/runtime v0.19.29/go.mod h1:BvrQtn6iVb2QmiVXRsFAm6ZCAZBpbVKFfN6QWCp582M= -github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= -github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= -github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY= -github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= -github.com/go-openapi/spec v0.19.6/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= -github.com/go-openapi/spec v0.19.8/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= -github.com/go-openapi/spec v0.19.15/go.mod h1:+81FIL1JwC5P3/Iuuozq3pPE9dXdIEGxFutcFKaVbmU= -github.com/go-openapi/spec v0.20.0/go.mod h1:+81FIL1JwC5P3/Iuuozq3pPE9dXdIEGxFutcFKaVbmU= -github.com/go-openapi/spec v0.20.1/go.mod h1:93x7oh+d+FQsmsieroS4cmR3u0p/ywH649a3qwC9OsQ= -github.com/go-openapi/spec v0.20.3 h1:uH9RQ6vdyPSs2pSy9fL8QPspDF2AMIMPtmK5coSSjtQ= -github.com/go-openapi/spec v0.20.3/go.mod h1:gG4F8wdEDN+YPBMVnzE85Rbhf+Th2DTvA9nFPQ5AYEg= -github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= -github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= -github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+ZPMF/cC8nDY= -github.com/go-openapi/strfmt v0.19.2/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= -github.com/go-openapi/strfmt v0.19.3/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= -github.com/go-openapi/strfmt v0.19.4/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk= -github.com/go-openapi/strfmt v0.19.5/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk= -github.com/go-openapi/strfmt v0.19.11/go.mod h1:UukAYgTaQfqJuAFlNxxMWNvMYiwiXtLsF2VwmoFtbtc= -github.com/go-openapi/strfmt v0.20.0/go.mod h1:UukAYgTaQfqJuAFlNxxMWNvMYiwiXtLsF2VwmoFtbtc= -github.com/go-openapi/strfmt v0.20.1 h1:1VgxvehFne1mbChGeCmZ5pc0LxUf6yaACVSIYAR91Xc= -github.com/go-openapi/strfmt v0.20.1/go.mod h1:43urheQI9dNtE5lTZQfuFJvjYJKPrxicATpEfZwHUNk= -github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= -github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= -github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.19.7/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= -github.com/go-openapi/swag v0.19.9/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= -github.com/go-openapi/swag v0.19.12/go.mod h1:eFdyEBkTdoAf/9RXBvj4cr1nH7GD8Kzo5HTt47gr72M= -github.com/go-openapi/swag v0.19.13/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= -github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= -github.com/go-openapi/swag v0.19.15 h1:D2NRCBzS9/pEY3gP9Nl8aDqGUcPFrwG2p+CNFrLyrCM= -github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= -github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= -github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= -github.com/go-openapi/validate v0.19.3/go.mod h1:90Vh6jjkTn+OT1Eefm0ZixWNFjhtOH7vS9k0lo6zwJo= -github.com/go-openapi/validate v0.19.10/go.mod h1:RKEZTUWDkxKQxN2jDT7ZnZi2bhZlbNMAuKvKB+IaGx8= -github.com/go-openapi/validate v0.19.12/go.mod h1:Rzou8hA/CBw8donlS6WNEUQupNvUZ0waH08tGe6kAQ4= -github.com/go-openapi/validate v0.19.15/go.mod h1:tbn/fdOwYHgrhPBzidZfJC2MIVvs9GA7monOmWBbeCI= -github.com/go-openapi/validate v0.20.1/go.mod h1:b60iJT+xNNLfaQJUqLI7946tYiFEOuE9E4k54HpKcJ0= -github.com/go-openapi/validate v0.20.2 h1:AhqDegYV3J3iQkMPJSXkvzymHKMTw0BST3RK3hTT4ts= -github.com/go-openapi/validate v0.20.2/go.mod h1:e7OJoKNgd0twXZwIn0A43tHbvIcr/rZIVCbJBpTUoY0= -github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= -github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0= -github.com/gobuffalo/depgen v0.0.0-20190329151759-d478694a28d3/go.mod h1:3STtPUQYuzV0gBVOY3vy6CfMm/ljR4pABfrTeHNLHUY= -github.com/gobuffalo/depgen v0.1.0/go.mod h1:+ifsuy7fhi15RWncXQQKjWS9JPkdah5sZvtHc2RXGlg= -github.com/gobuffalo/envy v1.6.15/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= -github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= -github.com/gobuffalo/flect v0.1.0/go.mod h1:d2ehjJqGOH/Kjqcoz+F7jHTBbmDb38yXA598Hb50EGs= -github.com/gobuffalo/flect v0.1.1/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= -github.com/gobuffalo/flect v0.1.3/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= -github.com/gobuffalo/genny v0.0.0-20190329151137-27723ad26ef9/go.mod h1:rWs4Z12d1Zbf19rlsn0nurr75KqhYp52EAGGxTbBhNk= -github.com/gobuffalo/genny v0.0.0-20190403191548-3ca520ef0d9e/go.mod h1:80lIj3kVJWwOrXWWMRzzdhW3DsrdjILVil/SFKBzF28= -github.com/gobuffalo/genny v0.1.0/go.mod h1:XidbUqzak3lHdS//TPu2OgiFB+51Ur5f7CSnXZ/JDvo= -github.com/gobuffalo/genny v0.1.1/go.mod h1:5TExbEyY48pfunL4QSXxlDOmdsD44RRq4mVZ0Ex28Xk= -github.com/gobuffalo/gitgen v0.0.0-20190315122116-cc086187d211/go.mod h1:vEHJk/E9DmhejeLeNt7UVvlSGv3ziL+djtTr3yyzcOw= -github.com/gobuffalo/gogen v0.0.0-20190315121717-8f38393713f5/go.mod h1:V9QVDIxsgKNZs6L2IYiGR8datgMhB577vzTDqypH360= -github.com/gobuffalo/gogen v0.1.0/go.mod h1:8NTelM5qd8RZ15VjQTFkAW6qOMx5wBbW4dSCS3BY8gg= -github.com/gobuffalo/gogen v0.1.1/go.mod h1:y8iBtmHmGc4qa3urIyo1shvOD8JftTtfcKi+71xfDNE= -github.com/gobuffalo/logger v0.0.0-20190315122211-86e12af44bc2/go.mod h1:QdxcLw541hSGtBnhUc4gaNIXRjiDppFGaDqzbrBd3v8= -github.com/gobuffalo/mapi v1.0.1/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= -github.com/gobuffalo/mapi v1.0.2/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= -github.com/gobuffalo/packd v0.0.0-20190315124812-a385830c7fc0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= -github.com/gobuffalo/packd v0.1.0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= -github.com/gobuffalo/packr/v2 v2.0.9/go.mod h1:emmyGweYTm6Kdper+iywB6YK5YzuKchGtJQZ0Odn4pQ= -github.com/gobuffalo/packr/v2 v2.2.0/go.mod h1:CaAwI0GPIAv+5wKLtv8Afwl+Cm78K/I/VCm/3ptBN+0= -github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -169,189 +25,60 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0 h1:LUVKkCeviFUMKqHa4tXIIij/lbhnMbP7Fn5wKdKkRh4= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/protobuf v3.14.0+incompatible/go.mod h1:lUQ9D1ePzbH2PrIS7ob/bjm9HXyH5WHB0Akwh7URreM= -github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/jessevdk/go-flags v1.5.0 h1:1jKYvbxEjfUl0fmqTCOfonvskHHXMjBySTLW4y9LFvc= -github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= -github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= -github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= -github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= -github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= -github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= -github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4= -github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= -github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= -github.com/klauspost/compress v1.9.5/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.7.1/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= -github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA= -github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= -github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.3.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.4.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag= -github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= -github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/openconfig/gnmi v0.0.0-20210527163611-d3a3e30199da h1:Gaj4Reje4wKdliTXaXDE7ginHeVzDbcUTszUx6xpQeE= github.com/openconfig/gnmi v0.0.0-20210527163611-d3a3e30199da/go.mod h1:H/20NXlnWbCPFC593nxpiKJ+OU//7mW7s7Qk7uVdg3Q= github.com/openconfig/goyang v0.0.0-20200115183954-d0a48929f0ea/go.mod h1:dhXaV0JgHJzdrHi2l+w0fZrwArtXL7jEFoiqLEdmkvU= github.com/openconfig/ygot v0.6.0/go.mod h1:o30svNf7O0xK+R35tlx95odkDmZWS9JyWWQSmIhqwAs= -github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= -github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= -github.com/pelletier/go-toml v1.4.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUruD3k1mMwo= -github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= -github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= -github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= -github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= -github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= -github.com/xdg-go/scram v1.0.2/go.mod h1:1WAq6h33pAW+iRreB34OORO2Nf7qel3VV3fjBj+hCSs= -github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM= -github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= -github.com/xdg/stringprep v0.0.0-20180714160509-73f8eece6fdc/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= -github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= -go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= -go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= -go.mongodb.org/mongo-driver v1.3.0/go.mod h1:MSWZXKOynuguX+JSvwP8i+58jYCXxbia8HS3gZBapIE= -go.mongodb.org/mongo-driver v1.3.4/go.mod h1:MSWZXKOynuguX+JSvwP8i+58jYCXxbia8HS3gZBapIE= -go.mongodb.org/mongo-driver v1.4.3/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4SoGjYphSc= -go.mongodb.org/mongo-driver v1.4.4/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4SoGjYphSc= -go.mongodb.org/mongo-driver v1.4.6/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4SoGjYphSc= -go.mongodb.org/mongo-driver v1.5.1 h1:9nOVLGDfOaZ9R0tBumx/BcuqkbFpyTCU2r/Po7A2azI= -go.mongodb.org/mongo-driver v1.5.1/go.mod h1:gRXCHX4Jo7J0IJ1oDQyUxF7jfy19UfxniMS4xxMmUqw= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= -golang.org/x/crypto v0.0.0-20190530122614-20be4c3c3ed5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210614182718-04defd469f4e h1:XpT3nA5TvE525Ne3hInMh6+GETgn27Zfm9dxsThnX2Q= golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190419153524-e8e3143a4f4a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190531175056-4c3a928424d2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201214210602-f9fddec55a1e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da h1:b3NXsE2LusjYGGjL5bxEVZZORm/YEFFrWFjR8eFrw/c= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190329151228-23e29df326fe/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190416151739-9c9e1878f421/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190420181800-aa740d480789/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190531172133-b3315ee88b7d/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190617190820-da514acc4774/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= @@ -383,21 +110,6 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=