Documentation
¶
Overview ¶
Package relayv1 provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.8.0 DO NOT EDIT.
Index ¶
- func Handler(si ServerInterface) http.Handler
- func HandlerFromMux(si ServerInterface, m ServeMux) http.Handler
- func HandlerFromMuxWithBaseURL(si ServerInterface, m ServeMux, baseURL string) http.Handler
- func HandlerWithOptions(si ServerInterface, options StdHTTPServerOptions) http.Handler
- func NewClaimPublisherConnectionRequest(server string, publisherConnectionId PublisherConnectionID, ...) (*http.Request, error)
- func NewClaimPublisherConnectionRequestWithBody(server string, publisherConnectionId PublisherConnectionID, contentType string, ...) (*http.Request, error)
- func NewDisconnectPublisherConnectionRequest(server string, publisherConnectionId PublisherConnectionID, ...) (*http.Request, error)
- func NewDisconnectPublisherConnectionRequestWithBody(server string, publisherConnectionId PublisherConnectionID, contentType string, ...) (*http.Request, error)
- func NewDrainRelayRequest(server string, relayId RelayID, body DrainRelayJSONRequestBody) (*http.Request, error)
- func NewDrainRelayRequestWithBody(server string, relayId RelayID, contentType string, body io.Reader) (*http.Request, error)
- func NewGetRelayTransportCertificateRequest(server string, relayServiceId RelayServiceID, ...) (*http.Request, error)
- func NewMarkPublisherConnectionReadyRequest(server string, publisherConnectionId PublisherConnectionID, ...) (*http.Request, error)
- func NewMarkPublisherConnectionReadyRequestWithBody(server string, publisherConnectionId PublisherConnectionID, contentType string, ...) (*http.Request, error)
- func NewRegisterRelayRequest(server string, body RegisterRelayJSONRequestBody) (*http.Request, error)
- func NewRegisterRelayRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewRenewRelayRequest(server string, relayId RelayID, body RenewRelayJSONRequestBody) (*http.Request, error)
- func NewRenewRelayRequestWithBody(server string, relayId RelayID, contentType string, body io.Reader) (*http.Request, error)
- type ClaimPublisherConnectionJSONRequestBody
- type ClaimPublisherConnectionResponse
- func (r ClaimPublisherConnectionResponse) ContentType() string
- func (r ClaimPublisherConnectionResponse) GetApplicationproblemJSONDefault() *Problem
- func (r ClaimPublisherConnectionResponse) GetBody() []byte
- func (r ClaimPublisherConnectionResponse) GetJSON200() *ClaimedPublisherConnection
- func (r ClaimPublisherConnectionResponse) Status() string
- func (r ClaimPublisherConnectionResponse) StatusCode() int
- type ClaimedPublisherConnection
- type ClaimedPublisherConnectionState
- type Client
- func (c *Client) ClaimPublisherConnection(ctx context.Context, publisherConnectionId PublisherConnectionID, ...) (*http.Response, error)
- func (c *Client) ClaimPublisherConnectionWithBody(ctx context.Context, publisherConnectionId PublisherConnectionID, ...) (*http.Response, error)
- func (c *Client) DisconnectPublisherConnection(ctx context.Context, publisherConnectionId PublisherConnectionID, ...) (*http.Response, error)
- func (c *Client) DisconnectPublisherConnectionWithBody(ctx context.Context, publisherConnectionId PublisherConnectionID, ...) (*http.Response, error)
- func (c *Client) DrainRelay(ctx context.Context, relayId RelayID, body DrainRelayJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) DrainRelayWithBody(ctx context.Context, relayId RelayID, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) GetRelayTransportCertificate(ctx context.Context, relayServiceId RelayServiceID, ...) (*http.Response, error)
- func (c *Client) MarkPublisherConnectionReady(ctx context.Context, publisherConnectionId PublisherConnectionID, ...) (*http.Response, error)
- func (c *Client) MarkPublisherConnectionReadyWithBody(ctx context.Context, publisherConnectionId PublisherConnectionID, ...) (*http.Response, error)
- func (c *Client) RegisterRelay(ctx context.Context, body RegisterRelayJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) RegisterRelayWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) RenewRelay(ctx context.Context, relayId RelayID, body RenewRelayJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) RenewRelayWithBody(ctx context.Context, relayId RelayID, contentType string, body io.Reader, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) ClaimPublisherConnectionWithBodyWithResponse(ctx context.Context, publisherConnectionId PublisherConnectionID, ...) (*ClaimPublisherConnectionResponse, error)
- func (c *ClientWithResponses) ClaimPublisherConnectionWithResponse(ctx context.Context, publisherConnectionId PublisherConnectionID, ...) (*ClaimPublisherConnectionResponse, error)
- func (c *ClientWithResponses) DisconnectPublisherConnectionWithBodyWithResponse(ctx context.Context, publisherConnectionId PublisherConnectionID, ...) (*DisconnectPublisherConnectionResponse, error)
- func (c *ClientWithResponses) DisconnectPublisherConnectionWithResponse(ctx context.Context, publisherConnectionId PublisherConnectionID, ...) (*DisconnectPublisherConnectionResponse, error)
- func (c *ClientWithResponses) DrainRelayWithBodyWithResponse(ctx context.Context, relayId RelayID, contentType string, body io.Reader, ...) (*DrainRelayResponse, error)
- func (c *ClientWithResponses) DrainRelayWithResponse(ctx context.Context, relayId RelayID, body DrainRelayJSONRequestBody, ...) (*DrainRelayResponse, error)
- func (c *ClientWithResponses) GetRelayTransportCertificateWithResponse(ctx context.Context, relayServiceId RelayServiceID, ...) (*GetRelayTransportCertificateResponse, error)
- func (c *ClientWithResponses) MarkPublisherConnectionReadyWithBodyWithResponse(ctx context.Context, publisherConnectionId PublisherConnectionID, ...) (*MarkPublisherConnectionReadyResponse, error)
- func (c *ClientWithResponses) MarkPublisherConnectionReadyWithResponse(ctx context.Context, publisherConnectionId PublisherConnectionID, ...) (*MarkPublisherConnectionReadyResponse, error)
- func (c *ClientWithResponses) RegisterRelayWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*RegisterRelayResponse, error)
- func (c *ClientWithResponses) RegisterRelayWithResponse(ctx context.Context, body RegisterRelayJSONRequestBody, ...) (*RegisterRelayResponse, error)
- func (c *ClientWithResponses) RenewRelayWithBodyWithResponse(ctx context.Context, relayId RelayID, contentType string, body io.Reader, ...) (*RenewRelayResponse, error)
- func (c *ClientWithResponses) RenewRelayWithResponse(ctx context.Context, relayId RelayID, body RenewRelayJSONRequestBody, ...) (*RenewRelayResponse, error)
- type ClientWithResponsesInterface
- type DisconnectPublisherConnectionJSONRequestBody
- type DisconnectPublisherConnectionResponse
- func (r DisconnectPublisherConnectionResponse) ContentType() string
- func (r DisconnectPublisherConnectionResponse) GetApplicationproblemJSONDefault() *Problem
- func (r DisconnectPublisherConnectionResponse) GetBody() []byte
- func (r DisconnectPublisherConnectionResponse) GetJSON200() *ClaimedPublisherConnection
- func (r DisconnectPublisherConnectionResponse) Status() string
- func (r DisconnectPublisherConnectionResponse) StatusCode() int
- type DrainRelayJSONRequestBody
- type DrainRelayResponse
- func (r DrainRelayResponse) ContentType() string
- func (r DrainRelayResponse) GetApplicationproblemJSONDefault() *Problem
- func (r DrainRelayResponse) GetBody() []byte
- func (r DrainRelayResponse) GetJSON200() *RelayLease
- func (r DrainRelayResponse) Status() string
- func (r DrainRelayResponse) StatusCode() int
- type GetRelayTransportCertificateParams
- type GetRelayTransportCertificateResponse
- func (r GetRelayTransportCertificateResponse) ContentType() string
- func (r GetRelayTransportCertificateResponse) GetApplicationproblemJSONDefault() *Problem
- func (r GetRelayTransportCertificateResponse) GetBody() []byte
- func (r GetRelayTransportCertificateResponse) GetJSON200() *RelayTransportCertificate
- func (r GetRelayTransportCertificateResponse) Status() string
- func (r GetRelayTransportCertificateResponse) StatusCode() int
- type GetRelayTransportCertificateResponse200Headers
- type HttpRequestDoer
- type Identifier
- type InvalidParamFormatError
- type MarkPublisherConnectionReadyJSONRequestBody
- type MarkPublisherConnectionReadyResponse
- func (r MarkPublisherConnectionReadyResponse) ContentType() string
- func (r MarkPublisherConnectionReadyResponse) GetApplicationproblemJSONDefault() *Problem
- func (r MarkPublisherConnectionReadyResponse) GetBody() []byte
- func (r MarkPublisherConnectionReadyResponse) GetJSON200() *ClaimedPublisherConnection
- func (r MarkPublisherConnectionReadyResponse) Status() string
- func (r MarkPublisherConnectionReadyResponse) StatusCode() int
- type MiddlewareFunc
- type Problem
- type PublisherConnectionClaim
- type PublisherConnectionDisconnect
- type PublisherConnectionID
- type PublisherConnectionIdentity
- type PublisherConnectionProcessIdentity
- type PublisherConnectionTransition
- type RegisterRelayJSONRequestBody
- type RegisterRelayResponse
- func (r RegisterRelayResponse) ContentType() string
- func (r RegisterRelayResponse) GetApplicationproblemJSONDefault() *Problem
- func (r RegisterRelayResponse) GetBody() []byte
- func (r RegisterRelayResponse) GetJSON200() *RelayLease
- func (r RegisterRelayResponse) Status() string
- func (r RegisterRelayResponse) StatusCode() int
- type RelayDrainRequest
- type RelayID
- type RelayLease
- type RelayLeaseIdentity
- type RelayRegistration
- type RelayRenewal
- type RelayServiceID
- type RelayTransportCertificate
- type RenewRelayJSONRequestBody
- type RenewRelayResponse
- func (r RenewRelayResponse) ContentType() string
- func (r RenewRelayResponse) GetApplicationproblemJSONDefault() *Problem
- func (r RenewRelayResponse) GetBody() []byte
- func (r RenewRelayResponse) GetJSON200() *RelayLease
- func (r RenewRelayResponse) Status() string
- func (r RenewRelayResponse) StatusCode() int
- type RequestEditorFn
- type RequiredHeaderError
- type RequiredParamError
- type ServeMux
- type ServerInterface
- type ServerInterfaceWrapper
- func (siw *ServerInterfaceWrapper) ClaimPublisherConnection(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) DisconnectPublisherConnection(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) DrainRelay(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetRelayTransportCertificate(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) MarkPublisherConnectionReady(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) RegisterRelay(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) RenewRelay(w http.ResponseWriter, r *http.Request)
- type StdHTTPServerOptions
- type TooManyValuesForParamError
- type UnescapedCookieParamError
- type UnmarshalingParamError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Handler ¶
func Handler(si ServerInterface) http.Handler
Handler creates http.Handler with routing matching OpenAPI spec.
func HandlerFromMux ¶
func HandlerFromMux(si ServerInterface, m ServeMux) http.Handler
HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.
func HandlerFromMuxWithBaseURL ¶
func HandlerFromMuxWithBaseURL(si ServerInterface, m ServeMux, baseURL string) http.Handler
func HandlerWithOptions ¶
func HandlerWithOptions(si ServerInterface, options StdHTTPServerOptions) http.Handler
HandlerWithOptions creates http.Handler with additional options
func NewClaimPublisherConnectionRequest ¶
func NewClaimPublisherConnectionRequest(server string, publisherConnectionId PublisherConnectionID, body ClaimPublisherConnectionJSONRequestBody) (*http.Request, error)
NewClaimPublisherConnectionRequest calls the generic ClaimPublisherConnection builder with application/json body
func NewClaimPublisherConnectionRequestWithBody ¶
func NewClaimPublisherConnectionRequestWithBody(server string, publisherConnectionId PublisherConnectionID, contentType string, body io.Reader) (*http.Request, error)
NewClaimPublisherConnectionRequestWithBody constructs an http.Request for the ClaimPublisherConnection method, with any body, and a specified content type
func NewDisconnectPublisherConnectionRequest ¶
func NewDisconnectPublisherConnectionRequest(server string, publisherConnectionId PublisherConnectionID, body DisconnectPublisherConnectionJSONRequestBody) (*http.Request, error)
NewDisconnectPublisherConnectionRequest calls the generic DisconnectPublisherConnection builder with application/json body
func NewDisconnectPublisherConnectionRequestWithBody ¶
func NewDisconnectPublisherConnectionRequestWithBody(server string, publisherConnectionId PublisherConnectionID, contentType string, body io.Reader) (*http.Request, error)
NewDisconnectPublisherConnectionRequestWithBody constructs an http.Request for the DisconnectPublisherConnection method, with any body, and a specified content type
func NewDrainRelayRequest ¶
func NewDrainRelayRequest(server string, relayId RelayID, body DrainRelayJSONRequestBody) (*http.Request, error)
NewDrainRelayRequest calls the generic DrainRelay builder with application/json body
func NewDrainRelayRequestWithBody ¶
func NewDrainRelayRequestWithBody(server string, relayId RelayID, contentType string, body io.Reader) (*http.Request, error)
NewDrainRelayRequestWithBody constructs an http.Request for the DrainRelay method, with any body, and a specified content type
func NewGetRelayTransportCertificateRequest ¶
func NewGetRelayTransportCertificateRequest(server string, relayServiceId RelayServiceID, params *GetRelayTransportCertificateParams) (*http.Request, error)
NewGetRelayTransportCertificateRequest constructs an http.Request for the GetRelayTransportCertificate method
func NewMarkPublisherConnectionReadyRequest ¶
func NewMarkPublisherConnectionReadyRequest(server string, publisherConnectionId PublisherConnectionID, body MarkPublisherConnectionReadyJSONRequestBody) (*http.Request, error)
NewMarkPublisherConnectionReadyRequest calls the generic MarkPublisherConnectionReady builder with application/json body
func NewMarkPublisherConnectionReadyRequestWithBody ¶
func NewMarkPublisherConnectionReadyRequestWithBody(server string, publisherConnectionId PublisherConnectionID, contentType string, body io.Reader) (*http.Request, error)
NewMarkPublisherConnectionReadyRequestWithBody constructs an http.Request for the MarkPublisherConnectionReady method, with any body, and a specified content type
func NewRegisterRelayRequest ¶
func NewRegisterRelayRequest(server string, body RegisterRelayJSONRequestBody) (*http.Request, error)
NewRegisterRelayRequest calls the generic RegisterRelay builder with application/json body
func NewRegisterRelayRequestWithBody ¶
func NewRegisterRelayRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewRegisterRelayRequestWithBody constructs an http.Request for the RegisterRelay method, with any body, and a specified content type
func NewRenewRelayRequest ¶
func NewRenewRelayRequest(server string, relayId RelayID, body RenewRelayJSONRequestBody) (*http.Request, error)
NewRenewRelayRequest calls the generic RenewRelay builder with application/json body
Types ¶
type ClaimPublisherConnectionJSONRequestBody ¶
type ClaimPublisherConnectionJSONRequestBody = PublisherConnectionClaim
ClaimPublisherConnectionJSONRequestBody defines body for ClaimPublisherConnection for application/json ContentType.
type ClaimPublisherConnectionResponse ¶
type ClaimPublisherConnectionResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *ClaimedPublisherConnection
// ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response
ApplicationproblemJSONDefault *Problem
}
func ParseClaimPublisherConnectionResponse ¶
func ParseClaimPublisherConnectionResponse(rsp *http.Response) (*ClaimPublisherConnectionResponse, error)
ParseClaimPublisherConnectionResponse parses an HTTP response from a ClaimPublisherConnectionWithResponse call
func (ClaimPublisherConnectionResponse) ContentType ¶
func (r ClaimPublisherConnectionResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (ClaimPublisherConnectionResponse) GetApplicationproblemJSONDefault ¶
func (r ClaimPublisherConnectionResponse) GetApplicationproblemJSONDefault() *Problem
GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response
func (ClaimPublisherConnectionResponse) GetBody ¶
func (r ClaimPublisherConnectionResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (ClaimPublisherConnectionResponse) GetJSON200 ¶
func (r ClaimPublisherConnectionResponse) GetJSON200() *ClaimedPublisherConnection
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (ClaimPublisherConnectionResponse) Status ¶
func (r ClaimPublisherConnectionResponse) Status() string
Status returns HTTPResponse.Status
func (ClaimPublisherConnectionResponse) StatusCode ¶
func (r ClaimPublisherConnectionResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ClaimedPublisherConnection ¶
type ClaimedPublisherConnection struct {
ClaimId Identifier `json:"claim_id"`
ConnectedAt time.Time `json:"connected_at"`
ConnectionAssignmentRevision int64 `json:"connection_assignment_revision"`
ConnectionSlot int `json:"connection_slot"`
PublicUrlId Identifier `json:"public_url_id"`
PublishRunId Identifier `json:"publish_run_id"`
PublishRunNumber int64 `json:"publish_run_number"`
PublisherConnectionCredentialExpiresAt time.Time `json:"publisher_connection_credential_expires_at"`
PublisherConnectionId Identifier `json:"publisher_connection_id"`
ReadyAt *time.Time `json:"ready_at,omitempty"`
RelayAddress Identifier `json:"relay_address"`
RelayId Identifier `json:"relay_id"`
RelayLeaseRevision int64 `json:"relay_lease_revision"`
RelayRunId Identifier `json:"relay_run_id"`
RelayServiceId Identifier `json:"relay_service_id"`
State ClaimedPublisherConnectionState `json:"state"`
TlsServerName Identifier `json:"tls_server_name"`
}
ClaimedPublisherConnection defines model for ClaimedPublisherConnection.
type ClaimedPublisherConnectionState ¶
type ClaimedPublisherConnectionState string
ClaimedPublisherConnectionState defines model for ClaimedPublisherConnection.State.
const ( Closed ClaimedPublisherConnectionState = "closed" Connected ClaimedPublisherConnectionState = "connected" Ready ClaimedPublisherConnectionState = "ready" )
Defines values for ClaimedPublisherConnectionState.
func (ClaimedPublisherConnectionState) Valid ¶
func (e ClaimedPublisherConnectionState) Valid() bool
Valid indicates whether the value is a known member of the ClaimedPublisherConnectionState enum.
type Client ¶
type Client struct {
// The endpoint of the server conforming to this interface, with scheme,
// https://api.deepmap.com for example. This can contain a path relative
// to the server, such as https://api.deepmap.com/dev-test, and all the
// paths in the swagger spec will be appended to the server.
Server string
// Doer for performing requests, typically a *http.Client with any
// customized settings, such as certificate chains.
Client HttpRequestDoer
// A list of callbacks for modifying requests which are generated before sending over
// the network.
RequestEditors []RequestEditorFn
}
Client which conforms to the OpenAPI3 specification for this service.
func NewClient ¶
func NewClient(server string, opts ...ClientOption) (*Client, error)
Creates a new Client, with reasonable defaults
func (*Client) ClaimPublisherConnection ¶
func (c *Client) ClaimPublisherConnection(ctx context.Context, publisherConnectionId PublisherConnectionID, body ClaimPublisherConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
ClaimPublisherConnection Claim a publisher connection with its credential
Takes a body of the `application/json` content type.
Corresponds with POST /internal/v1/publisher-connections/{publisher_connection_id}/claim (the `ClaimPublisherConnection` operationId).
func (*Client) ClaimPublisherConnectionWithBody ¶
func (c *Client) ClaimPublisherConnectionWithBody(ctx context.Context, publisherConnectionId PublisherConnectionID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
ClaimPublisherConnectionWithBody Claim a publisher connection with its credential
Takes any type of body and a specified content type.
Corresponds with POST /internal/v1/publisher-connections/{publisher_connection_id}/claim (the `ClaimPublisherConnection` operationId).
func (*Client) DisconnectPublisherConnection ¶
func (c *Client) DisconnectPublisherConnection(ctx context.Context, publisherConnectionId PublisherConnectionID, body DisconnectPublisherConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
DisconnectPublisherConnection Close a matching publisher connection
Takes a body of the `application/json` content type.
Corresponds with POST /internal/v1/publisher-connections/{publisher_connection_id}/disconnect (the `DisconnectPublisherConnection` operationId).
func (*Client) DisconnectPublisherConnectionWithBody ¶
func (c *Client) DisconnectPublisherConnectionWithBody(ctx context.Context, publisherConnectionId PublisherConnectionID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
DisconnectPublisherConnectionWithBody Close a matching publisher connection
Takes any type of body and a specified content type.
Corresponds with POST /internal/v1/publisher-connections/{publisher_connection_id}/disconnect (the `DisconnectPublisherConnection` operationId).
func (*Client) DrainRelay ¶
func (c *Client) DrainRelay(ctx context.Context, relayId RelayID, body DrainRelayJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
DrainRelay Stop a matching relay process from accepting new work
Takes a body of the `application/json` content type.
Corresponds with POST /internal/v1/relays/{relay_id}/drain (the `DrainRelay` operationId).
func (*Client) DrainRelayWithBody ¶
func (c *Client) DrainRelayWithBody(ctx context.Context, relayId RelayID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
DrainRelayWithBody Stop a matching relay process from accepting new work
Takes any type of body and a specified content type.
Corresponds with POST /internal/v1/relays/{relay_id}/drain (the `DrainRelay` operationId).
func (*Client) GetRelayTransportCertificate ¶
func (c *Client) GetRelayTransportCertificate(ctx context.Context, relayServiceId RelayServiceID, params *GetRelayTransportCertificateParams, reqEditors ...RequestEditorFn) (*http.Response, error)
GetRelayTransportCertificate Retrieve the current relay transport certificate and private key
Corresponds with GET /internal/v1/relay-services/{relay_service_id}/certificate (the `GetRelayTransportCertificate` operationId).
func (*Client) MarkPublisherConnectionReady ¶
func (c *Client) MarkPublisherConnectionReady(ctx context.Context, publisherConnectionId PublisherConnectionID, body MarkPublisherConnectionReadyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
MarkPublisherConnectionReady Mark one connected publisher connection ready
Takes a body of the `application/json` content type.
Corresponds with POST /internal/v1/publisher-connections/{publisher_connection_id}/ready (the `MarkPublisherConnectionReady` operationId).
func (*Client) MarkPublisherConnectionReadyWithBody ¶
func (c *Client) MarkPublisherConnectionReadyWithBody(ctx context.Context, publisherConnectionId PublisherConnectionID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
MarkPublisherConnectionReadyWithBody Mark one connected publisher connection ready
Takes any type of body and a specified content type.
Corresponds with POST /internal/v1/publisher-connections/{publisher_connection_id}/ready (the `MarkPublisherConnectionReady` operationId).
func (*Client) RegisterRelay ¶
func (c *Client) RegisterRelay(ctx context.Context, body RegisterRelayJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
RegisterRelay Register one relay process run
Takes a body of the `application/json` content type.
Corresponds with POST /internal/v1/relays/register (the `RegisterRelay` operationId).
func (*Client) RegisterRelayWithBody ¶
func (c *Client) RegisterRelayWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
RegisterRelayWithBody Register one relay process run
Takes any type of body and a specified content type.
Corresponds with POST /internal/v1/relays/register (the `RegisterRelay` operationId).
func (*Client) RenewRelay ¶
func (c *Client) RenewRelay(ctx context.Context, relayId RelayID, body RenewRelayJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
RenewRelay Renew a matching relay lease
Takes a body of the `application/json` content type.
Corresponds with POST /internal/v1/relays/{relay_id}/renew (the `RenewRelay` operationId).
func (*Client) RenewRelayWithBody ¶
func (c *Client) RenewRelayWithBody(ctx context.Context, relayId RelayID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
RenewRelayWithBody Renew a matching relay lease
Takes any type of body and a specified content type.
Corresponds with POST /internal/v1/relays/{relay_id}/renew (the `RenewRelay` operationId).
type ClientInterface ¶
type ClientInterface interface {
// ClaimPublisherConnectionWithBody Claim a publisher connection with its credential
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /internal/v1/publisher-connections/{publisher_connection_id}/claim (the `ClaimPublisherConnection` operationId).
ClaimPublisherConnectionWithBody(ctx context.Context, publisherConnectionId PublisherConnectionID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// ClaimPublisherConnection Claim a publisher connection with its credential
//
// Takes a body of the `application/json` content type.
//
// Corresponds with POST /internal/v1/publisher-connections/{publisher_connection_id}/claim (the `ClaimPublisherConnection` operationId).
ClaimPublisherConnection(ctx context.Context, publisherConnectionId PublisherConnectionID, body ClaimPublisherConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// DisconnectPublisherConnectionWithBody Close a matching publisher connection
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /internal/v1/publisher-connections/{publisher_connection_id}/disconnect (the `DisconnectPublisherConnection` operationId).
DisconnectPublisherConnectionWithBody(ctx context.Context, publisherConnectionId PublisherConnectionID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// DisconnectPublisherConnection Close a matching publisher connection
//
// Takes a body of the `application/json` content type.
//
// Corresponds with POST /internal/v1/publisher-connections/{publisher_connection_id}/disconnect (the `DisconnectPublisherConnection` operationId).
DisconnectPublisherConnection(ctx context.Context, publisherConnectionId PublisherConnectionID, body DisconnectPublisherConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// MarkPublisherConnectionReadyWithBody Mark one connected publisher connection ready
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /internal/v1/publisher-connections/{publisher_connection_id}/ready (the `MarkPublisherConnectionReady` operationId).
MarkPublisherConnectionReadyWithBody(ctx context.Context, publisherConnectionId PublisherConnectionID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// MarkPublisherConnectionReady Mark one connected publisher connection ready
//
// Takes a body of the `application/json` content type.
//
// Corresponds with POST /internal/v1/publisher-connections/{publisher_connection_id}/ready (the `MarkPublisherConnectionReady` operationId).
MarkPublisherConnectionReady(ctx context.Context, publisherConnectionId PublisherConnectionID, body MarkPublisherConnectionReadyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetRelayTransportCertificate Retrieve the current relay transport certificate and private key
//
// Corresponds with GET /internal/v1/relay-services/{relay_service_id}/certificate (the `GetRelayTransportCertificate` operationId).
GetRelayTransportCertificate(ctx context.Context, relayServiceId RelayServiceID, params *GetRelayTransportCertificateParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// RegisterRelayWithBody Register one relay process run
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /internal/v1/relays/register (the `RegisterRelay` operationId).
RegisterRelayWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// RegisterRelay Register one relay process run
//
// Takes a body of the `application/json` content type.
//
// Corresponds with POST /internal/v1/relays/register (the `RegisterRelay` operationId).
RegisterRelay(ctx context.Context, body RegisterRelayJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// DrainRelayWithBody Stop a matching relay process from accepting new work
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /internal/v1/relays/{relay_id}/drain (the `DrainRelay` operationId).
DrainRelayWithBody(ctx context.Context, relayId RelayID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// DrainRelay Stop a matching relay process from accepting new work
//
// Takes a body of the `application/json` content type.
//
// Corresponds with POST /internal/v1/relays/{relay_id}/drain (the `DrainRelay` operationId).
DrainRelay(ctx context.Context, relayId RelayID, body DrainRelayJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// RenewRelayWithBody Renew a matching relay lease
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /internal/v1/relays/{relay_id}/renew (the `RenewRelay` operationId).
RenewRelayWithBody(ctx context.Context, relayId RelayID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// RenewRelay Renew a matching relay lease
//
// Takes a body of the `application/json` content type.
//
// Corresponds with POST /internal/v1/relays/{relay_id}/renew (the `RenewRelay` operationId).
RenewRelay(ctx context.Context, relayId RelayID, body RenewRelayJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
}
The interface specification for the client above.
type ClientOption ¶
ClientOption allows setting custom parameters during construction
func WithHTTPClient ¶
func WithHTTPClient(doer HttpRequestDoer) ClientOption
WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.
func WithRequestEditorFn ¶
func WithRequestEditorFn(fn RequestEditorFn) ClientOption
WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.
type ClientWithResponses ¶
type ClientWithResponses struct {
ClientInterface
}
ClientWithResponses builds on ClientInterface to offer response payloads
func NewClientWithResponses ¶
func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
func (*ClientWithResponses) ClaimPublisherConnectionWithBodyWithResponse ¶
func (c *ClientWithResponses) ClaimPublisherConnectionWithBodyWithResponse(ctx context.Context, publisherConnectionId PublisherConnectionID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ClaimPublisherConnectionResponse, error)
ClaimPublisherConnectionWithBodyWithResponse Claim a publisher connection with its credential
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /internal/v1/publisher-connections/{publisher_connection_id}/claim (the `ClaimPublisherConnection` operationId).
func (*ClientWithResponses) ClaimPublisherConnectionWithResponse ¶
func (c *ClientWithResponses) ClaimPublisherConnectionWithResponse(ctx context.Context, publisherConnectionId PublisherConnectionID, body ClaimPublisherConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*ClaimPublisherConnectionResponse, error)
ClaimPublisherConnectionWithResponse Claim a publisher connection with its credential
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /internal/v1/publisher-connections/{publisher_connection_id}/claim (the `ClaimPublisherConnection` operationId).
func (*ClientWithResponses) DisconnectPublisherConnectionWithBodyWithResponse ¶
func (c *ClientWithResponses) DisconnectPublisherConnectionWithBodyWithResponse(ctx context.Context, publisherConnectionId PublisherConnectionID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DisconnectPublisherConnectionResponse, error)
DisconnectPublisherConnectionWithBodyWithResponse Close a matching publisher connection
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /internal/v1/publisher-connections/{publisher_connection_id}/disconnect (the `DisconnectPublisherConnection` operationId).
func (*ClientWithResponses) DisconnectPublisherConnectionWithResponse ¶
func (c *ClientWithResponses) DisconnectPublisherConnectionWithResponse(ctx context.Context, publisherConnectionId PublisherConnectionID, body DisconnectPublisherConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*DisconnectPublisherConnectionResponse, error)
DisconnectPublisherConnectionWithResponse Close a matching publisher connection
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /internal/v1/publisher-connections/{publisher_connection_id}/disconnect (the `DisconnectPublisherConnection` operationId).
func (*ClientWithResponses) DrainRelayWithBodyWithResponse ¶
func (c *ClientWithResponses) DrainRelayWithBodyWithResponse(ctx context.Context, relayId RelayID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DrainRelayResponse, error)
DrainRelayWithBodyWithResponse Stop a matching relay process from accepting new work
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /internal/v1/relays/{relay_id}/drain (the `DrainRelay` operationId).
func (*ClientWithResponses) DrainRelayWithResponse ¶
func (c *ClientWithResponses) DrainRelayWithResponse(ctx context.Context, relayId RelayID, body DrainRelayJSONRequestBody, reqEditors ...RequestEditorFn) (*DrainRelayResponse, error)
DrainRelayWithResponse Stop a matching relay process from accepting new work
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /internal/v1/relays/{relay_id}/drain (the `DrainRelay` operationId).
func (*ClientWithResponses) GetRelayTransportCertificateWithResponse ¶
func (c *ClientWithResponses) GetRelayTransportCertificateWithResponse(ctx context.Context, relayServiceId RelayServiceID, params *GetRelayTransportCertificateParams, reqEditors ...RequestEditorFn) (*GetRelayTransportCertificateResponse, error)
GetRelayTransportCertificateWithResponse Retrieve the current relay transport certificate and private key
Returns a wrapper object for the known response body format(s).
Corresponds with GET /internal/v1/relay-services/{relay_service_id}/certificate (the `GetRelayTransportCertificate` operationId).
func (*ClientWithResponses) MarkPublisherConnectionReadyWithBodyWithResponse ¶
func (c *ClientWithResponses) MarkPublisherConnectionReadyWithBodyWithResponse(ctx context.Context, publisherConnectionId PublisherConnectionID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*MarkPublisherConnectionReadyResponse, error)
MarkPublisherConnectionReadyWithBodyWithResponse Mark one connected publisher connection ready
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /internal/v1/publisher-connections/{publisher_connection_id}/ready (the `MarkPublisherConnectionReady` operationId).
func (*ClientWithResponses) MarkPublisherConnectionReadyWithResponse ¶
func (c *ClientWithResponses) MarkPublisherConnectionReadyWithResponse(ctx context.Context, publisherConnectionId PublisherConnectionID, body MarkPublisherConnectionReadyJSONRequestBody, reqEditors ...RequestEditorFn) (*MarkPublisherConnectionReadyResponse, error)
MarkPublisherConnectionReadyWithResponse Mark one connected publisher connection ready
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /internal/v1/publisher-connections/{publisher_connection_id}/ready (the `MarkPublisherConnectionReady` operationId).
func (*ClientWithResponses) RegisterRelayWithBodyWithResponse ¶
func (c *ClientWithResponses) RegisterRelayWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RegisterRelayResponse, error)
RegisterRelayWithBodyWithResponse Register one relay process run
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /internal/v1/relays/register (the `RegisterRelay` operationId).
func (*ClientWithResponses) RegisterRelayWithResponse ¶
func (c *ClientWithResponses) RegisterRelayWithResponse(ctx context.Context, body RegisterRelayJSONRequestBody, reqEditors ...RequestEditorFn) (*RegisterRelayResponse, error)
RegisterRelayWithResponse Register one relay process run
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /internal/v1/relays/register (the `RegisterRelay` operationId).
func (*ClientWithResponses) RenewRelayWithBodyWithResponse ¶
func (c *ClientWithResponses) RenewRelayWithBodyWithResponse(ctx context.Context, relayId RelayID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RenewRelayResponse, error)
RenewRelayWithBodyWithResponse Renew a matching relay lease
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /internal/v1/relays/{relay_id}/renew (the `RenewRelay` operationId).
func (*ClientWithResponses) RenewRelayWithResponse ¶
func (c *ClientWithResponses) RenewRelayWithResponse(ctx context.Context, relayId RelayID, body RenewRelayJSONRequestBody, reqEditors ...RequestEditorFn) (*RenewRelayResponse, error)
RenewRelayWithResponse Renew a matching relay lease
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /internal/v1/relays/{relay_id}/renew (the `RenewRelay` operationId).
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// ClaimPublisherConnectionWithBodyWithResponse Claim a publisher connection with its credential
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /internal/v1/publisher-connections/{publisher_connection_id}/claim (the `ClaimPublisherConnection` operationId).
ClaimPublisherConnectionWithBodyWithResponse(ctx context.Context, publisherConnectionId PublisherConnectionID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ClaimPublisherConnectionResponse, error)
// ClaimPublisherConnectionWithResponse Claim a publisher connection with its credential
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /internal/v1/publisher-connections/{publisher_connection_id}/claim (the `ClaimPublisherConnection` operationId).
ClaimPublisherConnectionWithResponse(ctx context.Context, publisherConnectionId PublisherConnectionID, body ClaimPublisherConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*ClaimPublisherConnectionResponse, error)
// DisconnectPublisherConnectionWithBodyWithResponse Close a matching publisher connection
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /internal/v1/publisher-connections/{publisher_connection_id}/disconnect (the `DisconnectPublisherConnection` operationId).
DisconnectPublisherConnectionWithBodyWithResponse(ctx context.Context, publisherConnectionId PublisherConnectionID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DisconnectPublisherConnectionResponse, error)
// DisconnectPublisherConnectionWithResponse Close a matching publisher connection
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /internal/v1/publisher-connections/{publisher_connection_id}/disconnect (the `DisconnectPublisherConnection` operationId).
DisconnectPublisherConnectionWithResponse(ctx context.Context, publisherConnectionId PublisherConnectionID, body DisconnectPublisherConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*DisconnectPublisherConnectionResponse, error)
// MarkPublisherConnectionReadyWithBodyWithResponse Mark one connected publisher connection ready
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /internal/v1/publisher-connections/{publisher_connection_id}/ready (the `MarkPublisherConnectionReady` operationId).
MarkPublisherConnectionReadyWithBodyWithResponse(ctx context.Context, publisherConnectionId PublisherConnectionID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*MarkPublisherConnectionReadyResponse, error)
// MarkPublisherConnectionReadyWithResponse Mark one connected publisher connection ready
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /internal/v1/publisher-connections/{publisher_connection_id}/ready (the `MarkPublisherConnectionReady` operationId).
MarkPublisherConnectionReadyWithResponse(ctx context.Context, publisherConnectionId PublisherConnectionID, body MarkPublisherConnectionReadyJSONRequestBody, reqEditors ...RequestEditorFn) (*MarkPublisherConnectionReadyResponse, error)
// GetRelayTransportCertificateWithResponse Retrieve the current relay transport certificate and private key
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /internal/v1/relay-services/{relay_service_id}/certificate (the `GetRelayTransportCertificate` operationId).
GetRelayTransportCertificateWithResponse(ctx context.Context, relayServiceId RelayServiceID, params *GetRelayTransportCertificateParams, reqEditors ...RequestEditorFn) (*GetRelayTransportCertificateResponse, error)
// RegisterRelayWithBodyWithResponse Register one relay process run
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /internal/v1/relays/register (the `RegisterRelay` operationId).
RegisterRelayWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RegisterRelayResponse, error)
// RegisterRelayWithResponse Register one relay process run
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /internal/v1/relays/register (the `RegisterRelay` operationId).
RegisterRelayWithResponse(ctx context.Context, body RegisterRelayJSONRequestBody, reqEditors ...RequestEditorFn) (*RegisterRelayResponse, error)
// DrainRelayWithBodyWithResponse Stop a matching relay process from accepting new work
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /internal/v1/relays/{relay_id}/drain (the `DrainRelay` operationId).
DrainRelayWithBodyWithResponse(ctx context.Context, relayId RelayID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DrainRelayResponse, error)
// DrainRelayWithResponse Stop a matching relay process from accepting new work
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /internal/v1/relays/{relay_id}/drain (the `DrainRelay` operationId).
DrainRelayWithResponse(ctx context.Context, relayId RelayID, body DrainRelayJSONRequestBody, reqEditors ...RequestEditorFn) (*DrainRelayResponse, error)
// RenewRelayWithBodyWithResponse Renew a matching relay lease
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /internal/v1/relays/{relay_id}/renew (the `RenewRelay` operationId).
RenewRelayWithBodyWithResponse(ctx context.Context, relayId RelayID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RenewRelayResponse, error)
// RenewRelayWithResponse Renew a matching relay lease
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /internal/v1/relays/{relay_id}/renew (the `RenewRelay` operationId).
RenewRelayWithResponse(ctx context.Context, relayId RelayID, body RenewRelayJSONRequestBody, reqEditors ...RequestEditorFn) (*RenewRelayResponse, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type DisconnectPublisherConnectionJSONRequestBody ¶
type DisconnectPublisherConnectionJSONRequestBody = PublisherConnectionDisconnect
DisconnectPublisherConnectionJSONRequestBody defines body for DisconnectPublisherConnection for application/json ContentType.
type DisconnectPublisherConnectionResponse ¶
type DisconnectPublisherConnectionResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *ClaimedPublisherConnection
// ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response
ApplicationproblemJSONDefault *Problem
}
func ParseDisconnectPublisherConnectionResponse ¶
func ParseDisconnectPublisherConnectionResponse(rsp *http.Response) (*DisconnectPublisherConnectionResponse, error)
ParseDisconnectPublisherConnectionResponse parses an HTTP response from a DisconnectPublisherConnectionWithResponse call
func (DisconnectPublisherConnectionResponse) ContentType ¶
func (r DisconnectPublisherConnectionResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (DisconnectPublisherConnectionResponse) GetApplicationproblemJSONDefault ¶
func (r DisconnectPublisherConnectionResponse) GetApplicationproblemJSONDefault() *Problem
GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response
func (DisconnectPublisherConnectionResponse) GetBody ¶
func (r DisconnectPublisherConnectionResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (DisconnectPublisherConnectionResponse) GetJSON200 ¶
func (r DisconnectPublisherConnectionResponse) GetJSON200() *ClaimedPublisherConnection
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (DisconnectPublisherConnectionResponse) Status ¶
func (r DisconnectPublisherConnectionResponse) Status() string
Status returns HTTPResponse.Status
func (DisconnectPublisherConnectionResponse) StatusCode ¶
func (r DisconnectPublisherConnectionResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DrainRelayJSONRequestBody ¶
type DrainRelayJSONRequestBody = RelayDrainRequest
DrainRelayJSONRequestBody defines body for DrainRelay for application/json ContentType.
type DrainRelayResponse ¶
type DrainRelayResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *RelayLease
// ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response
ApplicationproblemJSONDefault *Problem
}
func ParseDrainRelayResponse ¶
func ParseDrainRelayResponse(rsp *http.Response) (*DrainRelayResponse, error)
ParseDrainRelayResponse parses an HTTP response from a DrainRelayWithResponse call
func (DrainRelayResponse) ContentType ¶
func (r DrainRelayResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (DrainRelayResponse) GetApplicationproblemJSONDefault ¶
func (r DrainRelayResponse) GetApplicationproblemJSONDefault() *Problem
GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response
func (DrainRelayResponse) GetBody ¶
func (r DrainRelayResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (DrainRelayResponse) GetJSON200 ¶
func (r DrainRelayResponse) GetJSON200() *RelayLease
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (DrainRelayResponse) Status ¶
func (r DrainRelayResponse) Status() string
Status returns HTTPResponse.Status
func (DrainRelayResponse) StatusCode ¶
func (r DrainRelayResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetRelayTransportCertificateParams ¶
type GetRelayTransportCertificateParams struct {
RelayId Identifier `form:"relay_id" json:"relay_id"`
RelayRunId Identifier `form:"relay_run_id" json:"relay_run_id"`
RelayLeaseRevision int64 `form:"relay_lease_revision" json:"relay_lease_revision"`
}
GetRelayTransportCertificateParams defines parameters for GetRelayTransportCertificate.
type GetRelayTransportCertificateResponse ¶
type GetRelayTransportCertificateResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *RelayTransportCertificate
// ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response
ApplicationproblemJSONDefault *Problem
// Headers200 the parsed response headers for an HTTP 200 response
Headers200 *GetRelayTransportCertificateResponse200Headers
}
func ParseGetRelayTransportCertificateResponse ¶
func ParseGetRelayTransportCertificateResponse(rsp *http.Response) (*GetRelayTransportCertificateResponse, error)
ParseGetRelayTransportCertificateResponse parses an HTTP response from a GetRelayTransportCertificateWithResponse call
func (GetRelayTransportCertificateResponse) ContentType ¶
func (r GetRelayTransportCertificateResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetRelayTransportCertificateResponse) GetApplicationproblemJSONDefault ¶
func (r GetRelayTransportCertificateResponse) GetApplicationproblemJSONDefault() *Problem
GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response
func (GetRelayTransportCertificateResponse) GetBody ¶
func (r GetRelayTransportCertificateResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GetRelayTransportCertificateResponse) GetJSON200 ¶
func (r GetRelayTransportCertificateResponse) GetJSON200() *RelayTransportCertificate
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GetRelayTransportCertificateResponse) Status ¶
func (r GetRelayTransportCertificateResponse) Status() string
Status returns HTTPResponse.Status
func (GetRelayTransportCertificateResponse) StatusCode ¶
func (r GetRelayTransportCertificateResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetRelayTransportCertificateResponse200Headers ¶
type GetRelayTransportCertificateResponse200Headers struct {
CacheControl string
}
GetRelayTransportCertificateResponse200Headers the declared response headers of an HTTP 200 response for GetRelayTransportCertificate
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type InvalidParamFormatError ¶
func (*InvalidParamFormatError) Error ¶
func (e *InvalidParamFormatError) Error() string
func (*InvalidParamFormatError) Unwrap ¶
func (e *InvalidParamFormatError) Unwrap() error
type MarkPublisherConnectionReadyJSONRequestBody ¶
type MarkPublisherConnectionReadyJSONRequestBody = PublisherConnectionTransition
MarkPublisherConnectionReadyJSONRequestBody defines body for MarkPublisherConnectionReady for application/json ContentType.
type MarkPublisherConnectionReadyResponse ¶
type MarkPublisherConnectionReadyResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *ClaimedPublisherConnection
// ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response
ApplicationproblemJSONDefault *Problem
}
func ParseMarkPublisherConnectionReadyResponse ¶
func ParseMarkPublisherConnectionReadyResponse(rsp *http.Response) (*MarkPublisherConnectionReadyResponse, error)
ParseMarkPublisherConnectionReadyResponse parses an HTTP response from a MarkPublisherConnectionReadyWithResponse call
func (MarkPublisherConnectionReadyResponse) ContentType ¶
func (r MarkPublisherConnectionReadyResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (MarkPublisherConnectionReadyResponse) GetApplicationproblemJSONDefault ¶
func (r MarkPublisherConnectionReadyResponse) GetApplicationproblemJSONDefault() *Problem
GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response
func (MarkPublisherConnectionReadyResponse) GetBody ¶
func (r MarkPublisherConnectionReadyResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (MarkPublisherConnectionReadyResponse) GetJSON200 ¶
func (r MarkPublisherConnectionReadyResponse) GetJSON200() *ClaimedPublisherConnection
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (MarkPublisherConnectionReadyResponse) Status ¶
func (r MarkPublisherConnectionReadyResponse) Status() string
Status returns HTTPResponse.Status
func (MarkPublisherConnectionReadyResponse) StatusCode ¶
func (r MarkPublisherConnectionReadyResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type Problem ¶
type Problem struct {
Detail string `json:"detail"`
Status int `json:"status"`
Title string `json:"title"`
Type string `json:"type"`
}
Problem defines model for Problem.
type PublisherConnectionClaim ¶
type PublisherConnectionClaim struct {
ClaimId Identifier `json:"claim_id"`
ConnectionAssignmentRevision int64 `json:"connection_assignment_revision"`
ConnectionSlot int `json:"connection_slot"`
PublicUrlId Identifier `json:"public_url_id"`
PublishRunId Identifier `json:"publish_run_id"`
PublishRunNumber int64 `json:"publish_run_number"`
PublisherConnectionCredential string `json:"publisher_connection_credential"`
PublisherConnectionId Identifier `json:"publisher_connection_id"`
RelayId Identifier `json:"relay_id"`
RelayLeaseRevision int64 `json:"relay_lease_revision"`
RelayRunId Identifier `json:"relay_run_id"`
RelayServiceId Identifier `json:"relay_service_id"`
}
PublisherConnectionClaim defines model for PublisherConnectionClaim.
type PublisherConnectionDisconnect ¶
type PublisherConnectionDisconnect struct {
ClaimId Identifier `json:"claim_id"`
ConnectionAssignmentRevision int64 `json:"connection_assignment_revision"`
ConnectionSlot int `json:"connection_slot"`
PublicUrlId Identifier `json:"public_url_id"`
PublishRunId Identifier `json:"publish_run_id"`
PublishRunNumber int64 `json:"publish_run_number"`
PublisherConnectionId Identifier `json:"publisher_connection_id"`
RelayId Identifier `json:"relay_id"`
RelayLeaseRevision int64 `json:"relay_lease_revision"`
RelayRunId Identifier `json:"relay_run_id"`
RelayServiceId Identifier `json:"relay_service_id"`
Unexpected bool `json:"unexpected"`
}
PublisherConnectionDisconnect defines model for PublisherConnectionDisconnect.
type PublisherConnectionID ¶
type PublisherConnectionID = Identifier
PublisherConnectionID defines model for PublisherConnectionID.
type PublisherConnectionIdentity ¶
type PublisherConnectionIdentity struct {
ConnectionAssignmentRevision int64 `json:"connection_assignment_revision"`
ConnectionSlot int `json:"connection_slot"`
PublicUrlId Identifier `json:"public_url_id"`
PublishRunId Identifier `json:"publish_run_id"`
PublishRunNumber int64 `json:"publish_run_number"`
PublisherConnectionId Identifier `json:"publisher_connection_id"`
RelayServiceId Identifier `json:"relay_service_id"`
}
PublisherConnectionIdentity defines model for PublisherConnectionIdentity.
type PublisherConnectionProcessIdentity ¶
type PublisherConnectionProcessIdentity struct {
ClaimId Identifier `json:"claim_id"`
RelayId Identifier `json:"relay_id"`
RelayLeaseRevision int64 `json:"relay_lease_revision"`
RelayRunId Identifier `json:"relay_run_id"`
}
PublisherConnectionProcessIdentity defines model for PublisherConnectionProcessIdentity.
type PublisherConnectionTransition ¶
type PublisherConnectionTransition struct {
ClaimId Identifier `json:"claim_id"`
ConnectionAssignmentRevision int64 `json:"connection_assignment_revision"`
ConnectionSlot int `json:"connection_slot"`
PublicUrlId Identifier `json:"public_url_id"`
PublishRunId Identifier `json:"publish_run_id"`
PublishRunNumber int64 `json:"publish_run_number"`
PublisherConnectionId Identifier `json:"publisher_connection_id"`
RelayId Identifier `json:"relay_id"`
RelayLeaseRevision int64 `json:"relay_lease_revision"`
RelayRunId Identifier `json:"relay_run_id"`
RelayServiceId Identifier `json:"relay_service_id"`
}
PublisherConnectionTransition defines model for PublisherConnectionTransition.
type RegisterRelayJSONRequestBody ¶
type RegisterRelayJSONRequestBody = RelayRegistration
RegisterRelayJSONRequestBody defines body for RegisterRelay for application/json ContentType.
type RegisterRelayResponse ¶
type RegisterRelayResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *RelayLease
// ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response
ApplicationproblemJSONDefault *Problem
}
func ParseRegisterRelayResponse ¶
func ParseRegisterRelayResponse(rsp *http.Response) (*RegisterRelayResponse, error)
ParseRegisterRelayResponse parses an HTTP response from a RegisterRelayWithResponse call
func (RegisterRelayResponse) ContentType ¶
func (r RegisterRelayResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (RegisterRelayResponse) GetApplicationproblemJSONDefault ¶
func (r RegisterRelayResponse) GetApplicationproblemJSONDefault() *Problem
GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response
func (RegisterRelayResponse) GetBody ¶
func (r RegisterRelayResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (RegisterRelayResponse) GetJSON200 ¶
func (r RegisterRelayResponse) GetJSON200() *RelayLease
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (RegisterRelayResponse) Status ¶
func (r RegisterRelayResponse) Status() string
Status returns HTTPResponse.Status
func (RegisterRelayResponse) StatusCode ¶
func (r RegisterRelayResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type RelayDrainRequest ¶
type RelayDrainRequest struct {
Deadline time.Time `json:"deadline"`
RelayId Identifier `json:"relay_id"`
RelayLeaseRevision int64 `json:"relay_lease_revision"`
RelayRunId Identifier `json:"relay_run_id"`
RelayServiceId Identifier `json:"relay_service_id"`
}
RelayDrainRequest defines model for RelayDrainRequest.
type RelayLease ¶
type RelayLease struct {
ConnectionCapacity int64 `json:"connection_capacity"`
DrainDeadline *time.Time `json:"drain_deadline,omitempty"`
Draining bool `json:"draining"`
InternalNetworks []string `json:"internal_networks"`
InternalRelayAddress Identifier `json:"internal_relay_address"`
LeaseExpiresAt time.Time `json:"lease_expires_at"`
ObservedAddress *string `json:"observed_address,omitempty"`
ProtocolVersion int64 `json:"protocol_version"`
RegisteredAt time.Time `json:"registered_at"`
RelayAddress Identifier `json:"relay_address"`
RelayId Identifier `json:"relay_id"`
RelayLeaseRevision int64 `json:"relay_lease_revision"`
RelayRunId Identifier `json:"relay_run_id"`
RelayServiceId Identifier `json:"relay_service_id"`
RenewedAt time.Time `json:"renewed_at"`
ReportedConnections int64 `json:"reported_connections"`
ReportedStreams int64 `json:"reported_streams"`
StreamCapacity int64 `json:"stream_capacity"`
TlsServerName Identifier `json:"tls_server_name"`
}
RelayLease defines model for RelayLease.
type RelayLeaseIdentity ¶
type RelayLeaseIdentity struct {
RelayId Identifier `json:"relay_id"`
RelayLeaseRevision int64 `json:"relay_lease_revision"`
RelayRunId Identifier `json:"relay_run_id"`
RelayServiceId Identifier `json:"relay_service_id"`
}
RelayLeaseIdentity defines model for RelayLeaseIdentity.
type RelayRegistration ¶
type RelayRegistration struct {
ConnectionCapacity int64 `json:"connection_capacity"`
InternalNetworks []string `json:"internal_networks"`
InternalRelayAddress Identifier `json:"internal_relay_address"`
ProtocolVersion int64 `json:"protocol_version"`
RelayAddress Identifier `json:"relay_address"`
RelayId Identifier `json:"relay_id"`
RelayRunId Identifier `json:"relay_run_id"`
RelayServiceId Identifier `json:"relay_service_id"`
StreamCapacity int64 `json:"stream_capacity"`
TlsServerName Identifier `json:"tls_server_name"`
}
RelayRegistration defines model for RelayRegistration.
type RelayRenewal ¶
type RelayRenewal struct {
RelayId Identifier `json:"relay_id"`
RelayLeaseRevision int64 `json:"relay_lease_revision"`
RelayRunId Identifier `json:"relay_run_id"`
RelayServiceId Identifier `json:"relay_service_id"`
ReportedConnections int64 `json:"reported_connections"`
ReportedStreams int64 `json:"reported_streams"`
}
RelayRenewal defines model for RelayRenewal.
type RelayServiceID ¶
type RelayServiceID = Identifier
RelayServiceID defines model for RelayServiceID.
type RelayTransportCertificate ¶
type RelayTransportCertificate struct {
CertificatePem string `json:"certificate_pem"`
NotAfter time.Time `json:"not_after"`
PrivateKeyPem string `json:"private_key_pem"`
RelayServiceId Identifier `json:"relay_service_id"`
TlsServerName Identifier `json:"tls_server_name"`
}
RelayTransportCertificate defines model for RelayTransportCertificate.
type RenewRelayJSONRequestBody ¶
type RenewRelayJSONRequestBody = RelayRenewal
RenewRelayJSONRequestBody defines body for RenewRelay for application/json ContentType.
type RenewRelayResponse ¶
type RenewRelayResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *RelayLease
// ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response
ApplicationproblemJSONDefault *Problem
}
func ParseRenewRelayResponse ¶
func ParseRenewRelayResponse(rsp *http.Response) (*RenewRelayResponse, error)
ParseRenewRelayResponse parses an HTTP response from a RenewRelayWithResponse call
func (RenewRelayResponse) ContentType ¶
func (r RenewRelayResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (RenewRelayResponse) GetApplicationproblemJSONDefault ¶
func (r RenewRelayResponse) GetApplicationproblemJSONDefault() *Problem
GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response
func (RenewRelayResponse) GetBody ¶
func (r RenewRelayResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (RenewRelayResponse) GetJSON200 ¶
func (r RenewRelayResponse) GetJSON200() *RelayLease
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (RenewRelayResponse) Status ¶
func (r RenewRelayResponse) Status() string
Status returns HTTPResponse.Status
func (RenewRelayResponse) StatusCode ¶
func (r RenewRelayResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type RequiredHeaderError ¶
func (*RequiredHeaderError) Error ¶
func (e *RequiredHeaderError) Error() string
func (*RequiredHeaderError) Unwrap ¶
func (e *RequiredHeaderError) Unwrap() error
type RequiredParamError ¶
type RequiredParamError struct {
ParamName string
}
func (*RequiredParamError) Error ¶
func (e *RequiredParamError) Error() string
type ServeMux ¶
type ServeMux interface {
HandleFunc(pattern string, handler func(http.ResponseWriter, *http.Request))
http.Handler
}
ServeMux is an abstraction of http.ServeMux.
type ServerInterface ¶
type ServerInterface interface {
// ClaimPublisherConnection Claim a publisher connection with its credential
// (POST /internal/v1/publisher-connections/{publisher_connection_id}/claim)
ClaimPublisherConnection(w http.ResponseWriter, r *http.Request, publisherConnectionId PublisherConnectionID)
// DisconnectPublisherConnection Close a matching publisher connection
// (POST /internal/v1/publisher-connections/{publisher_connection_id}/disconnect)
DisconnectPublisherConnection(w http.ResponseWriter, r *http.Request, publisherConnectionId PublisherConnectionID)
// MarkPublisherConnectionReady Mark one connected publisher connection ready
// (POST /internal/v1/publisher-connections/{publisher_connection_id}/ready)
MarkPublisherConnectionReady(w http.ResponseWriter, r *http.Request, publisherConnectionId PublisherConnectionID)
// GetRelayTransportCertificate Retrieve the current relay transport certificate and private key
// (GET /internal/v1/relay-services/{relay_service_id}/certificate)
GetRelayTransportCertificate(w http.ResponseWriter, r *http.Request, relayServiceId RelayServiceID, params GetRelayTransportCertificateParams)
// RegisterRelay Register one relay process run
// (POST /internal/v1/relays/register)
RegisterRelay(w http.ResponseWriter, r *http.Request)
// DrainRelay Stop a matching relay process from accepting new work
// (POST /internal/v1/relays/{relay_id}/drain)
DrainRelay(w http.ResponseWriter, r *http.Request, relayId RelayID)
// RenewRelay Renew a matching relay lease
// (POST /internal/v1/relays/{relay_id}/renew)
RenewRelay(w http.ResponseWriter, r *http.Request, relayId RelayID)
}
ServerInterface represents all server handlers.
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct {
Handler ServerInterface
HandlerMiddlewares []MiddlewareFunc
ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}
ServerInterfaceWrapper converts contexts to parameters.
func (*ServerInterfaceWrapper) ClaimPublisherConnection ¶
func (siw *ServerInterfaceWrapper) ClaimPublisherConnection(w http.ResponseWriter, r *http.Request)
ClaimPublisherConnection operation middleware
func (*ServerInterfaceWrapper) DisconnectPublisherConnection ¶
func (siw *ServerInterfaceWrapper) DisconnectPublisherConnection(w http.ResponseWriter, r *http.Request)
DisconnectPublisherConnection operation middleware
func (*ServerInterfaceWrapper) DrainRelay ¶
func (siw *ServerInterfaceWrapper) DrainRelay(w http.ResponseWriter, r *http.Request)
DrainRelay operation middleware
func (*ServerInterfaceWrapper) GetRelayTransportCertificate ¶
func (siw *ServerInterfaceWrapper) GetRelayTransportCertificate(w http.ResponseWriter, r *http.Request)
GetRelayTransportCertificate operation middleware
func (*ServerInterfaceWrapper) MarkPublisherConnectionReady ¶
func (siw *ServerInterfaceWrapper) MarkPublisherConnectionReady(w http.ResponseWriter, r *http.Request)
MarkPublisherConnectionReady operation middleware
func (*ServerInterfaceWrapper) RegisterRelay ¶
func (siw *ServerInterfaceWrapper) RegisterRelay(w http.ResponseWriter, r *http.Request)
RegisterRelay operation middleware
func (*ServerInterfaceWrapper) RenewRelay ¶
func (siw *ServerInterfaceWrapper) RenewRelay(w http.ResponseWriter, r *http.Request)
RenewRelay operation middleware
type StdHTTPServerOptions ¶
type StdHTTPServerOptions struct {
BaseURL string
BaseRouter ServeMux
Middlewares []MiddlewareFunc
ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}
type TooManyValuesForParamError ¶
func (*TooManyValuesForParamError) Error ¶
func (e *TooManyValuesForParamError) Error() string
type UnescapedCookieParamError ¶
func (*UnescapedCookieParamError) Error ¶
func (e *UnescapedCookieParamError) Error() string
func (*UnescapedCookieParamError) Unwrap ¶
func (e *UnescapedCookieParamError) Unwrap() error
type UnmarshalingParamError ¶
func (*UnmarshalingParamError) Error ¶
func (e *UnmarshalingParamError) Error() string
func (*UnmarshalingParamError) Unwrap ¶
func (e *UnmarshalingParamError) Unwrap() error