testhelpers

package
v0.8.11 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: MPL-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MockClusterReplicaScan added in v0.0.8

func MockClusterReplicaScan(mock sqlmock.Sqlmock, predicate string)

func MockClusterScan added in v0.0.8

func MockClusterScan(mock sqlmock.Sqlmock, predicate string)

func MockConnectionAwsPrivatelinkScan added in v0.0.8

func MockConnectionAwsPrivatelinkScan(mock sqlmock.Sqlmock, predicate string)

func MockConnectionAwsScan added in v0.6.7

func MockConnectionAwsScan(mock sqlmock.Sqlmock, predicate string)

func MockConnectionScan added in v0.0.8

func MockConnectionScan(mock sqlmock.Sqlmock, predicate string)

func MockConnectionSshTunnelScan added in v0.0.8

func MockConnectionSshTunnelScan(mock sqlmock.Sqlmock, predicate string)

func MockDatabaseScan added in v0.0.8

func MockDatabaseScan(mock sqlmock.Sqlmock, predicate string)

func MockDefaultPrivilegeScan added in v0.1.0

func MockDefaultPrivilegeScan(mock sqlmock.Sqlmock, predicate, objectType string)

func MockIndexColumnScan added in v0.1.5

func MockIndexColumnScan(mock sqlmock.Sqlmock, predicate string)

func MockIndexScan added in v0.0.8

func MockIndexScan(mock sqlmock.Sqlmock, predicate string)

func MockMaterializeViewScan added in v0.1.13

func MockMaterializeViewScan(mock sqlmock.Sqlmock, predicate string)

func MockMysqlSubsourceScan added in v0.8.0

func MockMysqlSubsourceScan(mock sqlmock.Sqlmock, predicate string)

MockMysqlSubsourceScan mocks the scan of a postgres source

func MockNetworkPolicyScan added in v0.8.11

func MockNetworkPolicyScan(mock sqlmock.Sqlmock, predicate string)

func MockPosgresSubsourceScan added in v0.8.0

func MockPosgresSubsourceScan(mock sqlmock.Sqlmock, predicate string)

MockPosgresSubsourceScan mocks the scan of a postgres source

func MockRoleGrantScan added in v0.1.0

func MockRoleGrantScan(mock sqlmock.Sqlmock)

func MockRoleScan added in v0.0.8

func MockRoleScan(mock sqlmock.Sqlmock, predicate string)

func MockSchemaScan added in v0.0.8

func MockSchemaScan(mock sqlmock.Sqlmock, predicate string)

func MockSecretScan added in v0.0.8

func MockSecretScan(mock sqlmock.Sqlmock, predicate string)

func MockSinkScan added in v0.0.8

func MockSinkScan(mock sqlmock.Sqlmock, predicate string)

func MockSourceScan added in v0.0.8

func MockSourceScan(mock sqlmock.Sqlmock, predicate string)

func MockSubsourceScan added in v0.1.5

func MockSubsourceScan(mock sqlmock.Sqlmock, predicate string)

func MockSystemGrantScan added in v0.1.0

func MockSystemGrantScan(mock sqlmock.Sqlmock)

func MockSystemPrivilege added in v0.1.0

func MockSystemPrivilege(mock sqlmock.Sqlmock)

func MockTableColumnScan added in v0.1.5

func MockTableColumnScan(mock sqlmock.Sqlmock, predicate string)

func MockTableScan added in v0.0.8

func MockTableScan(mock sqlmock.Sqlmock, predicate string)

func MockTypeScan added in v0.0.8

func MockTypeScan(mock sqlmock.Sqlmock, predicate string)

func MockViewScan added in v0.0.8

func MockViewScan(mock sqlmock.Sqlmock, predicate string)

func WithMockCloudServer added in v0.5.0

func WithMockCloudServer(t *testing.T, f func(url string))

WithMockCloudServer sets up a mock HTTP server for cloud-related requests and calls the provided function with the server URL.

func WithMockDb

func WithMockDb(t *testing.T, f func(*sqlx.DB, sqlmock.Sqlmock))

func WithMockFronteggServer added in v0.5.0

func WithMockFronteggServer(t *testing.T, f func(url string))

func WithMockProviderMeta added in v0.5.0

func WithMockProviderMeta(t *testing.T, f func(*utils.ProviderMeta, sqlmock.Sqlmock))

Types

type DefaultRoles added in v0.6.0

type DefaultRoles struct {
	RoleIds []string `json:"roleIds"`
}

type Domain added in v0.6.0

type Domain struct {
	ID          string `json:"id"`
	Domain      string `json:"domain"`
	Validated   bool   `json:"validated"`
	SsoConfigId string `json:"ssoConfigId"`
}

type FronteggRole added in v0.6.0

type FronteggRole struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

type FronteggRolesResponse added in v0.6.0

type FronteggRolesResponse struct {
	Items    []FronteggRole `json:"items"`
	Metadata struct {
		TotalItems int `json:"totalItems"`
		TotalPages int `json:"totalPages"`
	} `json:"_metadata"`
}

type GroupMapping added in v0.6.0

type GroupMapping struct {
	ID          string   `json:"id"`
	Group       string   `json:"group"`
	RoleIds     []string `json:"roleIds"`
	SsoConfigId string   `json:"ssoConfigId"`
	Enabled     bool     `json:"enabled"`
}

type MockAppPassword added in v0.5.0

type MockAppPassword struct {
	ClientID    string    `json:"clientId"`
	Description string    `json:"description"`
	Owner       string    `json:"owner"`
	CreatedAt   time.Time `json:"created_at"`
	Secret      string    `json:"secret"`
}

type MockCloudService added in v0.5.0

type MockCloudService struct{}

MockCloudService is a mock implementation of the http.RoundTripper interface for cloud-related requests

func (*MockCloudService) RoundTrip added in v0.5.0

func (m *MockCloudService) RoundTrip(req *http.Request) (*http.Response, error)

type SSOConfig added in v0.6.0

type SSOConfig struct {
	Id                        string         `json:"id"`
	Enabled                   bool           `json:"enabled"`
	SsoEndpoint               string         `json:"ssoEndpoint"`
	PublicCertificate         string         `json:"publicCertificate"`
	SignRequest               bool           `json:"signRequest"`
	AcsUrl                    string         `json:"acsUrl"`
	SpEntityId                string         `json:"spEntityId"`
	Type                      string         `json:"type"`
	OidcClientId              string         `json:"oidcClientId"`
	OidcSecret                string         `json:"oidcSecret"`
	Domains                   []Domain       `json:"domains"`
	Groups                    []GroupMapping `json:"groups"`
	DefaultRoles              DefaultRoles   `json:"defaultRoles"`
	GeneratedVerification     string         `json:"generatedVerification,omitempty"`
	CreatedAt                 time.Time      `json:"createdAt,omitempty"`
	UpdatedAt                 time.Time      `json:"updatedAt,omitempty"`
	ConfigMetadata            interface{}    `json:"configMetadata,omitempty"`
	OverrideActiveTenant      bool           `json:"overrideActiveTenant,omitempty"`
	SkipEmailDomainValidation bool           `json:"skipEmailDomainValidation,omitempty"`
	SubAccountAccessLimit     int            `json:"subAccountAccessLimit,omitempty"`
	RoleIds                   []string       `json:"roleIds"`
}

Jump to

Keyboard shortcuts

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