concurrent_record

package
v0.0.0-...-129b202 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client for concurrent record API

func (*Client) PutGameRecordConcurrentHandlerV1

  PutGameRecordConcurrentHandlerV1 creates or replace game record

  <table>
	<tr>
		<td>Required Permission</td>
		<td><code>NAMESPACE:{namespace}:CLOUDSAVE:RECORD [UPDATE]</code></td>
	</tr>
	<tr>
		<td>Required Scope</td>
		<td><code>social</code></td>
	</tr>

</table> <br/>

If record already exists, it will be replaced with the one from request body (all fields will be deleted). If record is not exists, it will create a new one with value from request body.

Example:

Replace all records <pre>

// existed record
{
	"foo": "bar"
}

// new update (request body)
{
	"foo_new": "bar_new"
}

// result
{
	"foo_new": "bar_new"
}

</pre>

<b>Optimistic Concurrency Control</b><br> This endpoint implement optimistic concurrency control to avoid race condition. If the record has been updated since the client fetch it, the server will return HTTP status code 412 (precondition failed) and client need to redo the operation (fetch data and do update). Otherwise, the server will process the request.

func (*Client) PutPlayerPublicRecordConcurrentHandlerV1

  PutPlayerPublicRecordConcurrentHandlerV1 creates or replace player record

  <table>
	<tr>
		<td>Required Permission</td>
		<td><code>NAMESPACE:{namespace}:USER:{userId}:PUBLIC:CLOUDSAVE:RECORD [UPDATE]</code></td>
	</tr>
	<tr>
		<td>Required Scope</td>
		<td><code>social</code></td>
	</tr>

</table> <br/>

If the record is not exist, it will create. If the record already exist, it will replace the record instead. And this operation can only be applied to record with <code>isPublic=true</code>.

Example

Replace record <pre> // existed record

{
	"foo": "bar"
}

// new record (request body)

{
	"foo_new": "bar_new"
}

// result

{
	"foo_new": "bar_new"
}

</pre>

<b>Optimistic Concurrency Control</b><br> This endpoint implement optimistic concurrency control to avoid race condition. If the record has been updated since the client fetch it, the server will return HTTP status code 412 (precondition failed) and client need to redo the operation (fetch data and do update). Otherwise, the server will process the request.

func (*Client) SetTransport

func (a *Client) SetTransport(transport runtime.ClientTransport)

SetTransport changes the transport on the client

type PutGameRecordConcurrentHandlerV1BadRequest

type PutGameRecordConcurrentHandlerV1BadRequest struct {
	Payload *cloudsaveclientmodels.ResponseError
}

PutGameRecordConcurrentHandlerV1BadRequest handles this case with default header values.

Bad Request

func NewPutGameRecordConcurrentHandlerV1BadRequest

func NewPutGameRecordConcurrentHandlerV1BadRequest() *PutGameRecordConcurrentHandlerV1BadRequest

NewPutGameRecordConcurrentHandlerV1BadRequest creates a PutGameRecordConcurrentHandlerV1BadRequest with default headers values

func (*PutGameRecordConcurrentHandlerV1BadRequest) Error

func (*PutGameRecordConcurrentHandlerV1BadRequest) GetPayload

type PutGameRecordConcurrentHandlerV1InternalServerError

type PutGameRecordConcurrentHandlerV1InternalServerError struct {
	Payload *cloudsaveclientmodels.ResponseError
}

PutGameRecordConcurrentHandlerV1InternalServerError handles this case with default header values.

Internal Server Error

func NewPutGameRecordConcurrentHandlerV1InternalServerError

func NewPutGameRecordConcurrentHandlerV1InternalServerError() *PutGameRecordConcurrentHandlerV1InternalServerError

NewPutGameRecordConcurrentHandlerV1InternalServerError creates a PutGameRecordConcurrentHandlerV1InternalServerError with default headers values

