postgres

package
v0.0.0-...-9bab107 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPostgresDB

func NewPostgresDB(config string) (*sqlx.DB, error)

Types

type Repository

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

func NewRepository

func NewRepository(db *sqlx.DB) *Repository

func (Repository) CreateShortURL

func (r Repository) CreateShortURL(ctx context.Context, link *model.Link) (string, error)

func (Repository) GetBaseURL

func (r Repository) GetBaseURL(ctx context.Context, link *model.Link) (string, error)

Jump to

Keyboard shortcuts

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