Documentation ¶
Index ¶
Constants ¶
const CreateOutput = `` /* 930-byte string literal not displayed */
const CreateRequest = `` /* 799-byte string literal not displayed */
const GetOutput = CreateOutput
const ListOutput = `` /* 1221-byte string literal not displayed */
const UpdateOutput = `` /* 938-byte string literal not displayed */
const UpdateRequest = `` /* 805-byte string literal not displayed */
Variables ¶
var ExpectedMappingsSlice = []federation.Mapping{MappingACME}
ExpectedMappingsSlice is the slice of mappings expected to be returned from ListOutput.
var MappingACME = federation.Mapping{ ID: "ACME", Links: map[string]interface{}{ "self": "http://example.com/identity/v3/OS-FEDERATION/mappings/ACME", }, Rules: []federation.MappingRule{ { Local: []federation.RuleLocal{ { User: &federation.RuleUser{ Name: "{0}", }, }, { Group: &federation.Group{ ID: "0cd5e9", }, }, }, Remote: []federation.RuleRemote{ { Type: "UserName", }, { Type: "orgPersonType", NotAnyOf: []string{ "Contractor", "Guest", }, }, }, }, }, }
var MappingUpdated = federation.Mapping{ ID: "ACME", Links: map[string]interface{}{ "self": "http://example.com/identity/v3/OS-FEDERATION/mappings/ACME", }, Rules: []federation.MappingRule{ { Local: []federation.RuleLocal{ { User: &federation.RuleUser{ Name: "{0}", }, }, { Group: &federation.Group{ ID: "0cd5e9", }, }, }, Remote: []federation.RuleRemote{ { Type: "UserName", }, { Type: "orgPersonType", AnyOneOf: []string{ "Contractor", "SubContractor", }, }, }, }, }, }
Functions ¶
func HandleCreateMappingSuccessfully ¶
HandleCreateMappingSuccessfully creates an HTTP handler at `/mappings` on the test handler mux that tests mapping creation.
func HandleDeleteMappingSuccessfully ¶
HandleDeleteMappingSuccessfully creates an HTTP handler at `/mappings` on the test handler mux that tests mapping deletion.
func HandleGetMappingSuccessfully ¶
HandleGetMappingSuccessfully creates an HTTP handler at `/mappings` on the test handler mux that responds with a single mapping.
func HandleListMappingsSuccessfully ¶
HandleListMappingsSuccessfully creates an HTTP handler at `/mappings` on the test handler mux that responds with a list of two mappings.
func HandleUpdateMappingSuccessfully ¶
HandleUpdateMappingSuccessfully creates an HTTP handler at `/mappings` on the test handler mux that tests mapping update.
Types ¶
This section is empty.