service

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Middleware

type Middleware struct{}

func (*Middleware) AllowCORS

func (m *Middleware) AllowCORS(h http.Handler) http.Handler

allowCORS from any origin. TODO disable in prod

func (*Middleware) Middleware

func (m *Middleware) Middleware(next http.HandlerFunc) http.HandlerFunc

General noauth middleware

type Repository

type Repository interface {
	CreateOrder(client pb.EventClient, Event *pb.EventRequest) error
	GetOrder(client pb.EventClient, filter *pb.GetEventFilter) (*model.OrderEvent, error)
}

type SrvRepository

type SrvRepository struct{}

func (*SrvRepository) CreateOrder

func (s *SrvRepository) CreateOrder(client pb.EventClient, Event *pb.EventRequest) error

createEvent calls the RPC method CreateEvent of EventServer

func (*SrvRepository) GetOrder

func (s *SrvRepository) GetOrder(client pb.EventClient, filter *pb.GetEventFilter) (*model.OrderEvent, error)

getEvents calls the RPC method GetEvents of EventServer

Jump to

Keyboard shortcuts

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