Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var NotExistingTenantId = int64(309832948930)
View Source
var TestApplicationAuthenticationData = []m.ApplicationAuthentication{ { ID: 1, VaultPath: fmt.Sprintf("Application_%d_%v", TestTenantData[0].Id, TestAuthenticationData[0].ID), TenantID: TestTenantData[0].Id, ApplicationID: 1, AuthenticationID: TestAuthenticationData[0].DbID, AuthenticationUID: TestAuthenticationData[0].ID, }, { ID: 2, VaultPath: fmt.Sprintf("Application_%d_%v", TestTenantData[0].Id, TestAuthenticationData[3].ID), TenantID: TestTenantData[0].Id, ApplicationID: 5, AuthenticationID: TestAuthenticationData[3].DbID, AuthenticationUID: TestAuthenticationData[3].ID, }, { ID: 300, VaultPath: fmt.Sprintf("Application_%d_%v", TestTenantData[0].Id, TestAuthenticationData[4].ID), TenantID: TestTenantData[0].Id, ApplicationID: 4, AuthenticationID: TestAuthenticationData[4].DbID, AuthenticationUID: TestAuthenticationData[4].ID, }, }
View Source
var TestApplicationData = []m.Application{ { ID: 1, Extra: datatypes.JSON("{\"extra\": true}"), ApplicationTypeID: 1, SourceID: 1, TenantID: 1, }, { ID: 2, Extra: datatypes.JSON("{\"extra\": false}"), ApplicationTypeID: 1, SourceID: 2, TenantID: 1, }, { ID: 3, Extra: datatypes.JSON("{\"extra\": false}"), ApplicationTypeID: 2, SourceID: 1, TenantID: 1, }, { ID: 4, Extra: datatypes.JSON("{\"extra\": false}"), ApplicationTypeID: 1, SourceID: 4, TenantID: 1, }, { ID: 5, Extra: datatypes.JSON("{\"extra\": false}"), ApplicationTypeID: 2, SourceID: 4, TenantID: 1, }, }
View Source
var TestApplicationTypeData = []m.ApplicationType{ { Id: 1, Name: "app type one", DisplayName: "test app type", }, { Id: 2, Name: "app type two", DisplayName: "second test app type", }, { Id: 5, Name: "app type one123", DisplayName: "test app type", }, { Id: 100, DisplayName: "app type without related sources", }, { Id: 3, DisplayName: "app-studio", Name: "/insights/platform/app-studio", ResourceOwnership: &userOwnership, SupportedSourceTypes: []byte(`["bitbucket", "dockerhub", "github", "gitlab", "quay"]`), }, { Id: 4, DisplayName: "Cost Management", Name: "/insights/platform/cost-management", SupportedSourceTypes: []byte(`["amazon", "azure", "google", "oracle-cloud-infrastructure", "openshift", "ibm"]`), }, }
View Source
var TestAuthenticationData = []m.Authentication{ { ID: "611a8a38-f434-4e62-bda0-78cd45ffae5b", DbID: 1, TenantID: TestTenantData[0].Id, SourceID: 1, Username: util.StringRef("first"), ResourceType: "Application", ResourceID: 1, AvailabilityStatus: &availabilityStatus, }, { ID: "82e1a1b6-a136-11ec-b909-0242ac120002", DbID: 2, TenantID: TestTenantData[0].Id, SourceID: 2, Username: util.StringRef("second"), ResourceType: "Endpoint", ResourceID: 1, AvailabilityStatus: &availabilityStatus, }, { ID: "24127a2a-c4db-11ec-9d64-0242ac120002", DbID: 3, TenantID: TestTenantData[0].Id, Username: util.StringRef("third"), SourceID: 2, ResourceType: "Source", ResourceID: 1, AvailabilityStatus: &availabilityStatus, }, { ID: "8fb28f0e-cb7a-11ec-9d64-0242ac120002", DbID: 4, TenantID: TestTenantData[0].Id, SourceID: 4, ResourceType: "Application", ResourceID: 5, AvailabilityStatus: &availabilityStatus, }, { ID: "1683629d-b830-4542-8842-308525cb7004", DbID: 5, TenantID: TestTenantData[0].Id, SourceID: 2, ResourceType: "Application", ResourceID: 4, AvailabilityStatus: &availabilityStatus, }, }
View Source
var TestAuthenticationVaultData = map[string]interface{}{ "authtype": "test", "availability_status": "available", "availability_error": "", "resource_type": "Application", "resource_id": "1", "extra": map[string]interface{}{}, "name": "OpenShift", "source_id": "1", "username": "testusr", }
View Source
var TestAuthenticationVaultMetaData = map[string]interface{}{ "created_time": "2022-01-10T14:58:02.850209Z", "custom_metadata": "2022-01-10T14:58:02.850209Z", "deletion_time": nil, "destroyed": false, "version": json.Number("2"), "extra": map[string]interface{}{}, "name": "OpenShift", "source_id": "1", "username": "testusr", }
View Source
var TestDataOffsetLimit = []OffsetLimit{
{
Limit: 10,
Offset: 0,
},
{
Limit: 10,
Offset: 1,
},
{
Limit: 10,
Offset: 100,
},
{
Limit: 1,
Offset: 0,
},
{
Limit: 1,
Offset: 1,
},
{
Limit: 1,
Offset: 100,
},
}
View Source
var TestEndpointData = []m.Endpoint{
{
ID: 1,
SourceID: 1,
TenantID: 1,
Port: &port,
Default: &defaultValueSource1,
Scheme: &scheme1,
Host: &host1,
Path: &path1,
AvailabilityStatus: "unavailable",
},
{
ID: 2,
SourceID: 1,
TenantID: 1,
Port: &port,
Default: &defaultValueSource2,
Scheme: &scheme2,
Host: &host2,
Path: &path2,
AvailabilityStatus: "unavailable",
},
{
ID: 300,
SourceID: 2,
TenantID: 1,
Port: &port,
Default: &defaultValueSource2,
Scheme: &scheme2,
Host: &host2,
Path: &path2,
AvailabilityStatus: "unavailable",
},
}
View Source
var TestMetaDataData = []m.MetaData{ { ID: 1, ApplicationTypeID: 1, Type: m.AppMetaData, }, { ID: 2, ApplicationTypeID: 1, Type: m.AppMetaData, }, }
View Source
var TestRhcConnectionData = []m.RhcConnection{
{
ID: 1,
RhcId: "a",
AvailabilityStatus: "available",
},
{
ID: 2,
RhcId: "b",
AvailabilityStatus: "available",
},
{
ID: 3,
RhcId: "c",
AvailabilityStatus: "unavailable",
},
}
View Source
var TestSourceData = []m.Source{
{
ID: 1,
Name: "Source1",
SourceTypeID: 1,
TenantID: 1,
AvailabilityStatus: "available",
Uid: &uid1,
},
{
ID: 2,
Name: "Source2",
SourceTypeID: 1,
TenantID: 1,
AvailabilityStatus: "unavailable",
Uid: &uid2,
},
{
ID: 100,
Name: "Source3 for TestSourceDelete()",
SourceTypeID: 1,
TenantID: 1,
AvailabilityStatus: "available",
Uid: &uid3,
},
{
ID: 4,
Name: "Source4",
SourceTypeID: 2,
TenantID: 1,
AvailabilityStatus: "available",
Uid: &uid4,
},
{
ID: 101,
Name: "Source5 without applications",
SourceTypeID: 2,
TenantID: 1,
AvailabilityStatus: "available",
Uid: &uid5,
},
{
ID: 6,
Name: "Source6 Satellite",
SourceTypeID: 5,
TenantID: 1,
AvailabilityStatus: "available",
Uid: &uid6,
},
}
View Source
var TestSourceRhcConnectionData = []m.SourceRhcConnection{ { SourceId: TestSourceData[0].ID, RhcConnectionId: TestRhcConnectionData[0].ID, TenantId: TestTenantData[0].Id, }, { SourceId: TestSourceData[0].ID, RhcConnectionId: TestRhcConnectionData[1].ID, TenantId: TestTenantData[0].Id, }, { SourceId: TestSourceData[1].ID, RhcConnectionId: TestRhcConnectionData[0].ID, TenantId: TestTenantData[0].Id, }, { SourceId: TestSourceData[1].ID, RhcConnectionId: TestRhcConnectionData[2].ID, TenantId: TestTenantData[0].Id, }, }
View Source
var TestSourceTypeData = []m.SourceType{
{
Id: 1,
Name: "amazon",
},
{
Id: 2,
Name: "google",
},
{
Id: 3,
Name: "bitbucket",
},
{
Id: 4,
Name: "amazon123",
},
{
Id: 100,
Name: "source type without sources in fixtures",
},
{
Id: 5,
Name: "satellite",
},
}
View Source
var TestTenantData = []m.Tenant{
{
Id: 1,
ExternalTenant: "12345",
OrgID: "9876543210",
},
{
Id: 2,
ExternalTenant: "67890",
},
{
Id: 3,
ExternalTenant: "7893720",
OrgID: "tenant without sources",
},
}
Functions ¶
This section is empty.
Types ¶
type OffsetLimit ¶
Click to show internal directories.
Click to hide internal directories.