storage

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Items

type Items struct {
	DB     *sql.DB
	Driver arcade.StorageDriver
}

Items is used to manage the persistent storage of item assets.

func (Items) Create

func (p Items) Create(ctx context.Context, req arcade.ItemRequest) (arcade.Item, error)

Create a item given the item request, returning the creating item.

func (Items) Get

func (p Items) Get(ctx context.Context, itemID string) (arcade.Item, error)

Get returns a single item given the itemID.

func (Items) List

func (p Items) List(ctx context.Context, filter arcade.ItemsFilter) ([]arcade.Item, error)

List returns a slice of items based on the value of the filter.

func (Items) Remove

func (p Items) Remove(ctx context.Context, itemID string) error

Remove deletes the given item from persistent storage.

func (Items) Update

func (p Items) Update(ctx context.Context, itemID string, req arcade.ItemRequest) (arcade.Item, error)

Update a item given the item request, returning the updated item.

type Links struct {
	DB     *sql.DB
	Driver arcade.StorageDriver
}

Links is used to manage the persistent storage of link assets.

func (Links) Create

func (p Links) Create(ctx context.Context, req arcade.LinkRequest) (arcade.Link, error)

Create a link given the link request, returning the creating link.

func (Links) Get

func (p Links) Get(ctx context.Context, linkID string) (arcade.Link, error)

Get returns a single link given the linkID.

func (Links) List

func (p Links) List(ctx context.Context, filter arcade.LinksFilter) ([]arcade.Link, error)

List returns a slice of links based on the value of the filter.

func (Links) Remove

func (p Links) Remove(ctx context.Context, linkID string) error

Remove deletes the given link from persistent storage.

func (Links) Update

func (p Links) Update(ctx context.Context, linkID string, req arcade.LinkRequest) (arcade.Link, error)

Update a link given the link request, returning the updated link.

type Players

type Players struct {
	DB     *sql.DB
	Driver arcade.StorageDriver
}

Players is used to manage the persistent storage of player assets.

func (Players) Create

func (p Players) Create(ctx context.Context, req arcade.PlayerRequest) (arcade.Player, error)

Create a player given the player request, returning the creating player.

func (Players) Get

func (p Players) Get(ctx context.Context, playerID string) (arcade.Player, error)

Get returns a single player given the playerID.

func (Players) List

func (p Players) List(ctx context.Context, filter arcade.PlayersFilter) ([]arcade.Player, error)

List returns a slice of players based on the value of the filter.

func (Players) Remove

func (p Players) Remove(ctx context.Context, playerID string) error

Remove deletes the given player from persistent storage.

func (Players) Update

func (p Players) Update(ctx context.Context, playerID string, req arcade.PlayerRequest) (arcade.Player, error)

Update a player given the player request, returning the updated player.

type Rooms

type Rooms struct {
	DB     *sql.DB
	Driver arcade.StorageDriver
}

Rooms is used to manage the persistent storage of room assets.

func (Rooms) Create

func (p Rooms) Create(ctx context.Context, req arcade.RoomRequest) (arcade.Room, error)

Create a room given the room request, returning the creating room.

func (Rooms) Get

func (p Rooms) Get(ctx context.Context, roomID string) (arcade.Room, error)

Get returns a single room given the roomID.

func (Rooms) List

func (p Rooms) List(ctx context.Context, filter arcade.RoomsFilter) ([]arcade.Room, error)

List returns a slice of rooms based on the value of the filter.

func (Rooms) Remove

func (p Rooms) Remove(ctx context.Context, roomID string) error

Remove deletes the given room from persistent storage.

func (Rooms) Update

func (p Rooms) Update(ctx context.Context, roomID string, req arcade.RoomRequest) (arcade.Room, error)

Update a room given the room request, returning the updated room.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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