postgres

package
v0.0.1-0...-0c05b8d Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2022 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is a database client.

func NewClient

func NewClient(cfg *config.Config) (*Client, error)

NewClient creates a new models Client from Config

func (*Client) Create

func (c *Client) Create(obj interface{}) error

Create a struct

func (*Client) Delete

func (c *Client) Delete(obj interface{}) error

Delete a struct

func (*Client) ReadUser

func (c *Client) ReadUser(id uuid.UUID) (*models.User, error)

ReadUser will retrieve a user by their uuid from the database

func (*Client) ReadUserByCertHash

func (c *Client) ReadUserByCertHash(certhash string) (*models.User, error)

ReadUserByCertHash will read a user by certhash from the database

func (*Client) ReadUserByUsername

func (c *Client) ReadUserByUsername(username string) (*models.User, error)

ReadUserByUsername will read a user by username from the database

func (*Client) Update

func (c *Client) Update(obj interface{}) error

Update a struct

Jump to

Keyboard shortcuts

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