package
0.0.0-20230516194455-8aef9cf14534
Repository: https://github.com/nextlinux/client-go.git
Documentation: pkg.go.dev
# README
Go API client for external
This is the Nextlinux Engine API. Provides the primary external API for users of the service.
Overview
This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.
- API version: 0.1.16
- Package version: 0.1.0
- Build package: org.openapitools.codegen.languages.GoClientCodegen
Installation
Install the following dependencies:
go get github.com/stretchr/testify/assert
go get golang.org/x/oauth2
go get golang.org/x/net/context
go get github.com/antihax/optional
Put the package under your project folder and add the following in import:
import "./external"
Documentation for API Endpoints
All URIs are relative to http://localhost
Class | Method | HTTP request | Description |
---|---|---|---|
ArchivesApi | ArchiveImageAnalysis | Post /archives/images | |
ArchivesApi | CreateAnalysisArchiveRule | Post /archives/rules | |
ArchivesApi | DeleteAnalysisArchiveRule | Delete /archives/rules/{ruleId} | |
ArchivesApi | DeleteArchivedAnalysis | Delete /archives/images/{imageDigest} | |
ArchivesApi | GetAnalysisArchiveRule | Get /archives/rules/{ruleId} | |
ArchivesApi | GetArchivedAnalysis | Get /archives/images/{imageDigest} | |
ArchivesApi | ListAnalysisArchive | Get /archives/images | |
ArchivesApi | ListAnalysisArchiveRules | Get /archives/rules | |
ArchivesApi | ListArchives | Get /archives | |
DefaultApi | GetOauthToken | Post /oauth/token | |
DefaultApi | HealthCheck | Get /health | |
DefaultApi | ListFileContentSearchResults | Get /images/{imageDigest}/artifacts/file_content_search | Return a list of analyzer artifacts of the specified type |
DefaultApi | ListRetrievedFiles | Get /images/{imageDigest}/artifacts/retrieved_files | Return a list of analyzer artifacts of the specified type |
DefaultApi | ListSecretSearchResults | Get /images/{imageDigest}/artifacts/secret_search | Return a list of analyzer artifacts of the specified type |
DefaultApi | Ping | Get / | |
DefaultApi | VersionCheck | Get /version | |
EventsApi | DeleteEvent | Delete /events/{eventId} | Delete Event |
EventsApi | DeleteEvents | Delete /events | Delete Events |
EventsApi | GetEvent | Get /events/{eventId} | Get Event |
EventsApi | ListEventTypes | Get /event_types | List Event Types |
EventsApi | ListEvents | Get /events | List Events |
IdentityApi | AddCredential | Post /user/credentials | add/replace credential |
IdentityApi | GetCredentials | Get /user/credentials | Get current credential summary |
IdentityApi | GetUser | Get /user | List authenticated user info |
IdentityApi | GetUsersAccount | Get /account | List the account for the authenticated user |
ImagesApi | AddImage | Post /images | Submit a new image for analysis by the engine |
ImagesApi | DeleteImage | Delete /images/{imageDigest} | Delete an image analysis |
ImagesApi | DeleteImageByImageId | Delete /images/by_id/{imageId} | Delete image by docker imageId |
ImagesApi | DeleteImagesAsync | Delete /images | Bulk mark images for deletion |
ImagesApi | GetImage | Get /images/{imageDigest} | Get image metadata |
ImagesApi | GetImageByImageId | Get /images/by_id/{imageId} | Lookup image by docker imageId |
ImagesApi | GetImageContentByType | Get /images/{imageDigest}/content/{ctype} | Get the content of an image by type |
ImagesApi | GetImageContentByTypeFiles | Get /images/{imageDigest}/content/files | Get the content of an image by type files |
ImagesApi | GetImageContentByTypeImageId | Get /images/by_id/{imageId}/content/{ctype} | Get the content of an image by type |
ImagesApi | GetImageContentByTypeImageIdFiles | Get /images/by_id/{imageId}/content/files | Get the content of an image by type files |
ImagesApi | GetImageContentByTypeImageIdJavapackage | Get /images/by_id/{imageId}/content/java | Get the content of an image by type java |
ImagesApi | GetImageContentByTypeJavapackage | Get /images/{imageDigest}/content/java | Get the content of an image by type java |
ImagesApi | GetImageContentByTypeMalware | Get /images/{imageDigest}/content/malware | Get the content of an image by type malware |
ImagesApi | GetImageMetadataByType | Get /images/{imageDigest}/metadata/{mtype} | Get the metadata of an image by type |
ImagesApi | GetImagePolicyCheck | Get /images/{imageDigest}/check | Check policy evaluation status for image |
ImagesApi | GetImagePolicyCheckByImageId | Get /images/by_id/{imageId}/check | Check policy evaluation status for image |
ImagesApi | GetImageVulnerabilitiesByType | Get /images/{imageDigest}/vuln/{vtype} | Get vulnerabilities by type |
ImagesApi | GetImageVulnerabilitiesByTypeImageId | Get /images/by_id/{imageId}/vuln/{vtype} | Get vulnerabilities by type |
ImagesApi | GetImageVulnerabilityTypes | Get /images/{imageDigest}/vuln | Get vulnerability types |
ImagesApi | GetImageVulnerabilityTypesByImageId | Get /images/by_id/{imageId}/vuln | Get vulnerability types |
ImagesApi | ListImageContent | Get /images/{imageDigest}/content | List image content types |
ImagesApi | ListImageContentByImageid | Get /images/by_id/{imageId}/content | List image content types |
ImagesApi | ListImageMetadata | Get /images/{imageDigest}/metadata | List image metadata types |
ImagesApi | ListImages | Get /images | List all visible images |
ImportApi | ImportImageArchive | Post /import/images | Import an nextlinux image tar.gz archive file. This is a deprecated API replaced by the "/imports/images" route |
ImportsApi | CreateOperation | Post /imports/images | Begin the import of an image analyzed by Syft into the system |
ImportsApi | GetOperation | Get /imports/images/{operation_id} | Get detail on a single import |
ImportsApi | ImportImageConfig | Post /imports/images/{operation_id}/image_config | Import a docker or OCI image config to associate with the image |
ImportsApi | ImportImageDockerfile | Post /imports/images/{operation_id}/dockerfile | Begin the import of an image analyzed by Syft into the system |
ImportsApi | ImportImageManifest | Post /imports/images/{operation_id}/manifest | Import a docker or OCI distribution manifest to associate with the image |
ImportsApi | ImportImagePackages | Post /imports/images/{operation_id}/packages | Begin the import of an image analyzed by Syft into the system |
ImportsApi | ImportImageParentManifest | Post /imports/images/{operation_id}/parent_manifest | Import a docker or OCI distribution manifest list to associate with the image |
ImportsApi | InvalidateOperation | Delete /imports/images/{operation_id} | Invalidate operation ID so it can be garbage collected |
ImportsApi | ListImportDockerfiles | Get /imports/images/{operation_id}/dockerfile | List uploaded dockerfiles |
ImportsApi | ListImportImageConfigs | Get /imports/images/{operation_id}/image_config | List uploaded image configs |
ImportsApi | ListImportImageManifests | Get /imports/images/{operation_id}/manifest | List uploaded image manifests |
ImportsApi | ListImportPackages | Get /imports/images/{operation_id}/packages | List uploaded package manifests |
ImportsApi | ListImportParentManifests | Get /imports/images/{operation_id}/parent_manifest | List uploaded parent manifests (manifest lists for a tag) |
ImportsApi | ListOperations | Get /imports/images | Lists in-progress imports |
PoliciesApi | AddPolicy | Post /policies | Add a new policy |
PoliciesApi | DeletePolicy | Delete /policies/{policyId} | Delete policy |
PoliciesApi | GetPolicy | Get /policies/{policyId} | Get specific policy |
PoliciesApi | ListPolicies | Get /policies | List policies |
PoliciesApi | UpdatePolicy | Put /policies/{policyId} | Update policy |
QueryApi | QueryImagesByPackage | Get /query/images/by_package | List of images containing given package |
QueryApi | QueryImagesByVulnerability | Get /query/images/by_vulnerability | List images vulnerable to the specific vulnerability ID. |
QueryApi | QueryVulnerabilities | Get /query/vulnerabilities | Listing information about given vulnerability |
RegistriesApi | CreateRegistry | Post /registries | Add a new registry |
RegistriesApi | DeleteRegistry | Delete /registries/{registry} | Delete a registry configuration |
RegistriesApi | GetRegistry | Get /registries/{registry} | Get a specific registry configuration |
RegistriesApi | ListRegistries | Get /registries | List configured registries |
RegistriesApi | UpdateRegistry | Put /registries/{registry} | Update/replace a registry configuration |
RepositoryCredentialsApi | AddRepository | Post /repositories | Add repository to watch |
SubscriptionsApi | AddSubscription | Post /subscriptions | Add a subscription of a specific type |
SubscriptionsApi | DeleteSubscription | Delete /subscriptions/{subscriptionId} | Delete subscriptions of a specific type |
SubscriptionsApi | GetSubscription | Get /subscriptions/{subscriptionId} | Get a specific subscription set |
SubscriptionsApi | ListSubscriptions | Get /subscriptions | List all subscriptions |
SubscriptionsApi | UpdateSubscription | Put /subscriptions/{subscriptionId} | Update an existing and specific subscription |
SummariesApi | ListImagetags | Get /summaries/imagetags | List all visible image digests and tags |
SystemApi | DeleteFeed | Delete /system/feeds/{feed} | |
SystemApi | DeleteFeedGroup | Delete /system/feeds/{feed}/{group} | |
SystemApi | DeleteService | Delete /system/services/{servicename}/{hostid} | Delete the service config |
SystemApi | DescribeErrorCodes | Get /system/error_codes | Describe nextlinux engine error codes. |
SystemApi | DescribePolicy | Get /system/policy_spec | Describe the policy language spec implemented by this service. |
SystemApi | GetServiceDetail | Get /system | System status |
SystemApi | GetServicesByName | Get /system/services/{servicename} | Get a service configuration and state |
SystemApi | GetServicesByNameAndHost | Get /system/services/{servicename}/{hostid} | Get service config for a specific host |
SystemApi | GetStatus | Get /status | Service status |
SystemApi | GetSystemFeeds | Get /system/feeds | list feeds operations and information |
SystemApi | ListServices | Get /system/services | List system services |
SystemApi | PostSystemFeeds | Post /system/feeds | trigger feeds operations |
SystemApi | TestWebhook | Post /system/webhooks/{webhook_type}/test | Adds the capabilities to test a webhook delivery for the given notification type |
SystemApi | ToggleFeedEnabled | Put /system/feeds/{feed} | |
SystemApi | ToggleGroupEnabled | Put /system/feeds/{feed}/{group} | |
UserManagementApi | CreateAccount | Post /accounts | Create a new user. Only avaialble to admin user. |
UserManagementApi | CreateUser | Post /accounts/{accountname}/users | Create a new user |
UserManagementApi | CreateUserCredential | Post /accounts/{accountname}/users/{username}/credentials | add/replace credential |
UserManagementApi | DeleteAccount | Delete /accounts/{accountname} | Delete the specified account, only allowed if the account is in the disabled state. All users will be deleted along with the account and all resources will be garbage collected |
UserManagementApi | DeleteUser | Delete /accounts/{accountname}/users/{username} | Delete a specific user credential by username of the credential. Cannot be the credential used to authenticate the request. |
UserManagementApi | DeleteUserCredential | Delete /accounts/{accountname}/users/{username}/credentials | Delete a credential by type |
UserManagementApi | GetAccount | Get /accounts/{accountname} | Get info about an user. Only available to admin user. Uses the main user Id, not a username. |
UserManagementApi | GetAccountUser | Get /accounts/{accountname}/users/{username} | Get a specific user in the specified account |
UserManagementApi | ListAccounts | Get /accounts | List user summaries. Only available to the system admin user. |
UserManagementApi | ListUserCredentials | Get /accounts/{accountname}/users/{username}/credentials | Get current credential summary |
UserManagementApi | ListUsers | Get /accounts/{accountname}/users | List accounts for the user |
UserManagementApi | UpdateAccountState | Put /accounts/{accountname}/state | Update the state of an account to either enabled or disabled. For deletion use the DELETE route |
Documentation For Models
- AccessCredential
- Account
- AccountCreationRequest
- AccountStatus
- AnalysisArchiveAddResult
- AnalysisArchiveRulesSummary
- AnalysisArchiveSource
- AnalysisArchiveSummary
- AnalysisArchiveTransitionHistory
- AnalysisArchiveTransitionRule
- AnalysisArchiveTransitionRuleExclude
- AnalysisUpdateEval
- AnalysisUpdateNotification
- AnalysisUpdateNotificationAllOf
- AnalysisUpdateNotificationData
- AnalysisUpdateNotificationDataAllOf
- AnalysisUpdateNotificationPayload
- AnalysisUpdateNotificationPayloadAllOf
- NextlinuxErrorCode
- NextlinuxImage
- NextlinuxImageTagSummary
- ApiErrorResponse
- ArchiveSummary
- ArchivedAnalysis
- BaseNotificationData
- ContentFilesResponse
- ContentFilesResponseContent
- ContentJavaPackageResponse
- ContentJavaPackageResponseContent
- ContentMalwareResponse
- ContentPackageResponse
- ContentPackageResponseContent
- ContentResponse
- Cvssv2Scores
- Cvssv3Scores
- DeleteImageResponse
- EventCategory
- EventDescription
- EventResponse
- EventResponseEvent
- EventResponseEventResource
- EventResponseEventSource
- EventSubcategory
- EventsList
- FeedGroupMetadata
- FeedMetadata
- FeedSyncResult
- FileContentSearchResult
- GateSpec
- GenericNotificationPayload
- GroupSyncResult
- ImageAnalysisRequest
- ImageDetail
- ImageFilter
- ImageImportContentResponse
- ImageImportManifest
- ImageImportOperation
- ImagePackageManifest
- ImageRef
- ImageReference
- ImageSelectionRule
- ImageSelector
- ImageSource
- ImageWithPackages
- ImportContentDigests
- ImportDescriptor
- ImportDistribution
- ImportPackage
- ImportPackageLocation
- ImportPackageRelationship
- ImportSchema
- ImportSource
- LocalAnalysisSource
- MalwareScan
- MalwareScanFindings
- MappingRule
- MetadataResponse
- NotificationBase
- NvdDataObject
- PackageReference
- PaginatedImageList
- PaginatedImageListAllOf
- PaginatedVulnerabilityList
- PaginatedVulnerabilityListAllOf
- PaginatedVulnerableImageList
- PaginatedVulnerableImageListAllOf
- PaginationProperties
- Policy
- PolicyBundle
- PolicyBundleRecord
- PolicyEvalNotification
- PolicyEvalNotificationAllOf
- PolicyEvalNotificationData
- PolicyEvalNotificationDataAllOf
- PolicyEvalNotificationPayload
- PolicyEvalNotificationPayloadAllOf
- PolicyRule
- PolicyRuleParams
- RegexContentMatch
- RegistryConfiguration
- RegistryConfigurationRequest
- RegistryDigestSource
- RegistryTagSource
- RetrievedFile
- SecretSearchResult
- Service
- ServiceVersion
- ServiceVersionApi
- ServiceVersionDb
- ServiceVersionService
- StandaloneVulnerability
- StatusResponse
- Subscription
- SubscriptionRequest
- SubscriptionUpdate
- SystemStatusResponse
- TagEntry
- TagUpdateNotification
- TagUpdateNotificationAllOf
- TagUpdateNotificationData
- TagUpdateNotificationDataAllOf
- TagUpdateNotificationPayload
- TagUpdateNotificationPayloadAllOf
- TokenResponse
- TriggerParamSpec
- TriggerSpec
- User
- UserCreationRequest
- VendorDataObject
- VulnDiffResult
- VulnUpdateNotification
- VulnUpdateNotificationAllOf
- VulnUpdateNotificationData
- VulnUpdateNotificationDataAllOf
- VulnUpdateNotificationPayload
- VulnUpdateNotificationPayloadAllOf
- Vulnerability
- VulnerabilityReference
- VulnerabilityResponse
- VulnerableImage
- VulnerablePackageReference
- Whitelist
- WhitelistItem
Documentation For Authorization
Endpoints do not require authorization.