source

package
v0.0.0-...-ea8ee0a Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: Unlicense Imports: 4 Imported by: 0

Documentation

Overview

Package source manages the dummy data source for jobs

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

Store contains necessary handle for managing data.

func NewStore

func NewStore(db *pgxpool.Pool) *Store

NewStore returns a Store.

func (*Store) Close

func (s *Store) Close()

Close closes all handles Store holds

func (*Store) CountActiveUsers

func (s *Store) CountActiveUsers(ctx context.Context) (int, error)

CountActiveUsers returns the active user count.

func (*Store) Get

func (s *Store) Get(ctx context.Context) (pgx.Rows, error)

Get returns all the fake data. Ignore package boundary and pretend it's ok to leak implementation detail and to return a pgx.Rows.

func (*Store) Seed

func (s *Store) Seed(ctx context.Context, n int) error

Seed rinses the Store and insert n records.

Jump to

Keyboard shortcuts

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