charontest

package
v0.0.0-...-dec1867 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2016 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Charon

type Charon struct {
	mock.Mock
}

func (*Charon) FromContext

func (c *Charon) FromContext(ctx context.Context) (*charon.Subject, error)

Context implements Charon interface.

func (*Charon) IsAuthenticated

func (c *Charon) IsAuthenticated(ctx context.Context, token mnemosyne.Token) (bool, error)

IsAuthenticated implements Charon interface.

func (*Charon) IsGranted

func (c *Charon) IsGranted(ctx context.Context, userID int64, perm charon.Permission) (bool, error)

func (*Charon) Login

func (c *Charon) Login(ctx context.Context, username, password string) (*mnemosyne.Token, error)

Login implements Charon interface.

func (*Charon) Logout

func (c *Charon) Logout(ctx context.Context, token mnemosyne.Token) error

Logout implements Charon interface.

func (*Charon) Subject

func (c *Charon) Subject(ctx context.Context, token mnemosyne.Token) (*charon.Subject, error)

Subject implements Charon interface.

Jump to

Keyboard shortcuts

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