Documentation ¶
Index ¶
- type AllocateResponse
- type AllocationResponse
- type Config
- type MockMultiplayClient
- func (m MockMultiplayClient) Allocate(fleet, region string, profile int64, uuid string) (*AllocateResponse, error)
- func (m MockMultiplayClient) Allocations(fleet, region string, profile int64, uuid string) ([]AllocationResponse, error)
- func (m MockMultiplayClient) Deallocate(fleet, uuid string) error
- type MultiplayClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AllocateResponse ¶
type AllocateResponse struct { ProfileID int64 UUID string RegionID string Created string Error string }
AllocateResponse contains the response from the api
type AllocationResponse ¶
type Config ¶
type Config struct { AccessKey string `env:"MP_ACCESS_KEY"` SecretKey string `env:"MP_SECRET_KEY"` }
Config holds configuration used to access the multiplay api
type MockMultiplayClient ¶
type MockMultiplayClient struct { }
func (MockMultiplayClient) Allocate ¶
func (m MockMultiplayClient) Allocate(fleet, region string, profile int64, uuid string) (*AllocateResponse, error)
func (MockMultiplayClient) Allocations ¶
func (m MockMultiplayClient) Allocations(fleet, region string, profile int64, uuid string) ([]AllocationResponse, error)
func (MockMultiplayClient) Deallocate ¶
func (m MockMultiplayClient) Deallocate(fleet, uuid string) error
type MultiplayClient ¶
type MultiplayClient interface { Allocate(fleet, region string, profile int64, uuid string) (*AllocateResponse, error) Allocations(fleet, region string, profile int64, uuid string) ([]AllocationResponse, error) Deallocate(fleet, uuid string) error }
MultiplayClient represents something capable of interfacing with the multiplay API
func NewClientFromEnv ¶
func NewClientFromEnv() (MultiplayClient, error)
NewClientFromEnv creates a multiplay client from the environment
Click to show internal directories.
Click to hide internal directories.