connector

package
v0.0.0-...-364598c Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateStudy

func CreateStudy(pool *pgxpool.Pool, name string) string

func CreateUser

func CreateUser(pool *pgxpool.Pool, id string) string

func Exec

func Exec(conn *pgxpool.Pool, sql string, arguments ...interface{}) (*pgconn.CommandTag, error)

func GetBodyAs

func GetBodyAs(r *http.Request, t interface{}) (interface{}, error)

func GetCol

func GetCol(pool *pgxpool.Pool, table string, col string) []*string

func GetString

func GetString(d json.RawMessage, path string) string

func MakeUserMap

func MakeUserMap(e []*InferenceDataEvent) map[string]map[string]*InferenceDataEvent

func MustExec

func MustExec(t *testing.T, conn *pgxpool.Pool, sql string, arguments ...interface{})

func RowStrings

func RowStrings(rows pgx.Rows) []*string

func Sliceit

func Sliceit[T any](c <-chan T) []T

func TestPool

func TestPool() *pgxpool.Pool

func TestServer

func TestServer(handler func(http.ResponseWriter, *http.Request)) (*httptest.Server, *sling.Sling)

func TestServerMux

func TestServerMux() (*httptest.Server, *http.ServeMux)

Types

type TestTransport

type TestTransport func(req *http.Request) (*http.Response, error)

func (TestTransport) RoundTrip

func (r TestTransport) RoundTrip(req *http.Request) (*http.Response, error)

Jump to

Keyboard shortcuts

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