factories

package
v0.0.0-...-9758eb9 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SocketFactory = factory.NewFactory(
	&models.Socket{
		TargetHostname:        "webserver.connector.lab",
		TargetPort:            8000,
		Name:                  "webserver.connector.lab",
		SocketType:            "http",
		AllowedEmailAddresses: []string{"some-email01@domain.com"},
		AllowedEmailDomains:   []string{"border0.com", "some-other-domain.com"},
	},
).Attr("SocketID", func(args factory.Args) (interface{}, error) {
	return gofakeit.UUID(), nil
}).Attr("Name", func(args factory.Args) (interface{}, error) {
	return fmt.Sprintf("random-flower-%v", gofakeit.Number(1, 100)), nil
}).Attr("TargetHostname", func(args factory.Args) (interface{}, error) {
	return fmt.Sprintf("random-flower-%v", gofakeit.Number(1, 100)), nil
}).Attr("SocketType", func(args factory.Args) (interface{}, error) {
	return "http", nil
}).Attr("TargetPort", func(args factory.Args) (interface{}, error) {
	return 8080, nil
}).Attr("UpstreamType", func(args factory.Args) (interface{}, error) {
	return "http", nil
})

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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