Removing unused parameters (#1465)
This commit is contained in:
committed by
GitHub
parent
d8b387434b
commit
4a1ccf19a0
6
go.mod
6
go.mod
@@ -6,9 +6,9 @@ require (
|
||||
github.com/blang/semver/v4 v4.0.0
|
||||
github.com/cheggaaa/pb/v3 v3.0.6
|
||||
github.com/dustin/go-humanize v1.0.0
|
||||
github.com/go-openapi/errors v0.20.1
|
||||
github.com/go-openapi/errors v0.20.2
|
||||
github.com/go-openapi/loads v0.21.0
|
||||
github.com/go-openapi/runtime v0.21.0
|
||||
github.com/go-openapi/runtime v0.21.1
|
||||
github.com/go-openapi/spec v0.20.4
|
||||
github.com/go-openapi/strfmt v0.21.1
|
||||
github.com/go-openapi/swag v0.19.15
|
||||
@@ -62,7 +62,7 @@ require (
|
||||
github.com/fatih/structs v1.1.0 // indirect
|
||||
github.com/go-logr/logr v0.4.0 // indirect
|
||||
github.com/go-ole/go-ole v1.2.6 // indirect
|
||||
github.com/go-openapi/analysis v0.20.1 // indirect
|
||||
github.com/go-openapi/analysis v0.21.2 // indirect
|
||||
github.com/go-openapi/jsonpointer v0.19.5 // indirect
|
||||
github.com/go-openapi/jsonreference v0.19.6 // indirect
|
||||
github.com/go-stack/stack v1.8.0 // indirect
|
||||
|
||||
10
go.sum
10
go.sum
@@ -232,8 +232,9 @@ github.com/go-openapi/analysis v0.19.5/go.mod h1:hkEAkxagaIvIP7VTn8ygJNkd4kAYON2
|
||||
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/go.mod h1:BMchjvaHDykmRMsK40iPtvyOfFdMMxlOmQr9FBZk+Og=
|
||||
github.com/go-openapi/analysis v0.20.1 h1:zdVbw8yoD4SWZeq+cWdGgquaB0W4VrsJvDJHJND/Ktc=
|
||||
github.com/go-openapi/analysis v0.20.1/go.mod h1:BMchjvaHDykmRMsK40iPtvyOfFdMMxlOmQr9FBZk+Og=
|
||||
github.com/go-openapi/analysis v0.21.2 h1:hXFrOYFHUAMQdu6zwAiKKJHJQ8kqZs1ux/ru1P1wLJU=
|
||||
github.com/go-openapi/analysis v0.21.2/go.mod h1:HZwRk4RRisyG8vx2Oe6aqeSQcoxRp47Xkp3+K6q+LdY=
|
||||
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=
|
||||
@@ -242,8 +243,9 @@ github.com/go-openapi/errors v0.19.6/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpX
|
||||
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.1 h1:j23mMDtRxMwIobkpId7sWh7Ddcx4ivaoqUbfXx5P+a8=
|
||||
github.com/go-openapi/errors v0.20.1/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M=
|
||||
github.com/go-openapi/errors v0.20.2 h1:dxy7PGTqEh94zj2E3h1cUmQQWiM1+aeCROfAr02EmK8=
|
||||
github.com/go-openapi/errors v0.20.2/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M=
|
||||
github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0=
|
||||
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=
|
||||
@@ -277,8 +279,8 @@ github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29g
|
||||
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.21.0 h1:giZ8eT26R+/rx6RX2MkYjZPY8vPYVKDhP/mOazrQHzM=
|
||||
github.com/go-openapi/runtime v0.21.0/go.mod h1:aQg+kaIQEn+A2CRSY1TxbM8+sT9g2V3aLc1FbIAnbbs=
|
||||
github.com/go-openapi/runtime v0.21.1 h1:/KIG00BzA2x2HRStX2tnhbqbQdPcFlkgsYCiNY20FZs=
|
||||
github.com/go-openapi/runtime v0.21.1/go.mod h1:aQg+kaIQEn+A2CRSY1TxbM8+sT9g2V3aLc1FbIAnbbs=
|
||||
github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc=
|
||||
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=
|
||||
|
||||
@@ -37,8 +37,12 @@ import (
|
||||
type BucketAccess string
|
||||
|
||||
func NewBucketAccess(value BucketAccess) *BucketAccess {
|
||||
v := value
|
||||
return &v
|
||||
return &value
|
||||
}
|
||||
|
||||
// Pointer returns a pointer to a freshly-allocated BucketAccess.
|
||||
func (m BucketAccess) Pointer() *BucketAccess {
|
||||
return &m
|
||||
}
|
||||
|
||||
const (
|
||||
|
||||
@@ -37,8 +37,12 @@ import (
|
||||
type BucketEncryptionType string
|
||||
|
||||
func NewBucketEncryptionType(value BucketEncryptionType) *BucketEncryptionType {
|
||||
v := value
|
||||
return &v
|
||||
return &value
|
||||
}
|
||||
|
||||
// Pointer returns a pointer to a freshly-allocated BucketEncryptionType.
|
||||
func (m BucketEncryptionType) Pointer() *BucketEncryptionType {
|
||||
return &m
|
||||
}
|
||||
|
||||
const (
|
||||
|
||||
@@ -37,8 +37,12 @@ import (
|
||||
type NofiticationService string
|
||||
|
||||
func NewNofiticationService(value NofiticationService) *NofiticationService {
|
||||
v := value
|
||||
return &v
|
||||
return &value
|
||||
}
|
||||
|
||||
// Pointer returns a pointer to a freshly-allocated NofiticationService.
|
||||
func (m NofiticationService) Pointer() *NofiticationService {
|
||||
return &m
|
||||
}
|
||||
|
||||
const (
|
||||
|
||||
@@ -37,8 +37,12 @@ import (
|
||||
type NotificationEventType string
|
||||
|
||||
func NewNotificationEventType(value NotificationEventType) *NotificationEventType {
|
||||
v := value
|
||||
return &v
|
||||
return &value
|
||||
}
|
||||
|
||||
// Pointer returns a pointer to a freshly-allocated NotificationEventType.
|
||||
func (m NotificationEventType) Pointer() *NotificationEventType {
|
||||
return &m
|
||||
}
|
||||
|
||||
const (
|
||||
|
||||
@@ -37,8 +37,12 @@ import (
|
||||
type ObjectLegalHoldStatus string
|
||||
|
||||
func NewObjectLegalHoldStatus(value ObjectLegalHoldStatus) *ObjectLegalHoldStatus {
|
||||
v := value
|
||||
return &v
|
||||
return &value
|
||||
}
|
||||
|
||||
// Pointer returns a pointer to a freshly-allocated ObjectLegalHoldStatus.
|
||||
func (m ObjectLegalHoldStatus) Pointer() *ObjectLegalHoldStatus {
|
||||
return &m
|
||||
}
|
||||
|
||||
const (
|
||||
|
||||
@@ -37,8 +37,12 @@ import (
|
||||
type ObjectRetentionMode string
|
||||
|
||||
func NewObjectRetentionMode(value ObjectRetentionMode) *ObjectRetentionMode {
|
||||
v := value
|
||||
return &v
|
||||
return &value
|
||||
}
|
||||
|
||||
// Pointer returns a pointer to a freshly-allocated ObjectRetentionMode.
|
||||
func (m ObjectRetentionMode) Pointer() *ObjectRetentionMode {
|
||||
return &m
|
||||
}
|
||||
|
||||
const (
|
||||
|
||||
@@ -37,8 +37,12 @@ import (
|
||||
type ObjectRetentionUnit string
|
||||
|
||||
func NewObjectRetentionUnit(value ObjectRetentionUnit) *ObjectRetentionUnit {
|
||||
v := value
|
||||
return &v
|
||||
return &value
|
||||
}
|
||||
|
||||
// Pointer returns a pointer to a freshly-allocated ObjectRetentionUnit.
|
||||
func (m ObjectRetentionUnit) Pointer() *ObjectRetentionUnit {
|
||||
return &m
|
||||
}
|
||||
|
||||
const (
|
||||
|
||||
@@ -37,8 +37,12 @@ import (
|
||||
type PolicyEntity string
|
||||
|
||||
func NewPolicyEntity(value PolicyEntity) *PolicyEntity {
|
||||
v := value
|
||||
return &v
|
||||
return &value
|
||||
}
|
||||
|
||||
// Pointer returns a pointer to a freshly-allocated PolicyEntity.
|
||||
func (m PolicyEntity) Pointer() *PolicyEntity {
|
||||
return &m
|
||||
}
|
||||
|
||||
const (
|
||||
|
||||
@@ -37,8 +37,12 @@ import (
|
||||
type ProfilerType string
|
||||
|
||||
func NewProfilerType(value ProfilerType) *ProfilerType {
|
||||
v := value
|
||||
return &v
|
||||
return &value
|
||||
}
|
||||
|
||||
// Pointer returns a pointer to a freshly-allocated ProfilerType.
|
||||
func (m ProfilerType) Pointer() *ProfilerType {
|
||||
return &m
|
||||
}
|
||||
|
||||
const (
|
||||
|
||||
@@ -621,25 +621,6 @@ func init() {
|
||||
],
|
||||
"summary": "List Buckets",
|
||||
"operationId": "ListBuckets",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"name": "sort_by",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"name": "offset",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"name": "limit",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
@@ -6697,25 +6678,6 @@ func init() {
|
||||
],
|
||||
"summary": "List Buckets",
|
||||
"operationId": "ListBuckets",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"name": "sort_by",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"name": "offset",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"name": "limit",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
|
||||
@@ -26,10 +26,7 @@ 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"
|
||||
)
|
||||
|
||||
// NewListBucketsParams creates a new ListBucketsParams object
|
||||
@@ -48,19 +45,6 @@ type ListBucketsParams struct {
|
||||
|
||||
// HTTP Request Object
|
||||
HTTPRequest *http.Request `json:"-"`
|
||||
|
||||
/*
|
||||
In: query
|
||||
*/
|
||||
Limit *int32
|
||||
/*
|
||||
In: query
|
||||
*/
|
||||
Offset *int32
|
||||
/*
|
||||
In: query
|
||||
*/
|
||||
SortBy *string
|
||||
}
|
||||
|
||||
// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface
|
||||
@@ -72,88 +56,8 @@ func (o *ListBucketsParams) BindRequest(r *http.Request, route *middleware.Match
|
||||
|
||||
o.HTTPRequest = r
|
||||
|
||||
qs := runtime.Values(r.URL.Query())
|
||||
|
||||
qLimit, qhkLimit, _ := qs.GetOK("limit")
|
||||
if err := o.bindLimit(qLimit, qhkLimit, route.Formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
qOffset, qhkOffset, _ := qs.GetOK("offset")
|
||||
if err := o.bindOffset(qOffset, qhkOffset, route.Formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
qSortBy, qhkSortBy, _ := qs.GetOK("sort_by")
|
||||
if err := o.bindSortBy(qSortBy, qhkSortBy, route.Formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// bindLimit binds and validates parameter Limit from query.
|
||||
func (o *ListBucketsParams) bindLimit(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.ConvertInt32(raw)
|
||||
if err != nil {
|
||||
return errors.InvalidType("limit", "query", "int32", raw)
|
||||
}
|
||||
o.Limit = &value
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// bindOffset binds and validates parameter Offset from query.
|
||||
func (o *ListBucketsParams) bindOffset(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.ConvertInt32(raw)
|
||||
if err != nil {
|
||||
return errors.InvalidType("offset", "query", "int32", raw)
|
||||
}
|
||||
o.Offset = &value
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// bindSortBy binds and validates parameter SortBy from query.
|
||||
func (o *ListBucketsParams) bindSortBy(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.SortBy = &raw
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -26,19 +26,11 @@ import (
|
||||
"errors"
|
||||
"net/url"
|
||||
golangswaggerpaths "path"
|
||||
|
||||
"github.com/go-openapi/swag"
|
||||
)
|
||||
|
||||
// ListBucketsURL generates an URL for the list buckets operation
|
||||
type ListBucketsURL struct {
|
||||
Limit *int32
|
||||
Offset *int32
|
||||
SortBy *string
|
||||
|
||||
_basePath string
|
||||
// avoid unkeyed usage
|
||||
_ struct{}
|
||||
}
|
||||
|
||||
// WithBasePath sets the base path for this url builder, only required when it's different from the
|
||||
@@ -68,34 +60,6 @@ func (o *ListBucketsURL) Build() (*url.URL, error) {
|
||||
}
|
||||
_result.Path = golangswaggerpaths.Join(_basePath, _path)
|
||||
|
||||
qs := make(url.Values)
|
||||
|
||||
var limitQ string
|
||||
if o.Limit != nil {
|
||||
limitQ = swag.FormatInt32(*o.Limit)
|
||||
}
|
||||
if limitQ != "" {
|
||||
qs.Set("limit", limitQ)
|
||||
}
|
||||
|
||||
var offsetQ string
|
||||
if o.Offset != nil {
|
||||
offsetQ = swag.FormatInt32(*o.Offset)
|
||||
}
|
||||
if offsetQ != "" {
|
||||
qs.Set("offset", offsetQ)
|
||||
}
|
||||
|
||||
var sortByQ string
|
||||
if o.SortBy != nil {
|
||||
sortByQ = *o.SortBy
|
||||
}
|
||||
if sortByQ != "" {
|
||||
qs.Set("sort_by", sortByQ)
|
||||
}
|
||||
|
||||
_result.RawQuery = qs.Encode()
|
||||
|
||||
return &_result, nil
|
||||
}
|
||||
|
||||
|
||||
@@ -153,21 +153,6 @@ paths:
|
||||
get:
|
||||
summary: List Buckets
|
||||
operationId: ListBuckets
|
||||
parameters:
|
||||
- name: sort_by
|
||||
in: query
|
||||
required: false
|
||||
type: string
|
||||
- name: offset
|
||||
in: query
|
||||
required: false
|
||||
type: integer
|
||||
format: int32
|
||||
- name: limit
|
||||
in: query
|
||||
required: false
|
||||
type: integer
|
||||
format: int32
|
||||
responses:
|
||||
200:
|
||||
description: A successful response.
|
||||
|
||||
Reference in New Issue
Block a user