postgres

package
v0.0.0-...-cb2c959 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(db *sql.DB) picklist.Service

New creates a new picklist service.

Types

type Service

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

Service is used for getting information about a picklist from a postgres database.

func (*Service) Delete

func (s *Service) Delete(id string) error

Delete deletes a picklist from the postgresql database.

func (*Service) Get

func (s *Service) Get(id string) (p picklist.Picklist, err error)

Get retrieves a picklist from the postgresql database given an id.

func (*Service) GetBasicPicklists

func (s *Service) GetBasicPicklists(username string) (bPicklists []picklist.BasicPicklist, err error)

GetBasicPicklists gets all basic picklists that belong to a certain user from the postgresql database.

func (*Service) GetByEvent

func (s *Service) GetByEvent(username, eventKey string) (bPicklists []picklist.BasicPicklist, err error)

GetByEvent gets basic picklists from the postgresql database by username and eventKey.

func (*Service) GetOwner

func (s *Service) GetOwner(id string) (username string, err error)

GetOwner retrieves the owner of a picklist in the postgresql database.

func (*Service) Insert

func (s *Service) Insert(p picklist.Picklist) (string, error)

Insert inserts a picklist into the postgresql database.

func (*Service) Update

func (s *Service) Update(p picklist.Picklist) error

Update updates a picklist in the postgresql database.

Jump to

Keyboard shortcuts

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