Documentation
¶
Index ¶
- Constants
- type JWTClaims
- type SystemUseCase
- func (s SystemUseCase) GetToken(email, userID string) (string, error)
- func (s SystemUseCase) InitSubscriptions(ids ...uuid.UUID) error
- func (s SystemUseCase) PrepareSubscriptions(ids ...uuid.UUID) error
- func (s SystemUseCase) RemoveOldTweets() error
- func (s SystemUseCase) SendConfirmationEmail() error
- func (s SystemUseCase) SendSubscriptions(ids ...uuid.UUID) error
- type UseCaseError
- type UserUseCase
- func (u UserUseCase) AddSubscription(ctx context.Context, subscription models.Subscription) (models.Subscription, error)
- func (u UserUseCase) ConfirmEmail(ctx context.Context, token string) error
- func (u UserUseCase) DeleteAccount(ctx context.Context, userID uuid.UUID) error
- func (u UserUseCase) DeleteSubscription(ctx context.Context, userID uuid.UUID, subscriptionID uuid.UUID) error
- func (u UserUseCase) GetSubscriptions(ctx context.Context, userID uuid.UUID) ([]models.Subscription, error)
- func (u UserUseCase) GetUserByID(ctx context.Context, userID uuid.UUID) (models.User, error)
- func (u UserUseCase) SearchTwitterUsers(ctx context.Context, userID uuid.UUID, query string) ([]models.TwitterUserSearchResult, error)
- func (u UserUseCase) SignInWithTwitter(ctx context.Context, ...) (models.User, error)
- func (u UserUseCase) UpdateSubscription(ctx context.Context, userID uuid.UUID, subscription models.Subscription) (models.Subscription, error)
Constants ¶
View Source
const ConfirmationEmailSubj = "Email address confirmation"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JWTClaims ¶
type JWTClaims struct { Email string `json:"email"` UserID string `json:"user_id"` jwt.StandardClaims }
type SystemUseCase ¶
type SystemUseCase struct { UserDatastore models.UserDatastore RpcClient pb.TwProxyServiceClient Conf *config.Config EmailSender models.EmailSender }
SystemUseCase implementation
func NewSystemUseCase ¶
func NewSystemUseCase(datastore models.UserDatastore, client pb.TwProxyServiceClient, conf *config.Config, emailSender models.EmailSender) *SystemUseCase
NewSystemUseCase creates a new SystemUseCase
func (SystemUseCase) GetToken ¶
func (s SystemUseCase) GetToken(email, userID string) (string, error)
func (SystemUseCase) InitSubscriptions ¶
func (s SystemUseCase) InitSubscriptions(ids ...uuid.UUID) error
func (SystemUseCase) PrepareSubscriptions ¶
func (s SystemUseCase) PrepareSubscriptions(ids ...uuid.UUID) error
func (SystemUseCase) RemoveOldTweets ¶
func (s SystemUseCase) RemoveOldTweets() error
func (SystemUseCase) SendConfirmationEmail ¶
func (s SystemUseCase) SendConfirmationEmail() error
func (SystemUseCase) SendSubscriptions ¶
func (s SystemUseCase) SendSubscriptions(ids ...uuid.UUID) error
type UseCaseError ¶
type UseCaseError struct {
// contains filtered or unexported fields
}
func NewUseCaseError ¶
func NewUseCaseError(msg string, code errors.ErrorCode) *UseCaseError
func (*UseCaseError) Code ¶
func (e *UseCaseError) Code() errors.ErrorCode
func (*UseCaseError) Error ¶
func (e *UseCaseError) Error() string
type UserUseCase ¶
type UserUseCase struct { UserDatastore models.UserDatastore RpcClient pb.TwProxyServiceClient Conf *config.Config }
UserUseCase implementation
func NewUserUseCase ¶
func NewUserUseCase(datastore models.UserDatastore, client pb.TwProxyServiceClient, conf *config.Config) *UserUseCase
NewUserUseCase implementation
func (UserUseCase) AddSubscription ¶
func (u UserUseCase) AddSubscription(ctx context.Context, subscription models.Subscription) (models.Subscription, error)
func (UserUseCase) ConfirmEmail ¶
func (u UserUseCase) ConfirmEmail(ctx context.Context, token string) error
func (UserUseCase) DeleteAccount ¶
func (UserUseCase) DeleteSubscription ¶
func (UserUseCase) GetSubscriptions ¶
func (u UserUseCase) GetSubscriptions(ctx context.Context, userID uuid.UUID) ([]models.Subscription, error)
func (UserUseCase) GetUserByID ¶
GetUserByID implementation
func (UserUseCase) SearchTwitterUsers ¶
func (u UserUseCase) SearchTwitterUsers(ctx context.Context, userID uuid.UUID, query string) ([]models.TwitterUserSearchResult, error)
func (UserUseCase) SignInWithTwitter ¶
func (u UserUseCase) SignInWithTwitter(ctx context.Context, twitterID, name, email, screenName, accessToken, tokenSecret string) (models.User, error)
SignInWithTwitter implementation
func (UserUseCase) UpdateSubscription ¶
func (u UserUseCase) UpdateSubscription(ctx context.Context, userID uuid.UUID, subscription models.Subscription) (models.Subscription, error)
Click to show internal directories.
Click to hide internal directories.