test

package
v0.1.26 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 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 AuthOnGetHeadlessSession added in v0.1.25

type AuthOnGetHeadlessSession struct {
	Given *auth.GetHeadlessSessionRequest
	Found *auth.HeadlessSession
	Error error
}

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
	OnGetHeadlessSession []AuthOnGetHeadlessSession
}

func (MockAuthClient) GetHeadlessSession added in v0.1.25

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) GetHeadlessSession added in v0.1.25

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