Documentation
¶
Index ¶
- func WithAcceptApplicationJSON(r *runtime.ClientOperation)
- func WithAcceptApplicationVndDockerRawStream(r *runtime.ClientOperation)
- func WithContentTypeApplicationJSON(r *runtime.ClientOperation)
- func WithContentTypeTextPlain(r *runtime.ClientOperation)
- type Client
- type ClientOption
- type ClientService
- type SessionBadRequest
- func (o *SessionBadRequest) Code() int
- func (o *SessionBadRequest) Error() string
- func (o *SessionBadRequest) GetPayload() *models.ErrorResponse
- func (o *SessionBadRequest) IsClientError() bool
- func (o *SessionBadRequest) IsCode(code int) bool
- func (o *SessionBadRequest) IsRedirect() bool
- func (o *SessionBadRequest) IsServerError() bool
- func (o *SessionBadRequest) IsSuccess() bool
- func (o *SessionBadRequest) String() string
- type SessionInternalServerError
- func (o *SessionInternalServerError) Code() int
- func (o *SessionInternalServerError) Error() string
- func (o *SessionInternalServerError) GetPayload() *models.ErrorResponse
- func (o *SessionInternalServerError) IsClientError() bool
- func (o *SessionInternalServerError) IsCode(code int) bool
- func (o *SessionInternalServerError) IsRedirect() bool
- func (o *SessionInternalServerError) IsServerError() bool
- func (o *SessionInternalServerError) IsSuccess() bool
- func (o *SessionInternalServerError) String() string
- type SessionParams
- func (o *SessionParams) SetContext(ctx context.Context)
- func (o *SessionParams) SetDefaults()
- func (o *SessionParams) SetHTTPClient(client *http.Client)
- func (o *SessionParams) SetTimeout(timeout time.Duration)
- func (o *SessionParams) WithContext(ctx context.Context) *SessionParams
- func (o *SessionParams) WithDefaults() *SessionParams
- func (o *SessionParams) WithHTTPClient(client *http.Client) *SessionParams
- func (o *SessionParams) WithTimeout(timeout time.Duration) *SessionParams
- func (o *SessionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
- type SessionReader
- type SessionSwitchingProtocols
- func (o *SessionSwitchingProtocols) Code() int
- func (o *SessionSwitchingProtocols) Error() string
- func (o *SessionSwitchingProtocols) IsClientError() bool
- func (o *SessionSwitchingProtocols) IsCode(code int) bool
- func (o *SessionSwitchingProtocols) IsRedirect() bool
- func (o *SessionSwitchingProtocols) IsServerError() bool
- func (o *SessionSwitchingProtocols) IsSuccess() bool
- func (o *SessionSwitchingProtocols) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithAcceptApplicationJSON ¶
func WithAcceptApplicationJSON(r *runtime.ClientOperation)
WithAcceptApplicationJSON sets the Accept header to "application/json".
func WithAcceptApplicationVndDockerRawStream ¶
func WithAcceptApplicationVndDockerRawStream(r *runtime.ClientOperation)
WithAcceptApplicationVndDockerRawStream sets the Accept header to "application/vnd.docker.raw-stream".
func WithContentTypeApplicationJSON ¶
func WithContentTypeApplicationJSON(r *runtime.ClientOperation)
WithContentTypeApplicationJSON sets the Content-Type header to "application/json".
func WithContentTypeTextPlain ¶
func WithContentTypeTextPlain(r *runtime.ClientOperation)
WithContentTypeTextPlain sets the Content-Type header to "text/plain".
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client for session API
func (*Client) Session ¶
func (a *Client) Session(params *SessionParams, opts ...ClientOption) error
Session initializes interactive session Start a new interactive session with a server. Session allows server to call back to the client for advanced capabilities.
### Hijacking
This endpoint hijacks the HTTP connection to HTTP2 transport that allows the client to expose gPRC services on that connection.
For example, the client sends this request to upgrade the connection:
``` POST /session HTTP/1.1 Upgrade: h2c Connection: Upgrade ```
The Docker daemon will respond with a `101 UPGRADED` response follow with the raw stream:
``` HTTP/1.1 101 UPGRADED Connection: Upgrade Upgrade: h2c ```
func (*Client) SetTransport ¶
func (a *Client) SetTransport(transport runtime.ClientTransport)
SetTransport changes the transport on the client
type ClientOption ¶
type ClientOption func(*runtime.ClientOperation)
ClientOption may be used to customize the behavior of Client methods.
func WithAccept ¶
func WithAccept(mime string) ClientOption
WithAccept allows the client to force the Accept header to negotiate a specific Producer from the server.
You may use this option to set arbitrary extensions to your MIME media type.
func WithContentType ¶
func WithContentType(mime string) ClientOption
WithContentType allows the client to force the Content-Type header to negotiate a specific Consumer from the server.
You may use this option to set arbitrary extensions to your MIME media type.
type ClientService ¶
type ClientService interface {
Session(params *SessionParams, opts ...ClientOption) error
SetTransport(transport runtime.ClientTransport)
}
ClientService is the interface for Client methods
func New ¶
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService
New creates a new session API client.
func NewClientWithBasicAuth ¶
func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService
New creates a new session API client with basic auth credentials. It takes the following parameters: - host: http host (github.com). - basePath: any base path for the API client ("/v1", "/v3"). - scheme: http scheme ("http", "https"). - user: user for basic authentication header. - password: password for basic authentication header.
func NewClientWithBearerToken ¶
func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService
New creates a new session API client with a bearer token for authentication. It takes the following parameters: - host: http host (github.com). - basePath: any base path for the API client ("/v1", "/v3"). - scheme: http scheme ("http", "https"). - bearerToken: bearer token for Bearer authentication header.
type SessionBadRequest ¶
type SessionBadRequest struct {
Payload *models.ErrorResponse
}
SessionBadRequest describes a response with status code 400, with default header values.
bad parameter
func NewSessionBadRequest ¶
func NewSessionBadRequest() *SessionBadRequest
NewSessionBadRequest creates a SessionBadRequest with default headers values
func (*SessionBadRequest) Code ¶
func (o *SessionBadRequest) Code() int
Code gets the status code for the session bad request response
func (*SessionBadRequest) Error ¶
func (o *SessionBadRequest) Error() string
func (*SessionBadRequest) GetPayload ¶
func (o *SessionBadRequest) GetPayload() *models.ErrorResponse
func (*SessionBadRequest) IsClientError ¶
func (o *SessionBadRequest) IsClientError() bool
IsClientError returns true when this session bad request response has a 4xx status code
func (*SessionBadRequest) IsCode ¶
func (o *SessionBadRequest) IsCode(code int) bool
IsCode returns true when this session bad request response a status code equal to that given
func (*SessionBadRequest) IsRedirect ¶
func (o *SessionBadRequest) IsRedirect() bool
IsRedirect returns true when this session bad request response has a 3xx status code
func (*SessionBadRequest) IsServerError ¶
func (o *SessionBadRequest) IsServerError() bool
IsServerError returns true when this session bad request response has a 5xx status code
func (*SessionBadRequest) IsSuccess ¶
func (o *SessionBadRequest) IsSuccess() bool
IsSuccess returns true when this session bad request response has a 2xx status code
func (*SessionBadRequest) String ¶
func (o *SessionBadRequest) String() string
type SessionInternalServerError ¶
type SessionInternalServerError struct {
Payload *models.ErrorResponse
}
SessionInternalServerError describes a response with status code 500, with default header values.
server error
func NewSessionInternalServerError ¶
func NewSessionInternalServerError() *SessionInternalServerError
NewSessionInternalServerError creates a SessionInternalServerError with default headers values
func (*SessionInternalServerError) Code ¶
func (o *SessionInternalServerError) Code() int
Code gets the status code for the session internal server error response
func (*SessionInternalServerError) Error ¶
func (o *SessionInternalServerError) Error() string
func (*SessionInternalServerError) GetPayload ¶
func (o *SessionInternalServerError) GetPayload() *models.ErrorResponse
func (*SessionInternalServerError) IsClientError ¶
func (o *SessionInternalServerError) IsClientError() bool
IsClientError returns true when this session internal server error response has a 4xx status code
func (*SessionInternalServerError) IsCode ¶
func (o *SessionInternalServerError) IsCode(code int) bool
IsCode returns true when this session internal server error response a status code equal to that given
func (*SessionInternalServerError) IsRedirect ¶
func (o *SessionInternalServerError) IsRedirect() bool
IsRedirect returns true when this session internal server error response has a 3xx status code
func (*SessionInternalServerError) IsServerError ¶
func (o *SessionInternalServerError) IsServerError() bool
IsServerError returns true when this session internal server error response has a 5xx status code
func (*SessionInternalServerError) IsSuccess ¶
func (o *SessionInternalServerError) IsSuccess() bool
IsSuccess returns true when this session internal server error response has a 2xx status code
func (*SessionInternalServerError) String ¶
func (o *SessionInternalServerError) String() string
type SessionParams ¶
type SessionParams struct {
Context context.Context
HTTPClient *http.Client
// contains filtered or unexported fields
}
SessionParams contains all the parameters to send to the API endpoint
for the session operation. Typically these are written to a http.Request.
func NewSessionParams ¶
func NewSessionParams() *SessionParams
NewSessionParams creates a new SessionParams object, with the default timeout for this client.
Default values are not hydrated, since defaults are normally applied by the API server side.
To enforce default values in parameter, use SetDefaults or WithDefaults.
func NewSessionParamsWithContext ¶
func NewSessionParamsWithContext(ctx context.Context) *SessionParams
NewSessionParamsWithContext creates a new SessionParams object with the ability to set a context for a request.
func NewSessionParamsWithHTTPClient ¶
func NewSessionParamsWithHTTPClient(client *http.Client) *SessionParams
NewSessionParamsWithHTTPClient creates a new SessionParams object with the ability to set a custom HTTPClient for a request.
func NewSessionParamsWithTimeout ¶
func NewSessionParamsWithTimeout(timeout time.Duration) *SessionParams
NewSessionParamsWithTimeout creates a new SessionParams object with the ability to set a timeout on a request.
func (*SessionParams) SetContext ¶
func (o *SessionParams) SetContext(ctx context.Context)
SetContext adds the context to the session params
func (*SessionParams) SetDefaults ¶
func (o *SessionParams) SetDefaults()
SetDefaults hydrates default values in the session params (not the query body).
All values with no default are reset to their zero value.
func (*SessionParams) SetHTTPClient ¶
func (o *SessionParams) SetHTTPClient(client *http.Client)
SetHTTPClient adds the HTTPClient to the session params
func (*SessionParams) SetTimeout ¶
func (o *SessionParams) SetTimeout(timeout time.Duration)
SetTimeout adds the timeout to the session params
func (*SessionParams) WithContext ¶
func (o *SessionParams) WithContext(ctx context.Context) *SessionParams
WithContext adds the context to the session params
func (*SessionParams) WithDefaults ¶
func (o *SessionParams) WithDefaults() *SessionParams
WithDefaults hydrates default values in the session params (not the query body).
All values with no default are reset to their zero value.
func (*SessionParams) WithHTTPClient ¶
func (o *SessionParams) WithHTTPClient(client *http.Client) *SessionParams
WithHTTPClient adds the HTTPClient to the session params
func (*SessionParams) WithTimeout ¶
func (o *SessionParams) WithTimeout(timeout time.Duration) *SessionParams
WithTimeout adds the timeout to the session params
func (*SessionParams) WriteToRequest ¶
func (o *SessionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
WriteToRequest writes these params to a swagger request
type SessionReader ¶
type SessionReader struct {
// contains filtered or unexported fields
}
SessionReader is a Reader for the Session structure.
func (*SessionReader) ReadResponse ¶
func (o *SessionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error)
ReadResponse reads a server response into the received o.
type SessionSwitchingProtocols ¶
type SessionSwitchingProtocols struct {
}
SessionSwitchingProtocols describes a response with status code 101, with default header values.
no error, hijacking successful
func NewSessionSwitchingProtocols ¶
func NewSessionSwitchingProtocols() *SessionSwitchingProtocols
NewSessionSwitchingProtocols creates a SessionSwitchingProtocols with default headers values
func (*SessionSwitchingProtocols) Code ¶
func (o *SessionSwitchingProtocols) Code() int
Code gets the status code for the session switching protocols response
func (*SessionSwitchingProtocols) Error ¶
func (o *SessionSwitchingProtocols) Error() string
func (*SessionSwitchingProtocols) IsClientError ¶
func (o *SessionSwitchingProtocols) IsClientError() bool
IsClientError returns true when this session switching protocols response has a 4xx status code
func (*SessionSwitchingProtocols) IsCode ¶
func (o *SessionSwitchingProtocols) IsCode(code int) bool
IsCode returns true when this session switching protocols response a status code equal to that given
func (*SessionSwitchingProtocols) IsRedirect ¶
func (o *SessionSwitchingProtocols) IsRedirect() bool
IsRedirect returns true when this session switching protocols response has a 3xx status code
func (*SessionSwitchingProtocols) IsServerError ¶
func (o *SessionSwitchingProtocols) IsServerError() bool
IsServerError returns true when this session switching protocols response has a 5xx status code
func (*SessionSwitchingProtocols) IsSuccess ¶
func (o *SessionSwitchingProtocols) IsSuccess() bool
IsSuccess returns true when this session switching protocols response has a 2xx status code
func (*SessionSwitchingProtocols) String ¶
func (o *SessionSwitchingProtocols) String() string