permitdb

package
v0.0.0-...-57b3f38 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package permitdb contains permit related CRUD functionality.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplicationDB

type ApplicationDB struct {
	ID        int       `db:"application_id"`
	Status    string    `db:"status"`
	CatalogID uuid.UUID `db:"catalog_id"`
	Form      string    `db:"form"`
}

type Store

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

Store manages the set of APIs for permit database access.

func NewStore

func NewStore(logger *slog.Logger, db *sqlx.DB) *Store

NewStore constructs the api for data access.

func (*Store) Create

func (s *Store) Create(ctx context.Context, aplDB ApplicationDB) error

Create adds an application to the database.

func (*Store) Query

func (s *Store) Query(ctx context.Context) ([]ApplicationDB, error)

Query gets all applications from the database.

func (*Store) Retrieve

func (s *Store) Retrieve(ctx context.Context, aplID int) (ApplicationDB, error)

Retrieve retrieves an application from the database.

func (*Store) Update

func (s *Store) Update(ctx context.Context, aplID int, newStatus string) error

Update updates a specfic application.

Jump to

Keyboard shortcuts

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