testbackend

package
v0.0.0-...-01681b2 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TestBackend

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

func (*TestBackend) Add

func (b *TestBackend) Add(u *TestUser)

func (*TestBackend) AuthPassword

func (b *TestBackend) AuthPassword(sub, passwd string) (ret bool, err error)

func (*TestBackend) AuthPasswordByFeature

func (b *TestBackend) AuthPasswordByFeature(feature, passwd string) (ret bool, u iuser.User, err error)

func (*TestBackend) CreateUser

func (b *TestBackend) CreateUser(user iuser.User, passwordHashed bool) (err error)

func (*TestBackend) DeleteUser

func (b *TestBackend) DeleteUser(u iuser.User) (err error)

func (*TestBackend) GetUser

func (b *TestBackend) GetUser(id int) (ret iuser.User, err error)

func (*TestBackend) GetUserByEmail

func (b *TestBackend) GetUserByEmail(email string) (iuser.User, error)

func (*TestBackend) GetUserByFeature

func (b *TestBackend) GetUserByFeature(email string) (ret iuser.User, err error)

func (*TestBackend) GetUserByName

func (b *TestBackend) GetUserByName(name string) (ret iuser.User, err error)

func (*TestBackend) InitModel

func (b *TestBackend) InitModel(model interface{})

func (*TestBackend) ListUsers

func (b *TestBackend) ListUsers(ctx context.Context) (ret []iuser.User, err error)

func (*TestBackend) Name

func (b *TestBackend) Name() (ret string)

func (*TestBackend) SupportedVerificationMethods

func (b *TestBackend) SupportedVerificationMethods() (ret []string)

func (*TestBackend) UserIdToSub

func (b *TestBackend) UserIdToSub(id int) (ret string)

func (*TestBackend) UserSubToId

func (b *TestBackend) UserSubToId(sub string) (ret int, err error)

type TestUser

type TestUser struct {
	Id           int
	Name         string
	PasswordHash []byte
	Email        string
}

func (*TestUser) GetId

func (u *TestUser) GetId() (ret int)

func (*TestUser) GetMobile

func (u *TestUser) GetMobile() (ret string)

func (*TestUser) GetName

func (u *TestUser) GetName() (ret string)

func (*TestUser) GetProfile

func (u *TestUser) GetProfile() iuser.UserProfile

func (*TestUser) GetPublicProfile

func (u *TestUser) GetPublicProfile() (ret iuser.UserProfile)

func (*TestUser) GetSub

func (u *TestUser) GetSub() (ret string)

func (*TestUser) SetBackend

func (u *TestUser) SetBackend(back iuser.UserBackend)

type UserProfile

type UserProfile struct {
	Name     string `json:"name"`
	FullName string `json:"fullname"`
	Email    string `json:"email"`
	Mobile   string `json:"mobile"`
}

func (*UserProfile) GetEmail

func (p *UserProfile) GetEmail() string

func (*UserProfile) GetMobile

func (p *UserProfile) GetMobile() string

func (*UserProfile) GetName

func (p *UserProfile) GetName() string

Jump to

Keyboard shortcuts

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