icctest

package
v0.0.0-...-bd60060 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package icctest contains test helpers for all other packages of this module.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AutherStub

type AutherStub struct {
	UserID  int
	AuthErr bool
}

AutherStub impplements the icchelper.Auther interface

func (*AutherStub) Authenticate

func (a *AutherStub) Authenticate(w http.ResponseWriter, r *http.Request) (context.Context, error)

Authenticate does nothing. The Stub uses the userID that it was initialized with.

func (*AutherStub) FromContext

func (a *AutherStub) FromContext(context.Context) int

FromContext returns the user id the stub was initializes with.

Jump to

Keyboard shortcuts

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