mock

package
v0.0.0-...-d983439 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mock

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

Mock is a mocked out APIClient.

func (Mock) ApplicationsClient

func (c Mock) ApplicationsClient() applications.ApplicationsServiceClient

ApplicationsClient returns mock ApplicationsClient

func (Mock) AuthzClient

func (c Mock) AuthzClient() iam.AuthorizationClient

AuthzClient returns mock AuthzClient

func (Mock) CloseConnection

func (c Mock) CloseConnection() error

CloseConnection closes all connections opened by client

func (Mock) PoliciesClient

func (c Mock) PoliciesClient() iam.PoliciesClient

PoliciesClient returns mock PoliciesClient

func (Mock) ReportingClient

func (c Mock) ReportingClient() reporting.ReportingServiceClient

ReportingClient returns mock ReportingClient

func (Mock) TeamsClient

func (c Mock) TeamsClient() iam.TeamsClient

TeamsClient returns mock TeamsClient

func (Mock) TokensClient

func (c Mock) TokensClient() iam.TokensClient

TokensClient returns mock TokensClient

func (Mock) UsersClient

func (c Mock) UsersClient() iam.UsersClient

UsersClient returns mock UsersClient

type ServerMocks

type ServerMocks struct {
	AuthzMock    *iam.AuthorizationServerMock
	PoliciesMock *iam.PoliciesServerMock
	TeamsMock    *iam.TeamsServerMock
	TokensMock   *iam.TokensServerMock
	UsersMock    *iam.UsersServerMock
}

ServerMocks are mocked out API servers

func CreateMockConn

func CreateMockConn(t *testing.T) (client.APIClient, ServerMocks, error)

CreateMockConn returns a mocked version of APIClient that has clients that are connected to mock versions of the server.

Jump to

Keyboard shortcuts

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