postgres

package
v0.0.0-...-7e3a899 Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrWrite = errors.New("error write to PostgreSQL")

Functions

This section is empty.

Types

type Config

type Config struct {
	URI string
	// contains filtered or unexported fields
}

Config - config

type Store

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

Store implementation of db interface

func New

func New(ctx context.Context, store db.DB) (*Store, error)

New store

func (*Store) Add

func (s *Store) Add(ctx context.Context, source *domain.Link) (*domain.Link, error)

Add - an add link

func (*Store) Delete

func (s *Store) Delete(ctx context.Context, hash string) error

Delete - delete link

func (*Store) Get

func (s *Store) Get(ctx context.Context, hash string) (*domain.Link, error)

Get - a get link

func (*Store) List

func (s *Store) List(ctx context.Context, params *v1.FilterLink) (*domain.Links, error)

List - return list links

func (*Store) Update

func (s *Store) Update(ctx context.Context, in *domain.Link) (*domain.Link, error)

Update - update link

Directories

Path Synopsis
schema

Jump to

Keyboard shortcuts

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