session

package
v0.0.0-...-8251c7d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 10, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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 is the option for Client methods

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.

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) 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) Error

func (*SessionInternalServerError) GetPayload

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) (interface{}, 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) 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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL