Documentation
¶
Index ¶
- Constants
- Variables
- func ConfigLoggingCallback(f func(level LogLevel, levelStr string, format string, a ...interface{}))
- func MSG(id string) string
- func SetLoggingLevel(level LogLevel)
- type AmaasClient
- func (ac *AmaasClient) ConfigAppName(ctx context.Context) context.Context
- func (ac *AmaasClient) ConfigAuth(ctx context.Context) context.Context
- func (ac *AmaasClient) Destroy()
- func (ac *AmaasClient) DumpConfig() (output string)
- func (ac *AmaasClient) GetAppName() string
- func (ac *AmaasClient) GetConnection() *grpc.ClientConn
- func (ac *AmaasClient) GetTimeoutSetting() int
- func (ac *AmaasClient) ScanBuffer(buffer []byte, identifier string, tags []string) (resp string, e error)
- func (ac *AmaasClient) ScanFile(filePath string, tags []string) (resp string, e error)
- func (ac *AmaasClient) ScanReader(reader AmaasClientReader, tags []string) (resp string, e error)
- func (ac *AmaasClient) SetAppName(appName string)
- func (ac *AmaasClient) SetDigestDisable()
- func (ac *AmaasClient) SetFeedbackEnable()
- func (ac *AmaasClient) SetPMLEnable()
- func (ac *AmaasClient) SetVerboseEnable()
- type AmaasClientArchiveHandler
- type AmaasClientBufferReader
- func (reader *AmaasClientBufferReader) Close()
- func (reader *AmaasClientBufferReader) DataSize() (int64, error)
- func (reader *AmaasClientBufferReader) Hash(algorithm string) (string, error)
- func (reader *AmaasClientBufferReader) Identifier() string
- func (reader *AmaasClientBufferReader) ReadBytes(offset int64, length int32) ([]byte, error)
- type AmaasClientFileReader
- func (reader *AmaasClientFileReader) Close()
- func (reader *AmaasClientFileReader) DataSize() (int64, error)
- func (reader *AmaasClientFileReader) Hash(algorithm string) (string, error)
- func (reader *AmaasClientFileReader) Identifier() string
- func (reader *AmaasClientFileReader) ReadBytes(offset int64, length int32) ([]byte, error)
- type AmaasClientReader
- type ErrMsg
- type LogLevel
- type LoggerCallback
- type MalwareDetail
- type ScanResult2Client
Constants ¶
View Source
const ( AWS_JP_REGION = "ap-northeast-1" AWS_SG_REGION = "ap-southeast-1" AWS_AU_REGION = "ap-southeast-2" AWS_IN_REGION = "ap-south-1" AWS_US_REGION = "us-east-1" AWS_DE_REGION = "eu-central-1" AWS_CA_REGION = "ca-central-1" AWS_GB_REGION = "eu-west-2" AWS_AE_REGION = "me-central-1" C1_JP_REGION = "jp-1" C1_SG_REGION = "sg-1" C1_AU_REGION = "au-1" C1_IN_REGION = "in-1" C1_US_REGION = "us-1" C1_DE_REGION = "de-1" C1_CA_REGION = "ca-1" C1_GB_REGION = "gb-1" C1_TREND_REGION = "trend-us-1" C1_AE_REGION = "ae-1" )
Variables ¶
View Source
var AllRegions []string = append(C1Regions, V1Regions...)
View Source
var AllValidRegions []string = append(SupportedC1Regions, SupportedV1Regions...)
View Source
var C1Regions []string = []string{C1_AU_REGION, C1_CA_REGION, C1_DE_REGION, C1_GB_REGION, C1_IN_REGION, C1_JP_REGION, C1_SG_REGION, C1_US_REGION, C1_TREND_REGION}
View Source
var SupportedC1Regions []string = []string{C1_AU_REGION, C1_CA_REGION, C1_DE_REGION, C1_GB_REGION, C1_IN_REGION, C1_JP_REGION, C1_SG_REGION, C1_US_REGION}
View Source
var SupportedV1Regions []string = []string{AWS_AU_REGION, AWS_DE_REGION, AWS_IN_REGION, AWS_JP_REGION, AWS_SG_REGION, AWS_US_REGION, AWS_AE_REGION}
View Source
var V1Regions []string = []string{AWS_AU_REGION, AWS_CA_REGION, AWS_DE_REGION, AWS_GB_REGION, AWS_IN_REGION, AWS_JP_REGION, AWS_SG_REGION, AWS_US_REGION, AWS_AE_REGION}
View Source
var V1ToC1RegionMapping = map[string]string{ AWS_AU_REGION: C1_AU_REGION, AWS_DE_REGION: C1_DE_REGION, AWS_IN_REGION: C1_IN_REGION, AWS_JP_REGION: C1_JP_REGION, AWS_SG_REGION: C1_SG_REGION, AWS_US_REGION: C1_US_REGION, AWS_AE_REGION: C1_AE_REGION, }
Functions ¶
func ConfigLoggingCallback ¶
func SetLoggingLevel ¶
func SetLoggingLevel(level LogLevel)
Types ¶
type AmaasClient ¶
type AmaasClient struct {
// contains filtered or unexported fields
}
func NewClientInternal ¶
func (*AmaasClient) ConfigAppName ¶
func (ac *AmaasClient) ConfigAppName(ctx context.Context) context.Context
func (*AmaasClient) ConfigAuth ¶
func (ac *AmaasClient) ConfigAuth(ctx context.Context) context.Context
func (*AmaasClient) Destroy ¶
func (ac *AmaasClient) Destroy()
func (*AmaasClient) DumpConfig ¶
func (ac *AmaasClient) DumpConfig() (output string)
func (*AmaasClient) GetAppName ¶
func (ac *AmaasClient) GetAppName() string
func (*AmaasClient) GetConnection ¶
func (ac *AmaasClient) GetConnection() *grpc.ClientConn
func (*AmaasClient) GetTimeoutSetting ¶
func (ac *AmaasClient) GetTimeoutSetting() int
func (*AmaasClient) ScanBuffer ¶
func (*AmaasClient) ScanFile ¶
func (ac *AmaasClient) ScanFile(filePath string, tags []string) (resp string, e error)
func (*AmaasClient) ScanReader ¶ added in v1.5.0
func (ac *AmaasClient) ScanReader(reader AmaasClientReader, tags []string) (resp string, e error)
func (*AmaasClient) SetAppName ¶
func (ac *AmaasClient) SetAppName(appName string)
func (*AmaasClient) SetDigestDisable ¶ added in v1.4.0
func (ac *AmaasClient) SetDigestDisable()
func (*AmaasClient) SetFeedbackEnable ¶ added in v1.1.1
func (ac *AmaasClient) SetFeedbackEnable()
func (*AmaasClient) SetPMLEnable ¶
func (ac *AmaasClient) SetPMLEnable()
func (*AmaasClient) SetVerboseEnable ¶ added in v1.2.0
func (ac *AmaasClient) SetVerboseEnable()
type AmaasClientArchiveHandler ¶
type AmaasClientArchiveHandler struct { }
type AmaasClientBufferReader ¶
type AmaasClientBufferReader struct {
// contains filtered or unexported fields
}
func InitBufferReader ¶
func InitBufferReader(memBuffer []byte, identifier string) (*AmaasClientBufferReader, error)
func (*AmaasClientBufferReader) Close ¶
func (reader *AmaasClientBufferReader) Close()
func (*AmaasClientBufferReader) DataSize ¶
func (reader *AmaasClientBufferReader) DataSize() (int64, error)
func (*AmaasClientBufferReader) Hash ¶
func (reader *AmaasClientBufferReader) Hash(algorithm string) (string, error)
return hash value of buffer
func (*AmaasClientBufferReader) Identifier ¶
func (reader *AmaasClientBufferReader) Identifier() string
type AmaasClientFileReader ¶
type AmaasClientFileReader struct {
// contains filtered or unexported fields
}
func InitFileReader ¶
func InitFileReader(fileName string) (*AmaasClientFileReader, error)
func (*AmaasClientFileReader) Close ¶
func (reader *AmaasClientFileReader) Close()
func (*AmaasClientFileReader) DataSize ¶
func (reader *AmaasClientFileReader) DataSize() (int64, error)
func (*AmaasClientFileReader) Hash ¶
func (reader *AmaasClientFileReader) Hash(algorithm string) (string, error)
func (*AmaasClientFileReader) Identifier ¶
func (reader *AmaasClientFileReader) Identifier() string
type AmaasClientReader ¶
type AmaasClientReader interface { // Return the identifier of the data source. For example, name of the file being read. Identifier() string // Return the total size of the data source. DataSize() (int64, error) // Return requested number of bytes from the data source starting at the specified offset. ReadBytes(offset int64, length int32) ([]byte, error) }
type LoggerCallback ¶
type MalwareDetail ¶ added in v1.2.0
type ScanResult2Client ¶ added in v1.2.0
type ScanResult2Client struct { ScannerVersion string `json:"scannerVersion"` SchemaVersion string `json:"schemaVersion"` ScanResult int32 `json:"scanResult"` ScanId string `json:"scanId"` ScanTimestamp string `json:"scanTimestamp"` FileName string `json:"fileName"` FoundMalwares []MalwareDetail `json:"foundMalwares"` FoundErrors []ErrMsg `json:"foundErrors,omitempty"` FileSha1 string `json:"fileSHA1,omitempty"` FileSha256 string `json:"fileSHA256,omitempty"` }
Source Files
¶
Click to show internal directories.
Click to hide internal directories.