client

package
v0.0.0-...-e4dbbe6 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2023 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LogLevelOff     LogLevel = 0
	LogLevelFatal            = 1
	LogLevelError            = 2
	LogLevelWarning          = 3
	LogLevelInfo             = 4
	LogLevelDebug            = 5
)

Variables

This section is empty.

Functions

func ConfigLoggingCallback

func ConfigLoggingCallback(f func(level LogLevel, levelStr string, format string, a ...interface{}))

func MSG

func MSG(id string) string

func SetLoggingLevel

func SetLoggingLevel(level LogLevel)

Types

type AmaasClient

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

func NewClient

func NewClient(key string, region string) (c *AmaasClient, e error)

func NewClientInternal

func NewClientInternal(key string, addr string, useTLS bool) (*AmaasClient, error)

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) GetConnection

func (ac *AmaasClient) GetConnection() *grpc.ClientConn

func (*AmaasClient) GetTimeoutSetting

func (ac *AmaasClient) GetTimeoutSetting() int

func (*AmaasClient) ScanBuffer

func (ac *AmaasClient) ScanBuffer(buffer []byte, identifier string) (resp string, e error)

func (*AmaasClient) ScanFile

func (ac *AmaasClient) ScanFile(filePath string) (resp string, e error)

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() (string, error)

return hash value of buffer

func (*AmaasClientBufferReader) Identifier

func (reader *AmaasClientBufferReader) Identifier() string

func (*AmaasClientBufferReader) ReadBytes

func (reader *AmaasClientBufferReader) ReadBytes(offset int64, length int32) ([]byte, error)

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() (string, error)

func (*AmaasClientFileReader) Identifier

func (reader *AmaasClientFileReader) Identifier() string

func (*AmaasClientFileReader) ReadBytes

func (reader *AmaasClientFileReader) ReadBytes(offset int64, length int32) ([]byte, error)

type AmaasClientReader

type AmaasClientReader interface {
	Identifier() string
	DataSize() (int64, error)
	ReadBytes(offset int64, length int32) ([]byte, error)
	Close()
	Hash() (string, error)
}

type LogLevel

type LogLevel int

type LoggerCallback

type LoggerCallback func(level LogLevel, levelStr string, format string, a ...interface{})

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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