my

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: 12 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 struct {
	// contains filtered or unexported fields
}

func NewAuth

func NewAuth(repos *repository.Repositories) *Auth

func (*Auth) GetUserId

func (a *Auth) GetUserId(ctx context.Context, token string) (int, bool)

type Buy

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

func NewBuy

func NewBuy(repos *repository.Repositories) *Buy

func (*Buy) Create

func (b *Buy) Create(ctx context.Context, userId, companyId int, price int) error

func (*Buy) GetAllBuysByCompanyId

func (b *Buy) GetAllBuysByCompanyId(ctx context.Context, companyId int, limit, offset uint64) (price []int, err error)

type Company

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

func NewCompany

func NewCompany(repos *repository.Repositories) *Company

func (*Company) GetAll

func (c *Company) GetAll(ctx context.Context) ([]model.Company, error)

type KafkaSender

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

func NewKafkaSender

func NewKafkaSender(producer sarama.SyncProducer, topic string) *KafkaSender

func (*KafkaSender) SendMessage

func (s *KafkaSender) SendMessage(message kafka.RequestMessage) error

type Portfolio

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

func NewPortfolio

func NewPortfolio(repos *repository.Repositories) *Portfolio

func (*Portfolio) AddStock

func (p *Portfolio) AddStock(ctx context.Context, userId, companyId int) error

func (*Portfolio) RemoveStock

func (p *Portfolio) RemoveStock(ctx context.Context, userId, companyId int) error

type Sale

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

func NewSale

func NewSale(repos *repository.Repositories) *Sale

func (*Sale) Create

func (s *Sale) Create(ctx context.Context, userId, companyId int, price int) error

func (*Sale) GetAllSales

func (s *Sale) GetAllSales(ctx context.Context, companyId int, limit, offset uint64) (price []int, err error)

func (*Sale) GetAllSalesByCompanyId

func (s *Sale) GetAllSalesByCompanyId(ctx context.Context, companyId int, limit, offset uint64) (price []int, err error)

type Ttl

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

func NewTtl

func NewTtl(repos *repository.Repositories) *Ttl

func (*Ttl) Exec

func (t *Ttl) Exec(ctx context.Context)

type User

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

func NewUser

func NewUser(repos *repository.Repositories) *User

func (*User) Create

func (u *User) Create(ctx context.Context, login string, wealth int) (token string, err error)

func (*User) Get

func (u *User) Get(ctx context.Context, id int) (model.Info, error)

Jump to

Keyboard shortcuts

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