Documentation ¶
Index ¶
- Variables
- type AccessTokenRepository
- func (a *AccessTokenRepository) Create(ctx context.Context, request *dto.CreateAccessToken) error
- func (a *AccessTokenRepository) Delete(ctx context.Context, id string) error
- func (a *AccessTokenRepository) DeleteAll(ctx context.Context, request *dto.DeleteAccessTokens) error
- func (a *AccessTokenRepository) Exists(ctx context.Context, id string) bool
- func (a *AccessTokenRepository) IsRevoked(ctx context.Context, id string) bool
- func (a *AccessTokenRepository) RevokeAll(ctx context.Context, request *dto.RevokeAccessTokens) error
- type ClientRepository
- func (r *ClientRepository) Exists(ctx context.Context, id string) bool
- func (r *ClientRepository) Get(ctx context.Context, id string) (*entities.Client, error)
- func (r *ClientRepository) GetAll(ctx context.Context, ids ...string) ([]*entities.Client, error)
- func (r *ClientRepository) Register(ctx context.Context, request *entities.Client) error
- type ConsentRepository
- func (c *ConsentRepository) Create(ctx context.Context, consent *dto.Consent) error
- func (c *ConsentRepository) Delete(ctx context.Context, consent *dto.Consent) error
- func (c *ConsentRepository) Exists(ctx context.Context, consent *dto.Consent) bool
- func (c *ConsentRepository) Get(ctx context.Context, consent *dto.Consent) (*dto.Consent, error)
- func (c *ConsentRepository) GetAll(ctx context.Context, userID string) (*dto.UserConsents, error)
- type RefreshTokenRepository
- func (r *RefreshTokenRepository) Create(ctx context.Context, token *entities.RefreshToken) error
- func (r *RefreshTokenRepository) Get(ctx context.Context, id string) (*entities.RefreshToken, error)
- func (r *RefreshTokenRepository) RevokeAll(ctx context.Context, request *dto.RevokeRefreshTokens) error
- type UserRepository
- func (u *UserRepository) Create(ctx context.Context, username string, password string) error
- func (u *UserRepository) Exists(ctx context.Context, id string) bool
- func (u *UserRepository) ExistsUsername(ctx context.Context, username string) bool
- func (u *UserRepository) Get(ctx context.Context, id string) (*dto.User, error)
- func (u *UserRepository) GetByUsername(ctx context.Context, username string) (*dto.User, error)
- func (u *UserRepository) Update(ctx context.Context, request *dto.UpdateProfile) error
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrUserNotFound = fmt.Errorf("user not found")
)
Functions ¶
This section is empty.
Types ¶
type AccessTokenRepository ¶
type AccessTokenRepository struct {
// contains filtered or unexported fields
}
func NewAcccessTokenRepository ¶
func NewAcccessTokenRepository(db *sql.DB) *AccessTokenRepository
func (*AccessTokenRepository) Create ¶
func (a *AccessTokenRepository) Create(ctx context.Context, request *dto.CreateAccessToken) error
func (*AccessTokenRepository) Delete ¶
func (a *AccessTokenRepository) Delete(ctx context.Context, id string) error
func (*AccessTokenRepository) DeleteAll ¶
func (a *AccessTokenRepository) DeleteAll(ctx context.Context, request *dto.DeleteAccessTokens) error
func (*AccessTokenRepository) Exists ¶
func (a *AccessTokenRepository) Exists(ctx context.Context, id string) bool
func (*AccessTokenRepository) IsRevoked ¶
func (a *AccessTokenRepository) IsRevoked(ctx context.Context, id string) bool
func (*AccessTokenRepository) RevokeAll ¶
func (a *AccessTokenRepository) RevokeAll(ctx context.Context, request *dto.RevokeAccessTokens) error
type ClientRepository ¶
type ClientRepository struct {
// contains filtered or unexported fields
}
func NewClientRepository ¶
func NewClientRepository(db *sql.DB) *ClientRepository
func (*ClientRepository) Exists ¶
func (r *ClientRepository) Exists(ctx context.Context, id string) bool
type ConsentRepository ¶
type ConsentRepository struct {
// contains filtered or unexported fields
}
func NewConsentRepository ¶
func NewConsentRepository(db *sql.DB) *ConsentRepository
func (*ConsentRepository) GetAll ¶
func (c *ConsentRepository) GetAll(ctx context.Context, userID string) (*dto.UserConsents, error)
type RefreshTokenRepository ¶
type RefreshTokenRepository struct {
// contains filtered or unexported fields
}
func NewRefreshTokenRepository ¶
func NewRefreshTokenRepository(db *sql.DB) *RefreshTokenRepository
func (*RefreshTokenRepository) Create ¶
func (r *RefreshTokenRepository) Create(ctx context.Context, token *entities.RefreshToken) error
func (*RefreshTokenRepository) Get ¶
func (r *RefreshTokenRepository) Get(ctx context.Context, id string) (*entities.RefreshToken, error)
func (*RefreshTokenRepository) RevokeAll ¶
func (r *RefreshTokenRepository) RevokeAll(ctx context.Context, request *dto.RevokeRefreshTokens) error
type UserRepository ¶
type UserRepository struct {
// contains filtered or unexported fields
}
func NewUserRepository ¶
func NewUserRepository(db *sql.DB) *UserRepository
func (*UserRepository) Exists ¶
func (u *UserRepository) Exists(ctx context.Context, id string) bool
func (*UserRepository) ExistsUsername ¶
func (u *UserRepository) ExistsUsername(ctx context.Context, username string) bool
func (*UserRepository) GetByUsername ¶
func (*UserRepository) Update ¶
func (u *UserRepository) Update(ctx context.Context, request *dto.UpdateProfile) error
Click to show internal directories.
Click to hide internal directories.