Documentation ¶
Overview ¶
Copyright (C) 2020 Synopsys, Inc.
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright (C) 2020 Synopsys, Inc.
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- type DetectDockerConfig
- type NamingConfig
- type OSType
- type ScanClient
- func (sc *ScanClient) DetectBinaryScan(path string, projectName string, versionName string, scanName string) error
- func (sc *ScanClient) DetectDocker(projectName string, versionName string, scanName string, image string) error
- func (sc *ScanClient) DetectOffline(path string) error
- func (sc *ScanClient) DetectSignatureScan(path string, projectName string, versionName string, scanName string) error
- func (sc *ScanClient) IScan(path string, projectName string, versionName string, scanName string) error
- func (sc *ScanClient) Scan(path string, cfg *ScanConfig) error
- func (sc *ScanClient) ScanSh(path string, projectName string, versionName string, scanName string) error
- type ScanClientInfo
- func (sci *ScanClientInfo) ScanCliImplJarPath() string
- func (sci *ScanClientInfo) ScanCliJarPath() string
- func (sci *ScanClientInfo) ScanCliJavaHomePath() string
- func (sci *ScanClientInfo) ScanCliJavaPath() string
- func (sci *ScanClientInfo) ScanCliShPath() string
- func (sci *ScanClientInfo) ScanCliZipPath() string
- type ScanClientInterface
- type ScanConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DetectDockerConfig ¶
type DetectDockerConfig struct {
ImageTag string
}
type NamingConfig ¶
type OSType ¶
type OSType string
func (OSType) MarshalJSON ¶
func (OSType) MarshalText ¶
func (*OSType) UnmarshalJSON ¶
func (*OSType) UnmarshalText ¶
type ScanClient ¶
type ScanClient struct {
// contains filtered or unexported fields
}
ScanClient implements ScanClientInterface using the Black Duck hub and scan client programs.
func NewScanClient ¶
func NewScanClient(host string, username string, password string, port int, os OSType) (*ScanClient, error)
NewScanClient requires hub login credentials
func (*ScanClient) DetectBinaryScan ¶
func (*ScanClient) DetectDocker ¶
func (*ScanClient) DetectOffline ¶
func (sc *ScanClient) DetectOffline(path string) error
DetectOffline TODO is this method even necessary?
func (*ScanClient) DetectSignatureScan ¶
func (*ScanClient) IScan ¶
func (sc *ScanClient) IScan(path string, projectName string, versionName string, scanName string) error
Scan ...
func (*ScanClient) Scan ¶
func (sc *ScanClient) Scan(path string, cfg *ScanConfig) error
func (*ScanClient) ScanSh ¶
func (sc *ScanClient) ScanSh(path string, projectName string, versionName string, scanName string) error
ScanSh invokes scan.cli.sh example:
BD_HUB_PASSWORD=??? ./bin/scan.cli.sh --host ??? --port 443 --scheme https --username sysadmin --insecure --name ??? --release ??? --project ??? ???.tar
type ScanClientInfo ¶
ScanClientInfo ...
func DownloadScanClient ¶
func DownloadScanClient(osType OSType, cliRootPath string, hubHost string, hubUser string, hubPassword string, hubPort int, timeout time.Duration) (*ScanClientInfo, error)
DownloadScanClient ...
func NewScanClientInfo ¶
func NewScanClientInfo(hubVersion string, rootPath string, osType OSType) *ScanClientInfo
NewScanClientInfo ...
func (*ScanClientInfo) ScanCliImplJarPath ¶
func (sci *ScanClientInfo) ScanCliImplJarPath() string
ScanCliImplJarPath ...
func (*ScanClientInfo) ScanCliJarPath ¶
func (sci *ScanClientInfo) ScanCliJarPath() string
ScanCliJarPath ...
func (*ScanClientInfo) ScanCliJavaHomePath ¶
func (sci *ScanClientInfo) ScanCliJavaHomePath() string
func (*ScanClientInfo) ScanCliJavaPath ¶
func (sci *ScanClientInfo) ScanCliJavaPath() string
ScanCliJavaPath ...
func (*ScanClientInfo) ScanCliShPath ¶
func (sci *ScanClientInfo) ScanCliShPath() string
ScanCliShPath ...
func (*ScanClientInfo) ScanCliZipPath ¶
func (sci *ScanClientInfo) ScanCliZipPath() string
ScanCliZipPath ...
type ScanClientInterface ¶
type ScanClientInterface interface { IScan(path string, projectName string, versionName string, scanName string) error DetectDocker(projectName string, versionName string, scanName string, image string) error DetectSignatureScan(path string, projectName string, versionName string, scanName string) error DetectBinaryScan(path string, projectName string, versionName string, scanName string) error Scan(path string, cfg *ScanConfig) error }
ScanClientInterface ...
type ScanConfig ¶
type ScanConfig struct { Names *NamingConfig IScan bool DetectDocker *DetectDockerConfig DetectSignatureScan bool DetectBinaryScan bool }