service

package
v0.0.0-...-46f0560 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

type Auth interface {
	GetUserId(ctx context.Context, token string) (int, bool)
}

type Buy

type Buy interface {
	Create(ctx context.Context, userId, companyId int, price int) error
	GetAllBuysByCompanyId(ctx context.Context, companyId int, limit, offset uint64) (price []int, err error)
}

type Company

type Company interface {
	GetAll(ctx context.Context) ([]model.Company, error)
}

type KafkaSenderService

type KafkaSenderService interface {
	SendMessage(message kafka.RequestMessage) error
}

type Portfolio

type Portfolio interface {
	AddStock(ctx context.Context, userId, companyId int) error
	RemoveStock(ctx context.Context, userId, companyId int) error
}

type Sale

type Sale interface {
	Create(ctx context.Context, userId, companyId int, price int) error
	GetAllSalesByCompanyId(ctx context.Context, companyId int, limit, offset uint64) (price []int, err error)
}

type Services

func NewServices

func NewServices(repos *repository.Repositories, producer sarama.SyncProducer, cfg *config.Config) *Services

type Ttl

type Ttl interface {
	Exec(ctx context.Context)
}

type User

type User interface {
	Create(ctx context.Context, login string, wealth int) (token string, err error)
	Get(ctx context.Context, id int) (model.Info, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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