repository

package
v0.0.0-...-bc6e940 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Diners

type Diners interface {
	GetTotalCount(ctx context.Context) (int64, error)
	GetAll(ctx context.Context, page int64, limit int64) (*PaginationResultDiner, error)
	Create(ctx context.Context, newDiner *domainDiner.Diner) (*domainDiner.Diner, error)
	GetByID(ctx context.Context, id int64) (*domainDiner.Diner, error)
	Delete(ctx context.Context, id int64) (err error)
}

Diners specifies the repository contracts

type Menus interface {
	GetTotalCount(ctx context.Context) (int64, error)
	GetAll(ctx context.Context, page int64, limit int64) (*PaginationResultMenu, error)
	Create(ctx context.Context, newMenu *domainMenu.Menu) (*domainMenu.Menu, error)
	GetByID(ctx context.Context, id int64) (*domainMenu.Menu, error)
	GetByTopCount(ctx context.Context, count int) ([]domainMenu.Menu, error)
	Delete(ctx context.Context, id int64) (err error)
}

Menus specifies the repository contracts

type Orders

type Orders interface {
	Create(ctx context.Context, newOrder *domainOrder.Request) (*domainOrder.Request, error)
	GetByID(ctx context.Context, dinerID int64) ([]domainOrder.Response, error)
	Delete(ctx context.Context, id int) (err error)
}

Orders specifies the repository contracts

type PaginationResultDiner

type PaginationResultDiner struct {
	Data       *[]domainDiner.Diner
	Total      int64
	Limit      int64
	Current    int64
	NextCursor uint
	PrevCursor uint
	NumPages   int64
}

PaginationResultDiner is a struct that contains the pagination result for diner

type PaginationResultMenu

type PaginationResultMenu struct {
	Data       *[]domainMenu.Menu
	Total      int64
	Limit      int64
	Current    int64
	NextCursor uint
	PrevCursor uint
	NumPages   int64
}

PaginationResultMenu is a struct that contains the pagination result for menu

Directories

Path Synopsis
Package diner contains the repository implementation for the diner entity
Package diner contains the repository implementation for the diner entity
Package menu contains the repository implementation for the menu entity
Package menu contains the repository implementation for the menu entity
Package order contains the repository implementation for the order entity
Package order contains the repository implementation for the order entity

Jump to

Keyboard shortcuts

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