usecases

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: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotAuthenticated = errors.New("User could not be authenticated")

ErrNotAuthenticated response for non authenticated user

Functions

This section is empty.

Types

type KeyInteractor

type KeyInteractor struct {
	KeyRepository domain.KeyRepository
}

KeyInteractor holds a KeyRepository instance

func (KeyInteractor) AddKey

func (interactor KeyInteractor) AddKey(key *domain.Key) error

AddKey function contained on KeyInteractor

func (KeyInteractor) DeleteKey

func (interactor KeyInteractor) DeleteKey(id int64) error

DeleteKey function contained on KeyInteractor

func (KeyInteractor) GetKeys

func (interactor KeyInteractor) GetKeys() []domain.Key

GetKeys function contained on KeyInteractor

func (KeyInteractor) GetUserKeys

func (interactor KeyInteractor) GetUserKeys(user string) []domain.Key

GetUserKeys function contained on KeyInteractor

type UserInteractor

type UserInteractor struct {
	UserRepository domain.UserRepository
}

UserInteractor struct

func (UserInteractor) AddUser

func (interactor UserInteractor) AddUser(user *domain.User) error

AddUser function contained on UserInteractor

func (UserInteractor) AuthenticateUser

func (interactor UserInteractor) AuthenticateUser(username, password string) (domain.User, error)

AuthenticateUser function contained on UserInteractor

Jump to

Keyboard shortcuts

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