Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { UserID string Provider ProviderType FederatedID string }
Account respresents single account for the user.
type AccountRepository ¶
type AccountRepository interface { // Save saves a given entity. Save(ctx context.Context, entity *Account) (*Account, error) // Find retrieves an entity. Find(ctx context.Context, entity *Account) (*Account, error) // Exists returns whether an entity exists. Exists(ctx context.Context, entity *Account) (bool, error) // FindAll returns all instances of the type. FindAll(ctx context.Context, afterCursor string, limit int) ([]*Account, string, error) // Count returns the number of entities available. Count(ctx context.Context) (int, error) // Delete deletes a given entity. Delete(ctx context.Context, entity *Account) error // DeleteAll deletes all entities managed by the repository. DeleteAll(ctx context.Context) error // FindAllForUser returns all refresh tokens for specified user ID. FindAllForUser(ctx context.Context, userID string) ([]*Account, error) }
type AccountUsecase ¶
type AccountUsecase interface { // CreateAccount creates new account in the system. CreateAccount(context.Context, *Account) (*Account, error) // UpdateAccount updates existing account. UpdateAccount(context.Context, *Account) (*Account, error) // FindAllForUser retrieves all accounts for specified user ID. FindAllForUser(ctx context.Context, userID string) ([]*Account, error) }
type ProviderType ¶
type ProviderType string
const (
ProviderTypePassword ProviderType = "password"
)
func (ProviderType) IsValid ¶
func (p ProviderType) IsValid() error
func (ProviderType) String ¶
func (p ProviderType) String() string
func (*ProviderType) UnmarshalJSON ¶
func (p *ProviderType) UnmarshalJSON(b []byte) error
Click to show internal directories.
Click to hide internal directories.