db

package
v0.0.0-...-73635e7 Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBClient

type DBClient struct {
	Pool *pgxpool.Pool
}

func NewDBClient

func NewDBClient(ctx context.Context, connString string) (*DBClient, error)

func (*DBClient) Close

func (c *DBClient) Close()

func (*DBClient) CreateJob

func (c *DBClient) CreateJob(ctx context.Context) (*uuid.UUID, error)

func (*DBClient) GetLinkFromURL

func (c *DBClient) GetLinkFromURL(ctx context.Context, url string) (*Link, error)
func (c *DBClient) InsertLink(
	ctx context.Context,
	id *uuid.UUID,
	job_id *uuid.UUID,
	link string,
	title string,
) error
type Link struct {
	ID    *uuid.UUID
	JobID *uuid.UUID
	Link  string
	Title string
}

Jump to

Keyboard shortcuts

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