mirror of
https://github.com/openziti/zrok.git
synced 2025-08-17 19:31:12 +02:00
support for 'patch' access (frontend) to update description (for bind address) (#834)
This commit is contained in:
317
rest_client_zrok/share/update_access_responses.go
Normal file
317
rest_client_zrok/share/update_access_responses.go
Normal file
@@ -0,0 +1,317 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package share
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/go-openapi/runtime"
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
)
|
||||
|
||||
// UpdateAccessReader is a Reader for the UpdateAccess structure.
|
||||
type UpdateAccessReader struct {
|
||||
formats strfmt.Registry
|
||||
}
|
||||
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *UpdateAccessReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
case 200:
|
||||
result := NewUpdateAccessOK()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
case 401:
|
||||
result := NewUpdateAccessUnauthorized()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 404:
|
||||
result := NewUpdateAccessNotFound()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 500:
|
||||
result := NewUpdateAccessInternalServerError()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
default:
|
||||
return nil, runtime.NewAPIError("[PATCH /access] updateAccess", response, response.Code())
|
||||
}
|
||||
}
|
||||
|
||||
// NewUpdateAccessOK creates a UpdateAccessOK with default headers values
|
||||
func NewUpdateAccessOK() *UpdateAccessOK {
|
||||
return &UpdateAccessOK{}
|
||||
}
|
||||
|
||||
/*
|
||||
UpdateAccessOK describes a response with status code 200, with default header values.
|
||||
|
||||
access updated
|
||||
*/
|
||||
type UpdateAccessOK struct {
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this update access o k response has a 2xx status code
|
||||
func (o *UpdateAccessOK) IsSuccess() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this update access o k response has a 3xx status code
|
||||
func (o *UpdateAccessOK) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this update access o k response has a 4xx status code
|
||||
func (o *UpdateAccessOK) IsClientError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsServerError returns true when this update access o k response has a 5xx status code
|
||||
func (o *UpdateAccessOK) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this update access o k response a status code equal to that given
|
||||
func (o *UpdateAccessOK) IsCode(code int) bool {
|
||||
return code == 200
|
||||
}
|
||||
|
||||
// Code gets the status code for the update access o k response
|
||||
func (o *UpdateAccessOK) Code() int {
|
||||
return 200
|
||||
}
|
||||
|
||||
func (o *UpdateAccessOK) Error() string {
|
||||
return fmt.Sprintf("[PATCH /access][%d] updateAccessOK ", 200)
|
||||
}
|
||||
|
||||
func (o *UpdateAccessOK) String() string {
|
||||
return fmt.Sprintf("[PATCH /access][%d] updateAccessOK ", 200)
|
||||
}
|
||||
|
||||
func (o *UpdateAccessOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewUpdateAccessUnauthorized creates a UpdateAccessUnauthorized with default headers values
|
||||
func NewUpdateAccessUnauthorized() *UpdateAccessUnauthorized {
|
||||
return &UpdateAccessUnauthorized{}
|
||||
}
|
||||
|
||||
/*
|
||||
UpdateAccessUnauthorized describes a response with status code 401, with default header values.
|
||||
|
||||
unauthorized
|
||||
*/
|
||||
type UpdateAccessUnauthorized struct {
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this update access unauthorized response has a 2xx status code
|
||||
func (o *UpdateAccessUnauthorized) IsSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this update access unauthorized response has a 3xx status code
|
||||
func (o *UpdateAccessUnauthorized) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this update access unauthorized response has a 4xx status code
|
||||
func (o *UpdateAccessUnauthorized) IsClientError() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsServerError returns true when this update access unauthorized response has a 5xx status code
|
||||
func (o *UpdateAccessUnauthorized) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this update access unauthorized response a status code equal to that given
|
||||
func (o *UpdateAccessUnauthorized) IsCode(code int) bool {
|
||||
return code == 401
|
||||
}
|
||||
|
||||
// Code gets the status code for the update access unauthorized response
|
||||
func (o *UpdateAccessUnauthorized) Code() int {
|
||||
return 401
|
||||
}
|
||||
|
||||
func (o *UpdateAccessUnauthorized) Error() string {
|
||||
return fmt.Sprintf("[PATCH /access][%d] updateAccessUnauthorized ", 401)
|
||||
}
|
||||
|
||||
func (o *UpdateAccessUnauthorized) String() string {
|
||||
return fmt.Sprintf("[PATCH /access][%d] updateAccessUnauthorized ", 401)
|
||||
}
|
||||
|
||||
func (o *UpdateAccessUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewUpdateAccessNotFound creates a UpdateAccessNotFound with default headers values
|
||||
func NewUpdateAccessNotFound() *UpdateAccessNotFound {
|
||||
return &UpdateAccessNotFound{}
|
||||
}
|
||||
|
||||
/*
|
||||
UpdateAccessNotFound describes a response with status code 404, with default header values.
|
||||
|
||||
not found
|
||||
*/
|
||||
type UpdateAccessNotFound struct {
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this update access not found response has a 2xx status code
|
||||
func (o *UpdateAccessNotFound) IsSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this update access not found response has a 3xx status code
|
||||
func (o *UpdateAccessNotFound) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this update access not found response has a 4xx status code
|
||||
func (o *UpdateAccessNotFound) IsClientError() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsServerError returns true when this update access not found response has a 5xx status code
|
||||
func (o *UpdateAccessNotFound) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this update access not found response a status code equal to that given
|
||||
func (o *UpdateAccessNotFound) IsCode(code int) bool {
|
||||
return code == 404
|
||||
}
|
||||
|
||||
// Code gets the status code for the update access not found response
|
||||
func (o *UpdateAccessNotFound) Code() int {
|
||||
return 404
|
||||
}
|
||||
|
||||
func (o *UpdateAccessNotFound) Error() string {
|
||||
return fmt.Sprintf("[PATCH /access][%d] updateAccessNotFound ", 404)
|
||||
}
|
||||
|
||||
func (o *UpdateAccessNotFound) String() string {
|
||||
return fmt.Sprintf("[PATCH /access][%d] updateAccessNotFound ", 404)
|
||||
}
|
||||
|
||||
func (o *UpdateAccessNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewUpdateAccessInternalServerError creates a UpdateAccessInternalServerError with default headers values
|
||||
func NewUpdateAccessInternalServerError() *UpdateAccessInternalServerError {
|
||||
return &UpdateAccessInternalServerError{}
|
||||
}
|
||||
|
||||
/*
|
||||
UpdateAccessInternalServerError describes a response with status code 500, with default header values.
|
||||
|
||||
internal server error
|
||||
*/
|
||||
type UpdateAccessInternalServerError struct {
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this update access internal server error response has a 2xx status code
|
||||
func (o *UpdateAccessInternalServerError) IsSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this update access internal server error response has a 3xx status code
|
||||
func (o *UpdateAccessInternalServerError) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this update access internal server error response has a 4xx status code
|
||||
func (o *UpdateAccessInternalServerError) IsClientError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsServerError returns true when this update access internal server error response has a 5xx status code
|
||||
func (o *UpdateAccessInternalServerError) IsServerError() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsCode returns true when this update access internal server error response a status code equal to that given
|
||||
func (o *UpdateAccessInternalServerError) IsCode(code int) bool {
|
||||
return code == 500
|
||||
}
|
||||
|
||||
// Code gets the status code for the update access internal server error response
|
||||
func (o *UpdateAccessInternalServerError) Code() int {
|
||||
return 500
|
||||
}
|
||||
|
||||
func (o *UpdateAccessInternalServerError) Error() string {
|
||||
return fmt.Sprintf("[PATCH /access][%d] updateAccessInternalServerError ", 500)
|
||||
}
|
||||
|
||||
func (o *UpdateAccessInternalServerError) String() string {
|
||||
return fmt.Sprintf("[PATCH /access][%d] updateAccessInternalServerError ", 500)
|
||||
}
|
||||
|
||||
func (o *UpdateAccessInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
/*
|
||||
UpdateAccessBody update access body
|
||||
swagger:model UpdateAccessBody
|
||||
*/
|
||||
type UpdateAccessBody struct {
|
||||
|
||||
// description
|
||||
Description string `json:"description,omitempty"`
|
||||
|
||||
// frontend token
|
||||
FrontendToken string `json:"frontendToken,omitempty"`
|
||||
}
|
||||
|
||||
// Validate validates this update access body
|
||||
func (o *UpdateAccessBody) Validate(formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validates this update access body based on context it is used
|
||||
func (o *UpdateAccessBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (o *UpdateAccessBody) MarshalBinary() ([]byte, error) {
|
||||
if o == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(o)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (o *UpdateAccessBody) UnmarshalBinary(b []byte) error {
|
||||
var res UpdateAccessBody
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*o = res
|
||||
return nil
|
||||
}
|
Reference in New Issue
Block a user