charontest

package
v0.5.10 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2016 License: Apache-2.0 Imports: 3 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 string) (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) (string, error)

Login implements Charon interface.

func (*Charon) Logout

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

Logout implements Charon interface.

func (*Charon) Subject

func (c *Charon) Subject(ctx context.Context, token string) (*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