Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ service:
name: GetServersRequest
query-parameters:
tags: optional<string>
game_id: optional<uuid>
game: optional<uuid>
response: ListServersResponse

create:
Expand Down Expand Up @@ -70,7 +70,7 @@ types:
docs: The name ID of the datacenter
type: string
tags: unknown
image_id: uuid
image: uuid
arguments: optional<list<string>>
environment: optional<map<string, string>>
network: CreateServerNetworkRequest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/fern-api/fern/main/fern.schema.json

imports:
commons: ../../common.yml
uploadCommons: ../../upload/common.yml
cloudCommons: ../../cloud/common.yml
commons: ../common.yml
localCommons: common.yml
uploadCommons: ../upload/common.yml

service:
auth: true
Expand Down Expand Up @@ -45,11 +45,11 @@ types:
properties:
builds:
docs: A list of builds for the game associated with the token.
type: list<cloudCommons.BuildSummary>
type: list<localCommons.Build>

CreateBuildRequest:
properties:
display_name: commons.DisplayName
name: string
tags: unknown
image_tag:
docs: A tag given to the game build.
Expand All @@ -62,9 +62,9 @@ types:

CreateBuildResponse:
properties:
build_id:
build:
type: uuid
upload_id:
upload:
type: uuid
image_presigned_request: optional<uploadCommons.PresignedRequest>
image_presigned_requests: optional<list<uploadCommons.PresignedRequest>>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/fern-api/fern/main/fern.schema.json

imports:
commons: ../common.yml

types:
Server:
properties:
server_id: uuid
game_id: uuid
datacenter_id: uuid
cluster_id: uuid
id: uuid
game: uuid
datacenter: string
cluster: uuid
tags: unknown
image_id: uuid
image: uuid
arguments: optional<list<string>>
environment: optional<map<string, string>>
network: Network
Expand All @@ -19,9 +22,9 @@ types:
This should be set to a safe default, and can be overridden during a
DELETE request if needed.
type: optional<long>
create_ts: long
start_ts: optional<long>
destroy_ts: optional<long>
created_at: long
started_at: optional<long>
destroyed_at: optional<long>

Resources:
properties:
Expand Down Expand Up @@ -72,3 +75,18 @@ types:
HostRouting:
properties: {}

Build:
properties:
id: uuid
upload: uuid
name: string
created_at: commons.Timestamp
content_length:
docs: Unsigned 64 bit integer.
type: long
completed_at:
docs: Whether or not this build has completely been uploaded.
type: optional<commons.Timestamp>
tags:
docs: Tags of this build
type: map<string, string>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/fern-api/fern/main/fern.schema.json

imports:
commons: ../../common.yml
commons: ../common.yml

service:
auth: true
Expand All @@ -21,7 +21,7 @@ service:
name: GetServerLogsRequest
query-parameters:
stream: LogStream
game_id: optional<uuid>
game: optional<uuid>
watch_index:
docs: A query parameter denoting the requests watch index.
type: optional<string>
Expand Down
30 changes: 22 additions & 8 deletions lib/convert/src/impls/ds.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,37 @@ use rivet_operation::prelude::*;
use crate::{ApiFrom, ApiInto, ApiTryFrom, ApiTryInto};
use serde_json::{json, to_value};

impl ApiTryFrom<backend::build::Build> for models::GamesServersBuild {
type Error = GlobalError;
fn api_try_from(value: backend::build::Build) -> GlobalResult<models::GamesServersBuild> {
Ok(models::GamesServersBuild {
id: unwrap!(value.build_id).as_uuid(),
upload: unwrap!(value.upload_id).as_uuid(),
created_at: timestamp::to_string(value.create_ts)?,
content_length: value.content_length,
completed_at: value.completed_at.map(timestamp::to_string).transpose()?,
tags: value.tags,
})
}
}

impl ApiTryFrom<backend::ds::Server> for models::GamesServersServer {
type Error = GlobalError;
fn api_try_from(value: backend::ds::Server) -> GlobalResult<models::GamesServersServer> {
Ok(models::GamesServersServer {
cluster_id: unwrap!(value.cluster_id).as_uuid(),
create_ts: value.create_ts,
start_ts: value.start_ts,
datacenter_id: unwrap!(value.datacenter_id).as_uuid(),
destroy_ts: value.destroy_ts,
game_id: unwrap!(value.game_id).as_uuid(),
id: unwrap!(value.server_id).as_uuid(),
cluster: unwrap!(value.cluster_id).as_uuid(),
created_at: value.create_ts,
started_at: value.start_ts,
datacenter: unwrap!(value.datacenter_id).as_uuid(),
destroyed_at: value.destroy_ts,
game: unwrap!(value.game_id).as_uuid(),
kill_timeout: Some(value.kill_timeout_ms),
tags: Some(to_value(value.tags).unwrap()),
resources: Box::new(unwrap!(value.resources).api_into()),
server_id: unwrap!(value.server_id).as_uuid(),
arguments: Some(value.args),
environment: Some(value.environment),
image_id: unwrap!(value.image_id).as_uuid(),
image: unwrap!(value.image_id).as_uuid(),
network: Box::new(models::GamesServersNetwork {
mode: Some(
unwrap!(backend::ds::NetworkMode::from_i32(value.network_mode)).api_into(),
Expand Down
6 changes: 3 additions & 3 deletions sdks/full/go/client/client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 0 additions & 30 deletions sdks/full/go/games/client/client.go

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading