Documentation
¶
Index ¶
- func CreateGroupWithCleanup(client *APIClient, ctx context.Context, config *TestConfig, ...) (identityopenapi.GroupRead, string)
- type APIClient
- func (c *APIClient) CreateGroup(ctx context.Context, orgID string, group identityopenapi.GroupWrite) (*identityopenapi.GroupRead, error)
- func (c *APIClient) DeleteGroup(ctx context.Context, orgID, groupID string) error
- func (c *APIClient) GetGlobalACL(ctx context.Context) (*identityopenapi.Acl, error)
- func (c *APIClient) GetGroup(ctx context.Context, orgID, groupID string) (*identityopenapi.GroupRead, error)
- func (c *APIClient) GetListOrganizationsPath() string
- func (c *APIClient) GetOrganization(ctx context.Context, orgID string) (*identityopenapi.OrganizationRead, error)
- func (c *APIClient) GetOrganizationACL(ctx context.Context, orgID string) (*identityopenapi.Acl, error)
- func (c *APIClient) GetProject(ctx context.Context, orgID, projectID string) (*identityopenapi.ProjectRead, error)
- func (c *APIClient) GetQuotas(ctx context.Context, orgID string) (*identityopenapi.QuotasRead, error)
- func (c *APIClient) ListGroups(ctx context.Context, orgID string) (identityopenapi.Groups, error)
- func (c *APIClient) ListOrganizations(ctx context.Context) (identityopenapi.Organizations, error)
- func (c *APIClient) ListProjects(ctx context.Context, orgID string) (identityopenapi.Projects, error)
- func (c *APIClient) ListRoles(ctx context.Context, orgID string) (identityopenapi.Roles, error)
- func (c *APIClient) ListServiceAccounts(ctx context.Context, orgID string) (identityopenapi.ServiceAccounts, error)
- func (c *APIClient) ListUsers(ctx context.Context, orgID string) (identityopenapi.Users, error)
- func (c *APIClient) UpdateGroup(ctx context.Context, orgID, groupID string, group identityopenapi.GroupWrite) error
- type Endpoints
- func (e *Endpoints) GetGlobalACL() string
- func (e *Endpoints) GetGroup(orgID, groupID string) string
- func (e *Endpoints) GetOrganization(orgID string) string
- func (e *Endpoints) GetOrganizationACL(orgID string) string
- func (e *Endpoints) GetProject(orgID, projectID string) string
- func (e *Endpoints) GetQuotas(orgID string) string
- func (e *Endpoints) ListGroups(orgID string) string
- func (e *Endpoints) ListOrganizations() string
- func (e *Endpoints) ListProjects(orgID string) string
- func (e *Endpoints) ListRoles(orgID string) string
- func (e *Endpoints) ListServiceAccounts(orgID string) string
- func (e *Endpoints) ListUsers(orgID string) string
- type GinkgoLogger
- type GroupPayloadBuilder
- func (b *GroupPayloadBuilder) BuildTyped() identityopenapi.GroupWrite
- func (b *GroupPayloadBuilder) WithName(name string) *GroupPayloadBuilder
- func (b *GroupPayloadBuilder) WithRoleIDs(roleIDs []string) *GroupPayloadBuilder
- func (b *GroupPayloadBuilder) WithServiceAccountIDs(serviceAccountIDs []string) *GroupPayloadBuilder
- type TestConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateGroupWithCleanup ¶
func CreateGroupWithCleanup(client *APIClient, ctx context.Context, config *TestConfig, payload identityopenapi.GroupWrite) (identityopenapi.GroupRead, string)
CreateGroupWithCleanup creates a group and schedules automatic cleanup. Accepts a typed struct for type safety (or use BuildTyped() from the builder).
Types ¶
type APIClient ¶
type APIClient struct {
*coreclient.APIClient
// contains filtered or unexported fields
}
APIClient wraps the core API client with identity-specific methods. Add methods here as you write tests for specific endpoints.
func NewAPIClient ¶
NewAPIClient creates a new Identity API client.
func NewAPIClientWithConfig ¶
func NewAPIClientWithConfig(config *TestConfig) *APIClient
NewAPIClientWithConfig creates a new Identity API client with the given config.
func (*APIClient) CreateGroup ¶
func (c *APIClient) CreateGroup(ctx context.Context, orgID string, group identityopenapi.GroupWrite) (*identityopenapi.GroupRead, error)
CreateGroup creates a new group in an organization.
func (*APIClient) DeleteGroup ¶
DeleteGroup deletes a group from an organization.
func (*APIClient) GetGlobalACL ¶
GetGlobalACL gets the global ACL for the current user.
func (*APIClient) GetGroup ¶
func (c *APIClient) GetGroup(ctx context.Context, orgID, groupID string) (*identityopenapi.GroupRead, error)
GetGroup gets detailed information about a specific group.
func (*APIClient) GetListOrganizationsPath ¶
GetListOrganizationsPath returns the path for listing organizations. This is useful for tests that need direct access to the endpoint path.
func (*APIClient) GetOrganization ¶
func (c *APIClient) GetOrganization(ctx context.Context, orgID string) (*identityopenapi.OrganizationRead, error)
GetOrganization gets detailed information about a specific organization.
func (*APIClient) GetOrganizationACL ¶
func (c *APIClient) GetOrganizationACL(ctx context.Context, orgID string) (*identityopenapi.Acl, error)
GetOrganizationACL gets the ACL for a specific organization.
func (*APIClient) GetProject ¶
func (c *APIClient) GetProject(ctx context.Context, orgID, projectID string) (*identityopenapi.ProjectRead, error)
GetProject gets detailed information about a specific project.
func (*APIClient) GetQuotas ¶
func (c *APIClient) GetQuotas(ctx context.Context, orgID string) (*identityopenapi.QuotasRead, error)
GetQuotas gets the quotas for an organization.
func (*APIClient) ListGroups ¶
ListGroups lists all groups in an organization.
func (*APIClient) ListOrganizations ¶
func (c *APIClient) ListOrganizations(ctx context.Context) (identityopenapi.Organizations, error)
ListOrganizations lists all organizations.
func (*APIClient) ListProjects ¶
func (c *APIClient) ListProjects(ctx context.Context, orgID string) (identityopenapi.Projects, error)
ListProjects lists all projects in an organization.
func (*APIClient) ListServiceAccounts ¶
func (c *APIClient) ListServiceAccounts(ctx context.Context, orgID string) (identityopenapi.ServiceAccounts, error)
ListServiceAccounts lists all service accounts in an organization.
func (*APIClient) UpdateGroup ¶
func (c *APIClient) UpdateGroup(ctx context.Context, orgID, groupID string, group identityopenapi.GroupWrite) error
UpdateGroup updates an existing group in an organization. Returns nil on success. API returns 200 with empty body.
type Endpoints ¶
type Endpoints struct{}
Endpoints contains API endpoint patterns. Add endpoint methods here as you write tests for them.
func (*Endpoints) GetGlobalACL ¶
GetGlobalACL returns the endpoint for getting global ACL.
func (*Endpoints) GetOrganization ¶
GetOrganization returns the endpoint for getting a specific organization.
func (*Endpoints) GetOrganizationACL ¶
GetOrganizationACL returns the endpoint for getting organization ACL.
func (*Endpoints) GetProject ¶
GetProject returns the endpoint for getting a specific project.
func (*Endpoints) GetQuotas ¶
GetQuotas returns the endpoint for getting quotas for an organization.
func (*Endpoints) ListGroups ¶
ListGroups returns the endpoint for listing all groups in an organization.
func (*Endpoints) ListOrganizations ¶
ListOrganizations returns the endpoint for listing all organizations.
func (*Endpoints) ListProjects ¶
ListProjects returns the endpoint for listing all projects in an organization.
func (*Endpoints) ListRoles ¶
ListRoles returns the endpoint for listing all roles in an organization.
func (*Endpoints) ListServiceAccounts ¶
ListServiceAccounts returns the endpoint for listing all service accounts 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 GroupPayloadBuilder ¶
type GroupPayloadBuilder struct {
// contains filtered or unexported fields
}
GroupPayloadBuilder builds group payloads for testing using type-safe OpenAPI structs.
func NewGroupPayload ¶
func NewGroupPayload() *GroupPayloadBuilder
NewGroupPayload creates a new group payload builder with defaults from config.
func (*GroupPayloadBuilder) BuildTyped ¶
func (b *GroupPayloadBuilder) BuildTyped() identityopenapi.GroupWrite
BuildTyped returns the typed group struct directly.
func (*GroupPayloadBuilder) WithName ¶
func (b *GroupPayloadBuilder) WithName(name string) *GroupPayloadBuilder
WithName sets the group name.
func (*GroupPayloadBuilder) WithRoleIDs ¶
func (b *GroupPayloadBuilder) WithRoleIDs(roleIDs []string) *GroupPayloadBuilder
WithRoleIDs sets the role IDs for the group.
func (*GroupPayloadBuilder) WithServiceAccountIDs ¶
func (b *GroupPayloadBuilder) WithServiceAccountIDs(serviceAccountIDs []string) *GroupPayloadBuilder
WithServiceAccountIDs sets the service account IDs for the group.
type TestConfig ¶
type TestConfig struct {
coreconfig.BaseConfig
OrgID string
ProjectID string
}
TestConfig extends the base config with Identity-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.