This commit is contained in:
88
build/app/models/error.go
Normal file
88
build/app/models/error.go
Normal file
@@ -0,0 +1,88 @@
|
||||
// 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 (
|
||||
"context"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
"github.com/go-openapi/validate"
|
||||
)
|
||||
|
||||
// Error error
|
||||
//
|
||||
// swagger:model error
|
||||
type Error struct {
|
||||
|
||||
// error code
|
||||
// Required: true
|
||||
ErrorCode *string `json:"errorCode"`
|
||||
|
||||
// error message
|
||||
// Required: true
|
||||
ErrorMessage *string `json:"errorMessage"`
|
||||
}
|
||||
|
||||
// Validate validates this error
|
||||
func (m *Error) Validate(formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.validateErrorCode(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.validateErrorMessage(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Error) validateErrorCode(formats strfmt.Registry) error {
|
||||
|
||||
if err := validate.Required("errorCode", "body", m.ErrorCode); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Error) validateErrorMessage(formats strfmt.Registry) error {
|
||||
|
||||
if err := validate.Required("errorMessage", "body", m.ErrorMessage); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validates this error based on context it is used
|
||||
func (m *Error) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *Error) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *Error) UnmarshalBinary(b []byte) error {
|
||||
var res Error
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
50
build/app/models/post_o_k_body.go
Normal file
50
build/app/models/post_o_k_body.go
Normal file
@@ -0,0 +1,50 @@
|
||||
// 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 (
|
||||
"context"
|
||||
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
)
|
||||
|
||||
// PostOKBody post o k body
|
||||
//
|
||||
// swagger:model postOKBody
|
||||
type PostOKBody struct {
|
||||
|
||||
// export excel
|
||||
ExportExcel string `json:"export-excel,omitempty"`
|
||||
}
|
||||
|
||||
// Validate validates this post o k body
|
||||
func (m *PostOKBody) Validate(formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validates this post o k body based on context it is used
|
||||
func (m *PostOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *PostOKBody) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *PostOKBody) UnmarshalBinary(b []byte) error {
|
||||
var res PostOKBody
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
91
build/app/models/post_params_body.go
Normal file
91
build/app/models/post_params_body.go
Normal file
@@ -0,0 +1,91 @@
|
||||
// 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 (
|
||||
"context"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
"github.com/go-openapi/validate"
|
||||
)
|
||||
|
||||
// PostParamsBody post params body
|
||||
//
|
||||
// swagger:model postParamsBody
|
||||
type PostParamsBody struct {
|
||||
|
||||
// Name of the json input file to utilise
|
||||
Infile string `json:"infile,omitempty"`
|
||||
|
||||
// the filename of the output spreadsheet
|
||||
// Required: true
|
||||
OutFilename *string `json:"out-filename"`
|
||||
|
||||
// Label for the worksheet created in the spreadsheet
|
||||
// Required: true
|
||||
WorksheetName *string `json:"worksheet-name"`
|
||||
}
|
||||
|
||||
// Validate validates this post params body
|
||||
func (m *PostParamsBody) Validate(formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.validateOutFilename(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.validateWorksheetName(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *PostParamsBody) validateOutFilename(formats strfmt.Registry) error {
|
||||
|
||||
if err := validate.Required("out-filename", "body", m.OutFilename); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *PostParamsBody) validateWorksheetName(formats strfmt.Registry) error {
|
||||
|
||||
if err := validate.Required("worksheet-name", "body", m.WorksheetName); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validates this post params body based on context it is used
|
||||
func (m *PostParamsBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *PostParamsBody) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *PostParamsBody) UnmarshalBinary(b []byte) error {
|
||||
var res PostParamsBody
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
Reference in New Issue
Block a user