Documentation
¶
Index ¶
- type RateLimiter
- type RustMapsClient
- func (c *RustMapsClient) GenerateCustom(log *zap.Logger, m *types.Map) (*RustMapsGenerateResponse, error)
- func (c *RustMapsClient) GenerateProcedural(log *zap.Logger, m *types.Map) (*RustMapsGenerateResponse, error)
- func (c *RustMapsClient) GetLimits(log *zap.Logger) (*RustMapsLimitsResponse, error)
- func (c *RustMapsClient) GetStatus(log *zap.Logger, m *types.Map) (*RustMapsStatusResponse, error)
- func (r *RustMapsClient) SetApiKey(apiKey string)
- type RustMapsClientBase
- type RustMapsGenerateCustomRequest
- type RustMapsGenerateProceduralRequest
- type RustMapsGenerateResponse
- type RustMapsGenerateResponseData
- type RustMapsGenerateResponseMeta
- type RustMapsLimitsResponse
- type RustMapsLimitsResponseData
- type RustMapsLimitsResponseDataConcurrent
- type RustMapsLimitsResponseDataMonthly
- type RustMapsLimitsResponseMeta
- type RustMapsStatusResponse
- type RustMapsStatusResponseData
- type RustMapsStatusResponseDataBiomePercentages
- type RustMapsStatusResponseDataCoordinates
- type RustMapsStatusResponseDataMonuments
- type RustMapsStatusResponseMeta
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RateLimiter ¶
type RateLimiter struct {
// contains filtered or unexported fields
}
RateLimiter manages API request timing
func NewRateLimiter ¶
func NewRateLimiter(callsPerMinute int) *RateLimiter
NewRateLimiter creates a new rate limiter
func (*RateLimiter) Wait ¶
func (r *RateLimiter) Wait()
Wait ensures enough time has passed since the last call
type RustMapsClient ¶
type RustMapsClient struct {
RustMapsClientBase
ApiUrl string
// contains filtered or unexported fields
}
func (*RustMapsClient) GenerateCustom ¶
func (c *RustMapsClient) GenerateCustom(log *zap.Logger, m *types.Map) (*RustMapsGenerateResponse, error)
func (*RustMapsClient) GenerateProcedural ¶
func (c *RustMapsClient) GenerateProcedural(log *zap.Logger, m *types.Map) (*RustMapsGenerateResponse, error)
func (*RustMapsClient) GetLimits ¶
func (c *RustMapsClient) GetLimits(log *zap.Logger) (*RustMapsLimitsResponse, error)
func (*RustMapsClient) GetStatus ¶
func (c *RustMapsClient) GetStatus(log *zap.Logger, m *types.Map) (*RustMapsStatusResponse, error)
func (*RustMapsClient) SetApiKey ¶
func (r *RustMapsClient) SetApiKey(apiKey string)
type RustMapsClientBase ¶
type RustMapsClientBase interface {
GetStatus(log *zap.Logger, m *types.Map) (*RustMapsStatusResponse, error)
SetApiKey(apiKey string)
GetLimits(log *zap.Logger) (*RustMapsLimitsResponse, error)
GenerateCustom(log *zap.Logger, m *types.Map) (*RustMapsGenerateResponse, error)
GenerateProcedural(log *zap.Logger, m *types.Map) (*RustMapsGenerateResponse, error)
}
func NewRustMapsClient ¶
func NewRustMapsClient(apiKey string) RustMapsClientBase
type RustMapsGenerateCustomRequest ¶
type RustMapsGenerateCustomRequest struct {
MapParameters RustMapsGenerateProceduralRequest `json:"mapParameters"`
ConfigName string `json:"configName"`
}
type RustMapsGenerateResponse ¶
type RustMapsGenerateResponse struct {
Meta RustMapsGenerateResponseMeta `json:"meta"`
Data RustMapsGenerateResponseData `json:"data"`
}
type RustMapsLimitsResponse ¶
type RustMapsLimitsResponse struct {
Meta RustMapsLimitsResponseMeta `json:"meta"`
Data RustMapsLimitsResponseData `json:"data"`
}
type RustMapsLimitsResponseData ¶
type RustMapsLimitsResponseData struct {
Concurrent RustMapsLimitsResponseDataConcurrent `json:"concurrent"`
Monthly RustMapsLimitsResponseDataMonthly `json:"monthly"`
}
type RustMapsStatusResponse ¶
type RustMapsStatusResponse struct {
Meta RustMapsStatusResponseMeta `json:"meta"`
Data RustMapsStatusResponseData `json:"data"`
}
type RustMapsStatusResponseData ¶
type RustMapsStatusResponseData struct {
ID string `json:"id"`
Type string `json:"type"`
Seed int `json:"seed"`
Size int `json:"size"`
SaveVersion int `json:"saveVersion"`
URL string `json:"url"`
RawImageURL string `json:"rawImageUrl"`
ImageURL string `json:"imageUrl"`
ImageIconURL string `json:"imageIconUrl"`
ThumbnailURL string `json:"thumbnailUrl"`
IsStaging bool `json:"isStaging"`
IsCustomMap bool `json:"isCustomMap"`
CanDownload bool `json:"canDownload"`
DownloadURL string `json:"downloadUrl"`
TotalMonuments int `json:"totalMonuments"`
Monuments []RustMapsStatusResponseDataMonuments `json:"monuments"`
LandPercentageOfMap int `json:"landPercentageOfMap"`
BiomePercentages RustMapsStatusResponseDataBiomePercentages `json:"biomePercentages"`
Islands int `json:"islands"`
Mountains int `json:"mountains"`
IceLakes int `json:"iceLakes"`
Rivers int `json:"rivers"`
Lakes int `json:"lakes"`
Canyons int `json:"canyons"`
Oases int `json:"oases"`
BuildableRocks int `json:"buildableRocks"`
}
type RustMapsStatusResponseDataMonuments ¶
type RustMapsStatusResponseDataMonuments struct {
Type string `json:"type"`
Coordinates RustMapsStatusResponseDataCoordinates `json:"coordinates"`
NameOverride string `json:"nameOverride"`
}
Click to show internal directories.
Click to hide internal directories.