database

package
v0.0.0-...-2c1175a Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2024 License: Unlicense Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateEmployee

func CreateEmployee(ctx context.Context, db *sql.DB, email string, firstName string, lastName string) error

func CreateEmployeesTable

func CreateEmployeesTable(ctx context.Context, db *sql.DB) error

func GetConnection

func GetConnection() (*sql.DB, error)

Types

type Employee

type Employee struct {
	ID        int
	Email     string `json:"email"`
	FirstName string `json:"firstName"`
	LastName  string `json:"lastName"`
}

func GetEmployees

func GetEmployees(ctx context.Context, db *sql.DB) ([]*Employee, error)

Jump to

Keyboard shortcuts

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