db

package
v0.0.0-...-fc85361 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Joke

type Joke struct {
	Id  int    `json:"id"`
	Str string `json:"str"`
}

type JokeDatabase

type JokeDatabase interface {
	Add(user_id int, joke_str string) (int, error)
	Select(joke_id int, user_id int) (string, error)
	List(user_id int) ([]Joke, error)
	Update(joke_id int, user_id int, joke_str string) error
	Delete(joke_id int, user_id int) error
}

func Init

func Init() (JokeDatabase, error)

func PsqlInit

func PsqlInit(db_url string) (JokeDatabase, error)

Jump to

Keyboard shortcuts

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