services

package
v0.0.0-...-824ed62 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthService

type AuthService struct {
	Repo UserRepo
}

func (AuthService) ChangePassword

func (s AuthService) ChangePassword(ctx context.Context, userID string, container structs.PasswordsContainer, cfg config.AuthConfig) error

func (AuthService) CleanSession

func (s AuthService) CleanSession(userID string)

func (AuthService) GetTokenPair

func (s AuthService) GetTokenPair(ctx context.Context, identity structs.IdentityData, cfg config.AuthConfig) (structs.TokenPair, error)

func (AuthService) Refresh

func (s AuthService) Refresh(refreshString, userID string, cfg config.AuthConfig) (structs.TokenPair, error)

type CardsRepo

type CardsRepo interface {
	SelectAllCards(context.Context, structs.CardQueryParameters) ([]structs.Card, error)
	InsertCard(context.Context, structs.Card) error
	CountRowsTable(context.Context, string) (int, error)
	SelectCardByID(context.Context, string) (structs.Card, error)
	DelCardByID(context.Context, string) error
}

type CardsService

type CardsService struct {
	Repo CardsRepo
}

func (CardsService) DeleteCardByID

func (s CardsService) DeleteCardByID(ctx context.Context, id string) error

func (CardsService) ReturnCardByID

func (s CardsService) ReturnCardByID(ctx context.Context, id string) (structs.Card, error)

func (CardsService) ReturnCards

func (s CardsService) ReturnCards(ctx context.Context, params structs.CardQueryParameters) ([]structs.Card, int, error)

func (CardsService) SaveCard

func (s CardsService) SaveCard(ctx context.Context, form *multipart.Form) error

type ContactRepo

type ContactRepo interface {
	UpdateContact(context.Context, structs.Contact) error
	SelectContact(context.Context) (structs.Contact, error)
}

type ContactService

type ContactService struct {
	Repo ContactRepo
}

func (ContactService) Modify

func (s ContactService) Modify(ctx context.Context, contact structs.Contact) error

func (ContactService) Obtain

type FeedbackService

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

func NewFeedbackService

func NewFeedbackService(cfg config.SMTP) (FeedbackService, error)

func (FeedbackService) PassFeedback

func (f FeedbackService) PassFeedback(ctx context.Context, feedback structs.Feedback) error

type PartnersRepo

type PartnersRepo interface {
	SelectAllPartners(context.Context, structs.PartnerQueryParameters) ([]structs.Partner, error)
	InsertPartner(context.Context, structs.Partner, chan struct{}) error
	DelPartnerByID(context.Context, string) (string, error)
	CountRowsTable(context.Context, string) (int, error)
}

type PartnersService

type PartnersService struct {
	Repo PartnersRepo
}

func (PartnersService) DeletePartnerByID

func (p PartnersService) DeletePartnerByID(ctx context.Context, ID string, chWell chan struct{}) error

func (PartnersService) ReturnPartners

func (PartnersService) SavePartner

func (p PartnersService) SavePartner(ctx context.Context, form *multipart.Form, chWell chan struct{}) error

type RepoInterface

type RepoInterface interface {
	CardsRepo
	PartnersRepo
	SliderRepo
	ContactRepo
	UserRepo
}

type ReportService

type ReportService struct{}

func (ReportService) ChangeReport

func (s ReportService) ChangeReport(form *multipart.Form) error

func (ReportService) DeleteReport

func (s ReportService) DeleteReport() error

func (ReportService) ReturnReport

func (s ReportService) ReturnReport() (string, error)

type SliderRepo

type SliderRepo interface {
	SelectSlider(context.Context) ([]structs.Slide, error)
	InsertSlider(context.Context, structs.Slide, chan struct{}) error
	DelSlideByID(context.Context, string) (string, error)
}

type SliderService

type SliderService struct {
	Repo SliderRepo
}

func (SliderService) DeleteSlideByID

func (s SliderService) DeleteSlideByID(ctx context.Context, ID string, chWell chan struct{}) error

func (SliderService) ReturnSlider

func (s SliderService) ReturnSlider(ctx context.Context) ([]structs.Slide, error)

func (SliderService) SaveSlider

func (s SliderService) SaveSlider(ctx context.Context, form *multipart.Form, chWell chan struct{}) error

type UserRepo

type UserRepo interface {
	FindEmailWithPasword(context.Context, structs.IdentityData) (string, error)
	CheckUserIDWithPasword(context.Context, string, string) error
	UpdatePassord(context.Context, string, string) error
}

Jump to

Keyboard shortcuts

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