mockkeystone

package
v1.10.1 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2021 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	*httptest.Server

	// TokensFunc handles the /v2.0/tokens endpoint. This must be set
	// before the endpoint can be used.
	TokensFunc func(*keystone.TokensRequest) (*keystone.TokensResponse, error)

	// AuthTokensFunc handles the /v3/auth/tokens endpoint. This must
	// be set before the endpoint can be used.
	AuthTokensFunc func(*keystone.AuthTokensRequest) (*keystone.AuthTokensResponse, error)

	// TenantsFunc handles the /v2.0/tenants endpoint. This must be set
	// before the endpoint can be used.
	TenantsFunc func(*keystone.TenantsRequest) (*keystone.TenantsResponse, error)

	// UserGroupsFunc handles the /v3/users/:id/groups endpoint. This must be set
	// before the endpoint can be used.
	UserGroupsFunc func(*keystone.UserGroupsRequest) (*keystone.UserGroupsResponse, error)
}

Server provides a mock keystone server for use in tests.

func NewServer

func NewServer() *Server

NewServer creates a new Server for use in tests.

Jump to

Keyboard shortcuts

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