postgres

package
v0.0.0-...-1bc35f7 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PG

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

func New

func New(connStr string, logger *slog.Logger) (*PG, error)

func (*PG) AuthOrgUser

func (p *PG) AuthOrgUser(
	ctx context.Context,
	sessionToken string,
) (db.OrgUser, error)

func (*PG) CreateCostCenter

func (p *PG) CreateCostCenter(
	ctx context.Context,
	costCenterReq db.CCenterReq,
) (uuid.UUID, error)

func (*PG) CreateOnboardEmail

func (p *PG) CreateOnboardEmail(
	ctx context.Context,
	onboardEmailInfo db.OnboardEmailInfo,
) error

func (*PG) CreateOrgUserToken

func (p *PG) CreateOrgUserToken(
	ctx context.Context,
	orgUserToken db.OrgUserToken,
) error

func (*PG) DeQOnboard

func (p *PG) DeQOnboard(
	ctx context.Context,
) (*db.OnboardInfo, error)

func (*PG) GetCostCenters

func (p *PG) GetCostCenters(
	ctx context.Context,
	costCentersList db.CCentersList,
) ([]vetchi.CostCenter, error)

func (*PG) GetEmployer

func (p *PG) GetEmployer(
	ctx context.Context,
	clientID string,
) (db.Employer, error)

func (*PG) GetOldestUnsentEmails

func (p *PG) GetOldestUnsentEmails(ctx context.Context) ([]db.Email, error)

func (*PG) GetOrgUserAuth

func (p *PG) GetOrgUserAuth(
	ctx context.Context,
	orgUserCreds db.OrgUserCreds,
) (db.OrgUserAuth, error)

func (*PG) GetOrgUserByToken

func (p *PG) GetOrgUserByToken(
	ctx context.Context,
	tfaCode, tgt string,
) (db.OrgUser, error)

func (*PG) InitEmployerAndDomain

func (p *PG) InitEmployerAndDomain(
	ctx context.Context,
	employer db.Employer,
	domain db.Domain,
) error

func (*PG) InitEmployerTFA

func (p *PG) InitEmployerTFA(
	ctx context.Context,
	employerTFA db.EmployerTFA,
) error

func (*PG) OnboardAdmin

func (p *PG) OnboardAdmin(
	ctx context.Context,
	onboardReq db.OnboardReq,
) error

func (*PG) PruneTokens

func (p *PG) PruneTokens(ctx context.Context) error

func (*PG) UpdateEmailState

func (p *PG) UpdateEmailState(
	ctx context.Context,
	emailStateChange db.EmailStateChange,
) error

Jump to

Keyboard shortcuts

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