domain

package
v0.0.0-...-f20c94d Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2016 License: MIT Imports: 8 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Key

type Key struct {
	Id          int64  `json:"id,omitempty"`
	User        string `json:"user"`
	Title       string `json:"title"`
	Fingerprint string `json:"fingerprint"`
	Key         string `json:"key"`
}

Key struct holding information contained on Key

func (*Key) CalculateFingerprint

func (k *Key) CalculateFingerprint() error

CalculateFingerprint function contained on Key

type KeyRepository

type KeyRepository interface {
	Store(key *Key) error
	Delete(id int64) error
	GetKeys() []Key
	GetUserKeys(user string) []Key
}

KeyRepository interface

type User

type User struct {
	Id       int64  `json:"-"`
	Username string `json:"username"`
	Password string `json:"password,omitempty"`
}

User struct

func (*User) CheckPassword

func (u *User) CheckPassword(password string) bool

CheckPassword function contained on User

func (*User) HashPassword

func (u *User) HashPassword()

HashPassword function contained on User

type UserRepository

type UserRepository interface {
	Store(user *User) error
	GetUser(user string) (User, error)
	Update(user *User) error
	Delete(user string) error
	Count() (int, error)
}

UserRepository interface

Jump to

Keyboard shortcuts

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