Documentation
¶
Overview ¶
Package api provides the main ARK SDK API interface for accessing all ARK services Code generated by genservices; DO NOT EDIT. Automatically generated Ark API for all SDK services. Each service can define a module init to register its config alongside a ServiceGenerator function in the ARK SDK Golang. This package serves as the central entry point for interacting with various ARK services including SIA, SecHub, PCloud, Identity, and other components.
The ArkAPI struct acts as a service factory and registry, managing authenticators, service instances, and configuration profiles. It provides lazy loading of services, meaning services are only instantiated when first accessed, and subsequent calls return the cached instance.
Key features:
- Centralized access to all ARK services
- Lazy loading and caching of service instances
- Authenticator management and distribution to services
- Profile-based configuration management
- Service dependency injection with authenticators
- Consistent error handling across all services
The API supports multiple authenticators that are automatically distributed to services based on their configuration requirements. Each service specifies required and optional authenticators, and the API ensures the appropriate authenticators are provided during service initialization.
Example:
// Create authenticators
ispAuth := &auth.ArkISPAuth{...}
authenticators := []auth.ArkAuth{ispAuth}
// Create API instance
api, err := NewArkAPI(authenticators, nil) // nil uses default profile
if err != nil {
// handle error
}
// Access services (lazy loaded)
ssoService, err := api.SiaSso()
if err != nil {
// handle error
}
// Get specific authenticator
auth, err := api.Authenticator("isp")
if err != nil {
// handle error
}
Code generated by genservices; DO NOT EDIT. Automatically generated imports for all SDK services. Each service can define a module init to register its config. The configuration will be automatically registered upon import from this file.
Index ¶
- type ArkAPI
- func (api *ArkAPI) Authenticator(authenticatorName string) (auth.ArkAuth, error)
- func (api *ArkAPI) Cmgr() (*cmgr.ArkCmgrService, error)
- func (api *ArkAPI) IdentityDirectories() (*directories.ArkIdentityDirectoriesService, error)
- func (api *ArkAPI) IdentityRoles() (*roles.ArkIdentityRolesService, error)
- func (api *ArkAPI) IdentityUsers() (*users.ArkIdentityUsersService, error)
- func (api *ArkAPI) PcloudAccounts() (*accounts.ArkPCloudAccountsService, error)
- func (api *ArkAPI) PcloudSafes() (*safes.ArkPCloudSafesService, error)
- func (api *ArkAPI) Profile() *models.ArkProfile
- func (api *ArkAPI) SechubConfiguration() (*configuration.ArkSecHubConfigurationService, error)
- func (api *ArkAPI) SechubFilters() (*filters.ArkSecHubFiltersService, error)
- func (api *ArkAPI) SechubScans() (*scans.ArkSecHubScansService, error)
- func (api *ArkAPI) SechubSecrets() (*secrets.ArkSecHubSecretsService, error)
- func (api *ArkAPI) SechubSecretstores() (*secretstores.ArkSecHubSecretStoresService, error)
- func (api *ArkAPI) SechubServiceinfo() (*serviceinfo.ArkSecHubServiceInfoService, error)
- func (api *ArkAPI) SechubSyncpolicies() (*syncpolicies.ArkSecHubSyncPoliciesService, error)
- func (api *ArkAPI) SiaAccess() (*access.ArkSIAAccessService, error)
- func (api *ArkAPI) SiaDb() (*db.ArkSIADBService, error)
- func (api *ArkAPI) SiaK8s() (*k8s.ArkSIAK8SService, error)
- func (api *ArkAPI) SiaSecretsDb() (*dbsecrets.ArkSIASecretsDBService, error)
- func (api *ArkAPI) SiaSecretsVm() (*vmsecrets.ArkSIASecretsVMService, error)
- func (api *ArkAPI) SiaSshca() (*sshca.ArkSIASSHCAService, error)
- func (api *ArkAPI) SiaSso() (*sso.ArkSIASSOService, error)
- func (api *ArkAPI) SiaWorkspacesDb() (*db2.ArkSIAWorkspacesDBService, error)
- func (api *ArkAPI) SiaWorkspacesTargetsets() (*targetsets.ArkSIAWorkspacesTargetSetsService, error)
- func (api *ArkAPI) Sm() (*sm.ArkSMService, error)
- func (api *ArkAPI) Uap() (*uap.ArkUAPService, error)
- func (api *ArkAPI) UapDb() (*db3.ArkUAPSIADBService, error)
- func (api *ArkAPI) UapSca() (*sca.ArkUAPSCAService, error)
- func (api *ArkAPI) UapVm() (*vm.ArkUAPSIAVMService, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArkAPI ¶
type ArkAPI struct {
// contains filtered or unexported fields
}
ArkAPI wraps different API functionality of Ark Services.
ArkAPI serves as the central entry point and service factory for all ARK services. It manages authenticators, service instances, and configuration profiles, providing a unified interface for accessing various ARK components including SIA, SecHub, PCloud, Identity, and other services.
The struct implements lazy loading for services - each service is only instantiated when first accessed through its corresponding method. Subsequent calls return the cached instance, ensuring efficient resource usage and consistent service state.
Service creation follows a dependency injection pattern where authenticators are automatically distributed to services based on their configuration requirements. Each service specifies required and optional authenticators, and ArkAPI ensures the appropriate authenticators are provided during initialization.
func NewArkAPI ¶
NewArkAPI creates a new ArkAPI instance with the provided authenticators and profile.
Initializes a new ArkAPI instance that serves as the central access point for all ARK services. The instance manages the provided authenticators and distributes them to services as needed. If no profile is provided (nil), the default profile is loaded automatically.
The services map is initialized empty and services are created lazily when first accessed through their respective getter methods. This approach ensures optimal resource usage and faster startup times.
Parameters:
- authenticators: Slice of authenticators to be used by services. Each service will receive the authenticators it requires based on its configuration
- profile: Configuration profile to use. If nil, the default profile is loaded automatically using the default profile loader
Returns a pointer to the initialized ArkAPI instance, or an error if the default profile cannot be loaded when profile is nil.
Example:
// With explicit profile
profile := &models.ArkProfile{...}
api, err := NewArkAPI(authenticators, profile)
// With default profile (recommended)
api, err := NewArkAPI(authenticators, nil)
if err != nil {
// handle profile loading error
}
func (*ArkAPI) Authenticator ¶
Authenticator returns the authenticator with the specified name from the ArkAPI instance.
Searches through the API's authenticator collection and returns the first authenticator that matches the specified name. This method provides access to specific authenticators for custom operations or debugging purposes.
The search is case-sensitive and matches the exact authenticator name as returned by the authenticator's AuthenticatorName() method.
Parameters:
- authenticatorName: The exact name of the authenticator to retrieve
Returns the matching authenticator, or an error if no authenticator with the specified name is found.
Example:
ispAuth, err := api.Authenticator("isp")
if err != nil {
// handle authenticator not found
}
// use ispAuth for custom operations
func (*ArkAPI) IdentityDirectories ¶
func (api *ArkAPI) IdentityDirectories() (*directories.ArkIdentityDirectoriesService, error)
func (*ArkAPI) IdentityRoles ¶
func (api *ArkAPI) IdentityRoles() (*roles.ArkIdentityRolesService, error)
func (*ArkAPI) IdentityUsers ¶
func (api *ArkAPI) IdentityUsers() (*users.ArkIdentityUsersService, error)
func (*ArkAPI) PcloudAccounts ¶ added in v1.5.0
func (api *ArkAPI) PcloudAccounts() (*accounts.ArkPCloudAccountsService, error)
func (*ArkAPI) PcloudSafes ¶ added in v1.5.0
func (api *ArkAPI) PcloudSafes() (*safes.ArkPCloudSafesService, error)
func (*ArkAPI) Profile ¶
func (api *ArkAPI) Profile() *models.ArkProfile
Profile returns the profile associated with the ArkAPI instance.
Provides access to the configuration profile that was set during API initialization. The profile contains environment-specific settings, endpoints, and other configuration parameters used by the various ARK services.
The returned profile is the same instance that was either explicitly provided to NewArkAPI or automatically loaded as the default profile when nil was passed.
Returns a pointer to the ArkProfile instance. The profile is never nil for a properly initialized ArkAPI instance.
Example:
profile := api.Profile()
fmt.Printf("Using profile: %s\n", profile.ProfileName)
func (*ArkAPI) SechubConfiguration ¶ added in v1.5.0
func (api *ArkAPI) SechubConfiguration() (*configuration.ArkSecHubConfigurationService, error)
func (*ArkAPI) SechubFilters ¶ added in v1.5.0
func (api *ArkAPI) SechubFilters() (*filters.ArkSecHubFiltersService, error)
func (*ArkAPI) SechubScans ¶ added in v1.5.0
func (api *ArkAPI) SechubScans() (*scans.ArkSecHubScansService, error)
func (*ArkAPI) SechubSecrets ¶ added in v1.5.0
func (api *ArkAPI) SechubSecrets() (*secrets.ArkSecHubSecretsService, error)
func (*ArkAPI) SechubSecretstores ¶ added in v1.5.0
func (api *ArkAPI) SechubSecretstores() (*secretstores.ArkSecHubSecretStoresService, error)
func (*ArkAPI) SechubServiceinfo ¶ added in v1.5.0
func (api *ArkAPI) SechubServiceinfo() (*serviceinfo.ArkSecHubServiceInfoService, error)
func (*ArkAPI) SechubSyncpolicies ¶ added in v1.5.0
func (api *ArkAPI) SechubSyncpolicies() (*syncpolicies.ArkSecHubSyncPoliciesService, error)
func (*ArkAPI) SiaSecretsDb ¶ added in v1.5.0
func (api *ArkAPI) SiaSecretsDb() (*dbsecrets.ArkSIASecretsDBService, error)
func (*ArkAPI) SiaSecretsVm ¶ added in v1.5.0
func (api *ArkAPI) SiaSecretsVm() (*vmsecrets.ArkSIASecretsVMService, error)
func (*ArkAPI) SiaSshca ¶ added in v1.5.0
func (api *ArkAPI) SiaSshca() (*sshca.ArkSIASSHCAService, error)
func (*ArkAPI) SiaWorkspacesDb ¶ added in v1.5.0
func (api *ArkAPI) SiaWorkspacesDb() (*db2.ArkSIAWorkspacesDBService, error)
func (*ArkAPI) SiaWorkspacesTargetsets ¶ added in v1.5.0
func (api *ArkAPI) SiaWorkspacesTargetsets() (*targetsets.ArkSIAWorkspacesTargetSetsService, error)
Directories
¶
| Path | Synopsis |
|---|---|
|
Package actions provides base functionality for Ark SDK command line actions.
|
Package actions provides base functionality for Ark SDK command line actions. |
|
Package common provides shared utilities and types for the ARK SDK.
|
Package common provides shared utilities and types for the ARK SDK. |
|
args
Package args provides command-line argument handling utilities for the ARK SDK.
|
Package args provides command-line argument handling utilities for the ARK SDK. |
|
connections/ssh
Package ssh provides Secure Shell (SSH) connection capabilities for the ARK SDK Golang.
|
Package ssh provides Secure Shell (SSH) connection capabilities for the ARK SDK Golang. |
|
connections/winrm
Package winrm provides Windows Remote Management (WinRM) connection capabilities for the ARK SDK Golang.
|
Package winrm provides Windows Remote Management (WinRM) connection capabilities for the ARK SDK Golang. |
|
isp
Package isp provides ISP (Identity Service Provider) client functionality for the ARK SDK.
|
Package isp provides ISP (Identity Service Provider) client functionality for the ARK SDK. |
|
keyring
Package keyring provides keyring utilities for the ARK SDK.
|
Package keyring provides keyring utilities for the ARK SDK. |
|
Package models provides data structures and types for the ARK SDK.
|
Package models provides data structures and types for the ARK SDK. |
|
common
Package common provides common models and utilities for AWS environment management and configuration handling within the ARK SDK.
|
Package common provides common models and utilities for AWS environment management and configuration handling within the ARK SDK. |
|
common/identity
Package identity provides data structures and types for ARK Identity directory services.
|
Package identity provides data structures and types for ARK Identity directory services. |
|
Package profiles provides functionality for managing ARK configuration profiles in the ARK SDK Golang.
|
Package profiles provides functionality for managing ARK configuration profiles in the ARK SDK Golang. |