rest

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Item

type Item struct {
	// ID is the item identifier.
	// in: body
	ID string `json:"id"`

	// Name is the item name.
	// in: body
	Name string `json:"name"`

	// Description is the item description.
	// in: body
	Description string `json:"description"`

	// OwnerID is the PlayerID of the item owner.
	// in:body
	OwnerID string `json:"ownerID"`

	// LocationID is the LocationID of the item's location.
	// in: body
	LocationID ItemLocationID `json:"locationID"`

	// Created is the time of the item's creation.
	// in: body
	Created arcade.Timestamp `json:"created"`

	// Updated is the time the item was last updated.
	// in: body
	Updated arcade.Timestamp `json:"updated"`
}

Item holds an item's information, and is sent in a response.

swagger:parameter

type ItemCreateRequest

type ItemCreateRequest struct {
	ItemRequest
}

ItemCreateRequest is used to request an item be created.

swagger:parameters ItemCreate

type ItemLocationID

type ItemLocationID struct {
	// ID is the location identifier. This can correspond the the ID of a room, player or item.
	// in: body
	ID string `json:"id"`

	// Type is the type of location. This can be "room", "player" or "item".
	Type string `json:"type"`
}

ItemLocationID holds the locationID of the item, and the type of location.

type ItemRequest

type ItemRequest struct {
	// Name is the name of the item.
	// in: body
	// minimum length: 1
	// maximum length: 256
	Name string `json:"name"`

	// Description is the description of the item.
	// in: body
	// minimum length: 1
	// maximum length: 4096
	Description string `json:"description"`

	// OwnerID is the ID of the owner of the item.
	// in: body
	// minimum length: 1
	// maximum length: 4096
	OwnerID string `json:"ownerID"`

	// LocationID is the ID of the location of the item.
	// in: body
	LocationID ItemLocationID `json:"locationID"`
}

ItemRequest is used to request an item be created or updated.

type ItemResponse

type ItemResponse struct {
	// Item returns the information about an item.
	// in: body
	Item Item `json:"item"`
}

ItemResponse returns an item.

type ItemUpdateRequest

type ItemUpdateRequest struct {
	ItemRequest
}

ItemUpdateRequest is used to request an item be updated.

swagger:parameters ItemUpdate

type ItemsResponse

type ItemsResponse struct {
	// Items returns the information about multiple items.
	// in: body
	Items []Item `json:"items"`
}

ItemsResponse returns multiple items.

type Link struct {
	// ID is the link identifier.
	// in: body
	ID string `json:"id"`

	// Name is the link name.
	// in: body
	Name string `json:"name"`

	// Description is the link description.
	// in: body
	Description string `json:"description"`

	// OwnerID is the PlayerID of the link owner.
	// in:body
	OwnerID string `json:"ownerID"`

	// LocationID is the RoomID of the link's location.
	// in: body
	LocationID string `json:"locationID"`

	// DestinationID is the RoomID of the link's destination.
	// in: body
	DestinationID string `json:"destinationID"`

	// Created is the time of the link's creation.
	// in: body
	Created arcade.Timestamp `json:"created"`

	// Updated is the time the link was last updated.
	// in: body
	Updated arcade.Timestamp `json:"updated"`
}

Link holds a link's information, and is sent in a response.

swagger:parameter

type LinkCreateRequest

type LinkCreateRequest struct {
	LinkRequest
}

LinkCreateRequest is used to request an link be created.

swagger:parameters LinkCreate

type LinkRequest

type LinkRequest struct {
	// Name is the name of the link.
	// in: body
	// minimum length: 1
	// maximum length: 256
	Name string `json:"name"`

	// Description is the description of the link.
	// in: body
	// minimum length: 1
	// maximum length: 4096
	Description string `json:"description"`

	// OwnerID is the ID of the owner of the link.
	// in: body
	// minimum length: 1
	// maximum length: 4096
	OwnerID string `json:"ownerID"`

	// LocationID is the ID of the location of the link.
	// in: body
	LocationID string `json:"locationID"`

	// DestinationID is the ID of the destination of the link.
	// in: body
	DestinationID string `json:"destinationID"`
}

LinkRequest is used to request an link be created or updated.

type LinkResponse

type LinkResponse struct {
	// Link returns the information about a link.
	// in: body
	Link Link `json:"link"`
}

LinkResponse returns a link.

type LinkUpdateRequest

type LinkUpdateRequest struct {
	LinkRequest
}

