authentication

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package authentication is a generated GoMock package.

Package authentication is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authentication

type Authentication interface {
	// Authenticate check token valid and return user identifier
	Authenticate(ctx context.Context, token string) (string, error)
}

func NewAuthentication

func NewAuthentication(client TokenClient) Authentication

type MockAuthentication

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

MockAuthentication is a mock of Authentication interface.

func NewMockAuthentication

func NewMockAuthentication(ctrl *gomock.Controller) *MockAuthentication

NewMockAuthentication creates a new mock instance.

func (*MockAuthentication) Authenticate

func (m *MockAuthentication) Authenticate(ctx context.Context, token string) (string, error)

Authenticate mocks base method.

func (*MockAuthentication) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

type MockAuthenticationMockRecorder

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

MockAuthenticationMockRecorder is the mock recorder for MockAuthentication.

func (*MockAuthenticationMockRecorder) Authenticate

func (mr *MockAuthenticationMockRecorder) Authenticate(ctx, token interface{}) *gomock.Call

Authenticate indicates an expected call of Authenticate.

type MockTokenClient

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

MockTokenClient is a mock of TokenClient interface.

func NewMockTokenClient

func NewMockTokenClient(ctrl *gomock.Controller) *MockTokenClient

NewMockTokenClient creates a new mock instance.

func (*MockTokenClient) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockTokenClient) GetUser

func (m *MockTokenClient) GetUser(ctx context.Context, token string) (string, error)

GetUser mocks base method.

type MockTokenClientMockRecorder

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

MockTokenClientMockRecorder is the mock recorder for MockTokenClient.

func (*MockTokenClientMockRecorder) GetUser

func (mr *MockTokenClientMockRecorder) GetUser(ctx, token interface{}) *gomock.Call

GetUser indicates an expected call of GetUser.

type TokenClient

type TokenClient interface {
	GetUser(ctx context.Context, token string) (string, error)
}

func NewBuiltInClient

func NewBuiltInClient(cluster cluster.Cluster) TokenClient

Jump to

Keyboard shortcuts

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