handler

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// API is an constant to represent the API server.
	API = iota
	// WEB is an constant to represent the WEB server.
	WEB
)

Variables

This section is empty.

Functions

This section is empty.

Types

type APIHandler

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

APIHandler is a struct that implements the Handler interface.

func NewAPIHandler

func NewAPIHandler(randomizer service.GameRandomizer) APIHandler

NewAPIHandler is a constructor for creating a new APIHandler instance.

func (APIHandler) Process

func (h APIHandler) Process(c *gin.Context)

Process is a function implementation to execute calls to create random luck numbers.

type Handler

type Handler interface {
	// Process is a function to execute calls to create random luck numbers.
	Process(*gin.Context)
}

Handler is an interface to support web functions.

type Server

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

Server is an structure to support the handler.

func NewServer

func NewServer(serverType int) Server

NewServer create a new instante of Server structure.

func (Server) Start

func (s Server) Start()

Start initialize the router.

type WebHandler

type WebHandler struct{}

WebHandler is a struct that implements the Handler interface.

func NewWebHandler

func NewWebHandler() WebHandler

NewWebHandler is a constructor for creating a new WebHandler instance.

func (WebHandler) Process

func (h WebHandler) Process(_ *gin.Context)

Process is a function implementation to execute calls to create random luck numbers.

Jump to

Keyboard shortcuts

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