Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LoginTokenDataSource ¶
type LoginTokenDataSource interface { Create( ctx context.Context, email string, hashedToken string, ) (*model.LoginToken, error) FindUnexpiredByEmail( ctx context.Context, email string, ) (*model.LoginToken, error) FindUnexpiredByID( ctx context.Context, id string, ) (*model.LoginToken, error) Delete( ctx context.Context, id string, ) error }
type MembershipDataSource ¶
type MembershipDataSource interface { Create( ctx context.Context, userID string, createdAt time.Time, ) (*model.Membership, error) Find( ctx context.Context, userID string, ) (*model.Membership, error) Update( ctx context.Context, userID string, expiresAt time.Time, ) (*model.Membership, error) Delete( ctx context.Context, userID string, ) error }
type PaymentMethodDataSource ¶
type PaymentMethodDataSource interface { Create( ctx context.Context, userID string, label string, last4 string, brand model.PaymentMethodBrand, expMonth int, expYear int, ) (*model.PaymentMethod, error) FindByID( ctx context.Context, userID string, id string, ) (*model.PaymentMethodWithSubscriptions, error) FindByUserID( ctx context.Context, userID string, ) ([]*model.PaymentMethodWithSubscriptions, error) Delete( ctx context.Context, userID string, id string, ) error }
type SessionDataSource ¶
type SessionDataSource interface { Create( ctx context.Context, userID string, hashedToken string, duration time.Duration, ) (*model.Session, error) FindByID( ctx context.Context, id string, ) (*model.Session, error) Refresh( ctx context.Context, session *model.Session, duration time.Duration, ) error Delete( ctx context.Context, id string, ) error }
type SubscriptionDataSource ¶
type SubscriptionDataSource interface { Create( ctx context.Context, userID string, paymentMethodID string, label string, provider string, amount int, interval int, period model.SubscriptionPeriod, ) (*model.Subscription, error) FindByID( ctx context.Context, userID string, id string, ) (*model.Subscription, error) Delete( ctx context.Context, userID string, id string, ) error }
type UserDataSource ¶
Click to show internal directories.
Click to hide internal directories.