Documentation
¶
Overview ¶
Package api provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT.
Index ¶
- Constants
- func NewArtifactsRequest(server string, params *ArtifactsParams) (*http.Request, error)
- func NewDescribeSessionRequest(server string, id string) (*http.Request, error)
- func NewGetAvailableLocationsRequest(server string, image string) (*http.Request, error)
- func NewJoinSessionRequest(server string, body JoinSessionJSONRequestBody) (*http.Request, error)
- func NewJoinSessionRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewLeaveSessionRequest(server string, body LeaveSessionJSONRequestBody) (*http.Request, error)
- func NewLeaveSessionRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewSessionListRequest(server string, params *SessionListParams) (*http.Request, error)
- func NewSessionRunRequest(server string, body SessionRunJSONRequestBody) (*http.Request, error)
- func NewSessionRunRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewSessionStopRequest(server string, id string) (*http.Request, error)
- func NewStreamLogsRequest(server string, params *StreamLogsParams) (*http.Request, error)
- func NewTagExistsRequest(server string, region string, image string, version string) (*http.Request, error)
- type ArtifactsParams
- type ArtifactsResponse
- type AvailableLocationsEntry
- type AvailableLocationsOk
- type Client
- func (c *Client) Artifacts(ctx context.Context, params *ArtifactsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) DescribeSession(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetAvailableLocations(ctx context.Context, image string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) JoinSession(ctx context.Context, body JoinSessionJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) JoinSessionWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) LeaveSession(ctx context.Context, body LeaveSessionJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) LeaveSessionWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) SessionList(ctx context.Context, params *SessionListParams, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) SessionRun(ctx context.Context, body SessionRunJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) SessionRunWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) SessionStop(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) StreamLogs(ctx context.Context, params *StreamLogsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) TagExists(ctx context.Context, region string, image string, version string, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) ArtifactsWithResponse(ctx context.Context, params *ArtifactsParams, reqEditors ...RequestEditorFn) (*ArtifactsResponse, error)
- func (c *ClientWithResponses) DescribeSessionWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DescribeSessionResponse, error)
- func (c *ClientWithResponses) GetAvailableLocationsWithResponse(ctx context.Context, image string, reqEditors ...RequestEditorFn) (*GetAvailableLocationsResponse, error)
- func (c *ClientWithResponses) JoinSessionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*JoinSessionResponse, error)
- func (c *ClientWithResponses) JoinSessionWithResponse(ctx context.Context, body JoinSessionJSONRequestBody, ...) (*JoinSessionResponse, error)
- func (c *ClientWithResponses) LeaveSessionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*LeaveSessionResponse, error)
- func (c *ClientWithResponses) LeaveSessionWithResponse(ctx context.Context, body LeaveSessionJSONRequestBody, ...) (*LeaveSessionResponse, error)
- func (c *ClientWithResponses) SessionListWithResponse(ctx context.Context, params *SessionListParams, reqEditors ...RequestEditorFn) (*SessionListResponse, error)
- func (c *ClientWithResponses) SessionRunWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*SessionRunResponse, error)
- func (c *ClientWithResponses) SessionRunWithResponse(ctx context.Context, body SessionRunJSONRequestBody, ...) (*SessionRunResponse, error)
- func (c *ClientWithResponses) SessionStopWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*SessionStopResponse, error)
- func (c *ClientWithResponses) StreamLogsWithResponse(ctx context.Context, params *StreamLogsParams, reqEditors ...RequestEditorFn) (*StreamLogsResponse, error)
- func (c *ClientWithResponses) TagExistsWithResponse(ctx context.Context, region string, image string, version string, ...) (*TagExistsResponse, error)
- type ClientWithResponsesInterface
- type DescribeSessionResponse
- type DescribedSession
- type DescribedSessionPlayers
- type ErrorResponse
- type FieldViolation
- type GetAvailableLocationsResponse
- type HttpRequestDoer
- type JoinSession
- type JoinSessionJSONRequestBody
- type JoinSessionOk
- type JoinSessionResponse
- type LeaveSession
- type LeaveSessionJSONRequestBody
- type LeaveSessionOk
- type LeaveSessionResponse
- type Port
- type PortType
- type RequestEditorFn
- type SessionListEntry
- type SessionListOk
- type SessionListParams
- type SessionListResponse
- type SessionRun
- type SessionRunJSONRequestBody
- type SessionRunOk
- type SessionRunResponse
- type SessionStatus
- type SessionStopResponse
- type StreamLogsParams
- type StreamLogsResponse
- type TagExistsResponse
- type TagOk
Constants ¶
const (
Api_tokenScopes = "api_token.Scopes"
)
Variables ¶
This section is empty.
Functions ¶
func NewArtifactsRequest ¶
func NewArtifactsRequest(server string, params *ArtifactsParams) (*http.Request, error)
NewArtifactsRequest generates requests for Artifacts
func NewDescribeSessionRequest ¶
NewDescribeSessionRequest generates requests for DescribeSession
func NewGetAvailableLocationsRequest ¶
NewGetAvailableLocationsRequest generates requests for GetAvailableLocations
func NewJoinSessionRequest ¶
func NewJoinSessionRequest(server string, body JoinSessionJSONRequestBody) (*http.Request, error)
NewJoinSessionRequest calls the generic JoinSession builder with application/json body
func NewJoinSessionRequestWithBody ¶
func NewJoinSessionRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewJoinSessionRequestWithBody generates requests for JoinSession with any type of body
func NewLeaveSessionRequest ¶
func NewLeaveSessionRequest(server string, body LeaveSessionJSONRequestBody) (*http.Request, error)
NewLeaveSessionRequest calls the generic LeaveSession builder with application/json body
func NewLeaveSessionRequestWithBody ¶
func NewLeaveSessionRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewLeaveSessionRequestWithBody generates requests for LeaveSession with any type of body
func NewSessionListRequest ¶
func NewSessionListRequest(server string, params *SessionListParams) (*http.Request, error)
NewSessionListRequest generates requests for SessionList
func NewSessionRunRequest ¶
func NewSessionRunRequest(server string, body SessionRunJSONRequestBody) (*http.Request, error)
NewSessionRunRequest calls the generic SessionRun builder with application/json body
func NewSessionRunRequestWithBody ¶
func NewSessionRunRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewSessionRunRequestWithBody generates requests for SessionRun with any type of body
func NewSessionStopRequest ¶
NewSessionStopRequest generates requests for SessionStop
func NewStreamLogsRequest ¶
func NewStreamLogsRequest(server string, params *StreamLogsParams) (*http.Request, error)
NewStreamLogsRequest generates requests for StreamLogs
Types ¶
type ArtifactsParams ¶
type ArtifactsParams struct {
// Session The id of the session to download an artifact from.
Session string `form:"session" json:"session"`
// Path The local path inside the container to the target file or folder requested
// for download.
Path string `form:"path" json:"path"`
}
ArtifactsParams defines parameters for Artifacts.
type ArtifactsResponse ¶
type ArtifactsResponse struct {
Body []byte
HTTPResponse *http.Response
JSON401 *ErrorResponse
JSON404 *ErrorResponse
}
func ParseArtifactsResponse ¶
func ParseArtifactsResponse(rsp *http.Response) (*ArtifactsResponse, error)
ParseArtifactsResponse parses an HTTP response from a ArtifactsWithResponse call
func (ArtifactsResponse) Status ¶
func (r ArtifactsResponse) Status() string
Status returns HTTPResponse.Status
func (ArtifactsResponse) StatusCode ¶
func (r ArtifactsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type AvailableLocationsEntry ¶
AvailableLocationsEntry defines model for AvailableLocationsEntry.
type AvailableLocationsOk ¶
type AvailableLocationsOk struct {
Locations []AvailableLocationsEntry `json:"locations"`
}
AvailableLocationsOk defines model for AvailableLocationsOk.
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) Artifacts ¶
func (c *Client) Artifacts(ctx context.Context, params *ArtifactsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) DescribeSession ¶
func (*Client) GetAvailableLocations ¶
func (*Client) JoinSession ¶
func (c *Client) JoinSession(ctx context.Context, body JoinSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) JoinSessionWithBody ¶
func (*Client) LeaveSession ¶
func (c *Client) LeaveSession(ctx context.Context, body LeaveSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) LeaveSessionWithBody ¶
func (*Client) SessionList ¶
func (c *Client) SessionList(ctx context.Context, params *SessionListParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) SessionRun ¶
func (c *Client) SessionRun(ctx context.Context, body SessionRunJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) SessionRunWithBody ¶
func (*Client) SessionStop ¶
func (*Client) StreamLogs ¶
func (c *Client) StreamLogs(ctx context.Context, params *StreamLogsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
type ClientInterface ¶
type ClientInterface interface {
// Artifacts request
Artifacts(ctx context.Context, params *ArtifactsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetAvailableLocations request
GetAvailableLocations(ctx context.Context, image string, reqEditors ...RequestEditorFn) (*http.Response, error)
// StreamLogs request
StreamLogs(ctx context.Context, params *StreamLogsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// SessionList request
SessionList(ctx context.Context, params *SessionListParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// SessionRunWithBody request with any body
SessionRunWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
SessionRun(ctx context.Context, body SessionRunJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// JoinSessionWithBody request with any body
JoinSessionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
JoinSession(ctx context.Context, body JoinSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// LeaveSessionWithBody request with any body
LeaveSessionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
LeaveSession(ctx context.Context, body LeaveSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// SessionStop request
SessionStop(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
// DescribeSession request
DescribeSession(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
// TagExists request
TagExists(ctx context.Context, region string, image string, version string, 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) ArtifactsWithResponse ¶
func (c *ClientWithResponses) ArtifactsWithResponse(ctx context.Context, params *ArtifactsParams, reqEditors ...RequestEditorFn) (*ArtifactsResponse, error)
ArtifactsWithResponse request returning *ArtifactsResponse
func (*ClientWithResponses) DescribeSessionWithResponse ¶
func (c *ClientWithResponses) DescribeSessionWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DescribeSessionResponse, error)
DescribeSessionWithResponse request returning *DescribeSessionResponse
func (*ClientWithResponses) GetAvailableLocationsWithResponse ¶
func (c *ClientWithResponses) GetAvailableLocationsWithResponse(ctx context.Context, image string, reqEditors ...RequestEditorFn) (*GetAvailableLocationsResponse, error)
GetAvailableLocationsWithResponse request returning *GetAvailableLocationsResponse
func (*ClientWithResponses) JoinSessionWithBodyWithResponse ¶
func (c *ClientWithResponses) JoinSessionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*JoinSessionResponse, error)
JoinSessionWithBodyWithResponse request with arbitrary body returning *JoinSessionResponse
func (*ClientWithResponses) JoinSessionWithResponse ¶
func (c *ClientWithResponses) JoinSessionWithResponse(ctx context.Context, body JoinSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*JoinSessionResponse, error)
func (*ClientWithResponses) LeaveSessionWithBodyWithResponse ¶
func (c *ClientWithResponses) LeaveSessionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*LeaveSessionResponse, error)
LeaveSessionWithBodyWithResponse request with arbitrary body returning *LeaveSessionResponse
func (*ClientWithResponses) LeaveSessionWithResponse ¶
func (c *ClientWithResponses) LeaveSessionWithResponse(ctx context.Context, body LeaveSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*LeaveSessionResponse, error)
func (*ClientWithResponses) SessionListWithResponse ¶
func (c *ClientWithResponses) SessionListWithResponse(ctx context.Context, params *SessionListParams, reqEditors ...RequestEditorFn) (*SessionListResponse, error)
SessionListWithResponse request returning *SessionListResponse
func (*ClientWithResponses) SessionRunWithBodyWithResponse ¶
func (c *ClientWithResponses) SessionRunWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SessionRunResponse, error)
SessionRunWithBodyWithResponse request with arbitrary body returning *SessionRunResponse
func (*ClientWithResponses) SessionRunWithResponse ¶
func (c *ClientWithResponses) SessionRunWithResponse(ctx context.Context, body SessionRunJSONRequestBody, reqEditors ...RequestEditorFn) (*SessionRunResponse, error)
func (*ClientWithResponses) SessionStopWithResponse ¶
func (c *ClientWithResponses) SessionStopWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*SessionStopResponse, error)
SessionStopWithResponse request returning *SessionStopResponse
func (*ClientWithResponses) StreamLogsWithResponse ¶
func (c *ClientWithResponses) StreamLogsWithResponse(ctx context.Context, params *StreamLogsParams, reqEditors ...RequestEditorFn) (*StreamLogsResponse, error)
StreamLogsWithResponse request returning *StreamLogsResponse
func (*ClientWithResponses) TagExistsWithResponse ¶
func (c *ClientWithResponses) TagExistsWithResponse(ctx context.Context, region string, image string, version string, reqEditors ...RequestEditorFn) (*TagExistsResponse, error)
TagExistsWithResponse request returning *TagExistsResponse
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// ArtifactsWithResponse request
ArtifactsWithResponse(ctx context.Context, params *ArtifactsParams, reqEditors ...RequestEditorFn) (*ArtifactsResponse, error)
// GetAvailableLocationsWithResponse request
GetAvailableLocationsWithResponse(ctx context.Context, image string, reqEditors ...RequestEditorFn) (*GetAvailableLocationsResponse, error)
// StreamLogsWithResponse request
StreamLogsWithResponse(ctx context.Context, params *StreamLogsParams, reqEditors ...RequestEditorFn) (*StreamLogsResponse, error)
// SessionListWithResponse request
SessionListWithResponse(ctx context.Context, params *SessionListParams, reqEditors ...RequestEditorFn) (*SessionListResponse, error)
// SessionRunWithBodyWithResponse request with any body
SessionRunWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SessionRunResponse, error)
SessionRunWithResponse(ctx context.Context, body SessionRunJSONRequestBody, reqEditors ...RequestEditorFn) (*SessionRunResponse, error)
// JoinSessionWithBodyWithResponse request with any body
JoinSessionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*JoinSessionResponse, error)
JoinSessionWithResponse(ctx context.Context, body JoinSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*JoinSessionResponse, error)
// LeaveSessionWithBodyWithResponse request with any body
LeaveSessionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*LeaveSessionResponse, error)
LeaveSessionWithResponse(ctx context.Context, body LeaveSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*LeaveSessionResponse, error)
// SessionStopWithResponse request
SessionStopWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*SessionStopResponse, error)
// DescribeSessionWithResponse request
DescribeSessionWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DescribeSessionResponse, error)
// TagExistsWithResponse request
TagExistsWithResponse(ctx context.Context, region string, image string, version string, reqEditors ...RequestEditorFn) (*TagExistsResponse, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type DescribeSessionResponse ¶
type DescribeSessionResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *DescribedSession
JSON401 *ErrorResponse
JSON404 *ErrorResponse
}
func ParseDescribeSessionResponse ¶
func ParseDescribeSessionResponse(rsp *http.Response) (*DescribeSessionResponse, error)
ParseDescribeSessionResponse parses an HTTP response from a DescribeSessionWithResponse call
func (DescribeSessionResponse) Status ¶
func (r DescribeSessionResponse) Status() string
Status returns HTTPResponse.Status
func (DescribeSessionResponse) StatusCode ¶
func (r DescribeSessionResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DescribedSession ¶
type DescribedSession struct {
// Id The unique identifier of the session.
Id string `json:"id"`
// Image The name of the image of the game that is hosted inside the container.
Image string `json:"image"`
// Tag The build tag of the image the container is derived from.
Tag string `json:"tag"`
// Location The location or region that the game session is hosted in.
Location string `json:"location"`
// Host The IP address of the host machine the game session is hosted on.
Host string `json:"host"`
// Created The unix timestamp the session was created in.
Created float32 `json:"created"`
// Port A record of exposed ports for this container.
Port map[string]float32 `json:"port"`
// Status The current runtime status of the underlying container.
Status SessionStatus `json:"status"`
// Labels The collection of user-defined key/value metadata stored inside the configuration of the session.
Labels map[string]string `json:"labels"`
Players DescribedSessionPlayers `json:"players"`
}
DescribedSession defines model for DescribedSession.
type DescribedSessionPlayers ¶
type DescribedSessionPlayers struct {
Joined []string `json:"joined"`
JoinedCount int `json:"joinedCount"`
}
DescribedSessionPlayers defines model for DescribedSessionPlayers.
type ErrorResponse ¶
type ErrorResponse struct {
Code string `json:"code"`
Details string `json:"details"`
Identifier string `json:"identifier"`
Message string `json:"message"`
Path string `json:"path"`
StatusCode int `json:"statusCode"`
Timestamp string `json:"timestamp"`
Violations *[]FieldViolation `json:"violations,omitempty"`
}
ErrorResponse defines model for ErrorResponse.
type FieldViolation ¶
FieldViolation defines model for FieldViolation.
type GetAvailableLocationsResponse ¶
type GetAvailableLocationsResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *AvailableLocationsOk
JSON401 *ErrorResponse
JSON404 *ErrorResponse
}
func ParseGetAvailableLocationsResponse ¶
func ParseGetAvailableLocationsResponse(rsp *http.Response) (*GetAvailableLocationsResponse, error)
ParseGetAvailableLocationsResponse parses an HTTP response from a GetAvailableLocationsWithResponse call
func (GetAvailableLocationsResponse) Status ¶
func (r GetAvailableLocationsResponse) Status() string
Status returns HTTPResponse.Status
func (GetAvailableLocationsResponse) StatusCode ¶
func (r GetAvailableLocationsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type JoinSession ¶
type JoinSession struct {
// Players The list of player ID's to join this session.
Players []string `json:"players"`
// Session The ID of the session.
Session string `json:"session"`
}
JoinSession defines model for JoinSession.
type JoinSessionJSONRequestBody ¶
type JoinSessionJSONRequestBody = JoinSession
JoinSessionJSONRequestBody defines body for JoinSession for application/json ContentType.
type JoinSessionOk ¶
type JoinSessionOk struct {
// Count The total amount of players that are in this session.
Count int `json:"count"`
// Players The list of player ID's to join this session.
Players []string `json:"players"`
}
JoinSessionOk defines model for JoinSessionOk.
type JoinSessionResponse ¶
type JoinSessionResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *JoinSessionOk
JSON401 *ErrorResponse
JSON404 *ErrorResponse
JSON422 *ErrorResponse
}
func ParseJoinSessionResponse ¶
func ParseJoinSessionResponse(rsp *http.Response) (*JoinSessionResponse, error)
ParseJoinSessionResponse parses an HTTP response from a JoinSessionWithResponse call
func (JoinSessionResponse) Status ¶
func (r JoinSessionResponse) Status() string
Status returns HTTPResponse.Status
func (JoinSessionResponse) StatusCode ¶
func (r JoinSessionResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type LeaveSession ¶
type LeaveSession struct {
// Players The list of player ID's to join this session.
Players []string `json:"players"`
}
LeaveSession defines model for LeaveSession.
type LeaveSessionJSONRequestBody ¶
type LeaveSessionJSONRequestBody = LeaveSession
LeaveSessionJSONRequestBody defines body for LeaveSession for application/json ContentType.
type LeaveSessionOk ¶
type LeaveSessionOk struct {
// Count The total amount of players that are in this session.
Count int `json:"count"`
// Players The list of player ID's to leave this session.
Players []string `json:"players"`
}
LeaveSessionOk defines model for LeaveSessionOk.
type LeaveSessionResponse ¶
type LeaveSessionResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *LeaveSessionOk
JSON401 *ErrorResponse
JSON404 *ErrorResponse
JSON422 *ErrorResponse
}
func ParseLeaveSessionResponse ¶
func ParseLeaveSessionResponse(rsp *http.Response) (*LeaveSessionResponse, error)
ParseLeaveSessionResponse parses an HTTP response from a LeaveSessionWithResponse call
func (LeaveSessionResponse) Status ¶
func (r LeaveSessionResponse) Status() string
Status returns HTTPResponse.Status
func (LeaveSessionResponse) StatusCode ¶
func (r LeaveSessionResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type Port ¶
type Port struct {
// Container The port of the container that is hosted on the machine.
Container int `json:"container"`
// Host The host port for mapping the container port.
Host int `json:"host"`
// Type The type of protocol of this port entry.
Type PortType `json:"type"`
}
Port defines model for Port.
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type SessionListEntry ¶
type SessionListEntry struct {
// Id The unique identifier of the session.
Id string `json:"id"`
// Image The name of the image of the game that is hosted inside the container.
Image string `json:"image"`
// Tag The build tag of the image the container is derived from.
Tag *string `json:"tag,omitempty"`
// Location The location or region that the game session is hosted in.
Location string `json:"location"`
// Host The IP address of the host machine the game session is hosted on.
Host string `json:"host"`
// Created The unix timestamp the session was created in.
Created float32 `json:"created"`
// Port A record of exposed ports for this container.
Port map[string]float32 `json:"port"`
// Status The current runtime status of the underlying container.
Status SessionStatus `json:"status,omitempty"`
// Labels The collection of user-defined key/value metadata stored inside the configuration of the session.
Labels *map[string]string `json:"labels,omitempty"`
PlayerCount *int `json:"playerCount,omitempty"`
}
SessionListEntry defines model for SessionListEntry.
type SessionListOk ¶
type SessionListOk struct {
Sessions []SessionListEntry `json:"sessions"`
}
SessionListOk defines model for SessionListOk.
type SessionListParams ¶
type SessionListParams struct {
// All Whether to return all sessions regardless of status in the response.
// The default value for this is 'false', which would only return running sessions.
All *bool `form:"all,omitempty" json:"all,omitempty"`
// Location Filter results by location.
Location *string `form:"location,omitempty" json:"location,omitempty"`
// Image Filter results by image.
Image *string `form:"image,omitempty" json:"image,omitempty"`
// Tag Filter results by tag.
Tag *string `form:"tag,omitempty" json:"tag,omitempty"`
// Host Filter results by host IP address.
Host *string `form:"host,omitempty" json:"host,omitempty"`
PlayerCount *map[string]int `json:"playerCount,omitempty"`
Filter *map[string]string `json:"filter,omitempty"`
}
SessionListParams defines parameters for SessionList.
type SessionListResponse ¶
type SessionListResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *SessionListOk
JSON401 *ErrorResponse
}
func ParseSessionListResponse ¶
func ParseSessionListResponse(rsp *http.Response) (*SessionListResponse, error)
ParseSessionListResponse parses an HTTP response from a SessionListWithResponse call
func (SessionListResponse) Status ¶
func (r SessionListResponse) Status() string
Status returns HTTPResponse.Status
func (SessionListResponse) StatusCode ¶
func (r SessionListResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type SessionRun ¶
type SessionRun struct {
// Args The list of program console arguments to feed to the application hosted inside the underlying container.
Args *[]string `json:"args,omitempty"`
// Env The list of environment variables to feed the container on startup.
Env *map[string]string `json:"env,omitempty"`
// Id The unique identifier of the session. If undefined, Gameye will generate a UUIDV4
// for you and return it in the API response.
Id *string `json:"id,omitempty"`
// Image The name of the image of the game to host inside a container.
Image string `json:"image"`
// Labels The collection of user-defined key/value metadata stored inside the configuration of the session.
Labels map[string]string `json:"labels,omitempty"`
// Location The location or region that the game session is preferred to be hosted in.
Location string `json:"location"`
// Restart Indicates whether this session must be automatically restarted on failure.
// The underlying container will not be restarted in case of a manual termination.
Restart *bool `json:"restart,omitempty"`
// Version Tag of the image that the session will be run. This tag needs to be available or a 404 will be thrown. If not specified run the tag with the highest priority.
//
Version *string `json:"version,omitempty"`
}
SessionRun defines model for SessionRun.
type SessionRunJSONRequestBody ¶
type SessionRunJSONRequestBody = SessionRun
SessionRunJSONRequestBody defines body for SessionRun for application/json ContentType.
type SessionRunOk ¶
type SessionRunOk struct {
// Host The IP address of the machine that the session is running on.
Host string `json:"host"`
// Id The generated unique session ID.
Id *string `json:"id,omitempty"`
// Ports The list of mapped ports for this session.
Ports []Port `json:"ports"`
}
SessionRunOk defines model for SessionRunOk.
type SessionRunResponse ¶
type SessionRunResponse struct {
Body []byte
HTTPResponse *http.Response
JSON201 *SessionRunOk
JSON401 *ErrorResponse
JSON404 *ErrorResponse
JSON409 *ErrorResponse
JSON420 *ErrorResponse
JSON422 *ErrorResponse
}
func ParseSessionRunResponse ¶
func ParseSessionRunResponse(rsp *http.Response) (*SessionRunResponse, error)
ParseSessionRunResponse parses an HTTP response from a SessionRunWithResponse call
func (SessionRunResponse) Status ¶
func (r SessionRunResponse) Status() string
Status returns HTTPResponse.Status
func (SessionRunResponse) StatusCode ¶
func (r SessionRunResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type SessionStatus ¶
type SessionStatus string
SessionStatus The current runtime status of the underlying container.
const ( Created SessionStatus = "created" Dead SessionStatus = "dead" Draining SessionStatus = "draining" Exited SessionStatus = "exited" Restarting SessionStatus = "restarting" Running SessionStatus = "running" ServerUnreachable SessionStatus = "server_unreachable" Shuttingdown SessionStatus = "shuttingdown" )
Defines values for SessionStatus.
type SessionStopResponse ¶
type SessionStopResponse struct {
Body []byte
HTTPResponse *http.Response
JSON401 *ErrorResponse
JSON404 *ErrorResponse
JSON409 *ErrorResponse
}
func ParseSessionStopResponse ¶
func ParseSessionStopResponse(rsp *http.Response) (*SessionStopResponse, error)
ParseSessionStopResponse parses an HTTP response from a SessionStopWithResponse call
func (SessionStopResponse) Status ¶
func (r SessionStopResponse) Status() string
Status returns HTTPResponse.Status
func (SessionStopResponse) StatusCode ¶
func (r SessionStopResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type StreamLogsParams ¶
type StreamLogsParams struct {
Id string `form:"id" json:"id"`
Follow *bool `form:"follow,omitempty" json:"follow,omitempty"`
}
StreamLogsParams defines parameters for StreamLogs.
type StreamLogsResponse ¶
type StreamLogsResponse struct {
Body []byte
HTTPResponse *http.Response
JSON401 *ErrorResponse
JSON404 *ErrorResponse
}
func ParseStreamLogsResponse ¶
func ParseStreamLogsResponse(rsp *http.Response) (*StreamLogsResponse, error)
ParseStreamLogsResponse parses an HTTP response from a StreamLogsWithResponse call
func (StreamLogsResponse) Status ¶
func (r StreamLogsResponse) Status() string
Status returns HTTPResponse.Status
func (StreamLogsResponse) StatusCode ¶
func (r StreamLogsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type TagExistsResponse ¶
type TagExistsResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *TagOk
JSON400 *ErrorResponse
JSON401 *ErrorResponse
JSON404 *ErrorResponse
}
func ParseTagExistsResponse ¶
func ParseTagExistsResponse(rsp *http.Response) (*TagExistsResponse, error)
ParseTagExistsResponse parses an HTTP response from a TagExistsWithResponse call
func (TagExistsResponse) Status ¶
func (r TagExistsResponse) Status() string
Status returns HTTPResponse.Status
func (TagExistsResponse) StatusCode ¶
func (r TagExistsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode