Documentation
¶
Index ¶
- Variables
- func ExpectNoRows() *sqlmock.Rows
- func ExpectOneRow() *sqlmock.Rows
- func GetCNSIRows(records ...*api.CNSIRecord) *sqlmock.Rows
- func GetConnectedEndpointsRows(records ...*api.ConnectedEndpoint) *sqlmock.Rows
- func GetEmptyCNSIRows(exclude ...string) *sqlmock.Rows
- func GetEmptyConnectedEndpointsRows(exclude ...string) *sqlmock.Rows
- func GetEmptyTokenRows(exclude ...string) *sqlmock.Rows
- func GetTestCNSIRecord() *api.CNSIRecord
- func GetTestConnectedEndpoint() *api.ConnectedEndpoint
- func GetTokenRows(encriptionKey []byte) *sqlmock.Rows
- func GetTokenRowsWithExpiredToken(encriptionKey []byte) *sqlmock.Rows
Constants ¶
This section is empty.
Variables ¶
View Source
var ( MockCNSIGUID = "some-guid-1234" MockCNSIName = "mockCF" MockCFGUID = "some-cf-guid-1234" MockCFName = "Some fancy CF Cluster" MockHCEGUID = "some-hce-guid-1234" MockHCEName = "Some fancy HCE Cluster" MockAPIEndpoint = "https://api.127.0.0.1" MockAuthEndpoint = "https://login.127.0.0.1" MockDopplerEndpoint = "https://doppler.127.0.0.1" MockClientId = "stratos_clientid" MockClientSecret = "stratos_secret" MockAccount = "asd-gjfg-bob" MockTokenGUID = "mock-token-guid" MockUAAToken = `` /* 3260-byte string literal not displayed */ MockTokenExpiry = time.Now().AddDate(0, 0, 1).Unix() MockAdminGUID = tokens.SystemSharedUserGuid MockEncryptionKey = make([]byte, 32) MockCipherClientSecret = make([]byte, 0) )
Functions ¶
func ExpectNoRows ¶
func ExpectOneRow ¶
func GetCNSIRows ¶
func GetCNSIRows(records ...*api.CNSIRecord) *sqlmock.Rows
Gets a prefilled sqlmock.Rows with all the columns of the cnsis table. It contains entries corresponding to the records passed in
func GetConnectedEndpointsRows ¶
func GetConnectedEndpointsRows(records ...*api.ConnectedEndpoint) *sqlmock.Rows
Gets a prefilled sqlmock.Rows with all the columns of the cnsis + tokens (connected endpoints) table. It contains entries corresponding to the records passed in
func GetEmptyCNSIRows ¶
Gets an empty sqlmock.Rows with all the columns of the cnsis table, except the ones passed as exclude
func GetEmptyConnectedEndpointsRows ¶
Gets an empty sqlmock.Rows with all the columns of the cnsis + token (connected endpoints) table, except the ones passed as exclude
func GetEmptyTokenRows ¶
func GetTestCNSIRecord ¶
func GetTestCNSIRecord() *api.CNSIRecord
Gets the default CNSI Record for testing
func GetTestConnectedEndpoint ¶
func GetTestConnectedEndpoint() *api.ConnectedEndpoint
Gets the default Connected Enpoint Record for testing
func GetTokenRows ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.