provider

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package provider implements the endpoints required game provider integrations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OperatorAuthorization added in v0.6.0

func OperatorAuthorization(apiKey string) fiber.Handler

OperatorAuthorization is used as a fiber middleware to validate a configured api key.

func OperatorFactory

func OperatorFactory() *operatorFactory

OperatorFactory returns a single instance to the operator router factory

func ProviderFactory

func ProviderFactory() *providerFactory

ProviderFactory returns a single instance to the provider router factory

Types

type GameLaunchController

type GameLaunchController struct {
	// contains filtered or unexported fields
}

func NewGameLaunchController

func NewGameLaunchController(s ProviderService) *GameLaunchController

func (GameLaunchController) GameLaunchEndpoint

func (ctrl GameLaunchController) GameLaunchEndpoint(ctx *fiber.Ctx) error

GameLaunchEndpoint Execute provider gamelaunch request

type GameLaunchHeaders

type GameLaunchHeaders struct {
	SessionKey string `reqHeader:"X-Player-Token" validate:"required"`
}

type GameLaunchRequest

type GameLaunchRequest struct {
	LaunchConfig   map[string]interface{} `json:"launchConfig,omitempty"`
	Currency       string                 `json:"currency" validate:"required"`
	ProviderGameID string                 `json:"providerGameId" validate:"required"`
	PlayerID       string                 `json:"playerId" validate:"required"`
	Casino         string                 `json:"casino,omitempty"`
	Country        string                 `json:"country,omitempty"`
	Language       string                 `json:"language,omitempty"`
	SessionIP      string                 `json:"sessionIp,omitempty"`
}

type GameLaunchResponse

type GameLaunchResponse struct {
	GameURL string `json:"gameUrl"`
}

type GameRoundController added in v0.6.0

type GameRoundController struct {
	// contains filtered or unexported fields
}

func NewGameRoundController added in v0.6.0

func NewGameRoundController(s ProviderService) *GameRoundController

func (*GameRoundController) GetGameRoundEndpoint added in v0.6.0

func (ctrl *GameRoundController) GetGameRoundEndpoint(c *fiber.Ctx) error

GetGameRoundEndpoint Returns redirect status with provider url for game round rendering

type GameRoundRenderRequest added in v0.7.0

type GameRoundRenderRequest struct {
	GameRoundID string
	CasinoID    string
}

type OperatorArgs

type OperatorArgs struct {
	HTTPClient rest.HTTPClientJSONInterface
	Config     configs.ProviderConf
}

type ProviderArgs

type ProviderArgs struct {
	PamClient  pam.PamClient
	HTTPClient rest.HTTPClientJSONInterface
	Config     configs.ProviderConf
}

ProviderArgs composes all arguments required to build a provider router

type ProviderService added in v0.6.0

type ProviderService interface {
	// GameLaunch returns url to game session
	GameLaunch(*fiber.Ctx, *GameLaunchRequest, *GameLaunchHeaders) (string, error)
	// GetGameRoundRender Returns url where a specific game round result is rendered to be viewed
	GetGameRoundRender(*fiber.Ctx, GameRoundRenderRequest) (string, error)
}

ProviderService Contains Provider exposed features

type Registry

type Registry struct {
	// contains filtered or unexported fields
}

func NewRegistry

func NewRegistry(app *fiber.App, basePath string) *Registry

func (*Registry) Register

func (pr *Registry) Register(provider *Router) error

Register a provider

type Route

type Route struct {
	Path        string
	Method      string
	HandlerFunc fiber.Handler
	Middlewares []fiber.Handler
}

type Router

type Router struct {
	Name        string
	BasePath    string
	Routes      []Route
	Middlewares []fiber.Handler
}

Directories

Path Synopsis
Package caleta module for provider Caleta
Package caleta module for provider Caleta
auth
Package auth defines auth helpers
Package auth defines auth helpers
Package docs provides provider documentation, such as openapi specs.
Package docs provides provider documentation, such as openapi specs.
generated
Code generated by swaggo/swag.
Code generated by swaggo/swag.
Package evolution contains the provider implementation for Evolution games with wallet api and user authentication.
Package evolution contains the provider implementation for Evolution games with wallet api and user authentication.
internal
test
Package test contains shared test code for providers
Package test contains shared test code for providers
Package redtiger contains the provider implementation for Red Tiger games with wallet api and user authentication.
Package redtiger contains the provider implementation for Red Tiger games with wallet api and user authentication.

Jump to

Keyboard shortcuts

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