repositories

package
v0.0.0-...-5c97e34 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 5, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

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 (*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

func (*ClientRepository) Get

func (*ClientRepository) GetAll

func (r *ClientRepository) GetAll(ctx context.Context, ids ...string) ([]*entities.Client, error)

func (*ClientRepository) Register

func (r *ClientRepository) Register(ctx context.Context, request *entities.Client) error

type ConsentRepository

type ConsentRepository struct {
	// contains filtered or unexported fields
}

func NewConsentRepository

func NewConsentRepository(db *sql.DB) *ConsentRepository

func (*ConsentRepository) Create

func (c *ConsentRepository) Create(ctx context.Context, consent *dto.Consent) error

func (*ConsentRepository) Delete

func (c *ConsentRepository) Delete(ctx context.Context, consent *dto.Consent) error

func (*ConsentRepository) Exists

func (c *ConsentRepository) Exists(ctx context.Context, consent *dto.Consent) bool

func (*ConsentRepository) Get

func (c *ConsentRepository) Get(ctx context.Context, consent *dto.Consent) (*dto.Consent, error)

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 (*RefreshTokenRepository) Get

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) Create

func (u *UserRepository) Create(ctx context.Context, username string, password string) error

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) Get

func (u *UserRepository) Get(ctx context.Context, id string) (*dto.User, error)

func (*UserRepository) GetByUsername

func (u *UserRepository) GetByUsername(ctx context.Context, username string) (*dto.User, error)

func (*UserRepository) Update

func (u *UserRepository) Update(ctx context.Context, request *dto.UpdateProfile) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL