client

package
v0.0.0-...-a2b2d1c Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2018 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddUser

func AddUser(db *Client, user *User)

Add a user to the db

func CreateTables

func CreateTables(db *Client)

func Delete

func Delete(db *Client, id int)

This deletes a given name id

func WriteName

func WriteName(db *Client, name *Name)

This creates a new row or updates an existing one

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New() *Client

type Name

type Name struct {
	Id    int    `json:"id"`
	First string `json:"firstname"`
	Last  string `json:"lastname"`
}

My Name

func ReadName

func ReadName(db *Client) []Name

type User

type User struct {
	Id       int    `json:"id"`
	Username string `json:"first"`
	Password string `json:"password"`
	Admin    int    `json:"admin"`
}

func GetUser

func GetUser(db *Client, username string) User

Jump to

Keyboard shortcuts

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