postgres

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2023 License: MIT, MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewThingService

func NewThingService(psql *psqlService) *thingService

func NewUserService

func NewUserService(psql *psqlService) *userService

func Open

func Open(config Config) (*psqlService, error)

Open opens a postgres database and returns a service to interact with it.

Types

type Config

type Config struct {
	Password string
	User     string
	Name     string
	Host     string
	SSLMode  string
}

type User

type User struct {
	ID       int    `json:"id"`
	Username string `json:"username"`
	Password string `json:"password"`
	Email    string `json:"email"`
	Role     string `json:"role"`
}

Jump to

Keyboard shortcuts

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