access

package
v0.0.0-...-ad2105c Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2024 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct {
	*sqlx.DB
}

func NewDbConn

func NewDbConn(ctx context.Context) (*DB, error)

func NewMockDbConn

func NewMockDbConn(ctx context.Context) (*DB, sqlmock.Sqlmock, error)

func (*DB) Create

func (db *DB) Create(ctx context.Context, client *m.Client) error

func (*DB) CreateProvider

func (db *DB) CreateProvider(ctx context.Context, prov *m.Provider) error

func (*DB) Get

func (db *DB) Get(ctx context.Context, clientId uuid.UUID) (*m.Client, error)

func (*DB) GetAppointmentsByDay

func (db *DB) GetAppointmentsByDay(ctx context.Context, providerId *uuid.UUID, date time.Time) ([]*m.Appointment, error)

Fetch appointments from the database for the given day

func (*DB) GetProviderById

func (db *DB) GetProviderById(ctx context.Context, providerId *uuid.UUID) (*m.Provider, error)

func (*DB) UpdateAppointment

func (db *DB) UpdateAppointment(ctx context.Context, appt *m.Appointment) (*m.Appointment, error)

func (*DB) UpsertAppointments

func (db *DB) UpsertAppointments(ctx context.Context, appts []*m.Appointment) error

type MockDB

type MockDB struct {
	DB
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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