test

package
v0.1.19 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2024 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 AuthOnRegister

type AuthOnRegister struct {
	Given        *auth.RegistrationRequest
	Created      *auth.Session
	CheckContext FromContextFn
	Error        error
}

type AuthOnValidate

type AuthOnValidate struct {
	Given    FromContextFn
	Validate *auth.WhoAmI
	Error    error
}

type FromContextFn

type FromContextFn func(context.Context) bool

type MockAuthClient

type MockAuthClient struct {
	OnValidate []AuthOnValidate
	OnRegister []AuthOnRegister
}

func (MockAuthClient) Register

func (MockAuthClient) Validate

func (m MockAuthClient) Validate(ctx context.Context, _ *emptypb.Empty, _ ...grpc.CallOption) (*auth.WhoAmI, error)

type MockAuthServer

type MockAuthServer struct {
	auth.UnimplementedAuthServer
	Client MockAuthClient
}

func (MockAuthServer) Register

func (MockAuthServer) Validate

func (m MockAuthServer) Validate(ctx context.Context, empty *emptypb.Empty) (*auth.WhoAmI, error)

Jump to

Keyboard shortcuts

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