postgres

package
v0.0.0-...-05593c5 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Hostname string
	Database string
	Username string
	Password string
}

Config has the configuration options for the starter

type Dependencies

type Dependencies struct {
	Logger    zerolog.Logger
	Converter providers.EnvironmentConverter
}

Dependencies defines the dependencies of this bot

type Store

type Store struct {
	Config
	Dependencies
}

Store is a postgres based store.

func NewPostgresStore

func NewPostgresStore(cfg Config, deps Dependencies) *Store

NewPostgresStore creates a new PostgresStore

func (*Store) GetUser

func (s *Store) GetUser(ctx context.Context, handle string) (*models.User, error)

GetUser returns the full user entity.

Jump to

Keyboard shortcuts

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