model

package
v0.0.0-...-b9cce74 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const ConnString = "postgres://postgresql:postgresql@postgresql:5432/livechat-example?sslmode=disable"

Variables

This section is empty.

Functions

func Exec

func Exec(query string, args ...interface{}) error

func Get

func Get(dest interface{}, query string, args ...interface{}) error

func Init

func Init(maxConns int) error

func Select

func Select(dest interface{}, query string, args ...interface{}) error

Types

type Channel

type Channel struct {
	UUID        string `json:"uuid"`
	Name        string `json:"name"`
	Topic       string `json:"topic"`
	Description string `json:"description"`
}

type ChannelMessage

type ChannelMessage struct {
	ChannelUUID string    `json:"channel_uuid"`
	UserUUID    string    `json:"user_uuid"`
	Index       int       `json:"index"`
	Text        string    `json:"text"`
	Time        time.Time `json:"time"`
}

type User

type User struct {
	UUID         string `json:"uuid"`
	Name         string `json:"name"`
	PasswordHash string `json:"-"`
}

Jump to

Keyboard shortcuts

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