LinkUpdateRequest is used to request an link be updated.

swagger:parameters LinkUpdate

type LinksResponse

type LinksResponse struct {
	// Links returns the information about multiple links.
	// in: body
	Links []Link `json:"links"`
}

LinksResponse returns multiple links.

type Player

type Player struct {
	// ID is the player identifier.
	// in: body
	ID string `json:"id"`

	// Name is the player name.
	// in: body
	Name string `json:"name"`

	// Description is the player description.
	// in: body
	Description string `json:"description"`

	// HomeID is the RoomID of the player's home.
	// in:body
	HomeID string `json:"homeID"`

	// LocationID is the RoomID of the player's location.
	// in: body
	LocationID string `json:"locationID"`

	// Created is the time of the player's creation.
	// in: body
	Created arcade.Timestamp `json:"created"`

	// Updated is the time the player was last updated.
	// in: body
	Updated arcade.Timestamp `json:"updated"`
}

Player holds a player's information, and is sent in a response.

swagger:parameter

type PlayerCreateRequest

type PlayerCreateRequest struct {
	PlayerRequest
}

PlayerCreateRequest is used to request an player be created.

swagger:parameters PlayerCreate

type PlayerRequest

type PlayerRequest struct {
	// Name is the name of the player.
	// in: body
	// minimum length: 1
	// maximum length: 256
	Name string `json:"name"`

	// Description is the description of the player.
	// in: body
	// minimum length: 1
	// maximum length: 4096
	Description string `json:"description"`

	// HomeID is the ID of the home of the player.
	// in: body
	// minimum length: 1
	// maximum length: 4096
	HomeID string `json:"homeID"`

	// LocationID is the ID of the location of the player.
	// in: body
	LocationID string `json:"locationID"`
}

PlayerRequest is used to request an player be created or updated.

type PlayerResponse

type PlayerResponse struct {
	// Player returns the information about a player.
	// in: body
	Player Player `json:"player"`
}

PlayerResponse returns a player.

type PlayerUpdateRequest

type PlayerUpdateRequest struct {
	PlayerRequest
}

PlayerUpdateRequest is used to request an player be updated.

swagger:parameters PlayerUpdate

type PlayersResponse

type PlayersResponse struct {
	// Players returns the information about multiple players.
	// in: body
	Players []Player `json:"players"`
}

PlayersResponse returns multiple players.

type Room

type Room struct {
	// ID is the room identifier.
	// in: body
	ID string `json:"id"`

	// Name is the room name.
	// in: body
	Name string `json:"name"`

	// Description is the room description.
	// in: body
	Description string `json:"description"`

	// OwnerID is the PlayerID of the room owner.
	// in:body
	OwnerID string `json:"ownerID"`

	// ParentID is the RoomID of the room's parent.
	// in: body
	ParentID string `json:"parentID"`

	// Created is the time of the room's creation.
	// in: body
	Created arcade.Timestamp `json:"created"`

	// Updated is the time the room was last updated.
	// in: body
	Updated arcade.Timestamp `json:"updated"`
}

Room holds a room's information, and is sent in a response.

swagger:parameter

type RoomCreateRequest

type RoomCreateRequest struct {
	RoomRequest
}

RoomCreateRequest is used to request an room be created.

swagger:parameters ItemCreate

type RoomRequest

type RoomRequest struct {
	// Name is the name of the room.
	// in: body
	// minimum length: 1
	// maximum length: 256
	Name string `json:"name"`

	// Description is the description of the room.
	// in: body
	// minimum length: 1
	// maximum length: 4096
	Description string `json:"description"`

	// OwnerID is the ID of the owner of the room.
	// in: body
	// minimum length: 1
	// maximum length: 4096
	OwnerID string `json:"ownerID"`

	// ParentID is the ID of the parent of the room.
	// in: body
	ParentID string `json:"parentID"`
}

RoomRequest is used to request an item be created or updated.

type RoomResponse

type RoomResponse struct {
	// Room returns the information about a room.
	// in: body
	Room Room `json:"room"`
}

RoomResponse returns a room.

type RoomUpdateRequest

type RoomUpdateRequest struct {
	RoomRequest
}

RoomUpdateRequest is used to request an room be updated.

swagger:parameters RoomUpdate

type RoomsResponse

type RoomsResponse struct {
	// Rooms returns the information about multiple rooms.
	// in: body
	Rooms []Room `json:"rooms"`
}

RoomsResponse returns multiple rooms.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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