Documentation
¶
Index ¶
- type APIClient
- func (c *APIClient) GetListRegionsPath(orgID string) string
- func (c *APIClient) GetRegionDetail(ctx context.Context, orgID, regionID string) (*regionopenapi.RegionDetailRead, error)
- func (c *APIClient) ListExternalNetworks(ctx context.Context, orgID, regionID string) (regionopenapi.ExternalNetworks, error)
- func (c *APIClient) ListFlavors(ctx context.Context, orgID, regionID string) (regionopenapi.Flavors, error)
- func (c *APIClient) ListImages(ctx context.Context, orgID, regionID string) (regionopenapi.Images, error)
- func (c *APIClient) ListRegions(ctx context.Context, orgID string) (regionopenapi.Regions, error)
- type Endpoints
- func (e *Endpoints) GetRegionDetail(orgID, regionID string) string
- func (e *Endpoints) ListExternalNetworks(orgID, regionID string) string
- func (e *Endpoints) ListFlavors(orgID, regionID string) string
- func (e *Endpoints) ListImages(orgID, regionID string) string
- func (e *Endpoints) ListRegions(orgID string) string
- type GinkgoLogger
- type TestConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIClient ¶
type APIClient struct {
*coreclient.APIClient
// contains filtered or unexported fields
}
APIClient wraps the core API client with region-specific methods. Add methods here as you write tests for specific endpoints.
func NewAPIClient ¶
NewAPIClient creates a new Region API client.
func NewAPIClientWithConfig ¶
func NewAPIClientWithConfig(config *TestConfig) *APIClient
NewAPIClientWithConfig creates a new Region API client with the given config.
func (*APIClient) GetListRegionsPath ¶
GetListRegionsPath returns the path for listing regions. This is useful for tests that need direct access to the endpoint path.
func (*APIClient) GetRegionDetail ¶
func (c *APIClient) GetRegionDetail(ctx context.Context, orgID, regionID string) (*regionopenapi.RegionDetailRead, error)
GetRegionDetail gets detailed information about a specific region.
func (*APIClient) ListExternalNetworks ¶
func (c *APIClient) ListExternalNetworks(ctx context.Context, orgID, regionID string) (regionopenapi.ExternalNetworks, error)
ListExternalNetworks lists all external networks available in a region.
func (*APIClient) ListFlavors ¶
func (c *APIClient) ListFlavors(ctx context.Context, orgID, regionID string) (regionopenapi.Flavors, error)
ListFlavors lists all flavors available in a region.
func (*APIClient) ListImages ¶
func (c *APIClient) ListImages(ctx context.Context, orgID, regionID string) (regionopenapi.Images, error)
ListImages lists all images available in a region.
func (*APIClient) ListRegions ¶
ListRegions lists all regions for an organization.
type Endpoints ¶
type Endpoints struct{}
Endpoints contains API endpoint patterns. Add endpoint methods here as you write tests for them.
func (*Endpoints) GetRegionDetail ¶
GetRegionDetail returns the endpoint for getting detailed region information.
func (*Endpoints) ListExternalNetworks ¶
ListExternalNetworks returns the endpoint for listing external networks in a region.
func (*Endpoints) ListFlavors ¶
ListFlavors returns the endpoint for listing flavors in a region.
func (*Endpoints) ListImages ¶
ListImages returns the endpoint for listing images in a region.
func (*Endpoints) ListRegions ¶
ListRegions returns the endpoint for listing all regions in an organization.
type GinkgoLogger ¶
type GinkgoLogger struct{}
GinkgoLogger implements the Logger interface for Ginkgo tests.
func (*GinkgoLogger) Printf ¶
func (g *GinkgoLogger) Printf(format string, args ...interface{})
type TestConfig ¶
type TestConfig struct {
coreconfig.BaseConfig
OrgID string
ProjectID string
RegionID string
RegionBaseURL string
}
TestConfig extends the base config with Region-specific fields.
func LoadTestConfig ¶
func LoadTestConfig() (*TestConfig, error)
LoadTestConfig loads configuration from environment variables and .env files using viper. Returns an error if required configuration values are missing.