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) SetAppName(appName string)
- func (ac *AmaasClient) SetCacheDisable()
- func (ac *AmaasClient) SetFeedbackEnable()
- func (ac *AmaasClient) SetPMLEnable()
- 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 LogLevel
- type LoggerCallback
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" 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" )
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}
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}
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, }
Functions ¶
func ConfigLoggingCallback ¶
func SetLoggingLevel ¶
func SetLoggingLevel(level LogLevel)
Types ¶
type AmaasClient ¶
type AmaasClient struct {
// contains filtered or unexported fields
}
func NewClientInternal ¶
func NewClientInternal(key string, addr string, useTLS bool) (*AmaasClient, error)
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) SetAppName ¶
func (ac *AmaasClient) SetAppName(appName string)
func (*AmaasClient) SetCacheDisable ¶
func (ac *AmaasClient) SetCacheDisable()
func (*AmaasClient) SetFeedbackEnable ¶ added in v1.1.1
func (ac *AmaasClient) SetFeedbackEnable()
func (*AmaasClient) SetPMLEnable ¶
func (ac *AmaasClient) SetPMLEnable()
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 LoggerCallback ¶
Click to show internal directories.
Click to hide internal directories.