models

package
v0.0.0-...-922fd97 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Ping

func Ping(ctx context.Context) error

Ping the database to verify DSN provided by the user is valid and the server accessible. If the ping fails exit the program with an error.

Types

type Page

type Page struct {
	Title string
	Body  []byte
}

func (*Page) Load

func (p *Page) Load() error

func (*Page) Save

func (p *Page) Save() error

type User

type User struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

func (*User) Create

func (u *User) Create(ctx context.Context) error

func (*User) Read

func (u *User) Read(ctx context.Context) error

Query the database for the information requested and prints the results. If the query fails exit the program with an error.

Jump to

Keyboard shortcuts

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