Documentation
¶
Index ¶
- func CreateGroupWithCleanup(client *APIClient, ctx context.Context, config *TestConfig, ...) (identityopenapi.GroupRead, string)
- func CreateOauth2ProviderWithCleanup(client *APIClient, ctx context.Context, config *TestConfig, ...) (identityopenapi.Oauth2ProviderRead, string)
- func CreateProjectWithCleanup(client *APIClient, ctx context.Context, config *TestConfig, ...) (identityopenapi.ProjectRead, string)
- func CreateServiceAccountWithCleanup(client *APIClient, ctx context.Context, config *TestConfig, ...) (identityopenapi.ServiceAccountCreate, string)
- func CreateUserWithCleanup(client *APIClient, ctx context.Context, config *TestConfig, ...) (identityopenapi.UserRead, string)
- func WaitForProjectInACL(callerClient *APIClient, ctx context.Context, config *TestConfig, ...) identityopenapi.AclProject
- func WaitForProjectProvisioned(client *APIClient, ctx context.Context, config *TestConfig, projectID string)
- func WaitForProjectRemovedFromACL(callerClient *APIClient, ctx context.Context, config *TestConfig, ...)
- type APIClient
- func (c *APIClient) CreateGroup(ctx context.Context, orgID string, group identityopenapi.GroupWrite) (*identityopenapi.GroupRead, error)
- func (c *APIClient) CreateOauth2Provider(ctx context.Context, orgID string, ...) (*identityopenapi.Oauth2ProviderRead, error)
- func (c *APIClient) CreateProject(ctx context.Context, orgID string, project identityopenapi.ProjectWrite) (*identityopenapi.ProjectRead, error)
- func (c *APIClient) CreateServiceAccount(ctx context.Context, orgID string, sa identityopenapi.ServiceAccountWrite) (*identityopenapi.ServiceAccountCreate, error)
- func (c *APIClient) CreateUser(ctx context.Context, orgID string, user identityopenapi.UserWrite) (*identityopenapi.UserRead, error)
- func (c *APIClient) DeleteGroup(ctx context.Context, orgID, groupID string) error
- func (c *APIClient) DeleteOauth2Provider(ctx context.Context, orgID, providerID string) error
- func (c *APIClient) DeleteProject(ctx context.Context, orgID, projectID string) error
- func (c *APIClient) DeleteServiceAccount(ctx context.Context, orgID, saID string) error
- func (c *APIClient) DeleteUser(ctx context.Context, orgID, userID string) error
- func (c *APIClient) GetEndpoints() *Endpoints
- 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) ListGlobalOauth2Providers(ctx context.Context) (identityopenapi.Oauth2Providers, error)
- func (c *APIClient) ListGroups(ctx context.Context, orgID string) (identityopenapi.Groups, error)
- func (c *APIClient) ListOauth2Providers(ctx context.Context, orgID string) (identityopenapi.Oauth2Providers, 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) RotateServiceAccount(ctx context.Context, orgID, saID string) (*identityopenapi.ServiceAccountCreate, error)
- func (c *APIClient) SetQuotas(ctx context.Context, orgID string, quotas identityopenapi.QuotasWrite) (*identityopenapi.QuotasRead, error)
- func (c *APIClient) UpdateGroup(ctx context.Context, orgID, groupID string, group identityopenapi.GroupWrite) error
- func (c *APIClient) UpdateOauth2Provider(ctx context.Context, orgID, providerID string, ...) error
- func (c *APIClient) UpdateOrganization(ctx context.Context, orgID string, org identityopenapi.OrganizationWrite) error
- func (c *APIClient) UpdateProject(ctx context.Context, orgID, projectID string, ...) error
- func (c *APIClient) UpdateServiceAccount(ctx context.Context, orgID, saID string, ...) (*identityopenapi.ServiceAccountRead, error)
- func (c *APIClient) UpdateUser(ctx context.Context, orgID, userID string, user identityopenapi.UserWrite) (*identityopenapi.UserRead, error)
- type Endpoints
- func (e *Endpoints) GetGlobalACL() string
- func (e *Endpoints) GetGroup(orgID, groupID string) string
- func (e *Endpoints) GetOauth2Provider(orgID, providerID 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) GetServiceAccount(orgID, saID string) string
- func (e *Endpoints) GetUser(orgID, userID string) string
- func (e *Endpoints) ListGlobalOauth2Providers() string
- func (e *Endpoints) ListGroups(orgID string) string
- func (e *Endpoints) ListOauth2Providers(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
- func (e *Endpoints) RotateServiceAccount(orgID, saID string) string
- type GinkgoLogger
- type GroupPayloadBuilder
- func (b *GroupPayloadBuilder) Build() identityopenapi.GroupWrite
- func (b *GroupPayloadBuilder) WithName(name string) *GroupPayloadBuilder
- func (b *GroupPayloadBuilder) WithRoleIDs(roleIDs []string) *GroupPayloadBuilder
- func (b *GroupPayloadBuilder) WithServiceAccountIDs(serviceAccountIDs []string) *GroupPayloadBuilder
- func (b *GroupPayloadBuilder) WithUserIDs(userIDs []string) *GroupPayloadBuilder
- type Oauth2ProviderPayloadBuilder
- type OrganizationPayloadBuilder
- type ProjectPayloadBuilder
- type ServiceAccountPayloadBuilder
- type TestConfig
- type UserPayloadBuilder
- func (b *UserPayloadBuilder) Build() identityopenapi.UserWrite
- func (b *UserPayloadBuilder) WithGroupIDs(groupIDs []string) *UserPayloadBuilder
- func (b *UserPayloadBuilder) WithState(state identityopenapi.UserState) *UserPayloadBuilder
- func (b *UserPayloadBuilder) WithSubject(subject string) *UserPayloadBuilder
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 Build() from the builder).
func CreateOauth2ProviderWithCleanup ¶ added in v1.16.1
func CreateOauth2ProviderWithCleanup(client *APIClient, ctx context.Context, config *TestConfig, payload identityopenapi.Oauth2ProviderWrite) (identityopenapi.Oauth2ProviderRead, string)
CreateOauth2ProviderWithCleanup creates an OAuth2 provider and schedules automatic cleanup.
func CreateProjectWithCleanup ¶ added in v1.16.1
func CreateProjectWithCleanup(client *APIClient, ctx context.Context, config *TestConfig, payload identityopenapi.ProjectWrite) (identityopenapi.ProjectRead, string)
CreateProjectWithCleanup creates a project and schedules automatic cleanup. Project deletion is async (202), so cleanup polls until the project is gone.
func CreateServiceAccountWithCleanup ¶ added in v1.16.1
func CreateServiceAccountWithCleanup(client *APIClient, ctx context.Context, config *TestConfig, payload identityopenapi.ServiceAccountWrite) (identityopenapi.ServiceAccountCreate, string)
CreateServiceAccountWithCleanup creates a service account and schedules automatic cleanup.
func CreateUserWithCleanup ¶ added in v1.16.1
func CreateUserWithCleanup(client *APIClient, ctx context.Context, config *TestConfig, payload identityopenapi.UserWrite) (identityopenapi.UserRead, string)
CreateUserWithCleanup creates a user and schedules automatic cleanup.
func WaitForProjectInACL ¶ added in v1.16.1
func WaitForProjectInACL(callerClient *APIClient, ctx context.Context, config *TestConfig, projectID string) identityopenapi.AclProject
WaitForProjectInACL polls until projectID appears in the caller's organization ACL. ACL propagation may lag project provisioning, so this must be called after WaitForProjectProvisioned. Returns the matching AclProject for further assertions.
func WaitForProjectProvisioned ¶ added in v1.16.1
func WaitForProjectProvisioned(client *APIClient, ctx context.Context, config *TestConfig, projectID string)
WaitForProjectProvisioned polls until the project reaches provisioned state. Projects are created asynchronously (202); mutations will conflict if the controller is still reconciling, so callers must wait before updating.
func WaitForProjectRemovedFromACL ¶ added in v1.16.1
func WaitForProjectRemovedFromACL(callerClient *APIClient, ctx context.Context, config *TestConfig, projectID string)
WaitForProjectRemovedFromACL polls until projectID is no longer present in the caller's organization ACL.
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) CreateOauth2Provider ¶ added in v1.16.1
func (c *APIClient) CreateOauth2Provider(ctx context.Context, orgID string, provider identityopenapi.Oauth2ProviderWrite) (*identityopenapi.Oauth2ProviderRead, error)
CreateOauth2Provider creates a new OAuth2 provider in an organization.
func (*APIClient) CreateProject ¶ added in v1.16.1
func (c *APIClient) CreateProject(ctx context.Context, orgID string, project identityopenapi.ProjectWrite) (*identityopenapi.ProjectRead, error)
CreateProject creates a new project in an organization.
func (*APIClient) CreateServiceAccount ¶ added in v1.16.1
func (c *APIClient) CreateServiceAccount(ctx context.Context, orgID string, sa identityopenapi.ServiceAccountWrite) (*identityopenapi.ServiceAccountCreate, error)
CreateServiceAccount creates a new service account in an organization. The returned ServiceAccountCreate.Status.AccessToken is non-nil and contains the one-time access token — it is only present on create and rotate responses.
func (*APIClient) CreateUser ¶ added in v1.16.1
func (c *APIClient) CreateUser(ctx context.Context, orgID string, user identityopenapi.UserWrite) (*identityopenapi.UserRead, error)
CreateUser creates a new user in an organization.
func (*APIClient) DeleteGroup ¶
DeleteGroup deletes a group from an organization.
func (*APIClient) DeleteOauth2Provider ¶ added in v1.16.1
DeleteOauth2Provider deletes an OAuth2 provider from an organization.
func (*APIClient) DeleteProject ¶ added in v1.16.1
DeleteProject deletes a project from an organization.
func (*APIClient) DeleteServiceAccount ¶ added in v1.16.1
DeleteServiceAccount deletes a service account from an organization.
func (*APIClient) DeleteUser ¶ added in v1.16.1
DeleteUser deletes a user from an organization.
func (*APIClient) GetEndpoints ¶ added in v1.16.0
GetEndpoints returns the endpoints helper for direct path access in tests.
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) ListGlobalOauth2Providers ¶ added in v1.16.1
func (c *APIClient) ListGlobalOauth2Providers(ctx context.Context) (identityopenapi.Oauth2Providers, error)
ListGlobalOauth2Providers lists platform-level OAuth2 providers (not scoped to an organization).
func (*APIClient) ListGroups ¶
ListGroups lists all groups in an organization.
func (*APIClient) ListOauth2Providers ¶ added in v1.16.1
func (c *APIClient) ListOauth2Providers(ctx context.Context, orgID string) (identityopenapi.Oauth2Providers, error)
ListOauth2Providers lists all OAuth2 providers 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) RotateServiceAccount ¶ added in v1.16.1
func (c *APIClient) RotateServiceAccount(ctx context.Context, orgID, saID string) (*identityopenapi.ServiceAccountCreate, error)
RotateServiceAccount rotates the access token for a service account. The returned ServiceAccountCreate.Status.AccessToken contains the new one-time token.
func (*APIClient) SetQuotas ¶ added in v1.16.1
func (c *APIClient) SetQuotas(ctx context.Context, orgID string, quotas identityopenapi.QuotasWrite) (*identityopenapi.QuotasRead, error)
SetQuotas updates the quotas for 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.
func (*APIClient) UpdateOauth2Provider ¶ added in v1.16.1
func (c *APIClient) UpdateOauth2Provider(ctx context.Context, orgID, providerID string, provider identityopenapi.Oauth2ProviderWrite) error
UpdateOauth2Provider updates an existing OAuth2 provider. Returns nil on success.
func (*APIClient) UpdateOrganization ¶ added in v1.16.1
func (c *APIClient) UpdateOrganization(ctx context.Context, orgID string, org identityopenapi.OrganizationWrite) error
UpdateOrganization updates an organization.
func (*APIClient) UpdateProject ¶ added in v1.16.1
func (c *APIClient) UpdateProject(ctx context.Context, orgID, projectID string, project identityopenapi.ProjectWrite) error
UpdateProject updates an existing project.
func (*APIClient) UpdateServiceAccount ¶ added in v1.16.1
func (c *APIClient) UpdateServiceAccount(ctx context.Context, orgID, saID string, sa identityopenapi.ServiceAccountWrite) (*identityopenapi.ServiceAccountRead, error)
UpdateServiceAccount updates an existing service account.
func (*APIClient) UpdateUser ¶ added in v1.16.1
func (c *APIClient) UpdateUser(ctx context.Context, orgID, userID string, user identityopenapi.UserWrite) (*identityopenapi.UserRead, error)
UpdateUser updates an existing user.
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) GetOauth2Provider ¶ added in v1.16.1
GetOauth2Provider returns the endpoint for a specific OAuth2 provider. Used for PUT and DELETE — the server does not expose a GET /oauth2providers/{providerID} route.
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) GetServiceAccount ¶ added in v1.16.1
GetServiceAccount returns the endpoint for a specific service account.
func (*Endpoints) GetUser ¶ added in v1.16.1
GetUser returns the endpoint for a specific user. Used for PUT and DELETE — the server does not expose a GET /users/{userID} route.
func (*Endpoints) ListGlobalOauth2Providers ¶ added in v1.16.1
ListGlobalOauth2Providers returns the endpoint for listing platform-level OAuth2 providers.
func (*Endpoints) ListGroups ¶
ListGroups returns the endpoint for listing all groups in an organization.
func (*Endpoints) ListOauth2Providers ¶ added in v1.16.1
ListOauth2Providers returns the endpoint for listing OAuth2 providers 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.
func (*Endpoints) ListUsers ¶
ListUsers returns the endpoint for listing all users in an organization.
func (*Endpoints) RotateServiceAccount ¶ added in v1.16.1
RotateServiceAccount returns the endpoint for rotating a service account token.
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 a unique name.
func (*GroupPayloadBuilder) Build ¶ added in v1.16.1
func (b *GroupPayloadBuilder) Build() identityopenapi.GroupWrite
Build 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.
func (*GroupPayloadBuilder) WithUserIDs ¶ added in v1.16.1
func (b *GroupPayloadBuilder) WithUserIDs(userIDs []string) *GroupPayloadBuilder
WithUserIDs sets the user IDs for the group.
type Oauth2ProviderPayloadBuilder ¶ added in v1.16.1
type Oauth2ProviderPayloadBuilder struct {
// contains filtered or unexported fields
}
Oauth2ProviderPayloadBuilder builds OAuth2 provider payloads for testing.
func NewOauth2ProviderPayload ¶ added in v1.16.1
func NewOauth2ProviderPayload() *Oauth2ProviderPayloadBuilder
NewOauth2ProviderPayload creates a new OAuth2 provider payload builder with a unique name.
func (*Oauth2ProviderPayloadBuilder) Build ¶ added in v1.16.1
func (b *Oauth2ProviderPayloadBuilder) Build() identityopenapi.Oauth2ProviderWrite
Build returns the typed OAuth2 provider struct.
func (*Oauth2ProviderPayloadBuilder) WithClientID ¶ added in v1.16.1
func (b *Oauth2ProviderPayloadBuilder) WithClientID(clientID string) *Oauth2ProviderPayloadBuilder
WithClientID sets the client ID.
func (*Oauth2ProviderPayloadBuilder) WithName ¶ added in v1.16.1
func (b *Oauth2ProviderPayloadBuilder) WithName(name string) *Oauth2ProviderPayloadBuilder
WithName sets the provider name.
type OrganizationPayloadBuilder ¶ added in v1.16.1
type OrganizationPayloadBuilder struct {
// contains filtered or unexported fields
}
OrganizationPayloadBuilder builds organization write payloads for testing.
func NewOrganizationPayload ¶ added in v1.16.1
func NewOrganizationPayload() *OrganizationPayloadBuilder
NewOrganizationPayload creates an empty organization payload builder.
func (*OrganizationPayloadBuilder) Build ¶ added in v1.16.1
func (b *OrganizationPayloadBuilder) Build() identityopenapi.OrganizationWrite
Build returns the typed OrganizationWrite struct.
func (*OrganizationPayloadBuilder) FromRead ¶ added in v1.16.1
func (b *OrganizationPayloadBuilder) FromRead(org identityopenapi.OrganizationRead) *OrganizationPayloadBuilder
FromRead initialises the builder from an OrganizationRead, preserving the existing spec so that updates don't accidentally overwrite required fields like OrganizationType.
func (*OrganizationPayloadBuilder) WithName ¶ added in v1.16.1
func (b *OrganizationPayloadBuilder) WithName(name string) *OrganizationPayloadBuilder
WithName sets the organization name.
type ProjectPayloadBuilder ¶ added in v1.16.1
type ProjectPayloadBuilder struct {
// contains filtered or unexported fields
}
ProjectPayloadBuilder builds project payloads for testing.
func NewProjectPayload ¶ added in v1.16.1
func NewProjectPayload() *ProjectPayloadBuilder
NewProjectPayload creates a new project payload builder with a unique name.
func (*ProjectPayloadBuilder) Build ¶ added in v1.16.1
func (b *ProjectPayloadBuilder) Build() identityopenapi.ProjectWrite
Build returns the typed project struct.
func (*ProjectPayloadBuilder) WithGroupIDs ¶ added in v1.16.1
func (b *ProjectPayloadBuilder) WithGroupIDs(groupIDs []string) *ProjectPayloadBuilder
WithGroupIDs sets the group IDs for the project.
func (*ProjectPayloadBuilder) WithName ¶ added in v1.16.1
func (b *ProjectPayloadBuilder) WithName(name string) *ProjectPayloadBuilder
WithName sets the project name.
type ServiceAccountPayloadBuilder ¶ added in v1.16.1
type ServiceAccountPayloadBuilder struct {
// contains filtered or unexported fields
}
ServiceAccountPayloadBuilder builds service account payloads for testing.
func NewServiceAccountPayload ¶ added in v1.16.1
func NewServiceAccountPayload() *ServiceAccountPayloadBuilder
NewServiceAccountPayload creates a new service account payload builder with a unique name.
func (*ServiceAccountPayloadBuilder) Build ¶ added in v1.16.1
func (b *ServiceAccountPayloadBuilder) Build() identityopenapi.ServiceAccountWrite
Build returns the typed service account struct.
func (*ServiceAccountPayloadBuilder) WithGroupIDs ¶ added in v1.16.1
func (b *ServiceAccountPayloadBuilder) WithGroupIDs(groupIDs []string) *ServiceAccountPayloadBuilder
WithGroupIDs sets the group IDs for the service account.
func (*ServiceAccountPayloadBuilder) WithName ¶ added in v1.16.1
func (b *ServiceAccountPayloadBuilder) WithName(name string) *ServiceAccountPayloadBuilder
WithName sets the service account name.
type TestConfig ¶
type TestConfig struct {
coreconfig.BaseConfig
AdminToken string
UserToken string
OrgID string
ProjectID string
AdminGroupID string
UserGroupID string
UserSAID 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.
type UserPayloadBuilder ¶ added in v1.16.1
type UserPayloadBuilder struct {
// contains filtered or unexported fields
}
UserPayloadBuilder builds user payloads for testing.
func NewUserPayload ¶ added in v1.16.1
func NewUserPayload() *UserPayloadBuilder
NewUserPayload creates a new user payload builder with a unique subject.
func (*UserPayloadBuilder) Build ¶ added in v1.16.1
func (b *UserPayloadBuilder) Build() identityopenapi.UserWrite
Build returns the typed user struct.
func (*UserPayloadBuilder) WithGroupIDs ¶ added in v1.16.1
func (b *UserPayloadBuilder) WithGroupIDs(groupIDs []string) *UserPayloadBuilder
WithGroupIDs sets the group IDs for the user.
func (*UserPayloadBuilder) WithState ¶ added in v1.16.1
func (b *UserPayloadBuilder) WithState(state identityopenapi.UserState) *UserPayloadBuilder
WithState sets the user state.
func (*UserPayloadBuilder) WithSubject ¶ added in v1.16.1
func (b *UserPayloadBuilder) WithSubject(subject string) *UserPayloadBuilder
WithSubject sets the user subject (email).