api

package
v0.1.16 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2026 License: Apache-2.0 Imports: 50 Imported by: 0

Documentation

Overview

Package api provides the main IDSEC SDK API interface for accessing all IDSEC services Code generated by genservices; DO NOT EDIT. Automatically generated Idsec API for all SDK services. Each service can define a module init to register its config alongside a ServiceGenerator function in the IDSEC SDK Golang. This package serves as the central entry point for interacting with various IDSEC services including SIA, SecHub, PCloud, Identity, and other components.

The IdsecAPI 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 IDSEC 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.IdsecISPAuth{...}
authenticators := []auth.IdsecAuth{ispAuth}

// Create API instance
api, err := NewIdsecAPI(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

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IdsecAPI

type IdsecAPI struct {
	// contains filtered or unexported fields
}

IdsecAPI wraps different API functionality of Idsec Services.

IdsecAPI serves as the central entry point and service factory for all IDSEC services. It manages authenticators, service instances, and configuration profiles, providing a unified interface for accessing various IDSEC 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 IdsecAPI ensures the appropriate authenticators are provided during initialization.

func NewIdsecAPI

func NewIdsecAPI(authenticators []auth.IdsecAuth, profile *models.IdsecProfile) (*IdsecAPI, error)

NewIdsecAPI creates a new IdsecAPI instance with the provided authenticators and profile.

Initializes a new IdsecAPI instance that serves as the central access point for all IDSEC 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 IdsecAPI instance, or an error if the default profile cannot be loaded when profile is nil.

Example:

// With explicit profile
profile := &models.IdsecProfile{...}
api, err := NewIdsecAPI(authenticators, profile)

// With default profile (recommended)
api, err := NewIdsecAPI(authenticators, nil)
if err != nil {
	// handle profile loading error
}

func (*IdsecAPI) Authenticator

func (api *IdsecAPI) Authenticator(authenticatorName string) (auth.IdsecAuth, error)

Authenticator returns the authenticator with the specified name from the IdsecAPI 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 (*IdsecAPI) CceAws

func (api *IdsecAPI) CceAws() (*aws.IdsecCCEAWSService, error)

func (*IdsecAPI) CceAzure

func (api *IdsecAPI) CceAzure() (*azure.IdsecCCEAzureService, error)

func (*IdsecAPI) Cmgr

func (api *IdsecAPI) Cmgr() (*cmgr.IdsecCmgrService, error)

func (*IdsecAPI) IdentityAuthprofiles added in v0.1.9

func (api *IdsecAPI) IdentityAuthprofiles() (*authprofiles.IdsecIdentityAuthProfilesService, error)

func (*IdsecAPI) IdentityDirectories

func (api *IdsecAPI) IdentityDirectories() (*directories.IdsecIdentityDirectoriesService, error)

func (*IdsecAPI) IdentityPolicies added in v0.1.9

func (api *IdsecAPI) IdentityPolicies() (*policies.IdsecIdentityPoliciesService, error)

func (*IdsecAPI) IdentityRoles

func (api *IdsecAPI) IdentityRoles() (*roles.IdsecIdentityRolesService, error)

func (*IdsecAPI) IdentityUsers

func (api *IdsecAPI) IdentityUsers() (*users.IdsecIdentityUsersService, error)

func (*IdsecAPI) PcloudAccounts

func (api *IdsecAPI) PcloudAccounts() (*accounts.IdsecPCloudAccountsService, error)

func (*IdsecAPI) PcloudPlatforms

func (api *IdsecAPI) PcloudPlatforms() (*platforms.IdsecPCloudPlatformsService, error)

func (*IdsecAPI) PcloudSafes

func (api *IdsecAPI) PcloudSafes() (*safes.IdsecPCloudSafesService, error)

func (*IdsecAPI) Policy added in v0.1.2

func (api *IdsecAPI) Policy() (*policy.IdsecPolicyService, error)

func (*IdsecAPI) PolicyCloudaccess added in v0.1.2

func (api *IdsecAPI) PolicyCloudaccess() (*cloudaccess.IdsecPolicyCloudAccessService, error)

func (*IdsecAPI) PolicyDb added in v0.1.3

func (api *IdsecAPI) PolicyDb() (*db.IdsecPolicyDBService, error)

func (*IdsecAPI) PolicyVm added in v0.1.3

func (api *IdsecAPI) PolicyVm() (*vm.IdsecPolicyVMService, error)

func (*IdsecAPI) Profile

func (api *IdsecAPI) Profile() *models.IdsecProfile

Profile returns the profile associated with the IdsecAPI 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 IDSEC services.

The returned profile is the same instance that was either explicitly provided to NewIdsecAPI or automatically loaded as the default profile when nil was passed.

Returns a pointer to the IdsecProfile instance. The profile is never nil for a properly initialized IdsecAPI instance.

Example:

profile := api.Profile()
fmt.Printf("Using profile: %s\n", profile.ProfileName)

func (*IdsecAPI) Sca

func (api *IdsecAPI) Sca() (*sca.IdsecSCAService, error)

func (*IdsecAPI) SechubConfiguration

func (api *IdsecAPI) SechubConfiguration() (*configuration.IdsecSecHubConfigurationService, error)

func (*IdsecAPI) SechubFilters

func (api *IdsecAPI) SechubFilters() (*filters.IdsecSecHubFiltersService, error)

func (*IdsecAPI) SechubScans

func (api *IdsecAPI) SechubScans() (*scans.IdsecSecHubScansService, error)

func (*IdsecAPI) SechubSecrets

func (api *IdsecAPI) SechubSecrets() (*secrets.IdsecSecHubSecretsService, error)

func (*IdsecAPI) SechubSecretstores

func (api *IdsecAPI) SechubSecretstores() (*secretstores.IdsecSecHubSecretStoresService, error)

func (*IdsecAPI) SechubServiceinfo

func (api *IdsecAPI) SechubServiceinfo() (*serviceinfo.IdsecSecHubServiceInfoService, error)

func (*IdsecAPI) SechubSyncpolicies

func (api *IdsecAPI) SechubSyncpolicies() (*syncpolicies.IdsecSecHubSyncPoliciesService, error)

func (*IdsecAPI) SiaAccess

func (api *IdsecAPI) SiaAccess() (*access.IdsecSIAAccessService, error)

func (*IdsecAPI) SiaCertificates

func (api *IdsecAPI) SiaCertificates() (*certificates.IdsecSIACertificatesService, error)

func (*IdsecAPI) SiaDb

func (api *IdsecAPI) SiaDb() (*db2.IdsecSIADBService, error)

func (*IdsecAPI) SiaK8s

func (api *IdsecAPI) SiaK8s() (*k8s.IdsecSIAK8SService, error)

func (*IdsecAPI) SiaSecretsDb

func (api *IdsecAPI) SiaSecretsDb() (*dbsecrets.IdsecSIASecretsDBService, error)

func (*IdsecAPI) SiaSecretsVm

func (api *IdsecAPI) SiaSecretsVm() (*vmsecrets.IdsecSIASecretsVMService, error)

func (*IdsecAPI) SiaSettings

func (api *IdsecAPI) SiaSettings() (*settings.IdsecSIASettingsService, error)

func (*IdsecAPI) SiaSshca

func (api *IdsecAPI) SiaSshca() (*sshca.IdsecSIASSHCAService, error)

func (*IdsecAPI) SiaSso

func (api *IdsecAPI) SiaSso() (*sso.IdsecSIASSOService, error)

func (*IdsecAPI) SiaWorkspacesDb

func (api *IdsecAPI) SiaWorkspacesDb() (*db3.IdsecSIAWorkspacesDBService, error)

func (*IdsecAPI) SiaWorkspacesTargetsets

func (api *IdsecAPI) SiaWorkspacesTargetsets() (*targetsets.IdsecSIAWorkspacesTargetSetsService, error)

func (*IdsecAPI) Sm

func (api *IdsecAPI) Sm() (*sm.IdsecSMService, error)

Directories

Path Synopsis
Package actions provides base functionality for Idsec SDK command line actions.
Package actions provides base functionality for Idsec SDK command line actions.
Package common provides shared utilities and types for the IDSEC SDK.
Package common provides shared utilities and types for the IDSEC SDK.
args
Package args provides command-line argument handling utilities for the IDSEC SDK.
Package args provides command-line argument handling utilities for the IDSEC SDK.
connections/ssh
Package ssh provides Secure Shell (SSH) connection capabilities for the IDSEC SDK Golang.
Package ssh provides Secure Shell (SSH) connection capabilities for the IDSEC SDK Golang.
connections/winrm
Package winrm provides Windows Remote Management (WinRM) connection capabilities for the IDSEC SDK Golang.
Package winrm provides Windows Remote Management (WinRM) connection capabilities for the IDSEC SDK Golang.
isp
Package isp provides ISP (Identity Service Provider) client functionality for the IDSEC SDK.
Package isp provides ISP (Identity Service Provider) client functionality for the IDSEC SDK.
keyring
Package keyring provides keyring utilities for the IDSEC SDK.
Package keyring provides keyring utilities for the IDSEC SDK.
Package config provides shared utilities and types for the IDSEC SDK.
Package config provides shared utilities and types for the IDSEC SDK.
Package models provides data structures and types for the IDSEC SDK.
Package models provides data structures and types for the IDSEC SDK.
common
Package common provides common models and utilities for AWS environment management and configuration handling within the IDSEC SDK.
Package common provides common models and utilities for AWS environment management and configuration handling within the IDSEC SDK.
common/identity
Package identity provides data structures and types for IDSEC Identity directory services.
Package identity provides data structures and types for IDSEC Identity directory services.
Package profiles provides functionality for managing IDSEC configuration profiles in the IDSEC SDK Golang.
Package profiles provides functionality for managing IDSEC configuration profiles in the IDSEC SDK Golang.
cce
sca
sca/models
Package models provides data structures for SCA discovery operations including request, response and account info types relocated from the Cloud Access Policy module.
Package models provides data structures for SCA discovery operations including request, response and account info types relocated from the Cloud Access Policy module.
sia
sm

Jump to

Keyboard shortcuts

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