postgres

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAircraftRepository

func NewAircraftRepository(db *sql.DB) repository.AircraftRepository

func NewCredentialRepository

func NewCredentialRepository(db *sql.DB) repository.CredentialRepository

func NewFlightRepository

func NewFlightRepository(db *sql.DB) repository.FlightRepository

NewFlightRepository creates a new flight repository

func NewLicenseRepository

func NewLicenseRepository(db *sql.DB) repository.LicenseRepository

NewLicenseRepository creates a new license repository

func NewNotificationRepository

func NewNotificationRepository(db *sql.DB) repository.NotificationRepository

func NewPasswordResetTokenRepository

func NewPasswordResetTokenRepository(db *sql.DB) repository.PasswordResetTokenRepository

NewPasswordResetTokenRepository creates a new password reset token repository

func NewRefreshTokenRepository

func NewRefreshTokenRepository(db *sql.DB) repository.RefreshTokenRepository

NewRefreshTokenRepository creates a new refresh token repository

Types

type ClassRatingRepository

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

func NewClassRatingRepository

func NewClassRatingRepository(db *sql.DB) *ClassRatingRepository

func (*ClassRatingRepository) Create

func (*ClassRatingRepository) Delete

func (r *ClassRatingRepository) Delete(ctx context.Context, id uuid.UUID) error

func (*ClassRatingRepository) GetByID

func (*ClassRatingRepository) GetByLicenseID

func (r *ClassRatingRepository) GetByLicenseID(ctx context.Context, licenseID uuid.UUID) ([]*models.ClassRating, error)

func (*ClassRatingRepository) Update

type ContactRepository

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

func NewContactRepository

func NewContactRepository(db *sql.DB) *ContactRepository

func (*ContactRepository) Create

func (r *ContactRepository) Create(ctx context.Context, contact *models.Contact) error

func (*ContactRepository) Delete

func (r *ContactRepository) Delete(ctx context.Context, id uuid.UUID) error

func (*ContactRepository) GetByExactName

func (r *ContactRepository) GetByExactName(ctx context.Context, userID uuid.UUID, name string) (*models.Contact, error)

func (*ContactRepository) GetByID

func (r *ContactRepository) GetByID(ctx context.Context, id uuid.UUID) (*models.Contact, error)

func (*ContactRepository) GetByUserID

func (r *ContactRepository) GetByUserID(ctx context.Context, userID uuid.UUID) ([]*models.Contact, error)

func (*ContactRepository) Search

func (r *ContactRepository) Search(ctx context.Context, userID uuid.UUID, query string, limit int) ([]*models.Contact, error)

func (*ContactRepository) Update

func (r *ContactRepository) Update(ctx context.Context, contact *models.Contact) error

type FlightCrewRepository

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

func NewFlightCrewRepository

func NewFlightCrewRepository(db *sql.DB) *FlightCrewRepository

func (*FlightCrewRepository) DeleteByFlightID

func (r *FlightCrewRepository) DeleteByFlightID(ctx context.Context, flightID uuid.UUID) error

func (*FlightCrewRepository) GetByFlightID

func (r *FlightCrewRepository) GetByFlightID(ctx context.Context, flightID uuid.UUID) ([]models.FlightCrewMember, error)

func (*FlightCrewRepository) SetCrewMembers

func (r *FlightCrewRepository) SetCrewMembers(ctx context.Context, flightID uuid.UUID, members []models.FlightCrewMember) error

type UserRepository

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

func NewUserRepository

func NewUserRepository(db *sql.DB) *UserRepository

func (*UserRepository) Create

func (r *UserRepository) Create(ctx context.Context, user *models.User) error

func (*UserRepository) Delete

func (r *UserRepository) Delete(ctx context.Context, id uuid.UUID) error

func (*UserRepository) GetByEmail

func (r *UserRepository) GetByEmail(ctx context.Context, email string) (*models.User, error)

func (*UserRepository) GetByID

func (r *UserRepository) GetByID(ctx context.Context, id uuid.UUID) (*models.User, error)

func (*UserRepository) IncrementFailedLoginAttempts

func (r *UserRepository) IncrementFailedLoginAttempts(ctx context.Context, id uuid.UUID) error

func (*UserRepository) LockAccount

func (r *UserRepository) LockAccount(ctx context.Context, id uuid.UUID, until time.Time) error

func (*UserRepository) ResetFailedLoginAttempts

func (r *UserRepository) ResetFailedLoginAttempts(ctx context.Context, id uuid.UUID) error

func (*UserRepository) Update

func (r *UserRepository) Update(ctx context.Context, user *models.User) error

Jump to

Keyboard shortcuts

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