cockroach

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2021 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close(wg *sync.WaitGroup) error

func Cluster

func Cluster() string

func Database

func Database() string

func Host

func Host() string

func Password

func Password() string

func Port

func Port() string

func SSLMode

func SSLMode() string

func SSLRootCert

func SSLRootCert() string

func SetCluster

func SetCluster(newCluster string)

func SetDatabase

func SetDatabase(newDatabase string)

func SetHost

func SetHost(newHost string)

func SetPassword

func SetPassword(newPassword string)

func SetPort

func SetPort(newPort string)

func SetSSLMode

func SetSSLMode(newSSLMode string)

func SetSSLRootCert

func SetSSLRootCert(newSSLRootCert string)

func SetUser

func SetUser(newUser string)

func User

func User() string

Types

type Conn

type Conn struct {
	*pgx.Conn
}

func GetConnection

func GetConnection() (*Conn, error)

func (*Conn) AddPost

func (c *Conn) AddPost(request models.SendPostRequest) error

TODO Use user model

func (*Conn) FindUser

func (c *Conn) FindUser(filter map[string]string) (models.User, error)

func (*Conn) GetPosts

func (c *Conn) GetPosts(page, num int) ([]models.PostDisplay, error)

func (*Conn) GetPublicKey

func (c *Conn) GetPublicKey(email string) (ssh.PublicKey, error)

func (*Conn) RegisterUser

func (c *Conn) RegisterUser(request models.RegisterRequest) error

Jump to

Keyboard shortcuts

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