Documentation
¶
Overview ¶
*
- Copyright 2016 Game Server Services, Inc. or its affiliates. All Rights
- Reserved. *
- Licensed under the Apache License, Version 2.0 (the "License").
- You may not use this file except in compliance with the License.
- A copy of the License is located at *
- http://www.apache.org/licenses/LICENSE-2.0 *
- or in the "license" file accompanying this file. This file is distributed
- on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- express or implied. See the License for the specific language governing
- permissions and limitations under the License.
*
- Copyright 2016 Game Server Services, Inc. or its affiliates. All Rights
- Reserved. *
- Licensed under the Apache License, Version 2.0 (the "License").
- You may not use this file except in compliance with the License.
- A copy of the License is located at *
- http://www.apache.org/licenses/LICENSE-2.0 *
- or in the "license" file accompanying this file. This file is distributed
- on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- express or implied. See the License for the specific language governing
- permissions and limitations under the License.
*
- Copyright 2016 Game Server Services, Inc. or its affiliates. All Rights
- Reserved. *
- Licensed under the Apache License, Version 2.0 (the "License").
- You may not use this file except in compliance with the License.
- A copy of the License is located at *
- http://www.apache.org/licenses/LICENSE-2.0 *
- or in the "license" file accompanying this file. This file is distributed
- on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- express or implied. See the License for the specific language governing
- permissions and limitations under the License.
Index ¶
- Constants
- Variables
- func Cast2Strings(value []interface{}) [][]*string
- func Cast2StringsFromDict(value [][]*string) []interface{}
- func CastArray(value interface{}) []interface{}
- func CastBool(value interface{}) *bool
- func CastBools(value []interface{}) []*bool
- func CastBoolsFromDict(value []*bool) []interface{}
- func CastFloat32(value interface{}) *float32
- func CastFloat32s(value []interface{}) []*float32
- func CastFloat32sFromDict(value []*float32) []interface{}
- func CastFloat64(value interface{}) *float64
- func CastFloat64s(value []interface{}) []*float64
- func CastFloat64sFromDict(value []*float64) []interface{}
- func CastInt32(value interface{}) *int32
- func CastInt32s(value []interface{}) []*int32
- func CastInt32sFromDict(value []*int32) []interface{}
- func CastInt64(value interface{}) *int64
- func CastInt64s(value []interface{}) []*int64
- func CastInt64sFromDict(value []*int64) []interface{}
- func CastMap(value interface{}) map[string]interface{}
- func CastString(value interface{}) *string
- func CastStrings(value []interface{}) []*string
- func CastStringsFromDict(value []*string) []interface{}
- func CastUserId(value interface{}) *string
- func CastUserIds(value []interface{}) []*string
- func CastUserIdsFromDict(value []*string) []interface{}
- func MarshalJson(v interface{}) ([]byte, error)
- func ToString(data interface{}) string
- type AccessToken
- type AccessTokenType
- type AsyncResult
- type BadGatewayException
- type BadRequestException
- type BasicGs2Credential
- type Bodies
- type ClientError
- type ClientId
- type ClientSecret
- type ConflictException
- type ConnectAsyncResult
- type Connection
- type ConnectionBroken
- type ContextStack
- type ErrorResult
- type ExpiresIn
- type Gs2Exception
- type Gs2Model
- type Gs2RestSession
- func (p *Gs2RestSession) Connect() error
- func (p *Gs2RestSession) ConnectAsync(callback chan<- ConnectAsyncResult)
- func (p Gs2RestSession) CreateAuthorizationHeader() map[string]string
- func (p *Gs2RestSession) Disconnect()
- func (p Gs2RestSession) EndpointHost(service string) Url
- func (p *Gs2RestSession) Send(job *NetworkJob, isBlocking bool) error
- type Gs2Result
- type Gs2WebSocketSession
- func (p *Gs2WebSocketSession) AddNotificationHandler(handler func(message Notification))
- func (p *Gs2WebSocketSession) Connect() error
- func (p *Gs2WebSocketSession) ConnectAsync(callback chan<- ConnectAsyncResult)
- func (p Gs2WebSocketSession) CreateAuthorizationHeader() map[string]string
- func (p *Gs2WebSocketSession) Disconnect()
- func (p Gs2WebSocketSession) EndpointHost(service string) Url
- func (p *Gs2WebSocketSession) Send(job *WebSocketNetworkJob, isBlocking bool) error
- type HttpHeaders
- type HttpMethod
- type IGs2Credential
- type ISession
- type InternalServerErrorException
- type LoginResult
- type NetworkJob
- type NoInternetConnectionException
- type NotFoundException
- type Notification
- type OwnerId
- type ProjectToken
- type ProjectTokenGs2Credential
- type QueryStrings
- type QuotaExceedException
- type Region
- type RequestError
- type RequestId
- type RequestTimeoutException
- type ServiceUnavailableException
- type UnauthorizedException
- type UnknownException
- type Url
- type WebSocketBodies
- type WebSocketMessageContainer
- type WebSocketMessageContainerBody
- type WebSocketMessageContainerMessage
- type WebSocketMessageContainerStatus
- type WebSocketMessageContainerType
- type WebSocketNetworkJob
- type WebSocketRequestId
- type WebsocketConnection
Constants ¶
View Source
const ( Get = HttpMethod("GET") Post = HttpMethod("POST") Put = HttpMethod("PUT") Delete = HttpMethod("DELETE") )
Variables ¶
View Source
var ( EndpointHost = "https://{service}.{region}.gen2.gs2io.com" WsEndpointHost = "wss://gateway-ws.{region}.gen2.gs2io.com" )
Functions ¶
func Cast2Strings ¶
func Cast2Strings(value []interface{}) [][]*string
func Cast2StringsFromDict ¶
func Cast2StringsFromDict(value [][]*string) []interface{}
func CastBoolsFromDict ¶
func CastBoolsFromDict(value []*bool) []interface{}
func CastFloat32 ¶
func CastFloat32(value interface{}) *float32
func CastFloat32s ¶
func CastFloat32s(value []interface{}) []*float32
func CastFloat32sFromDict ¶
func CastFloat32sFromDict(value []*float32) []interface{}
func CastFloat64 ¶
func CastFloat64(value interface{}) *float64
func CastFloat64s ¶
func CastFloat64s(value []interface{}) []*float64
func CastFloat64sFromDict ¶
func CastFloat64sFromDict(value []*float64) []interface{}
func CastInt32s ¶
func CastInt32s(value []interface{}) []*int32
func CastInt32sFromDict ¶
func CastInt32sFromDict(value []*int32) []interface{}
func CastInt64s ¶
func CastInt64s(value []interface{}) []*int64
func CastInt64sFromDict ¶
func CastInt64sFromDict(value []*int64) []interface{}
func CastString ¶
func CastString(value interface{}) *string
func CastStrings ¶
func CastStrings(value []interface{}) []*string
func CastStringsFromDict ¶
func CastStringsFromDict(value []*string) []interface{}
func CastUserId ¶
func CastUserId(value interface{}) *string
func CastUserIds ¶
func CastUserIds(value []interface{}) []*string
func CastUserIdsFromDict ¶
func CastUserIdsFromDict(value []*string) []interface{}
func MarshalJson ¶
Types ¶
type AccessToken ¶
type AccessToken = string
type AccessTokenType ¶
type AccessTokenType string
type AsyncResult ¶
type BadGatewayException ¶
type BadGatewayException struct {
Errors []RequestError
// contains filtered or unexported fields
}
func (BadGatewayException) ClientError ¶
func (p BadGatewayException) ClientError() *ClientError
func (BadGatewayException) Error ¶
func (p BadGatewayException) Error() string
func (BadGatewayException) RequestErrors ¶
func (p BadGatewayException) RequestErrors() []RequestError
func (BadGatewayException) SetClientError ¶
func (p BadGatewayException) SetClientError(err ClientError) Gs2Exception
type BadRequestException ¶
type BadRequestException struct {
Errors []RequestError `json:"errors"`
// contains filtered or unexported fields
}
func (BadRequestException) ClientError ¶
func (p BadRequestException) ClientError() *ClientError
func (BadRequestException) Error ¶
func (p BadRequestException) Error() string
func (BadRequestException) RequestErrors ¶
func (p BadRequestException) RequestErrors() []RequestError
func (BadRequestException) SetClientError ¶
func (p BadRequestException) SetClientError(err ClientError) Gs2Exception
type BasicGs2Credential ¶
type BasicGs2Credential struct {
ClientId ClientId
ClientSecret ClientSecret
}
func (BasicGs2Credential) GetClientId ¶
func (p BasicGs2Credential) GetClientId() *ClientId
func (BasicGs2Credential) GetClientSecret ¶
func (p BasicGs2Credential) GetClientSecret() *ClientSecret
type ClientError ¶
type ClientSecret ¶
type ClientSecret string
type ConflictException ¶
type ConflictException struct {
Errors []RequestError
// contains filtered or unexported fields
}
func (ConflictException) ClientError ¶
func (p ConflictException) ClientError() *ClientError
func (ConflictException) Error ¶
func (p ConflictException) Error() string
func (ConflictException) RequestErrors ¶
func (p ConflictException) RequestErrors() []RequestError
func (ConflictException) SetClientError ¶
func (p ConflictException) SetClientError(err ClientError) Gs2Exception
type ConnectAsyncResult ¶
type ConnectAsyncResult struct {
// contains filtered or unexported fields
}
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
type ConnectionBroken ¶
type ConnectionBroken struct {
}
func (ConnectionBroken) Error ¶
func (p ConnectionBroken) Error() string
type ContextStack ¶
type ContextStack = string
type ErrorResult ¶
type ErrorResult struct {
Message string `json:"message"`
}
type Gs2Exception ¶
type Gs2Exception interface {
RequestErrors() []RequestError
SetClientError(err ClientError) Gs2Exception
ClientError() *ClientError
Error() string
}
type Gs2RestSession ¶
type Gs2RestSession struct {
Credential IGs2Credential
Region Region
// contains filtered or unexported fields
}
func (*Gs2RestSession) Connect ¶
func (p *Gs2RestSession) Connect() error
func (*Gs2RestSession) ConnectAsync ¶
func (p *Gs2RestSession) ConnectAsync( callback chan<- ConnectAsyncResult, )
func (Gs2RestSession) CreateAuthorizationHeader ¶
func (p Gs2RestSession) CreateAuthorizationHeader() map[string]string
func (*Gs2RestSession) Disconnect ¶
func (p *Gs2RestSession) Disconnect()
func (Gs2RestSession) EndpointHost ¶
func (p Gs2RestSession) EndpointHost(service string) Url
func (*Gs2RestSession) Send ¶
func (p *Gs2RestSession) Send( job *NetworkJob, isBlocking bool, ) error
type Gs2WebSocketSession ¶
type Gs2WebSocketSession struct {
Credential IGs2Credential
Region Region
Jobs []*WebSocketNetworkJob
// contains filtered or unexported fields
}
func (*Gs2WebSocketSession) AddNotificationHandler ¶
func (p *Gs2WebSocketSession) AddNotificationHandler(handler func(message Notification))
func (*Gs2WebSocketSession) Connect ¶
func (p *Gs2WebSocketSession) Connect() error
func (*Gs2WebSocketSession) ConnectAsync ¶
func (p *Gs2WebSocketSession) ConnectAsync( callback chan<- ConnectAsyncResult, )
func (Gs2WebSocketSession) CreateAuthorizationHeader ¶
func (p Gs2WebSocketSession) CreateAuthorizationHeader() map[string]string
func (*Gs2WebSocketSession) Disconnect ¶
func (p *Gs2WebSocketSession) Disconnect()
func (Gs2WebSocketSession) EndpointHost ¶
func (p Gs2WebSocketSession) EndpointHost(service string) Url
func (*Gs2WebSocketSession) Send ¶
func (p *Gs2WebSocketSession) Send( job *WebSocketNetworkJob, isBlocking bool, ) error
type HttpHeaders ¶
type HttpMethod ¶
type HttpMethod string
type IGs2Credential ¶
type IGs2Credential interface {
GetClientId() *ClientId
GetClientSecret() *ClientSecret
}
type InternalServerErrorException ¶
type InternalServerErrorException struct {
Errors []RequestError
// contains filtered or unexported fields
}
func (InternalServerErrorException) ClientError ¶
func (p InternalServerErrorException) ClientError() *ClientError
func (InternalServerErrorException) Error ¶
func (p InternalServerErrorException) Error() string
func (InternalServerErrorException) RequestErrors ¶
func (p InternalServerErrorException) RequestErrors() []RequestError
func (InternalServerErrorException) SetClientError ¶
func (p InternalServerErrorException) SetClientError(err ClientError) Gs2Exception
type LoginResult ¶
type LoginResult struct {
Gs2Result
AccessToken ProjectToken `json:"access_token"`
TokenType AccessTokenType `json:"token_type"`
ExpiresIn ExpiresIn `json:"expires_in"`
}
func (LoginResult) ToDict ¶
func (p LoginResult) ToDict() map[string]interface{}
type NetworkJob ¶
type NetworkJob struct {
Url Url
Method HttpMethod
Headers HttpHeaders
QueryStrings QueryStrings
Bodies Bodies
Callback chan<- AsyncResult
}
type NoInternetConnectionException ¶
type NoInternetConnectionException struct {
Errors []RequestError
// contains filtered or unexported fields
}
func (NoInternetConnectionException) ClientError ¶
func (p NoInternetConnectionException) ClientError() *ClientError
func (NoInternetConnectionException) Error ¶
func (p NoInternetConnectionException) Error() string
func (NoInternetConnectionException) RequestErrors ¶
func (p NoInternetConnectionException) RequestErrors() []RequestError
func (NoInternetConnectionException) SetClientError ¶
func (p NoInternetConnectionException) SetClientError(err ClientError) Gs2Exception
type NotFoundException ¶
type NotFoundException struct {
Errors []RequestError
// contains filtered or unexported fields
}
func (NotFoundException) ClientError ¶
func (p NotFoundException) ClientError() *ClientError
func (NotFoundException) Error ¶
func (p NotFoundException) Error() string
func (NotFoundException) RequestErrors ¶
func (p NotFoundException) RequestErrors() []RequestError
func (NotFoundException) SetClientError ¶
func (p NotFoundException) SetClientError(err ClientError) Gs2Exception
type Notification ¶
type ProjectToken ¶
type ProjectToken string
type ProjectTokenGs2Credential ¶
type ProjectTokenGs2Credential struct {
IGs2Credential
OwnerId OwnerId
ProjectToken ProjectToken
}
func (ProjectTokenGs2Credential) GetClientId ¶
func (p ProjectTokenGs2Credential) GetClientId() *ClientId
func (ProjectTokenGs2Credential) GetClientSecret ¶
func (p ProjectTokenGs2Credential) GetClientSecret() *ClientSecret
type QueryStrings ¶
type QuotaExceedException ¶
type QuotaExceedException struct {
Errors []RequestError
// contains filtered or unexported fields
}
func (QuotaExceedException) ClientError ¶
func (p QuotaExceedException) ClientError() *ClientError
func (QuotaExceedException) Error ¶
func (p QuotaExceedException) Error() string
func (QuotaExceedException) RequestErrors ¶
func (p QuotaExceedException) RequestErrors() []RequestError
func (QuotaExceedException) SetClientError ¶
func (p QuotaExceedException) SetClientError(err ClientError) Gs2Exception
type RequestError ¶
type RequestTimeoutException ¶
type RequestTimeoutException struct {
Errors []RequestError
// contains filtered or unexported fields
}
func (RequestTimeoutException) ClientError ¶
func (p RequestTimeoutException) ClientError() *ClientError
func (RequestTimeoutException) Error ¶
func (p RequestTimeoutException) Error() string
func (RequestTimeoutException) RequestErrors ¶
func (p RequestTimeoutException) RequestErrors() []RequestError
func (RequestTimeoutException) SetClientError ¶
func (p RequestTimeoutException) SetClientError(err ClientError) Gs2Exception
type ServiceUnavailableException ¶
type ServiceUnavailableException struct {
// contains filtered or unexported fields
}
func (ServiceUnavailableException) ClientError ¶
func (p ServiceUnavailableException) ClientError() *ClientError
func (ServiceUnavailableException) Error ¶
func (p ServiceUnavailableException) Error() string
func (ServiceUnavailableException) RequestErrors ¶
func (p ServiceUnavailableException) RequestErrors() []RequestError
func (ServiceUnavailableException) SetClientError ¶
func (p ServiceUnavailableException) SetClientError(err ClientError) Gs2Exception
type UnauthorizedException ¶
type UnauthorizedException struct {
// contains filtered or unexported fields
}
func (UnauthorizedException) ClientError ¶
func (p UnauthorizedException) ClientError() *ClientError
func (UnauthorizedException) Error ¶
func (p UnauthorizedException) Error() string
func (UnauthorizedException) RequestErrors ¶
func (p UnauthorizedException) RequestErrors() []RequestError
func (UnauthorizedException) SetClientError ¶
func (p UnauthorizedException) SetClientError(err ClientError) Gs2Exception
type UnknownException ¶
type UnknownException struct {
Errors []RequestError
// contains filtered or unexported fields
}
func (UnknownException) ClientError ¶
func (p UnknownException) ClientError() *ClientError
func (UnknownException) Error ¶
func (p UnknownException) Error() string
func (UnknownException) RequestErrors ¶
func (p UnknownException) RequestErrors() []RequestError
func (UnknownException) SetClientError ¶
func (p UnknownException) SetClientError(err ClientError) Gs2Exception
type WebSocketBodies ¶
type WebSocketBodies map[string]interface{}
type WebSocketMessageContainer ¶
type WebSocketMessageContainer struct {
RequestId WebSocketRequestId `json:"requestId"`
Message WebSocketMessageContainerMessage `json:"message"`
Body map[string]interface{} `json:"body"`
Type WebSocketMessageContainerType `json:"type"`
Status WebSocketMessageContainerStatus `json:"status"`
}
type WebSocketMessageContainerBody ¶
type WebSocketMessageContainerBody string
type WebSocketMessageContainerMessage ¶
type WebSocketMessageContainerMessage string
type WebSocketMessageContainerStatus ¶
type WebSocketMessageContainerStatus int
type WebSocketMessageContainerType ¶
type WebSocketMessageContainerType string
type WebSocketNetworkJob ¶
type WebSocketNetworkJob struct {
RequestId WebSocketRequestId
Bodies WebSocketBodies
Callback chan<- AsyncResult
}
type WebSocketRequestId ¶
type WebSocketRequestId string
type WebsocketConnection ¶
type WebsocketConnection struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.