func (*PutGameRecordConcurrentHandlerV1InternalServerError) Error

func (*PutGameRecordConcurrentHandlerV1InternalServerError) GetPayload

type PutGameRecordConcurrentHandlerV1NoContent

type PutGameRecordConcurrentHandlerV1NoContent struct {
}

PutGameRecordConcurrentHandlerV1NoContent handles this case with default header values.

Record saved

func NewPutGameRecordConcurrentHandlerV1NoContent

func NewPutGameRecordConcurrentHandlerV1NoContent() *PutGameRecordConcurrentHandlerV1NoContent

NewPutGameRecordConcurrentHandlerV1NoContent creates a PutGameRecordConcurrentHandlerV1NoContent with default headers values

func (*PutGameRecordConcurrentHandlerV1NoContent) Error

type PutGameRecordConcurrentHandlerV1Params

type PutGameRecordConcurrentHandlerV1Params struct {

	/*Body*/
	Body *cloudsaveclientmodels.ModelsConcurrentRecordRequest
	/*Key
	  key of record

	*/
	Key string
	/*Namespace
	  namespace of the game

	*/
	Namespace string

	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

PutGameRecordConcurrentHandlerV1Params contains all the parameters to send to the API endpoint for the put game record concurrent handler v1 operation typically these are written to a http.Request

func NewPutGameRecordConcurrentHandlerV1Params

func NewPutGameRecordConcurrentHandlerV1Params() *PutGameRecordConcurrentHandlerV1Params

NewPutGameRecordConcurrentHandlerV1Params creates a new PutGameRecordConcurrentHandlerV1Params object with the default values initialized.

func NewPutGameRecordConcurrentHandlerV1ParamsWithContext

func NewPutGameRecordConcurrentHandlerV1ParamsWithContext(ctx context.Context) *PutGameRecordConcurrentHandlerV1Params

NewPutGameRecordConcurrentHandlerV1ParamsWithContext creates a new PutGameRecordConcurrentHandlerV1Params object with the default values initialized, and the ability to set a context for a request

func NewPutGameRecordConcurrentHandlerV1ParamsWithHTTPClient

func NewPutGameRecordConcurrentHandlerV1ParamsWithHTTPClient(client *http.Client) *PutGameRecordConcurrentHandlerV1Params

NewPutGameRecordConcurrentHandlerV1ParamsWithHTTPClient creates a new PutGameRecordConcurrentHandlerV1Params object with the default values initialized, and the ability to set a custom HTTPClient for a request

func NewPutGameRecordConcurrentHandlerV1ParamsWithTimeout

func NewPutGameRecordConcurrentHandlerV1ParamsWithTimeout(timeout time.Duration) *PutGameRecordConcurrentHandlerV1Params

NewPutGameRecordConcurrentHandlerV1ParamsWithTimeout creates a new PutGameRecordConcurrentHandlerV1Params object with the default values initialized, and the ability to set a timeout on a request

func (*PutGameRecordConcurrentHandlerV1Params) SetBody

SetBody adds the body to the put game record concurrent handler v1 params

func (*PutGameRecordConcurrentHandlerV1Params) SetContext

SetContext adds the context to the put game record concurrent handler v1 params

func (*PutGameRecordConcurrentHandlerV1Params) SetHTTPClient

func (o *PutGameRecordConcurrentHandlerV1Params) SetHTTPClient(client *http.Client)

SetHTTPClient adds the HTTPClient to the put game record concurrent handler v1 params

func (*PutGameRecordConcurrentHandlerV1Params) SetKey

SetKey adds the key to the put game record concurrent handler v1 params

func (*PutGameRecordConcurrentHandlerV1Params) SetNamespace

func (o *PutGameRecordConcurrentHandlerV1Params) SetNamespace(namespace string)

SetNamespace adds the namespace to the put game record concurrent handler v1 params

func (*PutGameRecordConcurrentHandlerV1Params) SetTimeout

func (o *PutGameRecordConcurrentHandlerV1Params) SetTimeout(timeout time.Duration)

SetTimeout adds the timeout to the put game record concurrent handler v1 params

func (*PutGameRecordConcurrentHandlerV1Params) WithBody

WithBody adds the body to the put game record concurrent handler v1 params

func (*PutGameRecordConcurrentHandlerV1Params) WithContext

WithContext adds the context to the put game record concurrent handler v1 params

func (*PutGameRecordConcurrentHandlerV1Params) WithHTTPClient

WithHTTPClient adds the HTTPClient to the put game record concurrent handler v1 params

func (*PutGameRecordConcurrentHandlerV1Params) WithKey

WithKey adds the key to the put game record concurrent handler v1 params

func (*PutGameRecordConcurrentHandlerV1Params) WithNamespace

WithNamespace adds the namespace to the put game record concurrent handler v1 params

func (*PutGameRecordConcurrentHandlerV1Params) WithTimeout

WithTimeout adds the timeout to the put game record concurrent handler v1 params

func (*PutGameRecordConcurrentHandlerV1Params) WriteToRequest

WriteToRequest writes these params to a swagger request

type PutGameRecordConcurrentHandlerV1PreconditionFailed

type PutGameRecordConcurrentHandlerV1PreconditionFailed struct {
	Payload *cloudsaveclientmodels.ResponseError
}

PutGameRecordConcurrentHandlerV1PreconditionFailed handles this case with default header values.

Precondition Failed

func NewPutGameRecordConcurrentHandlerV1PreconditionFailed

func NewPutGameRecordConcurrentHandlerV1PreconditionFailed() *PutGameRecordConcurrentHandlerV1PreconditionFailed

NewPutGameRecordConcurrentHandlerV1PreconditionFailed creates a PutGameRecordConcurrentHandlerV1PreconditionFailed with default headers values

func (*PutGameRecordConcurrentHandlerV1PreconditionFailed) Error

func (*PutGameRecordConcurrentHandlerV1PreconditionFailed) GetPayload

type PutGameRecordConcurrentHandlerV1Reader

type PutGameRecordConcurrentHandlerV1Reader struct {
	// contains filtered or unexported fields
}

PutGameRecordConcurrentHandlerV1Reader is a Reader for the PutGameRecordConcurrentHandlerV1 structure.

func (*PutGameRecordConcurrentHandlerV1Reader) ReadResponse

func (o *PutGameRecordConcurrentHandlerV1Reader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

type PutPlayerPublicRecordConcurrentHandlerV1BadRequest

type PutPlayerPublicRecordConcurrentHandlerV1BadRequest struct {
	Payload *cloudsaveclientmodels.ResponseError
}

PutPlayerPublicRecordConcurrentHandlerV1BadRequest handles this case with default header values.

Bad Request

func NewPutPlayerPublicRecordConcurrentHandlerV1BadRequest

func NewPutPlayerPublicRecordConcurrentHandlerV1BadRequest() *PutPlayerPublicRecordConcurrentHandlerV1BadRequest

NewPutPlayerPublicRecordConcurrentHandlerV1BadRequest creates a PutPlayerPublicRecordConcurrentHandlerV1BadRequest with default headers values

func (*PutPlayerPublicRecordConcurrentHandlerV1BadRequest) Error

func (*PutPlayerPublicRecordConcurrentHandlerV1BadRequest) GetPayload

type PutPlayerPublicRecordConcurrentHandlerV1InternalServerError

type PutPlayerPublicRecordConcurrentHandlerV1InternalServerError struct {
	Payload *cloudsaveclientmodels.ResponseError
}

PutPlayerPublicRecordConcurrentHandlerV1InternalServerError handles this case with default header values.

Internal Server Error

func NewPutPlayerPublicRecordConcurrentHandlerV1InternalServerError

func NewPutPlayerPublicRecordConcurrentHandlerV1InternalServerError() *PutPlayerPublicRecordConcurrentHandlerV1InternalServerError

NewPutPlayerPublicRecordConcurrentHandlerV1InternalServerError creates a PutPlayerPublicRecordConcurrentHandlerV1InternalServerError with default headers values

func (*PutPlayerPublicRecordConcurrentHandlerV1InternalServerError) Error

func (*PutPlayerPublicRecordConcurrentHandlerV1InternalServerError) GetPayload

type PutPlayerPublicRecordConcurrentHandlerV1NoContent

type PutPlayerPublicRecordConcurrentHandlerV1NoContent struct {
}

PutPlayerPublicRecordConcurrentHandlerV1NoContent handles this case with default header values.

Record saved

func NewPutPlayerPublicRecordConcurrentHandlerV1NoContent

func NewPutPlayerPublicRecordConcurrentHandlerV1NoContent() *PutPlayerPublicRecordConcurrentHandlerV1NoContent

NewPutPlayerPublicRecordConcurrentHandlerV1NoContent creates a PutPlayerPublicRecordConcurrentHandlerV1NoContent with default headers values

func (*PutPlayerPublicRecordConcurrentHandlerV1NoContent) Error

type PutPlayerPublicRecordConcurrentHandlerV1Params

type PutPlayerPublicRecordConcurrentHandlerV1Params struct {

	/*Body*/
	Body *cloudsaveclientmodels.ModelsConcurrentRecordRequest
	/*Key
	  key of record

	*/
	Key string
	/*Namespace
	  namespace of the game

	*/
	Namespace string
	/*UserID
	  user ID who own the record

	*/
	UserID string

	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

PutPlayerPublicRecordConcurrentHandlerV1Params contains all the parameters to send to the API endpoint for the put player public record concurrent handler v1 operation typically these are written to a http.Request

func NewPutPlayerPublicRecordConcurrentHandlerV1Params

func NewPutPlayerPublicRecordConcurrentHandlerV1Params() *PutPlayerPublicRecordConcurrentHandlerV1Params

NewPutPlayerPublicRecordConcurrentHandlerV1Params creates a new PutPlayerPublicRecordConcurrentHandlerV1Params object with the default values initialized.

func NewPutPlayerPublicRecordConcurrentHandlerV1ParamsWithContext

func NewPutPlayerPublicRecordConcurrentHandlerV1ParamsWithContext(ctx context.Context) *PutPlayerPublicRecordConcurrentHandlerV1Params

NewPutPlayerPublicRecordConcurrentHandlerV1ParamsWithContext creates a new PutPlayerPublicRecordConcurrentHandlerV1Params object with the default values initialized, and the ability to set a context for a request

func NewPutPlayerPublicRecordConcurrentHandlerV1ParamsWithHTTPClient

func NewPutPlayerPublicRecordConcurrentHandlerV1ParamsWithHTTPClient(client *http.Client) *PutPlayerPublicRecordConcurrentHandlerV1Params

NewPutPlayerPublicRecordConcurrentHandlerV1ParamsWithHTTPClient creates a new PutPlayerPublicRecordConcurrentHandlerV1Params object with the default values initialized, and the ability to set a custom HTTPClient for a request

func NewPutPlayerPublicRecordConcurrentHandlerV1ParamsWithTimeout

func NewPutPlayerPublicRecordConcurrentHandlerV1ParamsWithTimeout(timeout time.Duration) *PutPlayerPublicRecordConcurrentHandlerV1Params

NewPutPlayerPublicRecordConcurrentHandlerV1ParamsWithTimeout creates a new PutPlayerPublicRecordConcurrentHandlerV1Params object with the default values initialized, and the ability to set a timeout on a request

func (*PutPlayerPublicRecordConcurrentHandlerV1Params) SetBody

SetBody adds the body to the put player public record concurrent handler v1 params

func (*PutPlayerPublicRecordConcurrentHandlerV1Params) SetContext

SetContext adds the context to the put player public record concurrent handler v1 params

func (*PutPlayerPublicRecordConcurrentHandlerV1Params) SetHTTPClient

SetHTTPClient adds the HTTPClient to the put player public record concurrent handler v1 params

func (*PutPlayerPublicRecordConcurrentHandlerV1Params) SetKey

SetKey adds the key to the put player public record concurrent handler v1 params

func (*PutPlayerPublicRecordConcurrentHandlerV1Params) SetNamespace

func (o *PutPlayerPublicRecordConcurrentHandlerV1Params) SetNamespace(namespace string)

SetNamespace adds the namespace to the put player public record concurrent handler v1 params

func (*PutPlayerPublicRecordConcurrentHandlerV1Params) SetTimeout

SetTimeout adds the timeout to the put player public record concurrent handler v1 params

func (*PutPlayerPublicRecordConcurrentHandlerV1Params) SetUserID

SetUserID adds the userId to the put player public record concurrent handler v1 params

func (*PutPlayerPublicRecordConcurrentHandlerV1Params) WithBody

WithBody adds the body to the put player public record concurrent handler v1 params

func (*PutPlayerPublicRecordConcurrentHandlerV1Params) WithContext

WithContext adds the context to the put player public record concurrent handler v1 params

func (*PutPlayerPublicRecordConcurrentHandlerV1Params) WithHTTPClient

WithHTTPClient adds the HTTPClient to the put player public record concurrent handler v1 params

func (*PutPlayerPublicRecordConcurrentHandlerV1Params) WithKey

WithKey adds the key to the put player public record concurrent handler v1 params

func (*PutPlayerPublicRecordConcurrentHandlerV1Params) WithNamespace

WithNamespace adds the namespace to the put player public record concurrent handler v1 params

func (*PutPlayerPublicRecordConcurrentHandlerV1Params) WithTimeout

WithTimeout adds the timeout to the put player public record concurrent handler v1 params

func (*PutPlayerPublicRecordConcurrentHandlerV1Params) WithUserID

WithUserID adds the userID to the put player public record concurrent handler v1 params

func (*PutPlayerPublicRecordConcurrentHandlerV1Params) WriteToRequest

WriteToRequest writes these params to a swagger request

type PutPlayerPublicRecordConcurrentHandlerV1PreconditionFailed

type PutPlayerPublicRecordConcurrentHandlerV1PreconditionFailed struct {
	Payload *cloudsaveclientmodels.ResponseError
}

PutPlayerPublicRecordConcurrentHandlerV1PreconditionFailed handles this case with default header values.

Precondition Failed

func NewPutPlayerPublicRecordConcurrentHandlerV1PreconditionFailed

func NewPutPlayerPublicRecordConcurrentHandlerV1PreconditionFailed() *PutPlayerPublicRecordConcurrentHandlerV1PreconditionFailed

NewPutPlayerPublicRecordConcurrentHandlerV1PreconditionFailed creates a PutPlayerPublicRecordConcurrentHandlerV1PreconditionFailed with default headers values

func (*PutPlayerPublicRecordConcurrentHandlerV1PreconditionFailed) Error

func (*PutPlayerPublicRecordConcurrentHandlerV1PreconditionFailed) GetPayload

type PutPlayerPublicRecordConcurrentHandlerV1Reader

type PutPlayerPublicRecordConcurrentHandlerV1Reader struct {
	// contains filtered or unexported fields
}

PutPlayerPublicRecordConcurrentHandlerV1Reader is a Reader for the PutPlayerPublicRecordConcurrentHandlerV1 structure.

func (*PutPlayerPublicRecordConcurrentHandlerV1Reader) ReadResponse

func (o *PutPlayerPublicRecordConcurrentHandlerV1Reader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

Jump to

Keyboard shortcuts

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