database

package
v0.0.0-...-f682ce8 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package database implements postgres connection and queries.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DBConn

func DBConn() (*pg.DB, error)

DBConn returns a postgres connection pool.

Types

type RequestStore

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

RequestStore implements database operations for request management.

func NewRequestStore

func NewRequestStore(db *pg.DB) *RequestStore

NewRequestStore returns a RequestStore implementation.

func (*RequestStore) Get

func (s *RequestStore) Get(github string) (*models.Request, error)

Get gets a request by github ID.

func (*RequestStore) Insert

func (s *RequestStore) Insert(github, address string) (*models.Request, error)

Insert a request with github and address.

func (*RequestStore) Update

func (s *RequestStore) Update(p *models.Request) error

Update updates profile.

Directories

Path Synopsis
Package migrate implements postgres migrations.
Package migrate implements postgres migrations.

Jump to

Keyboard shortcuts

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