root

package
v1.1.0-dotfiles Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2018 License: Unlicense Imports: 0 Imported by: 0

Documentation

Overview

Package root defines some fundamental types.

Package root defines some fundamental types.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Credentials

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

Credentials represent some credentials to log in with.

type User

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

User represents a single user.

type UserService

type UserService interface {
	CreateUser(u *User) error
	GetUserByUsername(username string) (User, error)
	Login(c Credentials) (User, error)
}

UserService defines an interface for a user service.

Directories

Path Synopsis
Package mock provides some mocks to test with.
Package mock provides some mocks to test with.
Package mongo interfaces with MongoDb for us.
Package mongo interfaces with MongoDb for us.
Package server defines internal behaviour.
Package server defines internal behaviour.

Jump to

Keyboard shortcuts

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