mocks

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2024 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthClient

type AuthClient struct {
	Calls                 map[string][]AuthClientCallerInfo
	MockEnsureUserByEmail func(ctx context.Context, in *auth.GetUserByEmailRequest, opts ...grpc.CallOption) (*auth.GetUserByEmailOut, error)
	MockGetAccessToken    func(ctx context.Context, in *auth.GetAccessTokenRequest, opts ...grpc.CallOption) (*auth.AccessTokenOut, error)
	MockGetUser           func(ctx context.Context, in *auth.GetUserIn, opts ...grpc.CallOption) (*auth.GetUserOut, error)
}

func NewAuthClient

func NewAuthClient() *AuthClient

func (*AuthClient) EnsureUserByEmail

func (aMock *AuthClient) EnsureUserByEmail(ctx context.Context, in *auth.GetUserByEmailRequest, opts ...grpc.CallOption) (*auth.GetUserByEmailOut, error)

func (*AuthClient) GetAccessToken

func (aMock *AuthClient) GetAccessToken(ctx context.Context, in *auth.GetAccessTokenRequest, opts ...grpc.CallOption) (*auth.AccessTokenOut, error)

func (*AuthClient) GetUser

func (aMock *AuthClient) GetUser(ctx context.Context, in *auth.GetUserIn, opts ...grpc.CallOption) (*auth.GetUserOut, error)

type AuthClientCallerInfo

type AuthClientCallerInfo struct {
	Args []any
}

type AuthServer

type AuthServer struct {
	Calls                 map[string][]AuthServerCallerInfo
	MockEnsureUserByEmail func(ka context.Context, kb *auth.GetUserByEmailRequest) (*auth.GetUserByEmailOut, error)
	MockGetAccessToken    func(kc context.Context, kd *auth.GetAccessTokenRequest) (*auth.AccessTokenOut, error)
	MockGetUser           func(ke context.Context, kf *auth.GetUserIn) (*auth.GetUserOut, error)
}

func NewAuthServer

func NewAuthServer() *AuthServer

func (*AuthServer) EnsureUserByEmail

func (aMock *AuthServer) EnsureUserByEmail(ka context.Context, kb *auth.GetUserByEmailRequest) (*auth.GetUserByEmailOut, error)

func (*AuthServer) GetAccessToken

func (aMock *AuthServer) GetAccessToken(kc context.Context, kd *auth.GetAccessTokenRequest) (*auth.AccessTokenOut, error)

func (*AuthServer) GetUser

func (aMock *AuthServer) GetUser(ke context.Context, kf *auth.GetUserIn) (*auth.GetUserOut, error)

type AuthServerCallerInfo

type AuthServerCallerInfo struct {
	Args []any
}

Jump to

Keyboard shortcuts

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