event

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("not found")

ErrNotFound is returned when a requested record is not found.

Functions

This section is empty.

Types

type Controller

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

Controller defines a metadata service controller.

func New

func New(repo eventRepository) *Controller

New creates a Event service controller.

func (*Controller) CreateBet

func (c *Controller) CreateBet(ctx context.Context, req *eventmodel.Bet) (int32, error)

func (*Controller) CreateEvent

func (c *Controller) CreateEvent(ctx context.Context, req *model.EventRequest) (int32, error)

func (*Controller) GetBets

func (c *Controller) GetBets(ctx context.Context, userId int32) (*eventmodel.BetsResponse, error)

func (*Controller) GetEvents

func (c *Controller) GetEvents(ctx context.Context) (*model.EventsResponse, error)

func (*Controller) HealthCheck

func (c *Controller) HealthCheck() *eventmodel.HealthStatus

HealthCheck returns the current health status of the application. It includes information such as the app version, start time, uptime, and a message indicating the application's health.

func (*Controller) SetFightResult

func (c *Controller) SetFightResult(ctx context.Context, req *model.FightResultRequest) (int32, error)

Jump to

Keyboard shortcuts

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