代码拉取完成,页面将自动刷新
// Code generated by go-swagger; DO NOT EDIT.
package registry
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"net/http"
"time"
"github.com/go-openapi/errors"
"github.com/go-openapi/runtime"
cr "github.com/go-openapi/runtime/client"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
// NewListRegistriesParams creates a new ListRegistriesParams object
// with the default values initialized.
func NewListRegistriesParams() *ListRegistriesParams {
var (
pageDefault = int64(1)
pageSizeDefault = int64(10)
)
return &ListRegistriesParams{
Page: &pageDefault,
PageSize: &pageSizeDefault,
timeout: cr.DefaultTimeout,
}
}
// NewListRegistriesParamsWithTimeout creates a new ListRegistriesParams object
// with the default values initialized, and the ability to set a timeout on a request
func NewListRegistriesParamsWithTimeout(timeout time.Duration) *ListRegistriesParams {
var (
pageDefault = int64(1)
pageSizeDefault = int64(10)
)
return &ListRegistriesParams{
Page: &pageDefault,
PageSize: &pageSizeDefault,
timeout: timeout,
}
}
// NewListRegistriesParamsWithContext creates a new ListRegistriesParams object
// with the default values initialized, and the ability to set a context for a request
func NewListRegistriesParamsWithContext(ctx context.Context) *ListRegistriesParams {
var (
pageDefault = int64(1)
pageSizeDefault = int64(10)
)
return &ListRegistriesParams{
Page: &pageDefault,
PageSize: &pageSizeDefault,
Context: ctx,
}
}
// NewListRegistriesParamsWithHTTPClient creates a new ListRegistriesParams object
// with the default values initialized, and the ability to set a custom HTTPClient for a request
func NewListRegistriesParamsWithHTTPClient(client *http.Client) *ListRegistriesParams {
var (
pageDefault = int64(1)
pageSizeDefault = int64(10)
)
return &ListRegistriesParams{
Page: &pageDefault,
PageSize: &pageSizeDefault,
HTTPClient: client,
}
}
/*ListRegistriesParams contains all the parameters to send to the API endpoint
for the list registries operation typically these are written to a http.Request
*/
type ListRegistriesParams struct {
/*XRequestID
An unique ID for the request
*/
XRequestID *string
/*Name
Deprecated, use `q` instead.
*/
Name *string
/*Page
The page number
*/
Page *int64
/*PageSize
The size of per page
*/
PageSize *int64
/*Q
Query string to query resources. Supported query patterns are "exact match(k=v)", "fuzzy match(k=~v)", "range(k=[min~max])", "list with union releationship(k={v1 v2 v3})" and "list with intersetion relationship(k=(v1 v2 v3))". The value of range and list can be string(enclosed by " or '), integer or time(in format "2020-04-09 02:36:00"). All of these query patterns should be put in the query string "q=xxx" and splitted by ",". e.g. q=k1=v1,k2=~v2,k3=[min~max]
*/
Q *string
/*Sort
Sort the resource list in ascending or descending order. e.g. sort by field1 in ascending orderr and field2 in descending order with "sort=field1,-field2"
*/
Sort *string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithTimeout adds the timeout to the list registries params
func (o *ListRegistriesParams) WithTimeout(timeout time.Duration) *ListRegistriesParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the list registries params
func (o *ListRegistriesParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the list registries params
func (o *ListRegistriesParams) WithContext(ctx context.Context) *ListRegistriesParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the list registries params
func (o *ListRegistriesParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the list registries params
func (o *ListRegistriesParams) WithHTTPClient(client *http.Client) *ListRegistriesParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the list registries params
func (o *ListRegistriesParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithXRequestID adds the xRequestID to the list registries params
func (o *ListRegistriesParams) WithXRequestID(xRequestID *string) *ListRegistriesParams {
o.SetXRequestID(xRequestID)
return o
}
// SetXRequestID adds the xRequestId to the list registries params
func (o *ListRegistriesParams) SetXRequestID(xRequestID *string) {
o.XRequestID = xRequestID
}
// WithName adds the name to the list registries params
func (o *ListRegistriesParams) WithName(name *string) *ListRegistriesParams {
o.SetName(name)
return o
}
// SetName adds the name to the list registries params
func (o *ListRegistriesParams) SetName(name *string) {
o.Name = name
}
// WithPage adds the page to the list registries params
func (o *ListRegistriesParams) WithPage(page *int64) *ListRegistriesParams {
o.SetPage(page)
return o
}
// SetPage adds the page to the list registries params
func (o *ListRegistriesParams) SetPage(page *int64) {
o.Page = page
}
// WithPageSize adds the pageSize to the list registries params
func (o *ListRegistriesParams) WithPageSize(pageSize *int64) *ListRegistriesParams {
o.SetPageSize(pageSize)
return o
}
// SetPageSize adds the pageSize to the list registries params
func (o *ListRegistriesParams) SetPageSize(pageSize *int64) {
o.PageSize = pageSize
}
// WithQ adds the q to the list registries params
func (o *ListRegistriesParams) WithQ(q *string) *ListRegistriesParams {
o.SetQ(q)
return o
}
// SetQ adds the q to the list registries params
func (o *ListRegistriesParams) SetQ(q *string) {
o.Q = q
}
// WithSort adds the sort to the list registries params
func (o *ListRegistriesParams) WithSort(sort *string) *ListRegistriesParams {
o.SetSort(sort)
return o
}
// SetSort adds the sort to the list registries params
func (o *ListRegistriesParams) SetSort(sort *string) {
o.Sort = sort
}
// WriteToRequest writes these params to a swagger request
func (o *ListRegistriesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.XRequestID != nil {
// header param X-Request-Id
if err := r.SetHeaderParam("X-Request-Id", *o.XRequestID); err != nil {
return err
}
}
if o.Name != nil {
// query param name
var qrName string
if o.Name != nil {
qrName = *o.Name
}
qName := qrName
if qName != "" {
if err := r.SetQueryParam("name", qName); err != nil {
return err
}
}
}
if o.Page != nil {
// query param page
var qrPage int64
if o.Page != nil {
qrPage = *o.Page
}
qPage := swag.FormatInt64(qrPage)
if qPage != "" {
if err := r.SetQueryParam("page", qPage); err != nil {
return err
}
}
}
if o.PageSize != nil {
// query param page_size
var qrPageSize int64
if o.PageSize != nil {
qrPageSize = *o.PageSize
}
qPageSize := swag.FormatInt64(qrPageSize)
if qPageSize != "" {
if err := r.SetQueryParam("page_size", qPageSize); err != nil {
return err
}
}
}
if o.Q != nil {
// query param q
var qrQ string
if o.Q != nil {
qrQ = *o.Q
}
qQ := qrQ
if qQ != "" {
if err := r.SetQueryParam("q", qQ); err != nil {
return err
}
}
}
if o.Sort != nil {
// query param sort
var qrSort string
if o.Sort != nil {
qrSort = *o.Sort
}
qSort := qrSort
if qSort != "" {
if err := r.SetQueryParam("sort", qSort); err != nil {
return err
}
}
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。