dal

package module
v0.0.0-...-efd16c9 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2019 License: CC0-1.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	COLLECTION = "passengers"
)

COLLECTION

Variables

This section is empty.

Functions

This section is empty.

Types

type PeopleDAL

type PeopleDAL struct {
	Server   string
	Database string
}

PeopleDAL struct

func (*PeopleDAL) Connect

func (m *PeopleDAL) Connect()

Connect to database

func (*PeopleDAL) Delete

func (m *PeopleDAL) Delete(passenger People) error

Delete an existing passenger

func (*PeopleDAL) FindAll

func (m *PeopleDAL) FindAll() ([]People, error)

FindAll passengers

func (*PeopleDAL) FindByID

func (m *PeopleDAL) FindByID(id string) (People, error)

FindByID passenger by its id

func (*PeopleDAL) Insert

func (m *PeopleDAL) Insert(passenger People) error

Insert a passenger into database

func (*PeopleDAL) Update

func (m *PeopleDAL) Update(passenger People) error

Update an existing passenger

Jump to

Keyboard shortcuts

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