Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateTokenPlaintext ¶
Types ¶
type EconomicService ¶
type EconomicService interface { GetAll(reportType data.ReportType) (*[]data.Economic, error) GetIntervalWithPercentChange(ctx context.Context, wg *sync.WaitGroup, dataChan chan data.EconomicWithChangeResult, errChan chan error, reportType data.ReportType, years int, paging data.Paging) GetStats(ctx context.Context, wg *sync.WaitGroup, dataChan chan data.EconomicStatsResult, errChan chan error, reportType data.ReportType, years int, timeBucket int, paging data.Paging) StartDataSyncTask() }
type PermissionsService ¶
type PermissionsService interface {
GetAllForUser(ctx context.Context, userId int64) (data.Permissions, error)
}
func NewPermissionsService ¶
func NewPermissionsService(permissionRepo data.PermissionsRepository) PermissionsService
type ServicesModel ¶
type ServicesModel struct { AlphaVantageEconomicService EconomicService Economicdashservice EconomicDashboardService UserService UserService PermissionsService PermissionsService TokenService TokenService }
func NewServicesModel ¶
func NewServicesModel(models repo.Models, client alpha.ClientInterface, mailer *mailer.Mailer) ServicesModel
type TokenService ¶
type TokenService interface { New(ctx context.Context, userID int64, ttl time.Duration, scope string) (*data.Token, error) DeleteAllForUser(ctx context.Context, userId int64, scope string) error }
func NewTokenService ¶
func NewTokenService(tokenRepo data.TokenRepository) TokenService
type UserService ¶
type UserService interface { RegisterUser(ctx context.Context, user *data.User) error ActivateUser(ctx context.Context, token string) (*data.User, error) GetByEmail(ctx context.Context, email string) (*data.User, error) GetFromToken(ctx context.Context, tokenScope, tokenplaintext string) (*data.User, error) }
func NewUserService ¶
func NewUserService(userRepository data.UserRepository, permissionsRepository data.PermissionsRepository, tokenService TokenService, mailer *mailer.Mailer) UserService
Click to show internal directories.
Click to hide internal directories.