services

package
v0.0.0-...-39fcf47 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2024 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 AuthService

type AuthService interface {
	GetValidRefreshToken(ctx context.Context, token string, client *models.AuthClient) (*models.Token, error)
	GenerateNewRefreshToken(ctx context.Context, client *models.AuthClient, user *models.User) (*models.Token, error)
	GetOrCreateRefreshToken(ctx context.Context, client *models.AuthClient, user *models.User) (*models.Token, error)
	RefreshTokenGrant(ctx context.Context, r *models.AuthRequest, client *models.AuthClient) (*models.TokenResponse, error)
	PasswordGrant(ctx context.Context, r *models.AuthRequest, client *models.AuthClient) (*models.TokenResponse, error)
	GetClient(ctx context.Context, r *models.AuthRequest) (*models.AuthClient, error)
}

AuthService ...

func NewAuthService

func NewAuthService(repo repositories.AuthRepository) AuthService

NewAuthService ...

type CacheService

type CacheService interface {
	GetByKey(ctx context.Context, key string, obj interface{}) error
	Create(ctx context.Context, key string, data interface{}) error
	Update(ctx context.Context, key string, data interface{}) error
	Delete(ctx context.Context, key string) error
	Flush(ctx context.Context) error
}

CacheService ...

func NewCacheService

func NewCacheService(repo repositories.CacheRepository) CacheService

NewCacheService ...

type ClientService

type ClientService interface {
	CountAll(ctx context.Context, params *models.ClientQueryParams) (int, error)
	GetAll(ctx context.Context, params *models.ClientQueryParams) ([]models.Client, error)
	GetByID(ctx context.Context, id uuid.UUID) (*models.Client, error)
	Create(ctx context.Context, client *models.Client) (*models.Client, error)
	Update(ctx context.Context, client *models.Client) (*models.Client, error)
	Delete(ctx context.Context, id uuid.UUID) error
}

ClientService ...

func NewClientService

func NewClientService(repo repositories.ClientRepository) ClientService

NewClientService ...

type EmailService

type EmailService interface {
	SendEmail(ctx context.Context, to string, subject string, email hermes.Email) error
}

EmailService ...

func NewEmailService

func NewEmailService(repo repositories.EmailRepository) EmailService

NewEmailService ...

type QueueService

type QueueService interface {
	Add(ctx context.Context, queue string, data []byte) error
	AddObject(ctx context.Context, queue string, data interface{}) error
	AddToURL(ctx context.Context, queue string, data url.Values) error
}

QueueService ...

func NewQueueService

func NewQueueService(repo repositories.QueueRepository) QueueService

NewQueueService ...

type StatsService

type StatsService interface {
	Process(ctx echo.Context) error
	GetStats(ctx echo.Context) (*models.Stats, error)
}

StatsService ...

func NewStatsService

func NewStatsService(repo repositories.StatsRepository) StatsService

NewStatsService ...

type UserService

type UserService interface {
	GetByUsername(ctx context.Context, username string) (*models.User, error)
	GetByResetHash(ctx context.Context, hash string) (*models.User, error)
	CountAll(ctx context.Context, params *models.UserQueryParams) (int, error)
	GetAll(ctx context.Context, params *models.UserQueryParams) ([]models.User, error)
	GetByID(ctx context.Context, id uuid.UUID) (*models.User, error)
	Create(ctx context.Context, password string, user *models.User) (*models.User, error)
	Delete(ctx context.Context, id uuid.UUID) error
	Update(ctx context.Context, user *models.User) (*models.User, error)
	UpdatePassword(ctx context.Context, id uuid.UUID, newPassword string) (*models.User, error)
	UpdateUsername(ctx context.Context, id uuid.UUID, newUsername string) (*models.User, error)
	UpdateLogin(ctx context.Context, user *models.User) (*models.User, error)
	ResetPassword(ctx context.Context, username string) (*models.User, error)
}

UserService ...

func NewUserService

func NewUserService(repo repositories.UserRepository, queue QueueService, cacheSrv CacheService) UserService

NewUserService ...

Jump to

Keyboard shortcuts

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