services

package
v0.0.0-...-8f7c90a Latest Latest
Warning

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

Go to latest
Published: Dec 14, 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 CreateCakeParams

type CreateCakeParams struct {
	Title       string
	Description string
	Rating      int
	Image       string
}

type CreateCakeResult

type CreateCakeResult struct {
	ID          int
	Title       string
	Description string
	Rating      int
	Image       string
	CreatedAt   time.Time
	UpdatedAt   time.Time
}

type CreateCakesService

type CreateCakesService interface {
	Call(ctx context.Context, params *CreateCakeParams) (*CreateCakeResult, error)
}

func NewCreateCakesService

func NewCreateCakesService(
	repo repositories.CakesRepository,
	logger grpclog.LoggerV2,
) CreateCakesService

type CreateCakesServiceImpl

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

func (*CreateCakesServiceImpl) Call

type DeleteCakeParams

type DeleteCakeParams struct {
	ID int
}

type DeleteCakeResult

type DeleteCakeResult struct {
	ID          int
	Title       string
	Description string
	Rating      int
	Image       string
	CreatedAt   time.Time
	UpdatedAt   time.Time
}

type DeleteCakesService

type DeleteCakesService interface {
	Call(ctx context.Context, params *DeleteCakeParams) (*DeleteCakeResult, error)
}

func NewDeleteCakesService

func NewDeleteCakesService(
	repo repositories.CakesRepository,
	logger grpclog.LoggerV2,
) DeleteCakesService

type DeleteCakesServiceImpl

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

func (*DeleteCakesServiceImpl) Call

type GetCakeParams

type GetCakeParams struct {
	ID int
}

type GetCakeResult

type GetCakeResult struct {
	ID          int
	Title       string
	Description string
	Rating      int
	Image       string
	CreatedAt   time.Time
	UpdatedAt   time.Time
}

type GetCakesService

type GetCakesService interface {
	Call(ctx context.Context, params *GetCakeParams) (*GetCakeResult, error)
}

func NewGetCakesService

func NewGetCakesService(
	repo repositories.CakesRepository,
	logger grpclog.LoggerV2,
) GetCakesService

type GetCakesServiceImpl

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

func (*GetCakesServiceImpl) Call

func (s *GetCakesServiceImpl) Call(ctx context.Context, params *GetCakeParams) (res *GetCakeResult, err error)

type ListCakeParams

type ListCakeParams struct{}

type ListCakeResult

type ListCakeResult struct {
	Cakes []models.Cakes
}

type ListCakesService

type ListCakesService interface {
	Call(ctx context.Context) (res *ListCakeResult, err error)
}

func NewListCakesService

func NewListCakesService(
	repo repositories.CakesRepository,
	logger grpclog.LoggerV2,
) ListCakesService

type ListCakesServiceImpl

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

func (*ListCakesServiceImpl) Call

func (s *ListCakesServiceImpl) Call(ctx context.Context) (res *ListCakeResult, err error)

type UpdateCakeParams

type UpdateCakeParams struct {
	ID          int
	Title       sql.NullString
	Description sql.NullString
	Rating      sql.NullInt32
	Image       sql.NullString
}

type UpdateCakeResult

type UpdateCakeResult struct {
	ID          int
	Title       string
	Description string
	Rating      int
	Image       string
	CreatedAt   time.Time
	UpdatedAt   time.Time
}

type UpdateCakesService

type UpdateCakesService interface {
	Call(ctx context.Context, params *UpdateCakeParams) (*UpdateCakeResult, error)
}

func NewUpdateCakesService

func NewUpdateCakesService(
	repo repositories.CakesRepository,
	logger grpclog.LoggerV2,
) UpdateCakesService

type UpdateCakesServiceImpl

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

func (*UpdateCakesServiceImpl) Call

Jump to

Keyboard shortcuts

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