user

package
v0.0.0-...-cb2c959 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2018 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NullableUser

type NullableUser struct {
	Username       *string `json:"username"`
	HashedPassword *string `json:"hashedPassword"`
	IsAdmin        *bool   `json:"isAdmin"`
	IsVerified     *bool   `json:"isVerified"`
}

NullableUser is a nullable version of user.

type Service

type Service interface {
	Create(User) error
	Get(username string) (User, error)
	GetUsers() ([]User, error)
	Update(username string, nu NullableUser) error
	Delete(username string) error
}

Service is a store for users.

type User

type User struct {
	Username       string `json:"username"`
	HashedPassword string `json:"hashedPassword"`
	IsAdmin        bool   `json:"isAdmin"`
	IsVerified     bool   `json:"isVerified"`
}

User holds information about a user.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