dummy

package
v0.0.0-...-0484061 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DummyAuth

type DummyAuth struct{}

Implements Authenticator.

func (*DummyAuth) Allowed

func (d *DummyAuth) Allowed(req *http.Request) error

Allowed implements Authenticator.Allowed method. This only check if authorization header exists (DummyAuth is a test).

func (*DummyAuth) GetCurrentUsername

func (d *DummyAuth) GetCurrentUsername(req *http.Request) (string, error)

GetCurrentUsername implements Authenticator.GetCurrentUsername methods. Base64 decrypt authorization header where we stored username (that's for testing).

func (*DummyAuth) Login

func (d *DummyAuth) Login(u *user.User) error

Login implements Authenticator.Login method.

func (*DummyAuth) Logout

func (d *DummyAuth) Logout(*user.User) error

Logout implements Authenticator.Logout method. Does nothing, we are using faked authorization header.

type DummyProject

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

Dummy project

func (*DummyProject) Get

func (dp *DummyProject) Get(name string) *project.Project

Get implements ProjectManager.Get method.

func (*DummyProject) GetAll

func (dp *DummyProject) GetAll(owner ...string) []*project.Project

GetAll implements ProjectManager.GetAll method.

func (*DummyProject) New

func (dp *DummyProject) New(prj *project.Project) error

New project to save.

func (*DummyProject) NextImage

func (db *DummyProject) NextImage(prj *project.Project) (string, error)

Jump to

Keyboard shortcuts

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