impl

package
v0.0.0-...-92d0c84 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2021 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AttributeTypeInvalid = iota
	AttributeTypeBoolean
	AttributeTypeByte
	AttributeTypeChar
	AttributeTypeShort
	AttributeTypeInteger
	AttributeTypeLong
	AttributeTypeFloat
	AttributeTypeDouble
	AttributeTypeNumber
	AttributeTypeString
	AttributeTypeDate
	AttributeTypeTime
	AttributeTypeTimeStamp
	AttributeTypeBlob
	AttributeTypeClob
)

======= Attribute Types =======

View Source
const (
	DATE_ONLY    = 0
	TIME_ONLY    = 1
	TIMESTAMP    = 2
	TGNoZone     = -1
	TGZoneOffset = 0
	TGZoneId     = 1
	TGZoneName   = 2
)
View Source
const (
	BuildTypeProduction byte = iota
	BuildTypeEngineering
	BuildTypeBeta
)
View Source
const (
	EditionEvaluation byte = iota
	EditionCommunity
	EditionEnterprise
	EditionDeveloper
)
View Source
const (
	//public static final List<?> EmptyList = new ArrayList<>();
	//EmptyByteArray []byte = []byte{}
	EmptyString string = ""

	U64_NULL       int64 = 0xfffffffffffffff
	U64PACKED_NULL byte  = 0xf0

	INTERNAL_SERVER_ERROR    string = "TGDB-00001"
	TGDB_HNDSHKRESP_ERROR    string = "TGDB-HNDSHKRESP-ERR"
	TGDB_CHANNEL_ERROR       string = "TGDB-CHANNEL-ERR"
	TGDB_SEND_ERROR          string = "TGDB-SENDL-ERR"
	TGDB_CLIENT_READEXTERNAL string = "TGDB-CLIENT-READEXTERNAL"

	DebugEnabled bool = false
)
View Source
const (
	CREATE = 1 + iota
	EXECUTE
	EXECUTEGREMLIN
	EXECUTEGREMLINSTR
	EXECUTED
	CLOSE
)
View Source
const (
	ConnectionPoolInitialized = iota
	ConnectionPoolConnecting
	ConnectionPoolConnected
	ConnectionPoolInUse
	ConnectionPoolDisconnecting
	ConnectionPoolDisconnected
	ConnectionPoolStopped
)

======= Various Connection Pool States =======

View Source
const (
	Immediate  = "-1"
	Indefinite = "0"
	IMMEDIATE  = 0
	INFINITE   = math.MaxInt32 // math.MaxInt64
)

0 : Indefinite -1 : Immediate &gt; : That many seconds

View Source
const (
	TGErrorBadVerb = iota
	TGErrorInvalidMessageLength
	TGErrorBadMagic
	TGErrorProtocolNotSupported
	TGErrorBadAuthentication
	TGErrorIOException
	TGErrorConnectionTimeout
	TGErrorGeneralException
	TGErrorRetryIOException
	TGErrorChannelDisconnected
	TGErrorSecurityException
	TGErrorTransactionException
	TGErrorTypeCoercionNotSupported
	TGErrorTypeNotSupported
	TGErrorVersionMismatchException
	TGErrorInvalidErrorCode
	TGSuccess
	TGQryError
	TGQryProviderNotInitialized
	TGQryParsingError
	TGQryStepNotSupported
	TGQryStepNotAllowed
	TGQryStepArgMissing
	TGQryStepArgNotSupported
	TGQryStepMissing
	TGQryNotDefined
	TGQryAttrDescNotFound
	TGQryEdgeTypeNotFound
	TGQryNodeTypeNotFound
	TGQryInternalDataMismatchError
	TGQryStepSignatureNotSupported
	TGQryInvalidDataType
)

/////////////////////////////////////////////////////////////// Helper functions for Interface ==> TGError ///////////////////////////////////////////////////////////////

View Source
const (
	TGQueryInvalid = iota + 8100
	TGQueryProviderNotInitialized
	TGQueryParsingError
	TGQueryStepNotSupported
	TGQueryStepNotAllowed
	TGQueryStepArgMissing
	TGQueryStepArgNotSupported
	TGQueryStepMissing
	TGQueryNotDefined
	TGQueryAttrDescNotFound
	TGQueryEdgeTypeNotFound
	TGQueryNodeTypeNotFound
	TGQueryInternalDataMismatchError
	TGQueryStepSignatureNotSupported
	TGQueryInvalidDataType
	TGQueryErrorCodeEndMarker
)
View Source
const (
	// Ping Message - Heart beats
	VerbPingMessage int = 0
	// HandShake Request/Response protocol
	VerbHandShakeRequest  int = 1
	VerbHandShakeResponse int = 2
	// Authenticate Request/Response protocol
	VerbAuthenticateRequest  int = 3
	VerbAuthenticateResponse int = 4
	// Transaction - begin/commit/rollback protocol verbs
	VerbBeginTransactionRequest     int = 5
	VerbBeginTransactionResponse    int = 6
	VerbCommitTransactionRequest    int = 7
	VerbCommitTransactionResponse   int = 8
	VerbRollbackTransactionRequest  int = 9
	VerbRollbackTransactionResponse int = 10
	// Query Request/Response verbs
	VerbQueryRequest  int = 11
	VerbQueryResponse int = 12
	// Graph Traversal verbs
	VerbTraverseRequest  int = 13
	VerbTraverseResponse int = 14
	// Admin Request/Response verbs
	VerbAdminRequest  int = 15
	VerbAdminResponse int = 16
	// Retrieve meta data
	VerbMetadataRequest  int = 19
	VerbMetadataResponse int = 20
	// Get entities
	VerbGetEntityRequest  int = 21
	VerbGetEntityResponse int = 22
	// Get LargeObject
	VerbGetLargeObjectRequest  int = 23
	VerbGetLargeObjectResponse int = 24
	// Import/Export verbs - They are admin request, and not supported by Java
	VerbBeginExportRequest    int = 25
	VerbBeginExportResponse   int = 26
	VerbPartialExportRequest  int = 27
	VerbPartialExportResponse int = 28
	VerbCancelExportRequest   int = 29
	VerbBeginImportRequest    int = 31
	BeginImportResponse       int = 32
	VerbPartialImportRequest  int = 33
	VerbPartialImportResponse int = 34
	// Dump Stacktrace request verb
	VerbDumpStacktraceRequest int = 39
	// Disconnect Request verbs
	VerbDisconnectChannelRequest    int = 40
	VerbSessionForcefullyTerminated int = 41
	// Decryption Request verbs
	VerbDecryptBufferRequest  int = 44
	VerbDecryptBufferResponse int = 45
	// Unknown Exception Message on the server.
	VerbExceptionMessage int = 100
	VerbInvalidMessage   int = -1
)
View Source
const (
	InvalidRequest = iota
	InitiateRequest
	ChallengeAccepted
)
View Source
const (
	ResponseInvalid = iota
	ResponseAcceptChallenge
	ResponseProceedWithAuthentication
	ResponseChallengeFailed
)
View Source
const (
	DefaultPrefetchSize    = 1000
	DefaultTraversalDepth  = 3
	DefaultEdgeLimit       = 0 // 0 ==> Unlimited
	DefaultOptionSortLimit = 0
	DefaultBatchSize       = 50

	OptionQueryBatchSize      = "batchsize"
	OptionQueryFetchSize      = "fetchsize"
	OptionQueryTraversalDepth = "traversaldepth"
	OptionQueryEdgeLimit      = "edgelimit"
	OptionQuerySortAttr       = "sortattrname"
	OptionQuerySortOrder      = "sortorder" // 0 - asc, 1 - dsc
	OptionQuerySortLimit      = "sortresultlimit"
)
View Source
const (
	TgMajorVersion uint8 = 3
	TgMinorVersion uint8 = 0
	TgMagic        int   = 0xdb2d1e4 // TGDecimal: 229822948
)
View Source
const (
	NullString string = "0000"
	Space      string = " "
	NewLine    string = "\r\n"
)
View Source
const (
	OUTPUTDESIREDTSLAYOUT = time.RFC3339              // Format is same as TROPOS Log TS format i.e. yyyy-mm-ddTHH:MM:SSZ<TZ Diff>
	SINCEEPOCH            = "19700101T12:00:00Z00.00" // Alternative form for UNITY Queries
	UNITYDESIREDLAYOUT    = "2006-Jan-02 15:04:05"
	UNITYDATETIMEFORMAT   = "yyyy-mmm-dd HH:MM:SS" // Should be in sync with UNITYDESIREDLAYOUT
	INPUTDESIREDTSLAYOUT  = "2006-01-02T15:04"
	DATETIMEFORMAT        = "yyyy-mm-ddTHH:MM" // Should be in sync with INPUTDESIREDTSLAYOUT
	INPUTDATEONLYLAYOUT   = "2006-01-02"
	DATEONLYFORMAT        = "yyyy-mm-dd" // Should be in sync with INPUTDATEONLYLAYOUT
	INPUTTIMEONLYLAYOUT   = "15:04"
	TIMEONLYFORMAT        = "HH:MM"                // Should be in sync with INPUTTIMEONLYLAYOUT
	WEBSERVER_LAYOUT      = "2006-Jan-02 15:04:05" // the input/output log format from web server log API
)
View Source
const (
	ChannelDefaultHost = iota
	ChannelDefaultPort
	ChannelDefaultProtocol
	ChannelSendSize
	ChannelRecvSize
	ChannelPingInterval
	ChannelConnectTimeout
	ChannelFTHosts
	ChannelFTRetryIntervalSeconds
	ChannelFTRetryCount
	ChannelDefaultUserID
	ChannelUserID
	ChannelPassword
	ChannelClientId
	ConnectionDatabaseName
	ConnectionPoolUseDedicatedChannelPerConnection
	ConnectionPoolDefaultPoolSize
	ConnectionReserveTimeoutSeconds
	ConnectionOperationTimeoutSeconds
	ConnectionDateFormat
	ConnectionTimeFormat
	ConnectionTimeStampFormat
	ConnectionLocale
	ConnectionDefaultQueryLanguage
	TlsProviderName
	TlsProviderClassName
	TlsProviderConfigFile
	TlsProtocol
	TlsCipherSuites
	TlsVerifyDatabaseName
	TlsExpectedHostName
	TlsTrustedCertificates
	KeyStorePassword
	EnableConnectionTrace
	ConnectionTraceDir
	InvalidName
)
View Source
const (
	AbstractMessage int = -100
)
View Source
const MaxFileSize int64 = 1 << 20
View Source
const MaxStringAttrLength = 1000 - 2 - 1 // 2 ==> size of int16 or short

Variables

View Source
var AtomicSequenceNumber int64
View Source
var ConnectionsToChannel int32
View Source
var DivisionPrecision = 16

TODO: Revisit later - for more testing and accuracy DivisionPrecision is the number of internalDecimal places in the result when it doesn't divide exactly.

View Source
var EntitySequencer int64
View Source
var LocalAttributeId int64
View Source
var MarshalJSONWithoutQuotes = false

MarshalJSONWithoutQuotes should be set to true if the internalDecimal needs to be JSON marshaled as a number, instead of as a string. WARNING: This may not be safe and accurate as there is a danger of losing Precision

View Source
var PreDefinedAttributeTypes = map[int]AttributeType{
	AttributeTypeInvalid:   {/* contains filtered or unexported fields */},
	AttributeTypeBoolean:   {/* contains filtered or unexported fields */},
	AttributeTypeByte:      {/* contains filtered or unexported fields */},
	AttributeTypeChar:      {/* contains filtered or unexported fields */},
	AttributeTypeShort:     {/* contains filtered or unexported fields */},
	AttributeTypeInteger:   {/* contains filtered or unexported fields */},
	AttributeTypeLong:      {/* contains filtered or unexported fields */},
	AttributeTypeFloat:     {/* contains filtered or unexported fields */},
	AttributeTypeDouble:    {/* contains filtered or unexported fields */},
	AttributeTypeNumber:    {/* contains filtered or unexported fields */},
	AttributeTypeString:    {/* contains filtered or unexported fields */},
	AttributeTypeDate:      {/* contains filtered or unexported fields */},
	AttributeTypeTime:      {/* contains filtered or unexported fields */},
	AttributeTypeTimeStamp: {/* contains filtered or unexported fields */},
	AttributeTypeBlob:      {/* contains filtered or unexported fields */},
	AttributeTypeClob:      {/* contains filtered or unexported fields */},
}
View Source
var PreDefinedCipherSuites = map[string]TGCipherSuite{
	"TLS_RSA_WITH_AES_128_CBC_SHA256":         {tls.TLS_RSA_WITH_AES_128_CBC_SHA256, "AES128-SHA256", "RSA", "AES", "128"},
	"TLS_RSA_WITH_AES_256_CBC_SHA256":         {0x3d, "AES256-SHA256", "RSA", "AES", "256"},
	"TLS_DHE_RSA_WITH_AES_128_CBC_SHA256":     {0x67, "DHE-RSA-AES128-SHA256", "DH", "AES", "128"},
	"TLS_DHE_RSA_WITH_AES_256_CBC_SHA256":     {0x6b, "DHE-RSA-AES256-SHA256", "DH", "AES", "256"},
	"TLS_RSA_WITH_AES_128_GCM_SHA256":         {tls.TLS_RSA_WITH_AES_128_GCM_SHA256, "AES128-GCM-SHA256", "RSA", "AESGCM", "128"},
	"TLS_RSA_WITH_AES_256_GCM_SHA384":         {tls.TLS_RSA_WITH_AES_256_GCM_SHA384, "AES256-GCM-SHA384", "RSA", "AESGCM", "256"},
	"TLS_DHE_RSA_WITH_AES_128_GCM_SHA256":     {0x9e, "DHE-RSA-AES128-GCM-SHA256", "DH", "AESGCM", "128"},
	"TLS_DHE_RSA_WITH_AES_256_GCM_SHA384":     {0x9f, "DHE-RSA-AES256-GCM-SHA384", "DH", "AESGCM", "256"},
	"TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256": {tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, "ECDHE-ECDSA-AES128-SHA256", "ECDH", "AES", "128"},
	"TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384": {0xc024, "ECDHE-ECDSA-AES256-SHA384", "ECDH", "AES", "256"},
	"TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256":   {tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, "ECDHE-RSA-AES128-SHA256", "ECDH", "AES", "128"},
	"TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384":   {0xc028, "ECDHE-RSA-AES256-SHA384", "ECDH", "AES", "256"},
	"TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256": {tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, "ECDHE-ECDSA-AES128-GCM-SHA256", "ECDH", "AESGCM", "128"},
	"TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384": {tls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, "ECDHE-ECDSA-AES256-GCM-SHA384", "ECDH", "AESGCM", "256"},
	"TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256":   {tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, "ECDHE-RSA-AES128-GCM-SHA256", "ECDH", "AESGCM", "128"},
	"TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384":   {tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, "ECDHE-RSA-AES256-GCM-SHA384", "ECDH", "AESGCM", "256"},
	"TLS_INVALID_CIPHER":                      {0, "", "", "", ""},
}
View Source
var PreDefinedConfigurations = map[int]ConfigName{
	ChannelDefaultHost:            {/* contains filtered or unexported fields */},
	ChannelDefaultPort:            {/* contains filtered or unexported fields */},
	ChannelDefaultProtocol:        {/* contains filtered or unexported fields */},
	ChannelSendSize:               {/* contains filtered or unexported fields */},
	ChannelRecvSize:               {/* contains filtered or unexported fields */},
	ChannelPingInterval:           {/* contains filtered or unexported fields */},
	ChannelConnectTimeout:         {/* contains filtered or unexported fields */},
	ChannelFTHosts:                {/* contains filtered or unexported fields */},
	ChannelFTRetryIntervalSeconds: {/* contains filtered or unexported fields */},
	ChannelFTRetryCount:           {/* contains filtered or unexported fields */},
	ChannelDefaultUserID:          {/* contains filtered or unexported fields */},
	ChannelUserID:                 {/* contains filtered or unexported fields */},
	ChannelPassword:               {/* contains filtered or unexported fields */},
	ChannelClientId:               {/* contains filtered or unexported fields */},
	ConnectionDatabaseName:        {/* contains filtered or unexported fields */},
	ConnectionPoolUseDedicatedChannelPerConnection: {/* contains filtered or unexported fields */},
	ConnectionPoolDefaultPoolSize:                  {/* contains filtered or unexported fields */},

	ConnectionReserveTimeoutSeconds: {/* contains filtered or unexported fields */},

	ConnectionOperationTimeoutSeconds: {/* contains filtered or unexported fields */},
	ConnectionDateFormat:              {/* contains filtered or unexported fields */},
	ConnectionTimeFormat:              {/* contains filtered or unexported fields */},
	ConnectionTimeStampFormat:         {/* contains filtered or unexported fields */},
	ConnectionLocale:                  {/* contains filtered or unexported fields */},
	ConnectionDefaultQueryLanguage:    {/* contains filtered or unexported fields */},

	TlsProviderName: {/* contains filtered or unexported fields */},

	TlsProviderClassName:  {/* contains filtered or unexported fields */},
	TlsProviderConfigFile: {/* contains filtered or unexported fields */},
	TlsProtocol:           {/* contains filtered or unexported fields */},

	TlsCipherSuites:        {/* contains filtered or unexported fields */},
	TlsVerifyDatabaseName:  {/* contains filtered or unexported fields */},
	TlsExpectedHostName:    {/* contains filtered or unexported fields */},
	TlsTrustedCertificates: {/* contains filtered or unexported fields */},
	KeyStorePassword:       {/* contains filtered or unexported fields */},
	EnableConnectionTrace:  {/* contains filtered or unexported fields */},
	ConnectionTraceDir:     {/* contains filtered or unexported fields */},
	InvalidName:            {/* contains filtered or unexported fields */},
}
View Source
var PreDefinedErrors = map[int]TGDBError{
	TGErrorBadVerb:                  {ErrorCode: "TGErrorBadVerb", ErrorType: TGErrorBadVerb, ErrorMsg: "", ErrorDetails: "", ErrorServerErrorCode: -1},
	TGErrorInvalidMessageLength:     {ErrorCode: "TGErrorInvalidMessageLength", ErrorType: TGErrorInvalidMessageLength, ErrorMsg: "", ErrorDetails: "", ErrorServerErrorCode: -1},
	TGErrorBadMagic:                 {ErrorCode: "TGErrorBadMagic", ErrorType: TGErrorBadMagic, ErrorMsg: "", ErrorDetails: "", ErrorServerErrorCode: -1},
	TGErrorProtocolNotSupported:     {ErrorCode: "TGErrorProtocolNotSupported", ErrorType: TGErrorProtocolNotSupported, ErrorMsg: "", ErrorDetails: "", ErrorServerErrorCode: -1},
	TGErrorBadAuthentication:        {ErrorCode: "TGErrorBadAuthentication", ErrorType: TGErrorBadAuthentication, ErrorMsg: "", ErrorDetails: "", ErrorServerErrorCode: -1},
	TGErrorIOException:              {ErrorCode: "TGErrorIOException", ErrorType: TGErrorIOException, ErrorMsg: "", ErrorDetails: "", ErrorServerErrorCode: -1},
	TGErrorConnectionTimeout:        {ErrorCode: "TGErrorConnectionTimeout", ErrorType: TGErrorConnectionTimeout, ErrorMsg: "", ErrorDetails: "", ErrorServerErrorCode: -1},
	TGErrorGeneralException:         {ErrorCode: "TGErrorGeneralException", ErrorType: TGErrorGeneralException, ErrorMsg: "", ErrorDetails: "", ErrorServerErrorCode: -1},
	TGErrorRetryIOException:         {ErrorCode: "TGErrorRetryIOException", ErrorType: TGErrorRetryIOException, ErrorMsg: "", ErrorDetails: "", ErrorServerErrorCode: -1},
	TGErrorChannelDisconnected:      {ErrorCode: "TGErrorChannelDisconnected", ErrorType: TGErrorChannelDisconnected, ErrorMsg: "", ErrorDetails: "", ErrorServerErrorCode: -1},
	TGErrorSecurityException:        {ErrorCode: "TGErrorSecurityException", ErrorType: TGErrorSecurityException, ErrorMsg: "", ErrorDetails: "", ErrorServerErrorCode: -1},
	TGErrorTransactionException:     {ErrorCode: "TGErrorTransactionException", ErrorType: TGErrorTransactionException, ErrorMsg: "", ErrorDetails: "", ErrorServerErrorCode: -1},
	TGErrorTypeCoercionNotSupported: {ErrorCode: "TGErrorTypeCoercionNotSupported", ErrorType: TGErrorTypeCoercionNotSupported, ErrorMsg: "", ErrorDetails: "", ErrorServerErrorCode: -1},
	TGErrorTypeNotSupported:         {ErrorCode: "TGErrorTypeNotSupported", ErrorType: TGErrorTypeNotSupported, ErrorMsg: "", ErrorDetails: "", ErrorServerErrorCode: -1},
	TGErrorVersionMismatchException: {ErrorCode: "TGErrorVersionMismatchException", ErrorType: TGErrorVersionMismatchException, ErrorMsg: "", ErrorDetails: "", ErrorServerErrorCode: -1},
	TGErrorInvalidErrorCode:         {ErrorCode: "TGErrorInvalidErrorCode", ErrorType: TGErrorInvalidErrorCode, ErrorMsg: "", ErrorDetails: "", ErrorServerErrorCode: -1},
	TGSuccess:                       {ErrorCode: "TGSuccess", ErrorType: TGSuccess, ErrorMsg: "", ErrorDetails: "", ErrorServerErrorCode: -1},
}

Code message map containing all code messages with the code as key

View Source
var PreDefinedVerbs = map[int]CommandVerbs{
	VerbPingMessage:                 {/* contains filtered or unexported fields */},
	VerbHandShakeRequest:            {/* contains filtered or unexported fields */},
	VerbHandShakeResponse:           {/* contains filtered or unexported fields */},
	VerbAuthenticateRequest:         {/* contains filtered or unexported fields */},
	VerbAuthenticateResponse:        {/* contains filtered or unexported fields */},
	VerbBeginTransactionRequest:     {/* contains filtered or unexported fields */},
	VerbBeginTransactionResponse:    {/* contains filtered or unexported fields */},
	VerbCommitTransactionRequest:    {/* contains filtered or unexported fields */},
	VerbCommitTransactionResponse:   {/* contains filtered or unexported fields */},
	VerbRollbackTransactionRequest:  {/* contains filtered or unexported fields */},
	VerbRollbackTransactionResponse: {/* contains filtered or unexported fields */},
	VerbQueryRequest:                {/* contains filtered or unexported fields */},
	VerbQueryResponse:               {/* contains filtered or unexported fields */},
	VerbTraverseRequest:             {/* contains filtered or unexported fields */},
	VerbTraverseResponse:            {/* contains filtered or unexported fields */},
	VerbAdminRequest:                {/* contains filtered or unexported fields */},
	VerbAdminResponse:               {/* contains filtered or unexported fields */},
	VerbMetadataRequest:             {/* contains filtered or unexported fields */},
	VerbMetadataResponse:            {/* contains filtered or unexported fields */},
	VerbGetEntityRequest:            {/* contains filtered or unexported fields */},
	VerbGetEntityResponse:           {/* contains filtered or unexported fields */},
	VerbGetLargeObjectRequest:       {/* contains filtered or unexported fields */},
	VerbGetLargeObjectResponse:      {/* contains filtered or unexported fields */},
	VerbDumpStacktraceRequest:       {/* contains filtered or unexported fields */},
	VerbDisconnectChannelRequest:    {/* contains filtered or unexported fields */},
	VerbSessionForcefullyTerminated: {/* contains filtered or unexported fields */},
	VerbDecryptBufferRequest:        {/* contains filtered or unexported fields */},
	VerbDecryptBufferResponse:       {/* contains filtered or unexported fields */},
	VerbExceptionMessage:            {/* contains filtered or unexported fields */},
	VerbInvalidMessage:              {/* contains filtered or unexported fields */},
}
View Source
var PresetIntervals = struct {
	One_Min,
	Five_Mins,
	Thirty_Mins,
	One_Hr,
	Twelve_Hrs,
	One_Day,
	Seven_Days,
	Thirty_Days,
	One_Yr time.Duration
}{
	One_Min:     time.Duration(1 * time.Minute),
	Five_Mins:   time.Duration(5 * time.Minute),
	Thirty_Mins: time.Duration(30 * time.Minute),
	One_Hr:      time.Duration(1 * time.Hour),
	Twelve_Hrs:  time.Duration(12 * time.Hour),
	One_Day:     time.Duration(24 * time.Hour),
	Seven_Days:  time.Duration(7 * 24 * time.Hour),
	Thirty_Days: time.Duration(30 * 24 * time.Hour),
	One_Yr:      time.Duration(365 * 24 * time.Hour),
}

Convienient predefined commonly-used time intervals

View Source
var UniqueId int64
View Source
var Zero = NewTGDecimal(0, 1)

Zero constant, to make computations faster.

Functions

func APMReadHeader

func APMReadHeader(msg tgdb.TGMessage, is tgdb.TGInputStream) tgdb.TGError

func APMWriteHeader

func APMWriteHeader(msg tgdb.TGMessage, os tgdb.TGOutputStream) tgdb.TGError

func AbstractAttributeReadDecrypted

func AbstractAttributeReadDecrypted(obj tgdb.TGAttribute, is tgdb.TGInputStream) tgdb.TGError

func AbstractAttributeReadExternal

func AbstractAttributeReadExternal(obj tgdb.TGAttribute, is tgdb.TGInputStream) tgdb.TGError

func AbstractAttributeWriteEncrypted

func AbstractAttributeWriteEncrypted(obj tgdb.TGAttribute, os tgdb.TGOutputStream) tgdb.TGError

func AbstractAttributeWriteExternal

func AbstractAttributeWriteExternal(obj tgdb.TGAttribute, os tgdb.TGOutputStream) tgdb.TGError

func BigDecimalToByteArray

func BigDecimalToByteArray(bd float64) ([]byte, error)

func CalendarToString

func CalendarToString(t time.Time) (string, error)

func ConstructList

func ConstructList(entityStream tgdb.TGInputStream, gof tgdb.TGGraphObjectFactory, col []interface{}) ([]interface{}, tgdb.TGError)

func ConstructList(entityStream tgdb.TGInputStream, gof tgdb.TGGraphObjectFactory, col []interface{}) tgdb.TGError {

func ConstructMap

func ConstructMap(entityStream tgdb.TGInputStream, gof tgdb.TGGraphObjectFactory, colMap map[string]interface{}) tgdb.TGError

func CreateAttribute

func CreateAttribute(attrDesc *AttributeDescriptor) (tgdb.TGAttribute, tgdb.TGError)

CreateAttribute creates a new attribute based on AttributeDescriptor

func CreateAttributeByType

func CreateAttributeByType(attrTypeId int) (tgdb.TGAttribute, tgdb.TGError)

CreateAttributeByType creates a new attribute based on the type specified

func CreateAttributeWithDesc

func CreateAttributeWithDesc(attrOwner tgdb.TGEntity, attrDesc *AttributeDescriptor, value interface{}) (tgdb.TGAttribute, tgdb.TGError)

CreateAttributeWithDesc creates new attribute based on the owner and AttributeDescriptor

func CreateExceptionByType

func CreateExceptionByType(excpTypeId int) tgdb.TGError

Create new exception instance based on the input type

func CreateMessageForVerb

func CreateMessageForVerb(verbId int) (tgdb.TGMessage, tgdb.TGError)

Create new message instance based on the input type

func CreateMessageFromBuffer

func CreateMessageFromBuffer(buffer []byte, offset int, length int) (tgdb.TGMessage, tgdb.TGError)

func CreateMessageWithToken

func CreateMessageWithToken(verbId int, authToken, sessionId int64) (tgdb.TGMessage, tgdb.TGError)

func DoesPropertyExist

func DoesPropertyExist(obj *SortedProperties, name string) bool

func DoubleToByteArray

func DoubleToByteArray(f float64) ([]byte, error)

func EntityTypeReadExternal

func EntityTypeReadExternal(obj tgdb.TGEntityType, is tgdb.TGInputStream) tgdb.TGError

func EntityTypeUpdateMetadata

func EntityTypeUpdateMetadata(obj tgdb.TGEntityType, gmd *GraphMetadata) tgdb.TGError

func Error

func Error(excpTypeId int) string

func FillCollection

func FillCollection(entityStream tgdb.TGInputStream, gof tgdb.TGGraphObjectFactory, col []interface{}) ([]interface{}, tgdb.TGError)

func FilterSuites

func FilterSuites(suites []string) []string

FilterSuites returns CipherSuites that are supported by TGDB client

func FilterSuitesById

func FilterSuitesById(suites []uint16) []uint16

FilterSuitesById returns CipherSuites that are supported by TGDB client

func FindSubstring

func FindSubstring(s string, pos int, length int) string

find substring within another string

func FloatToByteArray

func FloatToByteArray(f float32) ([]byte, error)

func FormatDateAsDateTime

func FormatDateAsDateTime(input time.Time, outputDateFormat string) string

FormatDateAsDateTime is a convenience function that converts the input date into the date format the user has specified, if no format is specified, it uses the default time.RFC3339 format

func FormatHex

func FormatHex(byteArray []byte) (string, error)

func FormatHexForLength

func FormatHexForLength(byteArray []byte, actualLength int) (string, error)

func FormatHexToWriter

func FormatHexToWriter(buf []byte, writer bytes.Buffer, actualLength int) (int, error)

func FormatHexToWriterInChunks

func FormatHexToWriterInChunks(buf []byte, writer bytes.Buffer, lineLength int, actualLength int) (int, error)

func FormatStringAsDateTime

func FormatStringAsDateTime(input string, outputDateFormat string) (string, error)

FormatStringAsDateTime identifies the input format in which users have entered date or time or date/time and appropriately convert it into standard RFC3339 format, if user has not specified the format

func FromBytes

func FromBytes(verbId int, buffer []byte) (tgdb.TGMessage, tgdb.TGError)

func GetAttributeDescriptor

func GetAttributeDescriptor(attrTypeId int) tgdb.TGAttributeDescriptor

GetAttributeDescriptor returns the AttributeDescriptor for this attribute type

func GetAuthToken

func GetAuthToken(verbId int) int64

GetAuthToken gets Authorization Token for specified message type

func GetErrorByType

func GetErrorByType(excpTypeId int, errorCode, errorMsg, errorDetails string) tgdb.TGError

Get the error struct with timestamp

func GetErrorDetails

func GetErrorDetails(excpTypeId int) string

func GetIsModified

func GetIsModified(attrTypeId int) bool

GetIsModified checks whether the attribute of this type is modified or not

func GetIsUpdatable

func GetIsUpdatable(verbId int) bool

func GetMagic

func GetMagic() int

func GetMessageByteBufLength

func GetMessageByteBufLength(verbId int) int

func GetName

func GetName(attrTypeId int) interface{}

GetName gets the Name for this attribute type as the most generic form

func GetOwner

func GetOwner(attrTypeId int) interface{}

GetOwner gets owner Entity of this attribute type

func GetProtocolVersion

func GetProtocolVersion() uint16

func GetRequestId

func GetRequestId(verbId int) int64

func GetSequenceNo

func GetSequenceNo(verbId int) int64

func GetSessionId

func GetSessionId(verbId int) int64

GetSessionId gets Session id for specified message type

func GetTimestamp

func GetTimestamp(verbId int) int64

func GetValue

func GetValue(attrTypeId int) interface{}

GetValue gets the value for this attribute type as the most generic form

func GetVerbId

func GetVerbId(verbId int) int

func InputStreamToByteArray

func InputStreamToByteArray(is tgdb.TGInputStream) ([]byte, error)

func IsCompatible

func IsCompatible(protocolVersion uint16) bool

func IsNull

func IsNull(attrTypeId int) bool

IsNull checks whether the value of this attribute type is null or not

func LongToCalendar

func LongToCalendar(l int64) time.Time

func NewTGConnectionFactory

func NewTGConnectionFactory() tgdb.TGConnectionFactory

This works

func ObjectFromByteArray

func ObjectFromByteArray(value []byte, attrType int) (interface{}, tgdb.TGError)

func ObjectToByteArray

func ObjectToByteArray(value interface{}, attrType int) ([]byte, tgdb.TGError)

func Range

func Range(start, end time.Time, n uint, randomized bool) ([]time.Time, error)

Generate a slice of times between 2 time points(exclusive), with the oldest time point first

start - start time point end - end time point n - number of time points needed randomized - specify if generated timer points should be randomized

If the n is such that the durations between time points fell below a nanosecond resolution, an empty slice is returned instead.

func RangeFuture

func RangeFuture(interval time.Duration, n uint, randomized bool) ([]time.Time, error)

Generate a slice of times from now into the future of specified interval, with the oldest time point first

interval - future time interval from time.Now() n - number of time points needed randomized - specify if generated timer points should be randomized

If the n is such that the durations between time points fell below nanosecond resolution, an empty slice is returned instead

func RangePast

func RangePast(interval time.Duration, n uint, randomized bool) ([]time.Time, error)

Generate a slice of times from now into the past of specified interval, with the oldest time point first

interval - past time interval from time.Now() n - number of time points needed randomized - specify if generated timer points should be randomized

If the n is such that the durations between time points fell below nanosecond resolution, an empty slice is returned instead.

func ReadExternal

func ReadExternal(attrTypeId int, is tgdb.TGInputStream) tgdb.TGError

ReadExternal reads the byte format from an external input stream and constructs a system object

func ReadExternalForEntity

func ReadExternalForEntity(owner tgdb.TGEntity, is tgdb.TGInputStream) (tgdb.TGAttribute, tgdb.TGError)

func ReadHeader

func ReadHeader(verbId int, is tgdb.TGInputStream) tgdb.TGError

func ReadPayload

func ReadPayload(verbId int, is tgdb.TGInputStream) tgdb.TGError

func ReadValue

func ReadValue(attrTypeId int, is tgdb.TGInputStream) tgdb.TGError

ReadValue reads the value of this attribute type from input stream

func ResetIsModified

func ResetIsModified(attrTypeId int)

ResetIsModified resets the IsModified flag of this attribute type - recursively, if needed

func RoundDuration

func RoundDuration(d time.Duration) string

Rounded up time.Duration display string eliminating the Precision Example: 500ms, 4s, 1h4m20s

func SetAuthToken

func SetAuthToken(verbId int, authToken int64)

func SetOwner

func SetOwner(attrTypeId int, attrOwner tgdb.TGEntity)

SetOwner sets the owner entity - Need this indirection to traverse the chain

func SetRequestId

func SetRequestId(verbId int, requestId int64)

func SetSessionId

func SetSessionId(verbId int, sessionId int64)

func SetTimestamp

func SetTimestamp(verbId int, timestamp int64) tgdb.TGError

func SetUserAndPassword

func SetUserAndPassword(obj *SortedProperties, user, pwd string) tgdb.TGError

func SetValue

func SetValue(attrTypeId int, value interface{}) tgdb.TGError

SetValue sets the value for this attribute type. Appropriate data conversion to its attribute desc will be performed If the object is Null, then the object is explicitly set, but no value is provided.

func StringToCalendar

func StringToCalendar(s string) (time.Time, error)

func StringToCharacter

func StringToCharacter(s string) (string, error)

func StringToDouble

func StringToDouble(s string) (float64, error)

func StringToFloat

func StringToFloat(s string) (float32, error)

func StringToInteger

func StringToInteger(s string) (int, error)

func StringToLong

func StringToLong(s string) (int64, error)

func StringToShort

func StringToShort(s string) (int16, error)

func ToBytes

func ToBytes(verbId int) ([]byte, int, tgdb.TGError)

func UpdateSequenceAndTimeStamp

func UpdateSequenceAndTimeStamp(verbId int, timestamp int64) tgdb.TGError

func UtfLength

func UtfLength(str string) int

func WriteExternal

func WriteExternal(attrTypeId int, os tgdb.TGOutputStream) tgdb.TGError

WriteExternal writes a system object into an appropriate byte format onto an external output stream

func WriteHeader

func WriteHeader(verbId int, os tgdb.TGOutputStream) tgdb.TGError

func WritePayload

func WritePayload(verbId int, os tgdb.TGOutputStream) tgdb.TGError

func WriteValue

func WriteValue(attrTypeId int, os tgdb.TGOutputStream) tgdb.TGError

WriteValue writes the value of this attribute type to output stream

Types

type AbstractAttribute

type AbstractAttribute struct {
	AttrDesc   *AttributeDescriptor
	AttrValue  interface{}
	IsModified bool
	// contains filtered or unexported fields
}

func NewAbstractAttribute

func NewAbstractAttribute(attrDesc *AttributeDescriptor) *AbstractAttribute

func NewAbstractAttributeWithDesc

func NewAbstractAttributeWithDesc(ownerEntity tgdb.TGEntity, attrDesc *AttributeDescriptor, value interface{}) *AbstractAttribute

func NewAbstractAttributeWithOwner

func NewAbstractAttributeWithOwner(ownerEntity tgdb.TGEntity) *AbstractAttribute

func (*AbstractAttribute) GetAttributeDescriptor

func (obj *AbstractAttribute) GetAttributeDescriptor() tgdb.TGAttributeDescriptor

GetAttributeDescriptor returns the AttributeDescriptor for this attribute

func (*AbstractAttribute) GetIsModified

func (obj *AbstractAttribute) GetIsModified() bool

GetIsModified checks whether the attribute modified or not

func (*AbstractAttribute) GetName

func (obj *AbstractAttribute) GetName() string

GetName gets the Name for this attribute as the most generic form

func (*AbstractAttribute) GetOwner

func (obj *AbstractAttribute) GetOwner() tgdb.TGEntity

GetOwner gets owner Entity of this attribute

func (*AbstractAttribute) GetValue

func (obj *AbstractAttribute) GetValue() interface{}

GetValue gets the value for this attribute as the most generic form

func (*AbstractAttribute) IsNull

func (obj *AbstractAttribute) IsNull() bool

IsNull checks whether the attribute value is null or not

func (*AbstractAttribute) MarshalBinary

func (obj *AbstractAttribute) MarshalBinary() ([]byte, error)

func (*AbstractAttribute) ReadExternal

func (obj *AbstractAttribute) ReadExternal(is tgdb.TGInputStream) tgdb.TGError

ReadExternal reads the byte format from an external input stream and constructs a system object

func (*AbstractAttribute) ReadValue

func (obj *AbstractAttribute) ReadValue(is tgdb.TGInputStream) tgdb.TGError

ReadValue reads the value from input stream

func (*AbstractAttribute) ResetIsModified

func (obj *AbstractAttribute) ResetIsModified()

ResetIsModified resets the IsModified flag - recursively, if needed

func (*AbstractAttribute) SetIsModified

func (obj *AbstractAttribute) SetIsModified(flag bool)

func (*AbstractAttribute) SetOwner

func (obj *AbstractAttribute) SetOwner(ownerEntity tgdb.TGEntity)

SetOwner sets the owner entity - Need this indirection to traverse the chain

func (*AbstractAttribute) SetValue

func (obj *AbstractAttribute) SetValue(value interface{}) tgdb.TGError

SetValue sets the value for this attribute. Appropriate data conversion to its attribute desc will be performed If the object is Null, then the object is explicitly set, but no value is provided.

func (*AbstractAttribute) String

func (obj *AbstractAttribute) String() string

func (*AbstractAttribute) UnmarshalBinary

func (obj *AbstractAttribute) UnmarshalBinary(data []byte) error

func (*AbstractAttribute) WriteExternal

func (obj *AbstractAttribute) WriteExternal(os tgdb.TGOutputStream) tgdb.TGError

WriteExternal writes a system object into an appropriate byte format onto an external output stream

func (*AbstractAttribute) WriteValue

func (obj *AbstractAttribute) WriteValue(os tgdb.TGOutputStream) tgdb.TGError

WriteValue writes the value to output stream

type AbstractChannel

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

func DefaultAbstractChannel

func DefaultAbstractChannel() *AbstractChannel

func NewAbstractChannel

func NewAbstractChannel(linkUrl *LinkUrl, props *SortedProperties) *AbstractChannel

func (*AbstractChannel) ChannelLock

func (obj *AbstractChannel) ChannelLock()

ChannelLock locks the communication channel between TGDB client and server

func (*AbstractChannel) ChannelUnlock

func (obj *AbstractChannel) ChannelUnlock()

ChannelUnlock unlocks the communication channel between TGDB client and server

func (*AbstractChannel) CloseSocket

func (obj *AbstractChannel) CloseSocket() tgdb.TGError

CloseSocket closes the network socket

func (*AbstractChannel) Connect

func (obj *AbstractChannel) Connect() tgdb.TGError

Connect connects the underlying channel using the URL end point

func (*AbstractChannel) CreateSocket

func (obj *AbstractChannel) CreateSocket() tgdb.TGError

CreateSocket creates a network socket to transfer the messages in the byte format

func (*AbstractChannel) DisablePing

func (obj *AbstractChannel) DisablePing()

DisablePing disables the pinging ability to the channel

func (*AbstractChannel) Disconnect

func (obj *AbstractChannel) Disconnect() tgdb.TGError

Disconnect disconnects the channel from its URL end point

func (*AbstractChannel) DoAuthenticate

func (obj *AbstractChannel) DoAuthenticate() tgdb.TGError

func (*AbstractChannel) EnablePing

func (obj *AbstractChannel) EnablePing()

EnablePing enables the pinging ability to the channel

func (*AbstractChannel) ExceptionLock

func (obj *AbstractChannel) ExceptionLock()

ExceptionLock locks the communication channel between TGDB client and server in case of business exceptions

func (*AbstractChannel) ExceptionUnlock

func (obj *AbstractChannel) ExceptionUnlock()

ExceptionUnlock unlocks the communication channel between TGDB client and server in case of business exceptions

func (*AbstractChannel) GetAuthToken

func (obj *AbstractChannel) GetAuthToken() int64

GetAuthToken gets Authorization Token

func (*AbstractChannel) GetChannelPassword

func (obj *AbstractChannel) GetChannelPassword() []byte

func (*AbstractChannel) GetChannelURL

func (obj *AbstractChannel) GetChannelURL() tgdb.TGChannelUrl

GetChannelURL gets the channel URL

func (*AbstractChannel) GetChannelUserName

func (obj *AbstractChannel) GetChannelUserName() string

func (*AbstractChannel) GetClientId

func (obj *AbstractChannel) GetClientId() string

GetClientId gets Client Name

func (*AbstractChannel) GetConnectionIndex

func (obj *AbstractChannel) GetConnectionIndex() int

GetConnectionIndex gets the Connection Index

func (*AbstractChannel) GetDataCryptoGrapher

func (obj *AbstractChannel) GetDataCryptoGrapher() tgdb.TGDataCryptoGrapher

GetDataCryptoGrapher gets the data cryptographer handle

func (*AbstractChannel) GetExceptionCondition

func (obj *AbstractChannel) GetExceptionCondition() *sync.Cond

GetExceptionCondition gets the Exception Condition

func (*AbstractChannel) GetLinkState

func (obj *AbstractChannel) GetLinkState() tgdb.LinkState

GetLinkState gets the Link/channel State

func (*AbstractChannel) GetNoOfConnections

func (obj *AbstractChannel) GetNoOfConnections() int32

GetNoOfConnections gets number of connections this channel has

func (*AbstractChannel) GetPrimaryURL

func (obj *AbstractChannel) GetPrimaryURL() tgdb.TGChannelUrl

GetPrimaryURL gets the Primary URL

func (*AbstractChannel) GetProperties

func (obj *AbstractChannel) GetProperties() tgdb.TGProperties

GetProperties gets the channel Properties

func (*AbstractChannel) GetReader

func (obj *AbstractChannel) GetReader() tgdb.TGChannelReader

GetReader gets the channel Reader

func (*AbstractChannel) GetResponses

func (obj *AbstractChannel) GetResponses() map[int64]tgdb.TGChannelResponse

GetResponses gets the channel Response Map

func (*AbstractChannel) GetSessionId

func (obj *AbstractChannel) GetSessionId() int64

GetSessionId gets Session id

func (*AbstractChannel) GetTracer

func (obj *AbstractChannel) GetTracer() tgdb.TGTracer

GetTracer gets the channel Tracer

func (*AbstractChannel) IsChannelPingable

func (obj *AbstractChannel) IsChannelPingable() bool

IsChannelPingable checks whether the channel is pingable or not

func (*AbstractChannel) IsClosed

func (obj *AbstractChannel) IsClosed() bool

IsClosed checks whether channel is open or closed

func (*AbstractChannel) OnConnect

func (obj *AbstractChannel) OnConnect() tgdb.TGError

OnConnect executes functional logic after successfully establishing the connection to the server

func (*AbstractChannel) ReadWireMsg

func (obj *AbstractChannel) ReadWireMsg() (tgdb.TGMessage, tgdb.TGError)

ReadWireMsg read the message from the network in the byte format

func (*AbstractChannel) Send

func (obj *AbstractChannel) Send(msg tgdb.TGMessage) tgdb.TGError

Send Message to the server, compress and or encrypt. Hence it is abstraction, that the channel knows about it. @param msg The message that needs to be sent to the server

func (*AbstractChannel) SendMessage

func (obj *AbstractChannel) SendMessage(msg tgdb.TGMessage) tgdb.TGError

SendMessage sends a Message on this channel, and returns immediately - An Asynchronous or Non-Blocking operation

func (*AbstractChannel) SendRequest

func (obj *AbstractChannel) SendRequest(msg tgdb.TGMessage, response tgdb.TGChannelResponse) (tgdb.TGMessage, tgdb.TGError)

SendRequest sends a Message, waits for a response in the message format, and blocks the thread till it gets the response

func (*AbstractChannel) SetAuthToken

func (obj *AbstractChannel) SetAuthToken(token int64)

func (*AbstractChannel) SetChannelLinkState

func (obj *AbstractChannel) SetChannelLinkState(state tgdb.LinkState)

SetChannelLinkState sets the Link/channel State

func (*AbstractChannel) SetChannelPassword

func (obj *AbstractChannel) SetChannelPassword(pword []byte)

func (*AbstractChannel) SetChannelURL

func (obj *AbstractChannel) SetChannelURL(url tgdb.TGChannelUrl)

SetChannelURL sets the channel URL

func (*AbstractChannel) SetChannelUserName

func (obj *AbstractChannel) SetChannelUserName(uname string)

func (*AbstractChannel) SetConnectionIndex

func (obj *AbstractChannel) SetConnectionIndex(index int)

SetConnectionIndex sets the connection index

func (*AbstractChannel) SetNoOfConnections

func (obj *AbstractChannel) SetNoOfConnections(count int32)

SetNoOfConnections sets number of connections

func (*AbstractChannel) SetResponse

func (obj *AbstractChannel) SetResponse(reqId int64, response tgdb.TGChannelResponse)

SetResponse sets the ChannelResponse Map

func (*AbstractChannel) Start

func (obj *AbstractChannel) Start() tgdb.TGError

Start starts the channel so that it can send and receive messages

func (*AbstractChannel) Stop

func (obj *AbstractChannel) Stop(bForcefully bool)

Stop stops the channel forcefully or gracefully

func (*AbstractChannel) String

func (obj *AbstractChannel) String() string

type AbstractEntity

type AbstractEntity struct {
	EntityId   int64
	EntityKind tgdb.TGEntityKind
	EntityType tgdb.TGEntityType

	Version   int
	VirtualId int64

	Attributes         map[string]tgdb.TGAttribute
	ModifiedAttributes []tgdb.TGAttribute
	// contains filtered or unexported fields
}

func DefaultAbstractEntity

func DefaultAbstractEntity() *AbstractEntity

func NewAbstractEntity

func NewAbstractEntity(gmd *GraphMetadata) *AbstractEntity

func (*AbstractEntity) AbstractEntityReadExternal

func (obj *AbstractEntity) AbstractEntityReadExternal(is tgdb.TGInputStream) tgdb.TGError

func (*AbstractEntity) AbstractEntityWriteExternal

func (obj *AbstractEntity) AbstractEntityWriteExternal(os tgdb.TGOutputStream) tgdb.TGError

func (*AbstractEntity) GetAttribute

func (obj *AbstractEntity) GetAttribute(attrName string) tgdb.TGAttribute

GetAttribute gets the attribute for the Name specified

func (*AbstractEntity) GetAttributes

func (obj *AbstractEntity) GetAttributes() ([]tgdb.TGAttribute, tgdb.TGError)

GetAttributes lists of all the Attributes set

func (*AbstractEntity) GetEntityKind

func (obj *AbstractEntity) GetEntityKind() tgdb.TGEntityKind

GetEntityKind returns the EntityKind as a constant

func (*AbstractEntity) GetEntityType

func (obj *AbstractEntity) GetEntityType() tgdb.TGEntityType

GetEntityType returns the EntityType

func (*AbstractEntity) GetGraphMetadata

func (obj *AbstractEntity) GetGraphMetadata() tgdb.TGGraphMetadata

GetGraphMetadata returns the Graph Meta Data - New in GO Lang

func (*AbstractEntity) GetIsDeleted

func (obj *AbstractEntity) GetIsDeleted() bool

GetIsDeleted checks whether this entity is already deleted in the system or not

func (*AbstractEntity) GetIsInitialized

func (obj *AbstractEntity) GetIsInitialized() bool

func (*AbstractEntity) GetIsNew

func (obj *AbstractEntity) GetIsNew() bool

GetIsNew checks whether this entity that is currently being added to the system is new or not

func (*AbstractEntity) GetModifiedAttributes

func (obj *AbstractEntity) GetModifiedAttributes() []tgdb.TGAttribute

func (*AbstractEntity) GetVersion

func (obj *AbstractEntity) GetVersion() int

GetVersion gets the version of the Entity

func (*AbstractEntity) GetVirtualId

func (obj *AbstractEntity) GetVirtualId() int64

GetVirtualId gets Entity identifier At the time of creation before reaching the server, it is the virtual id Upon successful creation, server returns a valid entity id that gets set in place of virtual id

func (*AbstractEntity) IsAttributeSet

func (obj *AbstractEntity) IsAttributeSet(attrName string) bool

IsAttributeSet checks whether this entity is an Attribute set or not

func (*AbstractEntity) MarshalBinary

func (obj *AbstractEntity) MarshalBinary() ([]byte, error)

func (*AbstractEntity) ReadExternal

func (obj *AbstractEntity) ReadExternal(is tgdb.TGInputStream) tgdb.TGError

ReadExternal reads the byte format from an external input stream and constructs a system object

func (*AbstractEntity) ResetModifiedAttributes

func (obj *AbstractEntity) ResetModifiedAttributes()

ResetModifiedAttributes resets the dirty flag on Attributes

func (*AbstractEntity) SetAttribute

func (obj *AbstractEntity) SetAttribute(attr tgdb.TGAttribute) tgdb.TGError

SetAttribute associates the specified Attribute to this Entity

func (*AbstractEntity) SetAttributeViaDescriptor

func (obj *AbstractEntity) SetAttributeViaDescriptor(attrDesc *AttributeDescriptor, value interface{}) tgdb.TGError

TODO: Revisit later - Once SetAttributeViaDescriptor is properly implemented after discussing with TGDB Engineering Team

func (*AbstractEntity) SetAttributes

func (obj *AbstractEntity) SetAttributes(modAttrs map[string]tgdb.TGAttribute)

func (*AbstractEntity) SetEntityId

func (obj *AbstractEntity) SetEntityId(id int64)

SetEntityId sets Entity id and reset Virtual id after creation

func (*AbstractEntity) SetEntityKind

func (obj *AbstractEntity) SetEntityKind(kind tgdb.TGEntityKind)

func (*AbstractEntity) SetEntityType

func (obj *AbstractEntity) SetEntityType(eType tgdb.TGEntityType)

func (*AbstractEntity) SetIsDeleted

func (obj *AbstractEntity) SetIsDeleted(flag bool)

SetIsDeleted set the deleted flag

func (*AbstractEntity) SetIsInitialized

func (obj *AbstractEntity) SetIsInitialized(flag bool)

func (*AbstractEntity) SetIsNew

func (obj *AbstractEntity) SetIsNew(flag bool)

SetIsNew sets the flag that this is a new entity

func (*AbstractEntity) SetModifiedAttributes

func (obj *AbstractEntity) SetModifiedAttributes(modAttrs []tgdb.TGAttribute)

func (*AbstractEntity) SetOrCreateAttribute

func (obj *AbstractEntity) SetOrCreateAttribute(name string, value interface{}) tgdb.TGError

SetOrCreateAttribute dynamically associates the attribute to this entity If the AttributeDescriptor doesn't exist in the database, create a new one

func (*AbstractEntity) SetVersion

func (obj *AbstractEntity) SetVersion(version int)

SetVersion sets the version of the Entity

func (*AbstractEntity) String

func (obj *AbstractEntity) String() string

func (*AbstractEntity) UnmarshalBinary

func (obj *AbstractEntity) UnmarshalBinary(data []byte) error

func (*AbstractEntity) WriteExternal

func (obj *AbstractEntity) WriteExternal(os tgdb.TGOutputStream) tgdb.TGError

WriteExternal writes a system object into an appropriate byte format onto an external output stream

type AbstractProtocolMessage

type AbstractProtocolMessage struct {
	*MessageHeader
	// contains filtered or unexported fields
}

NOTE: Maintain the order of structure elements as shown above for streamlined server communication

func DefaultAbstractProtocolMessage

func DefaultAbstractProtocolMessage() *AbstractProtocolMessage

func NewAbstractProtocolMessage

func NewAbstractProtocolMessage(authToken, sessionId int64) *AbstractProtocolMessage

func (*AbstractProtocolMessage) APMMessageToString

func (msg *AbstractProtocolMessage) APMMessageToString() string

func (*AbstractProtocolMessage) FromBytes

func (msg *AbstractProtocolMessage) FromBytes(buffer []byte) (tgdb.TGMessage, tgdb.TGError)

FromBytes constructs a message object from the input buffer in the byte format

func (*AbstractProtocolMessage) GetAuthToken

func (msg *AbstractProtocolMessage) GetAuthToken() int64

GetAuthToken gets the authToken

func (*AbstractProtocolMessage) GetIsUpdatable

func (msg *AbstractProtocolMessage) GetIsUpdatable() bool

GetIsUpdatable checks whether this message updatable or not

func (*AbstractProtocolMessage) GetMessageByteBufLength

func (msg *AbstractProtocolMessage) GetMessageByteBufLength() int

GetMessageByteBufLength gets the MessageByteBufLength. This method is called after the toBytes() is executed.

func (*AbstractProtocolMessage) GetRequestId

func (msg *AbstractProtocolMessage) GetRequestId() int64

GetRequestId gets the requestId for the message. This will be used as the CorrelationId

func (*AbstractProtocolMessage) GetSequenceNo

func (msg *AbstractProtocolMessage) GetSequenceNo() int64

GetSequenceNo gets the sequenceNo of the message

func (*AbstractProtocolMessage) GetSessionId

func (msg *AbstractProtocolMessage) GetSessionId() int64

GetSessionId gets the session id

func (*AbstractProtocolMessage) GetTenantId

func (msg *AbstractProtocolMessage) GetTenantId() int

func (*AbstractProtocolMessage) GetTimestamp

func (msg *AbstractProtocolMessage) GetTimestamp() int64

GetTimestamp gets the Timestamp

func (*AbstractProtocolMessage) GetUpdatableFlag

func (msg *AbstractProtocolMessage) GetUpdatableFlag() bool

func (*AbstractProtocolMessage) GetVerbId

func (msg *AbstractProtocolMessage) GetVerbId() int

GetVerbId gets verbId of the message

func (*AbstractProtocolMessage) MarshalBinary

func (msg *AbstractProtocolMessage) MarshalBinary() ([]byte, error)

func (*AbstractProtocolMessage) ReadHeader

ReadHeader reads the bytes from input stream and constructs a common header of network packet

func (*AbstractProtocolMessage) ReadPayload

func (msg *AbstractProtocolMessage) ReadPayload(is tgdb.TGInputStream) tgdb.TGError

ReadPayload reads the bytes from input stream and constructs message specific payload Attributes

func (*AbstractProtocolMessage) SetAuthToken

func (msg *AbstractProtocolMessage) SetAuthToken(authToken int64)

SetAuthToken sets the authToken

func (*AbstractProtocolMessage) SetDataOffset

func (msg *AbstractProtocolMessage) SetDataOffset(dataOffset int16)

SetDataOffset sets the offset at which data starts in the payload

func (*AbstractProtocolMessage) SetIsUpdatable

func (msg *AbstractProtocolMessage) SetIsUpdatable(updateFlag bool)

SetIsUpdatable sets the updatable flag

func (*AbstractProtocolMessage) SetMessageByteBufLength

func (msg *AbstractProtocolMessage) SetMessageByteBufLength(bufLength int)

SetMessageByteBufLength sets the message buffer length

func (*AbstractProtocolMessage) SetRequestId

func (msg *AbstractProtocolMessage) SetRequestId(requestId int64)

SetRequestId sets the request id

func (*AbstractProtocolMessage) SetSequenceAndTimeStamp

func (msg *AbstractProtocolMessage) SetSequenceAndTimeStamp(timestamp int64) tgdb.TGError

func (*AbstractProtocolMessage) SetSequenceNo

func (msg *AbstractProtocolMessage) SetSequenceNo(sequenceNo int64)

SetSequenceNo sets the sequenceNo

func (*AbstractProtocolMessage) SetSessionId

func (msg *AbstractProtocolMessage) SetSessionId(sessionId int64)

SetSessionId sets the session id

func (*AbstractProtocolMessage) SetTenantId

func (msg *AbstractProtocolMessage) SetTenantId(id int)

func (*AbstractProtocolMessage) SetTimestamp

func (msg *AbstractProtocolMessage) SetTimestamp(timestamp int64) tgdb.TGError

SetTimestamp sets the timestamp

func (*AbstractProtocolMessage) SetUpdatableFlag

func (msg *AbstractProtocolMessage) SetUpdatableFlag(updateFlag bool)

func (*AbstractProtocolMessage) SetVerbId

func (msg *AbstractProtocolMessage) SetVerbId(verbId int)

SetVerbId sets verbId of the message

func (*AbstractProtocolMessage) String

func (msg *AbstractProtocolMessage) String() string

func (*AbstractProtocolMessage) ToBytes

func (msg *AbstractProtocolMessage) ToBytes() ([]byte, int, tgdb.TGError)

ToBytes converts a message object into byte format to be sent over the network to TGDB server

func (*AbstractProtocolMessage) UnmarshalBinary

func (msg *AbstractProtocolMessage) UnmarshalBinary(data []byte) error

UnmarshalBinary modifies the receiver so it must take a pointer receiver.

func (*AbstractProtocolMessage) UpdateSequenceAndTimeStamp

func (msg *AbstractProtocolMessage) UpdateSequenceAndTimeStamp(timestamp int64) tgdb.TGError

UpdateSequenceAndTimeStamp updates the SequenceAndTimeStamp, if message is mutable @param timestamp @return TGMessage on success, error on failure

func (*AbstractProtocolMessage) WriteHeader

WriteHeader exports the values of the common message header Attributes to output stream

func (*AbstractProtocolMessage) WritePayload

func (msg *AbstractProtocolMessage) WritePayload(os tgdb.TGOutputStream) tgdb.TGError

WritePayload exports the values of the message specific payload Attributes to output stream

type AdminCommand

type AdminCommand int

======= Admin Command Types =======

const (
	AdminCommandInvalid AdminCommand = iota
	AdminCommandCreateUser
	AdminCommandCreateRole
	AdminCommandCreateAttrDesc
	AdminCommandCreateIndex
	AdminCommandCreateNodeType
	AdminCommandCreateEdgeType
	AdminCommandShowUsers
	AdminCommandShowRoles
	AdminCommandShowAttrDescs
	AdminCommandShowIndices
	AdminCommandShowTypes
	AdminCommandShowInfo
	AdminCommandShowConnections
	AdminCommandDescribe
	AdminCommandSetLogLevel
	AdminCommandSetSPDirectory
	AdminCommandUpdateRole
	AdminCommandStopServer
	AdminCommandCheckpointServer
	AdminCommandDisconnectClient
	AdminCommandKillConnection
)

func (AdminCommand) String

func (command AdminCommand) String() string

type AdminConnectionImpl

type AdminConnectionImpl struct {
	*TGDBConnection
}

func DefaultAdminConnection

func DefaultAdminConnection() *AdminConnectionImpl

func NewAdminConnection

func NewAdminConnection(conPool *ConnectionPoolImpl, channel tgdb.TGChannel, props tgdb.TGProperties) *AdminConnectionImpl

func (*AdminConnectionImpl) AttributeAdded

func (obj *AdminConnectionImpl) AttributeAdded(attr tgdb.TGAttribute, owner tgdb.TGEntity)

AttributeAdded gets called when an attribute is Added to an entity.

func (*AdminConnectionImpl) AttributeChanged

func (obj *AdminConnectionImpl) AttributeChanged(attr tgdb.TGAttribute, oldValue, newValue interface{})

AttributeChanged gets called when an attribute is set.

func (*AdminConnectionImpl) AttributeRemoved

func (obj *AdminConnectionImpl) AttributeRemoved(attr tgdb.TGAttribute, owner tgdb.TGEntity)

AttributeRemoved gets called when an attribute is removed from the entity.

func (*AdminConnectionImpl) CheckpointServer

func (obj *AdminConnectionImpl) CheckpointServer() tgdb.TGError

CheckpointServer allows the programmatic control to do a checkpoint on server

func (*AdminConnectionImpl) CloseQuery

func (obj *AdminConnectionImpl) CloseQuery(queryHashId int64) (tgdb.TGQuery, tgdb.TGError)

CloseQuery closes a specific query and associated objects

func (*AdminConnectionImpl) Commit

func (obj *AdminConnectionImpl) Commit() (tgdb.TGResultSet, tgdb.TGError)

Commit commits the current transaction on this connection

func (*AdminConnectionImpl) Connect

func (obj *AdminConnectionImpl) Connect() tgdb.TGError

Connect establishes a network connection to the TGDB server

func (*AdminConnectionImpl) CreateQuery

func (obj *AdminConnectionImpl) CreateQuery(expr string) (tgdb.TGQuery, tgdb.TGError)

CreateQuery creates a reusable query object that can be used to execute one or more statement

func (*AdminConnectionImpl) DecryptBuffer

func (obj *AdminConnectionImpl) DecryptBuffer(is tgdb.TGInputStream) ([]byte, tgdb.TGError)

DecryptBuffer decrypts the encrypted buffer by sending a DecryptBufferRequest to the server

func (*AdminConnectionImpl) DecryptEntity

func (obj *AdminConnectionImpl) DecryptEntity(entityId int64) ([]byte, tgdb.TGError)

DecryptEntity decrypts the encrypted entity using channel's data cryptographer

func (*AdminConnectionImpl) DeleteEntity

func (obj *AdminConnectionImpl) DeleteEntity(entity tgdb.TGEntity) tgdb.TGError

DeleteEntity marks an ENTITY for delete operation. Upon commit, the entity will be deleted from the database

func (*AdminConnectionImpl) Disconnect

func (obj *AdminConnectionImpl) Disconnect() tgdb.TGError

Disconnect breaks the connection from the TGDB server

func (*AdminConnectionImpl) DumpServerStackTrace

func (obj *AdminConnectionImpl) DumpServerStackTrace() tgdb.TGError

DumpServerStackTrace prints the stack trace

func (*AdminConnectionImpl) EncryptEntity

func (obj *AdminConnectionImpl) EncryptEntity(rawBuffer []byte) ([]byte, tgdb.TGError)

EncryptEntity encrypts the encrypted entity using channel's data cryptographer

func (*AdminConnectionImpl) EntityCreated

func (obj *AdminConnectionImpl) EntityCreated(entity tgdb.TGEntity)

EntityCreated gets called when an entity is Added

func (*AdminConnectionImpl) EntityDeleted

func (obj *AdminConnectionImpl) EntityDeleted(entity tgdb.TGEntity)

EntityDeleted gets called when the entity is deleted

func (*AdminConnectionImpl) ExecuteGremlinQuery

func (obj *AdminConnectionImpl) ExecuteGremlinQuery(expr string, collection []interface{}, options tgdb.TGQueryOption) ([]interface{}, tgdb.TGError)

ExecuteGremlinQuery executes a Gremlin Grammer-Based query with query options

func (*AdminConnectionImpl) ExecuteQuery

func (obj *AdminConnectionImpl) ExecuteQuery(expr string, options tgdb.TGQueryOption) (tgdb.TGResultSet, tgdb.TGError)

func (*AdminConnectionImpl) ExecuteQueryWithFilter

func (obj *AdminConnectionImpl) ExecuteQueryWithFilter(expr, edgeFilter, traversalCondition, endCondition string, options tgdb.TGQueryOption) (tgdb.TGResultSet, tgdb.TGError)

ExecuteQueryWithFilter executes an immediate query with specified filter & query options The query option is place holder at this time @param expr A subset of SQL-92 where clause @param edgeFilter filter used for selecting edges to be returned @param traversalCondition condition used for selecting edges to be traversed and returned @param endCondition condition used to stop the traversal @param option Query options for executing. Can be null, then it will use the default option

func (*AdminConnectionImpl) ExecuteQueryWithId

func (obj *AdminConnectionImpl) ExecuteQueryWithId(queryHashId int64, options tgdb.TGQueryOption) (tgdb.TGResultSet, tgdb.TGError)

ExecuteQueryWithId executes an immediate query for specified id & query options

func (*AdminConnectionImpl) GetAddedList

func (obj *AdminConnectionImpl) GetAddedList() map[int64]tgdb.TGEntity

GetAddedList gets a list of added entities

func (*AdminConnectionImpl) GetAttributeDescriptors

func (obj *AdminConnectionImpl) GetAttributeDescriptors() ([]tgdb.TGAttributeDescriptor, tgdb.TGError)

GetAttributeDescriptors gets the list of attribute descriptors

func (*AdminConnectionImpl) GetChangedList

func (obj *AdminConnectionImpl) GetChangedList() map[int64]tgdb.TGEntity

GetChangedList gets a list of changed entities

func (*AdminConnectionImpl) GetChannel

func (obj *AdminConnectionImpl) GetChannel() tgdb.TGChannel

GetChangedList gets the communication channel associated with this connection

func (*AdminConnectionImpl) GetConnectionGraphObjectFactory

func (obj *AdminConnectionImpl) GetConnectionGraphObjectFactory() *GraphObjectFactory

func (*AdminConnectionImpl) GetConnectionId

func (obj *AdminConnectionImpl) GetConnectionId() int64

GetConnectionId gets connection identifier

func (*AdminConnectionImpl) GetConnectionPool

func (obj *AdminConnectionImpl) GetConnectionPool() tgdb.TGConnectionPool

func (*AdminConnectionImpl) GetConnectionProperties

func (obj *AdminConnectionImpl) GetConnectionProperties() tgdb.TGProperties

GetConnectionProperties gets a list of connection properties

func (*AdminConnectionImpl) GetConnections

func (obj *AdminConnectionImpl) GetConnections() ([]tgdb.TGConnectionInfo, tgdb.TGError)

GetConnections gets the list of all socket connections using this connection type

func (*AdminConnectionImpl) GetEntities

func (obj *AdminConnectionImpl) GetEntities(qryKey tgdb.TGKey, props tgdb.TGProperties) (tgdb.TGResultSet, tgdb.TGError)

GetEntities gets a result set of entities given an non-uniqueKey

func (*AdminConnectionImpl) GetEntity

func (obj *AdminConnectionImpl) GetEntity(qryKey tgdb.TGKey, options tgdb.TGQueryOption) (tgdb.TGEntity, tgdb.TGError)

GetEntity gets an Entity given an UniqueKey for the Object

func (*AdminConnectionImpl) GetGraphMetadata

func (obj *AdminConnectionImpl) GetGraphMetadata(refresh bool) (tgdb.TGGraphMetadata, tgdb.TGError)

GetGraphMetadata gets the Graph Metadata

func (*AdminConnectionImpl) GetGraphObjectFactory

func (obj *AdminConnectionImpl) GetGraphObjectFactory() (tgdb.TGGraphObjectFactory, tgdb.TGError)

GetGraphObjectFactory gets the Graph Object Factory for Object creation

func (*AdminConnectionImpl) GetIndices

func (obj *AdminConnectionImpl) GetIndices() ([]tgdb.TGIndexInfo, tgdb.TGError)

GetIndices gets the list of all indices

func (*AdminConnectionImpl) GetInfo

func (obj *AdminConnectionImpl) GetInfo() (tgdb.TGServerInfo, tgdb.TGError)

GetInfo gets the information about this connection type

func (*AdminConnectionImpl) GetLargeObjectAsBytes

func (obj *AdminConnectionImpl) GetLargeObjectAsBytes(entityId int64, decryptFlag bool) ([]byte, tgdb.TGError)

GetLargeObjectAsBytes gets an Binary Large Object Entity given an UniqueKey for the Object

func (*AdminConnectionImpl) GetRemovedList

func (obj *AdminConnectionImpl) GetRemovedList() map[int64]tgdb.TGEntity

GetRemovedList gets a list of removed entities

func (*AdminConnectionImpl) GetUsers

func (obj *AdminConnectionImpl) GetUsers() ([]tgdb.TGUserInfo, tgdb.TGError)

GetUsers gets the list of users

func (*AdminConnectionImpl) InitMetadata

func (obj *AdminConnectionImpl) InitMetadata() tgdb.TGError

func (*AdminConnectionImpl) InsertEntity

func (obj *AdminConnectionImpl) InsertEntity(entity tgdb.TGEntity) tgdb.TGError

InsertEntity marks an ENTITY for insert operation. Upon commit, the entity will be inserted in the database

func (*AdminConnectionImpl) KillConnection

func (obj *AdminConnectionImpl) KillConnection(sessionId int64) tgdb.TGError

KillConnection terminates the connection forcefully

func (*AdminConnectionImpl) NodeAdded

func (obj *AdminConnectionImpl) NodeAdded(graph tgdb.TGGraph, node tgdb.TGNode)

NodeAdded gets called when a node is Added

func (*AdminConnectionImpl) NodeRemoved

func (obj *AdminConnectionImpl) NodeRemoved(graph tgdb.TGGraph, node tgdb.TGNode)

NodeRemoved gets called when a node is removed

func (*AdminConnectionImpl) Rollback

func (obj *AdminConnectionImpl) Rollback() tgdb.TGError

Rollback rolls back the current transaction on this connection

func (*AdminConnectionImpl) SetConnectionPool

func (obj *AdminConnectionImpl) SetConnectionPool(connPool tgdb.TGConnectionPool)

SetConnectionPool sets connection pool

func (*AdminConnectionImpl) SetConnectionProperties

func (obj *AdminConnectionImpl) SetConnectionProperties(connProps tgdb.TGProperties)

SetConnectionProperties sets connection properties

func (*AdminConnectionImpl) SetExceptionListener

func (obj *AdminConnectionImpl) SetExceptionListener(listener tgdb.TGConnectionExceptionListener)

SetExceptionListener sets exception listener

func (*AdminConnectionImpl) SetServerLogLevel

func (obj *AdminConnectionImpl) SetServerLogLevel(logLevel int, logComponent int64) tgdb.TGError

SetServerLogLevel set the log level

func (*AdminConnectionImpl) StopServer

func (obj *AdminConnectionImpl) StopServer() tgdb.TGError

StopServer stops the admin connection

func (*AdminConnectionImpl) String

func (obj *AdminConnectionImpl) String() string

func (*AdminConnectionImpl) UpdateEntity

func (obj *AdminConnectionImpl) UpdateEntity(entity tgdb.TGEntity) tgdb.TGError

UpdateEntity marks an ENTITY for update operation. Upon commit, the entity will be updated in the database When commit is called, the object is resolved to check if it is dirty. Entity.setAttribute calls make the entity dirty. If it is dirty, then the object is send to the server for update, otherwise it is ignored. Calling multiple times, does not change the behavior. The same entity cannot be updated on multiple connections. It will result an TGException of already associated to a connection.

type AdminRequestMessage

type AdminRequestMessage struct {
	*AbstractProtocolMessage
	// contains filtered or unexported fields
}

func DefaultAdminRequestMessage

func DefaultAdminRequestMessage() *AdminRequestMessage

func NewAdminRequestMessage

func NewAdminRequestMessage(authToken, sessionId int64) *AdminRequestMessage

Create New Message Instance

func (*AdminRequestMessage) FromBytes

func (msg *AdminRequestMessage) FromBytes(buffer []byte) (tgdb.TGMessage, tgdb.TGError)

FromBytes constructs a message object from the input buffer in the byte format

func (*AdminRequestMessage) GetAuthToken

func (msg *AdminRequestMessage) GetAuthToken() int64

GetAuthToken gets the authToken

func (*AdminRequestMessage) GetCommand

func (msg *AdminRequestMessage) GetCommand() AdminCommand

func (*AdminRequestMessage) GetIsUpdatable

func (msg *AdminRequestMessage) GetIsUpdatable() bool

GetIsUpdatable checks whether this message updatable or not

func (*AdminRequestMessage) GetLogLevel

func (msg *AdminRequestMessage) GetLogLevel() *ServerLogDetails

func (*AdminRequestMessage) GetMessageByteBufLength

func (msg *AdminRequestMessage) GetMessageByteBufLength() int

GetMessageByteBufLength gets the MessageByteBufLength. This method is called after the toBytes() is executed.

func (*AdminRequestMessage) GetRequestId

func (msg *AdminRequestMessage) GetRequestId() int64

GetRequestId gets the requestId for the message. This will be used as the CorrelationId

func (*AdminRequestMessage) GetSequenceNo

func (msg *AdminRequestMessage) GetSequenceNo() int64

GetSequenceNo gets the sequenceNo of the message

func (*AdminRequestMessage) GetSessionId

func (msg *AdminRequestMessage) GetSessionId() int64

GetSessionId gets the session id

func (*AdminRequestMessage) GetTimestamp

func (msg *AdminRequestMessage) GetTimestamp() int64

GetTimestamp gets the Timestamp

func (*AdminRequestMessage) GetVerbId

func (msg *AdminRequestMessage) GetVerbId() int

GetVerbId gets verbId of the message

func (*AdminRequestMessage) MarshalBinary

func (msg *AdminRequestMessage) MarshalBinary() ([]byte, error)

func (*AdminRequestMessage) ReadHeader

func (msg *AdminRequestMessage) ReadHeader(is tgdb.TGInputStream) tgdb.TGError

ReadHeader reads the bytes from input stream and constructs a common header of network packet

func (*AdminRequestMessage) ReadPayload

func (msg *AdminRequestMessage) ReadPayload(is tgdb.TGInputStream) tgdb.TGError

ReadPayload reads the bytes from input stream and constructs message specific payload Attributes

func (*AdminRequestMessage) SetAuthToken

func (msg *AdminRequestMessage) SetAuthToken(authToken int64)

SetAuthToken sets the authToken

func (*AdminRequestMessage) SetCommand

func (msg *AdminRequestMessage) SetCommand(cmd AdminCommand)

func (*AdminRequestMessage) SetDataOffset

func (msg *AdminRequestMessage) SetDataOffset(dataOffset int16)

SetDataOffset sets the offset at which data starts in the payload

func (*AdminRequestMessage) SetIsUpdatable

func (msg *AdminRequestMessage) SetIsUpdatable(updateFlag bool)

SetIsUpdatable sets the updatable flag

func (*AdminRequestMessage) SetLogLevel

func (msg *AdminRequestMessage) SetLogLevel(connId *ServerLogDetails)

func (*AdminRequestMessage) SetMessageByteBufLength

func (msg *AdminRequestMessage) SetMessageByteBufLength(bufLength int)

SetMessageByteBufLength sets the message buffer length

func (*AdminRequestMessage) SetRequestId

func (msg *AdminRequestMessage) SetRequestId(requestId int64)

SetRequestId sets the request id

func (*AdminRequestMessage) SetSequenceNo

func (msg *AdminRequestMessage) SetSequenceNo(sequenceNo int64)

SetSequenceNo sets the sequenceNo

func (*AdminRequestMessage) SetSessionId

func (msg *AdminRequestMessage) SetSessionId(sessionId int64)

SetSessionId sets the session id

func (*AdminRequestMessage) SetTimestamp

func (msg *AdminRequestMessage) SetTimestamp(timestamp int64) tgdb.TGError

SetTimestamp sets the timestamp

func (*AdminRequestMessage) SetVerbId

func (msg *AdminRequestMessage) SetVerbId(verbId int)

SetVerbId sets verbId of the message

func (*AdminRequestMessage) String

func (msg *AdminRequestMessage) String() string

func (*AdminRequestMessage) ToBytes

func (msg *AdminRequestMessage) ToBytes() ([]byte, int, tgdb.TGError)

ToBytes converts a message object into byte format to be sent over the network to TGDB server

func (*AdminRequestMessage) UnmarshalBinary

func (msg *AdminRequestMessage) UnmarshalBinary(data []byte) error

UnmarshalBinary modifies the receiver so it must take a pointer receiver.

func (*AdminRequestMessage) UpdateSequenceAndTimeStamp

func (msg *AdminRequestMessage) UpdateSequenceAndTimeStamp(timestamp int64) tgdb.TGError

UpdateSequenceAndTimeStamp updates the SequenceAndTimeStamp, if message is mutable @param timestamp @return TGMessage on success, error on failure

func (*AdminRequestMessage) WriteHeader

func (msg *AdminRequestMessage) WriteHeader(os tgdb.TGOutputStream) tgdb.TGError

WriteHeader exports the values of the common message header Attributes to output stream

func (*AdminRequestMessage) WritePayload

func (msg *AdminRequestMessage) WritePayload(os tgdb.TGOutputStream) tgdb.TGError

WritePayload exports the values of the message specific payload Attributes to output stream

type AdminResponseMessage

type AdminResponseMessage struct {
	*AbstractProtocolMessage
	// contains filtered or unexported fields
}

func DefaultAdminResponseMessage

func DefaultAdminResponseMessage() *AdminResponseMessage

func NewAdminResponseMessage

func NewAdminResponseMessage(authToken, sessionId int64) *AdminResponseMessage

Create New Message Instance

func (*AdminResponseMessage) FromBytes

func (msg *AdminResponseMessage) FromBytes(buffer []byte) (tgdb.TGMessage, tgdb.TGError)

FromBytes constructs a message object from the input buffer in the byte format

func (*AdminResponseMessage) GetAuthToken

func (msg *AdminResponseMessage) GetAuthToken() int64

GetAuthToken gets the authToken

func (*AdminResponseMessage) GetConnectionList

func (msg *AdminResponseMessage) GetConnectionList() []tgdb.TGConnectionInfo

func (*AdminResponseMessage) GetDescriptorList

func (msg *AdminResponseMessage) GetDescriptorList() []tgdb.TGAttributeDescriptor

func (*AdminResponseMessage) GetIndexList

func (msg *AdminResponseMessage) GetIndexList() []tgdb.TGIndexInfo

func (*AdminResponseMessage) GetIsUpdatable

func (msg *AdminResponseMessage) GetIsUpdatable() bool

GetIsUpdatable checks whether this message updatable or not

func (*AdminResponseMessage) GetMessageByteBufLength

func (msg *AdminResponseMessage) GetMessageByteBufLength() int

GetMessageByteBufLength gets the MessageByteBufLength. This method is called after the toBytes() is executed.

func (*AdminResponseMessage) GetRequestId

func (msg *AdminResponseMessage) GetRequestId() int64

GetRequestId gets the requestId for the message. This will be used as the CorrelationId

func (*AdminResponseMessage) GetSequenceNo

func (msg *AdminResponseMessage) GetSequenceNo() int64

GetSequenceNo gets the sequenceNo of the message

func (*AdminResponseMessage) GetServerInfo

func (msg *AdminResponseMessage) GetServerInfo() *ServerInfoImpl

func (*AdminResponseMessage) GetSessionId

func (msg *AdminResponseMessage) GetSessionId() int64

GetSessionId gets the session id

func (*AdminResponseMessage) GetTimestamp

func (msg *AdminResponseMessage) GetTimestamp() int64

GetTimestamp gets the Timestamp

func (*AdminResponseMessage) GetUserList

func (msg *AdminResponseMessage) GetUserList() []tgdb.TGUserInfo

func (*AdminResponseMessage) GetVerbId

func (msg *AdminResponseMessage) GetVerbId() int

GetVerbId gets verbId of the message

func (*AdminResponseMessage) MarshalBinary

func (msg *AdminResponseMessage) MarshalBinary() ([]byte, error)

func (*AdminResponseMessage) ReadHeader

func (msg *AdminResponseMessage) ReadHeader(is tgdb.TGInputStream) tgdb.TGError

ReadHeader reads the bytes from input stream and constructs a common header of network packet

func (*AdminResponseMessage) ReadPayload

func (msg *AdminResponseMessage) ReadPayload(is tgdb.TGInputStream) tgdb.TGError

ReadPayload reads the bytes from input stream and constructs message specific payload Attributes

func (*AdminResponseMessage) SetAuthToken

func (msg *AdminResponseMessage) SetAuthToken(authToken int64)

SetAuthToken sets the authToken

func (*AdminResponseMessage) SetConnectionList

func (msg *AdminResponseMessage) SetConnectionList(list []tgdb.TGConnectionInfo)

func (*AdminResponseMessage) SetDataOffset

func (msg *AdminResponseMessage) SetDataOffset(dataOffset int16)

SetDataOffset sets the offset at which data starts in the payload

func (*AdminResponseMessage) SetDescriptorList

func (msg *AdminResponseMessage) SetDescriptorList(list []tgdb.TGAttributeDescriptor)

func (*AdminResponseMessage) SetIndexList

func (msg *AdminResponseMessage) SetIndexList(list []tgdb.TGIndexInfo)

func (*AdminResponseMessage) SetIsUpdatable

func (msg *AdminResponseMessage) SetIsUpdatable(updateFlag bool)

SetIsUpdatable sets the updatable flag

func (*AdminResponseMessage) SetMessageByteBufLength

func (msg *AdminResponseMessage) SetMessageByteBufLength(bufLength int)

SetMessageByteBufLength sets the message buffer length

func (*AdminResponseMessage) SetRequestId

func (msg *AdminResponseMessage) SetRequestId(requestId int64)

SetRequestId sets the request id

func (*AdminResponseMessage) SetSequenceNo

func (msg *AdminResponseMessage) SetSequenceNo(sequenceNo int64)

SetSequenceNo sets the sequenceNo

func (*AdminResponseMessage) SetServerInfo

func (msg *AdminResponseMessage) SetServerInfo(sInfo *ServerInfoImpl)

func (*AdminResponseMessage) SetSessionId

func (msg *AdminResponseMessage) SetSessionId(sessionId int64)

SetSessionId sets the session id

func (*AdminResponseMessage) SetTimestamp

func (msg *AdminResponseMessage) SetTimestamp(timestamp int64) tgdb.TGError

SetTimestamp sets the timestamp

func (*AdminResponseMessage) SetUserList

func (msg *AdminResponseMessage) SetUserList(list []tgdb.TGUserInfo)

func (*AdminResponseMessage) SetVerbId

func (msg *AdminResponseMessage) SetVerbId(verbId int)

SetVerbId sets verbId of the message

func (*AdminResponseMessage) String

func (msg *AdminResponseMessage) String() string

func (*AdminResponseMessage) ToBytes

func (msg *AdminResponseMessage) ToBytes() ([]byte, int, tgdb.TGError)

ToBytes converts a message object into byte format to be sent over the network to TGDB server

func (*AdminResponseMessage) UnmarshalBinary

func (msg *AdminResponseMessage) UnmarshalBinary(data []byte) error

UnmarshalBinary modifies the receiver so it must take a pointer receiver.

func (*AdminResponseMessage) UpdateSequenceAndTimeStamp

func (msg *AdminResponseMessage) UpdateSequenceAndTimeStamp(timestamp int64) tgdb.TGError

UpdateSequenceAndTimeStamp updates the SequenceAndTimeStamp, if message is mutable @param timestamp @return TGMessage on success, error on failure

func (*AdminResponseMessage) WriteHeader

func (msg *AdminResponseMessage) WriteHeader(os tgdb.TGOutputStream) tgdb.TGError

WriteHeader exports the values of the common message header Attributes to output stream

func (*AdminResponseMessage) WritePayload

func (msg *AdminResponseMessage) WritePayload(os tgdb.TGOutputStream) tgdb.TGError

WritePayload exports the values of the message specific payload Attributes to output stream

type AttributeDescriptor

type AttributeDescriptor struct {
	SysType tgdb.TGSystemType

	Name        string
	AttrType    int
	IsArray     bool
	IsEncrypted bool
	Precision   int16
	Scale       int16
	// contains filtered or unexported fields
}

func DefaultAttributeDescriptor

func DefaultAttributeDescriptor() *AttributeDescriptor

func NewAttributeDescriptor

func NewAttributeDescriptor(id int64) *AttributeDescriptor

func NewAttributeDescriptorAsArray

func NewAttributeDescriptorAsArray(name string, attrType int, isArray bool) *AttributeDescriptor

func NewAttributeDescriptorOnServer

func NewAttributeDescriptorOnServer(name string, attrType int, isArray bool, attributeId int64) *AttributeDescriptor

TODO: To be used when created from server side data

func NewAttributeDescriptorWithType

func NewAttributeDescriptorWithType(name string, attrType int) *AttributeDescriptor

func (*AttributeDescriptor) GetAttrType

func (obj *AttributeDescriptor) GetAttrType() int

GetAttrType returns the type of Attribute Descriptor

func (*AttributeDescriptor) GetAttributeId

func (obj *AttributeDescriptor) GetAttributeId() int64

GetAttributeId returns the attributeId

func (*AttributeDescriptor) GetName

func (obj *AttributeDescriptor) GetName() string

GetName gets the system object's Name

func (*AttributeDescriptor) GetPrecision

func (obj *AttributeDescriptor) GetPrecision() int16

GetPrecision returns the Precision for Attribute Descriptor of type Number. The default Precision is 20

func (*AttributeDescriptor) GetScale

func (obj *AttributeDescriptor) GetScale() int16

GetScale returns the Scale for Attribute Descriptor of type Number. The default Scale is 5

func (*AttributeDescriptor) GetSystemType

func (obj *AttributeDescriptor) GetSystemType() tgdb.TGSystemType

GetSystemType gets system object's type

func (*AttributeDescriptor) IsAttributeArray

func (obj *AttributeDescriptor) IsAttributeArray() bool

IsAttributeArray checks whether the AttributeType an array desc or not

func (*AttributeDescriptor) Is_Encrypted

func (obj *AttributeDescriptor) Is_Encrypted() bool

Is_Encrypted checks whether this attribute is Encrypted or not

func (*AttributeDescriptor) MarshalBinary

func (obj *AttributeDescriptor) MarshalBinary() ([]byte, error)

func (*AttributeDescriptor) ReadExternal

func (obj *AttributeDescriptor) ReadExternal(is tgdb.TGInputStream) tgdb.TGError

ReadExternal reads the byte format from an external input stream and constructs a system object

func (*AttributeDescriptor) SetAttrType

func (obj *AttributeDescriptor) SetAttrType(attrType int)

func (*AttributeDescriptor) SetAttributeId

func (obj *AttributeDescriptor) SetAttributeId(attrId int64)

func (*AttributeDescriptor) SetIsArray

func (obj *AttributeDescriptor) SetIsArray(arrayFlag bool)

func (*AttributeDescriptor) SetIsEncrypted

func (obj *AttributeDescriptor) SetIsEncrypted(encryptedFlag bool)

func (*AttributeDescriptor) SetName

func (obj *AttributeDescriptor) SetName(attrName string)

func (*AttributeDescriptor) SetPrecision

func (obj *AttributeDescriptor) SetPrecision(precision int16)

SetPrecision sets the prevision for Attribute Descriptor of type Number

func (*AttributeDescriptor) SetScale

func (obj *AttributeDescriptor) SetScale(scale int16)

SetScale sets the Scale for Attribute Descriptor of type Number

func (*AttributeDescriptor) SetSystemType

func (obj *AttributeDescriptor) SetSystemType(sysType tgdb.TGSystemType)

func (*AttributeDescriptor) String

func (obj *AttributeDescriptor) String() string

func (*AttributeDescriptor) UnmarshalBinary

func (obj *AttributeDescriptor) UnmarshalBinary(data []byte) error

func (*AttributeDescriptor) WriteExternal

func (obj *AttributeDescriptor) WriteExternal(os tgdb.TGOutputStream) tgdb.TGError

WriteExternal writes a system object into an appropriate byte format onto an external output stream

type AttributeType

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

func GetAttributeTypeFromId

func GetAttributeTypeFromId(aType int) *AttributeType

GetAttributeTypeFromId returns the TGAttributeType given its id

func GetAttributeTypeFromName

func GetAttributeTypeFromName(aName string) *AttributeType

GetAttributeTypeFromName returns the TGAttributeType given its Name

func (*AttributeType) GetImplementor

func (obj *AttributeType) GetImplementor() string

func (*AttributeType) GetTypeId

func (obj *AttributeType) GetTypeId() int

func (*AttributeType) GetTypeName

func (obj *AttributeType) GetTypeName() string

func (*AttributeType) SetImplementor

func (obj *AttributeType) SetImplementor(impl string)

func (*AttributeType) SetTypeId

func (obj *AttributeType) SetTypeId(id int)

func (*AttributeType) SetTypeName

func (obj *AttributeType) SetTypeName(name string)

type AuthenticateRequestMessage

type AuthenticateRequestMessage struct {
	*AbstractProtocolMessage
	// contains filtered or unexported fields
}

func DefaultAuthenticateRequestMessage

func DefaultAuthenticateRequestMessage() *AuthenticateRequestMessage

func NewAuthenticateRequestMessage

func NewAuthenticateRequestMessage(authToken, sessionId int64) *AuthenticateRequestMessage

Create New Message Instance

func (*AuthenticateRequestMessage) FromBytes

func (msg *AuthenticateRequestMessage) FromBytes(buffer []byte) (tgdb.TGMessage, tgdb.TGError)

FromBytes constructs a message object from the input buffer in the byte format

func (*AuthenticateRequestMessage) GetAuthToken

func (msg *AuthenticateRequestMessage) GetAuthToken() int64

GetAuthToken gets the authToken

func (*AuthenticateRequestMessage) GetClientId

func (msg *AuthenticateRequestMessage) GetClientId() string

func (*AuthenticateRequestMessage) GetDatabaseName

func (msg *AuthenticateRequestMessage) GetDatabaseName() string

GetDatabaseName gets the database-name from request message

func (*AuthenticateRequestMessage) GetInboxAddr

func (msg *AuthenticateRequestMessage) GetInboxAddr() string

func (*AuthenticateRequestMessage) GetIsUpdatable

func (msg *AuthenticateRequestMessage) GetIsUpdatable() bool

GetIsUpdatable checks whether this message updatable or not

func (*AuthenticateRequestMessage) GetMessageByteBufLength

func (msg *AuthenticateRequestMessage) GetMessageByteBufLength() int

GetMessageByteBufLength gets the MessageByteBufLength. This method is called after the toBytes() is executed.

func (*AuthenticateRequestMessage) GetPassword

func (msg *AuthenticateRequestMessage) GetPassword() []byte

func (*AuthenticateRequestMessage) GetRequestId

func (msg *AuthenticateRequestMessage) GetRequestId() int64

GetRequestId gets the requestId for the message. This will be used as the CorrelationId

func (*AuthenticateRequestMessage) GetSequenceNo

func (msg *AuthenticateRequestMessage) GetSequenceNo() int64

GetSequenceNo gets the sequenceNo of the message

func (*AuthenticateRequestMessage) GetSessionId

func (msg *AuthenticateRequestMessage) GetSessionId() int64

GetSessionId gets the session id

func (*AuthenticateRequestMessage) GetTimestamp

func (msg *AuthenticateRequestMessage) GetTimestamp() int64

GetTimestamp gets the Timestamp

func (*AuthenticateRequestMessage) GetUserName

func (msg *AuthenticateRequestMessage) GetUserName() string

func (*AuthenticateRequestMessage) GetVerbId

func (msg *AuthenticateRequestMessage) GetVerbId() int

GetVerbId gets verbId of the message

func (*AuthenticateRequestMessage) MarshalBinary

func (msg *AuthenticateRequestMessage) MarshalBinary() ([]byte, error)

func (*AuthenticateRequestMessage) ReadHeader

ReadHeader reads the bytes from input stream and constructs a common header of network packet

func (*AuthenticateRequestMessage) ReadPayload

ReadPayload reads the bytes from input stream and constructs message specific payload Attributes

func (*AuthenticateRequestMessage) SetAuthToken

func (msg *AuthenticateRequestMessage) SetAuthToken(authToken int64)

SetAuthToken sets the authToken

func (*AuthenticateRequestMessage) SetClientId

func (msg *AuthenticateRequestMessage) SetClientId(client string)

func (*AuthenticateRequestMessage) SetDataOffset

func (msg *AuthenticateRequestMessage) SetDataOffset(dataOffset int16)

SetDataOffset sets the offset at which data starts in the payload

func (*AuthenticateRequestMessage) SetDatabaseName

func (msg *AuthenticateRequestMessage) SetDatabaseName(dbname string)

SetDatabaseName sets the database-name on request message

func (*AuthenticateRequestMessage) SetInboxAddr

func (msg *AuthenticateRequestMessage) SetInboxAddr(inbox string)

func (*AuthenticateRequestMessage) SetIsUpdatable

func (msg *AuthenticateRequestMessage) SetIsUpdatable(updateFlag bool)

SetIsUpdatable sets the updatable flag

func (*AuthenticateRequestMessage) SetMessageByteBufLength

func (msg *AuthenticateRequestMessage) SetMessageByteBufLength(bufLength int)

SetMessageByteBufLength sets the message buffer length

func (*AuthenticateRequestMessage) SetPassword

func (msg *AuthenticateRequestMessage) SetPassword(pwd []byte)

func (*AuthenticateRequestMessage) SetRequestId

func (msg *AuthenticateRequestMessage) SetRequestId(requestId int64)

SetRequestId sets the request id

func (*AuthenticateRequestMessage) SetSequenceNo

func (msg *AuthenticateRequestMessage) SetSequenceNo(sequenceNo int64)

SetSequenceNo sets the sequenceNo

func (*AuthenticateRequestMessage) SetSessionId

func (msg *AuthenticateRequestMessage) SetSessionId(sessionId int64)

SetSessionId sets the session id

func (*AuthenticateRequestMessage) SetTimestamp

func (msg *AuthenticateRequestMessage) SetTimestamp(timestamp int64) tgdb.TGError

SetTimestamp sets the timestamp

func (*AuthenticateRequestMessage) SetUserName

func (msg *AuthenticateRequestMessage) SetUserName(user string)

func (*AuthenticateRequestMessage) SetVerbId

func (msg *AuthenticateRequestMessage) SetVerbId(verbId int)

SetVerbId sets verbId of the message

func (*AuthenticateRequestMessage) String

func (msg *AuthenticateRequestMessage) String() string

func (*AuthenticateRequestMessage) ToBytes

func (msg *AuthenticateRequestMessage) ToBytes() ([]byte, int, tgdb.TGError)

ToBytes converts a message object into byte format to be sent over the network to TGDB server

func (*AuthenticateRequestMessage) UnmarshalBinary

func (msg *AuthenticateRequestMessage) UnmarshalBinary(data []byte) error

UnmarshalBinary modifies the receiver so it must take a pointer receiver.

func (*AuthenticateRequestMessage) UpdateSequenceAndTimeStamp

func (msg *AuthenticateRequestMessage) UpdateSequenceAndTimeStamp(timestamp int64) tgdb.TGError

UpdateSequenceAndTimeStamp updates the SequenceAndTimeStamp, if message is mutable @param timestamp @return TGMessage on success, error on failure

func (*AuthenticateRequestMessage) WriteHeader

WriteHeader exports the values of the common message header Attributes to output stream

func (*AuthenticateRequestMessage) WritePayload

WritePayload exports the values of the message specific payload Attributes to output stream

type AuthenticateResponseMessage

type AuthenticateResponseMessage struct {
	*AbstractProtocolMessage
	// contains filtered or unexported fields
}

func DefaultAuthenticateResponseMessage

func DefaultAuthenticateResponseMessage() *AuthenticateResponseMessage

func NewAuthenticateResponseMessage

func NewAuthenticateResponseMessage(authToken, sessionId int64) *AuthenticateResponseMessage

Create New Message Instance

func (*AuthenticateResponseMessage) FromBytes

func (msg *AuthenticateResponseMessage) FromBytes(buffer []byte) (tgdb.TGMessage, tgdb.TGError)

FromBytes constructs a message object from the input buffer in the byte format

func (*AuthenticateResponseMessage) GetAuthToken

func (msg *AuthenticateResponseMessage) GetAuthToken() int64

GetAuthToken gets the authToken

func (*AuthenticateResponseMessage) GetIsUpdatable

func (msg *AuthenticateResponseMessage) GetIsUpdatable() bool

GetIsUpdatable checks whether this message updatable or not

func (*AuthenticateResponseMessage) GetMessageByteBufLength

func (msg *AuthenticateResponseMessage) GetMessageByteBufLength() int

GetMessageByteBufLength gets the MessageByteBufLength. This method is called after the toBytes() is executed.

func (*AuthenticateResponseMessage) GetRequestId

func (msg *AuthenticateResponseMessage) GetRequestId() int64

GetRequestId gets the requestId for the message. This will be used as the CorrelationId

func (*AuthenticateResponseMessage) GetSequenceNo

func (msg *AuthenticateResponseMessage) GetSequenceNo() int64

GetSequenceNo gets the sequenceNo of the message

func (*AuthenticateResponseMessage) GetServerCertBuffer

func (msg *AuthenticateResponseMessage) GetServerCertBuffer() []byte

func (*AuthenticateResponseMessage) GetSessionId

func (msg *AuthenticateResponseMessage) GetSessionId() int64

GetSessionId gets the session id

func (*AuthenticateResponseMessage) GetTimestamp

func (msg *AuthenticateResponseMessage) GetTimestamp() int64

GetTimestamp gets the Timestamp

func (*AuthenticateResponseMessage) GetVerbId

func (msg *AuthenticateResponseMessage) GetVerbId() int

GetVerbId gets verbId of the message

func (*AuthenticateResponseMessage) IsSuccess

func (msg *AuthenticateResponseMessage) IsSuccess() bool

func (*AuthenticateResponseMessage) MarshalBinary

func (msg *AuthenticateResponseMessage) MarshalBinary() ([]byte, error)

func (*AuthenticateResponseMessage) ReadHeader

ReadHeader reads the bytes from input stream and constructs a common header of network packet

func (*AuthenticateResponseMessage) ReadPayload

ReadPayload reads the bytes from input stream and constructs message specific payload Attributes

func (*AuthenticateResponseMessage) SetAuthToken

func (msg *AuthenticateResponseMessage) SetAuthToken(authToken int64)

SetAuthToken sets the authToken

func (*AuthenticateResponseMessage) SetDataOffset

func (msg *AuthenticateResponseMessage) SetDataOffset(dataOffset int16)

SetDataOffset sets the offset at which data starts in the payload

func (*AuthenticateResponseMessage) SetErrorStatus

func (msg *AuthenticateResponseMessage) SetErrorStatus(status int)

func (*AuthenticateResponseMessage) SetIsUpdatable

func (msg *AuthenticateResponseMessage) SetIsUpdatable(updateFlag bool)

SetIsUpdatable sets the updatable flag

func (*AuthenticateResponseMessage) SetMessageByteBufLength

func (msg *AuthenticateResponseMessage) SetMessageByteBufLength(bufLength int)

SetMessageByteBufLength sets the message buffer length

func (*AuthenticateResponseMessage) SetRequestId

func (msg *AuthenticateResponseMessage) SetRequestId(requestId int64)

SetRequestId sets the request id

func (*AuthenticateResponseMessage) SetSequenceNo

func (msg *AuthenticateResponseMessage) SetSequenceNo(sequenceNo int64)

SetSequenceNo sets the sequenceNo

func (*AuthenticateResponseMessage) SetServerCertBuffer

func (msg *AuthenticateResponseMessage) SetServerCertBuffer(buffer []byte)

func (*AuthenticateResponseMessage) SetSessionId

func (msg *AuthenticateResponseMessage) SetSessionId(sessionId int64)

SetSessionId sets the session id

func (*AuthenticateResponseMessage) SetSuccess

func (msg *AuthenticateResponseMessage) SetSuccess(flag bool)

func (*AuthenticateResponseMessage) SetTimestamp

func (msg *AuthenticateResponseMessage) SetTimestamp(timestamp int64) tgdb.TGError

SetTimestamp sets the timestamp

func (*AuthenticateResponseMessage) SetVerbId

func (msg *AuthenticateResponseMessage) SetVerbId(verbId int)

SetVerbId sets verbId of the message

func (*AuthenticateResponseMessage) String

func (msg *AuthenticateResponseMessage) String() string

func (*AuthenticateResponseMessage) ToBytes

func (msg *AuthenticateResponseMessage) ToBytes() ([]byte, int, tgdb.TGError)

ToBytes converts a message object into byte format to be sent over the network to TGDB server

func (*AuthenticateResponseMessage) UnmarshalBinary

func (msg *AuthenticateResponseMessage) UnmarshalBinary(data []byte) error

UnmarshalBinary modifies the receiver so it must take a pointer receiver.

func (*AuthenticateResponseMessage) UpdateSequenceAndTimeStamp

func (msg *AuthenticateResponseMessage) UpdateSequenceAndTimeStamp(timestamp int64) tgdb.TGError

UpdateSequenceAndTimeStamp updates the SequenceAndTimeStamp, if message is mutable @param timestamp @return TGMessage on success, error on failure

func (*AuthenticateResponseMessage) WriteHeader

WriteHeader exports the values of the common message header Attributes to output stream

func (*AuthenticateResponseMessage) WritePayload

WritePayload exports the values of the message specific payload Attributes to output stream

type AuthenticatedMessage

type AuthenticatedMessage struct {
	*AbstractProtocolMessage
	// contains filtered or unexported fields
}

func DefaultAuthenticatedMessage

func DefaultAuthenticatedMessage() *AuthenticatedMessage

func NewAuthenticatedMessage

func NewAuthenticatedMessage(authToken, sessionId int64) *AuthenticatedMessage

Create New Message Instance

func (*AuthenticatedMessage) FromBytes

func (msg *AuthenticatedMessage) FromBytes(buffer []byte) (tgdb.TGMessage, tgdb.TGError)

FromBytes constructs a message object from the input buffer in the byte format

func (*AuthenticatedMessage) GetAuthToken

func (msg *AuthenticatedMessage) GetAuthToken() int64

GetAuthToken gets the authToken

func (*AuthenticatedMessage) GetClientId

func (msg *AuthenticatedMessage) GetClientId() string

func (*AuthenticatedMessage) GetConnectionId

func (msg *AuthenticatedMessage) GetConnectionId() int

func (*AuthenticatedMessage) GetIsUpdatable

func (msg *AuthenticatedMessage) GetIsUpdatable() bool

GetIsUpdatable checks whether this message updatable or not

func (*AuthenticatedMessage) GetMessageByteBufLength

func (msg *AuthenticatedMessage) GetMessageByteBufLength() int

GetMessageByteBufLength gets the MessageByteBufLength. This method is called after the toBytes() is executed.

func (*AuthenticatedMessage) GetRequestId

func (msg *AuthenticatedMessage) GetRequestId() int64

GetRequestId gets the requestId for the message. This will be used as the CorrelationId

func (*AuthenticatedMessage) GetSequenceNo

func (msg *AuthenticatedMessage) GetSequenceNo() int64

GetSequenceNo gets the sequenceNo of the message

func (*AuthenticatedMessage) GetSessionId

func (msg *AuthenticatedMessage) GetSessionId() int64

GetSessionId gets the session id

func (*AuthenticatedMessage) GetTimestamp

func (msg *AuthenticatedMessage) GetTimestamp() int64

GetTimestamp gets the Timestamp

func (*AuthenticatedMessage) GetVerbId

func (msg *AuthenticatedMessage) GetVerbId() int

GetVerbId gets verbId of the message

func (*AuthenticatedMessage) MarshalBinary

func (msg *AuthenticatedMessage) MarshalBinary() ([]byte, error)

func (*AuthenticatedMessage) ReadHeader

func (msg *AuthenticatedMessage) ReadHeader(is tgdb.TGInputStream) tgdb.TGError

ReadHeader reads the bytes from input stream and constructs a common header of network packet

func (*AuthenticatedMessage) ReadPayload

func (msg *AuthenticatedMessage) ReadPayload(is tgdb.TGInputStream) tgdb.TGError

ReadPayload reads the bytes from input stream and constructs message specific payload Attributes

func (*AuthenticatedMessage) SetAuthToken

func (msg *AuthenticatedMessage) SetAuthToken(authToken int64)

SetAuthToken sets the authToken

func (*AuthenticatedMessage) SetClientId

func (msg *AuthenticatedMessage) SetClientId(client string)

func (*AuthenticatedMessage) SetConnectionId

func (msg *AuthenticatedMessage) SetConnectionId(connId int)

func (*AuthenticatedMessage) SetDataOffset

func (msg *AuthenticatedMessage) SetDataOffset(dataOffset int16)

SetDataOffset sets the offset at which data starts in the payload

func (*AuthenticatedMessage) SetIsUpdatable

func (msg *AuthenticatedMessage) SetIsUpdatable(updateFlag bool)

SetIsUpdatable sets the updatable flag

func (*AuthenticatedMessage) SetMessageByteBufLength

func (msg *AuthenticatedMessage) SetMessageByteBufLength(bufLength int)

SetMessageByteBufLength sets the message buffer length

func (*AuthenticatedMessage) SetRequestId

func (msg *AuthenticatedMessage) SetRequestId(requestId int64)

SetRequestId sets the request id

func (*AuthenticatedMessage) SetSequenceNo

func (msg *AuthenticatedMessage) SetSequenceNo(sequenceNo int64)

SetSequenceNo sets the sequenceNo

func (*AuthenticatedMessage) SetSessionId

func (msg *AuthenticatedMessage) SetSessionId(sessionId int64)

SetSessionId sets the session id

func (*AuthenticatedMessage) SetTimestamp

func (msg *AuthenticatedMessage) SetTimestamp(timestamp int64) tgdb.TGError

SetTimestamp sets the timestamp

func (*AuthenticatedMessage) SetVerbId

func (msg *AuthenticatedMessage) SetVerbId(verbId int)

SetVerbId sets verbId of the message

func (*AuthenticatedMessage) String

func (msg *AuthenticatedMessage) String() string

func (*AuthenticatedMessage) ToBytes

func (msg *AuthenticatedMessage) ToBytes() ([]byte, int, tgdb.TGError)

ToBytes converts a message object into byte format to be sent over the network to TGDB server

func (*AuthenticatedMessage) UnmarshalBinary

func (msg *AuthenticatedMessage) UnmarshalBinary(data []byte) error

UnmarshalBinary modifies the receiver so it must take a pointer receiver.

func (*AuthenticatedMessage) UpdateSequenceAndTimeStamp

func (msg *AuthenticatedMessage) UpdateSequenceAndTimeStamp(timestamp int64) tgdb.TGError

UpdateSequenceAndTimeStamp updates the SequenceAndTimeStamp, if message is mutable @param timestamp @return TGMessage on success, error on failure

func (*AuthenticatedMessage) WriteHeader

func (msg *AuthenticatedMessage) WriteHeader(os tgdb.TGOutputStream) tgdb.TGError

WriteHeader exports the values of the common message header Attributes to output stream

func (*AuthenticatedMessage) WritePayload

func (msg *AuthenticatedMessage) WritePayload(os tgdb.TGOutputStream) tgdb.TGError

WritePayload exports the values of the message specific payload Attributes to output stream

type BadAuthentication

type BadAuthentication struct {
	*TGDBError
	// contains filtered or unexported fields
}

func DefaultTGBadAuthentication

func DefaultTGBadAuthentication() *BadAuthentication

Create New BadAuthentication Instance

func NewTGBadAuthentication

func NewTGBadAuthentication(eCode string, eType int, eMsg, eDetails string) *BadAuthentication

func NewTGBadAuthenticationWithMsg

func NewTGBadAuthenticationWithMsg(msg string) *BadAuthentication

func NewTGBadAuthenticationWithRealm

func NewTGBadAuthenticationWithRealm(eCode string, eType int, eMsg, eDetails string, realm string) *BadAuthentication

func (*BadAuthentication) Error

func (e *BadAuthentication) Error() string

func (*BadAuthentication) GetErrorCode

func (e *BadAuthentication) GetErrorCode() string

func (*BadAuthentication) GetErrorDetails

func (e *BadAuthentication) GetErrorDetails() string

func (*BadAuthentication) GetErrorMsg

func (e *BadAuthentication) GetErrorMsg() string

func (*BadAuthentication) GetErrorType

func (e *BadAuthentication) GetErrorType() int

func (*BadAuthentication) GetRealm

func (e *BadAuthentication) GetRealm() string

func (*BadAuthentication) SetRealm

func (e *BadAuthentication) SetRealm(realmStr string)

type BadMagic

type BadMagic struct {
	*TGDBError
}

func DefaultTGBadMagic

func DefaultTGBadMagic() *BadMagic

Create New BadMagic Instance

func NewTGBadMagic

func NewTGBadMagic(eCode string, eType int, eMsg, eDetails string) *BadMagic

func NewTGBadMagicWithMsg

func NewTGBadMagicWithMsg(msg string) *BadMagic

func (*BadMagic) Error

func (e *BadMagic) Error() string

func (*BadMagic) GetErrorCode

func (e *BadMagic) GetErrorCode() string

func (*BadMagic) GetErrorDetails

func (e *BadMagic) GetErrorDetails() string

func (*BadMagic) GetErrorMsg

func (e *BadMagic) GetErrorMsg() string

func (*BadMagic) GetErrorType

func (e *BadMagic) GetErrorType() int

type BadVerb

type BadVerb struct {
	*TGDBError
}

func DefaultTGBadVerb

func DefaultTGBadVerb() *BadVerb

Create New BadVerb Instance

func NewTGBadVerb

func NewTGBadVerb(eCode string, eType int, eMsg, eDetails string) *BadVerb

func NewTGBadVerbWithMsg

func NewTGBadVerbWithMsg(msg string) *BadVerb

func (*BadVerb) Error

func (e *BadVerb) Error() string

func (*BadVerb) GetErrorCode

func (e *BadVerb) GetErrorCode() string

func (*BadVerb) GetErrorDetails

func (e *BadVerb) GetErrorDetails() string

func (*BadVerb) GetErrorMsg

func (e *BadVerb) GetErrorMsg() string

func (*BadVerb) GetErrorType

func (e *BadVerb) GetErrorType() int

type BeginTransactionRequestMessage

type BeginTransactionRequestMessage struct {
	*AbstractProtocolMessage
}

func DefaultBeginTransactionRequestMessage

func DefaultBeginTransactionRequestMessage() *BeginTransactionRequestMessage

func NewBeginTransactionRequestMessage

func NewBeginTransactionRequestMessage(authToken, sessionId int64) *BeginTransactionRequestMessage

Create New Message Instance

func (*BeginTransactionRequestMessage) FromBytes

func (msg *BeginTransactionRequestMessage) FromBytes(buffer []byte) (tgdb.TGMessage, tgdb.TGError)

FromBytes constructs a message object from the input buffer in the byte format

func (*BeginTransactionRequestMessage) GetAuthToken

func (msg *BeginTransactionRequestMessage) GetAuthToken() int64

GetAuthToken gets the authToken

func (*BeginTransactionRequestMessage) GetIsUpdatable

func (msg *BeginTransactionRequestMessage) GetIsUpdatable() bool

GetIsUpdatable checks whether this message updatable or not

func (*BeginTransactionRequestMessage) GetMessageByteBufLength

func (msg *BeginTransactionRequestMessage) GetMessageByteBufLength() int

GetMessageByteBufLength gets the MessageByteBufLength. This method is called after the toBytes() is executed.

func (*BeginTransactionRequestMessage) GetRequestId

func (msg *BeginTransactionRequestMessage) GetRequestId() int64

GetRequestId gets the requestId for the message. This will be used as the CorrelationId

func (*BeginTransactionRequestMessage) GetSequenceNo

func (msg *BeginTransactionRequestMessage) GetSequenceNo() int64

GetSequenceNo gets the sequenceNo of the message

func (*BeginTransactionRequestMessage) GetSessionId

func (msg *BeginTransactionRequestMessage) GetSessionId() int64

GetSessionId gets the session id

func (*BeginTransactionRequestMessage) GetTimestamp

func (msg *BeginTransactionRequestMessage) GetTimestamp() int64

GetTimestamp gets the Timestamp

func (*BeginTransactionRequestMessage) GetVerbId

func (msg *BeginTransactionRequestMessage) GetVerbId() int

GetVerbId gets verbId of the message

func (*BeginTransactionRequestMessage) MarshalBinary

func (msg *BeginTransactionRequestMessage) MarshalBinary() ([]byte, error)

func (*BeginTransactionRequestMessage) ReadHeader

ReadHeader reads the bytes from input stream and constructs a common header of network packet

func (*BeginTransactionRequestMessage) ReadPayload

ReadPayload reads the bytes from input stream and constructs message specific payload Attributes

func (*BeginTransactionRequestMessage) SetAuthToken

func (msg *BeginTransactionRequestMessage) SetAuthToken(authToken int64)

SetAuthToken sets the authToken

func (*BeginTransactionRequestMessage) SetDataOffset

func (msg *BeginTransactionRequestMessage) SetDataOffset(dataOffset int16)

SetDataOffset sets the offset at which data starts in the payload

func (*BeginTransactionRequestMessage) SetIsUpdatable

func (msg *BeginTransactionRequestMessage) SetIsUpdatable(updateFlag bool)

SetIsUpdatable sets the updatable flag

func (*BeginTransactionRequestMessage) SetMessageByteBufLength

func (msg *BeginTransactionRequestMessage) SetMessageByteBufLength(bufLength int)

SetMessageByteBufLength sets the message buffer length

func (*BeginTransactionRequestMessage) SetRequestId

func (msg *BeginTransactionRequestMessage) SetRequestId(requestId int64)

SetRequestId sets the request id

func (*BeginTransactionRequestMessage) SetSequenceNo

func (msg *BeginTransactionRequestMessage) SetSequenceNo(sequenceNo int64)

SetSequenceNo sets the sequenceNo

func (*BeginTransactionRequestMessage) SetSessionId

func (msg *BeginTransactionRequestMessage) SetSessionId(sessionId int64)

SetSessionId sets the session id

func (*BeginTransactionRequestMessage) SetTimestamp

func (msg *BeginTransactionRequestMessage) SetTimestamp(timestamp int64) tgdb.TGError

SetTimestamp sets the timestamp

func (*BeginTransactionRequestMessage) SetVerbId

func (msg *BeginTransactionRequestMessage) SetVerbId(verbId int)

SetVerbId sets verbId of the message

func (*BeginTransactionRequestMessage) String

func (msg *BeginTransactionRequestMessage) String() string

func (*BeginTransactionRequestMessage) ToBytes

func (msg *BeginTransactionRequestMessage) ToBytes() ([]byte, int, tgdb.TGError)

ToBytes converts a message object into byte format to be sent over the network to TGDB server

func (*BeginTransactionRequestMessage) UnmarshalBinary

func (msg *BeginTransactionRequestMessage) UnmarshalBinary(data []byte) error

UnmarshalBinary modifies the receiver so it must take a pointer receiver.

func (*BeginTransactionRequestMessage) UpdateSequenceAndTimeStamp

func (msg *BeginTransactionRequestMessage) UpdateSequenceAndTimeStamp(timestamp int64) tgdb.TGError

UpdateSequenceAndTimeStamp updates the SequenceAndTimeStamp, if message is mutable @param timestamp @return TGMessage on success, error on failure

func (*BeginTransactionRequestMessage) WriteHeader

WriteHeader exports the values of the common message header Attributes to output stream

func (*BeginTransactionRequestMessage) WritePayload

WritePayload exports the values of the message specific payload Attributes to output stream

type BeginTransactionResponseMessage

type BeginTransactionResponseMessage struct {
	*AbstractProtocolMessage
	// contains filtered or unexported fields
}

func DefaultBeginTransactionResponseMessage

func DefaultBeginTransactionResponseMessage() *BeginTransactionResponseMessage

func NewBeginTransactionResponseMessage

func NewBeginTransactionResponseMessage(authToken, sessionId int64) *BeginTransactionResponseMessage

Create New Message Instance

func (*BeginTransactionResponseMessage) FromBytes

func (msg *BeginTransactionResponseMessage) FromBytes(buffer []byte) (tgdb.TGMessage, tgdb.TGError)

FromBytes constructs a message object from the input buffer in the byte format

func (*BeginTransactionResponseMessage) GetAuthToken

func (msg *BeginTransactionResponseMessage) GetAuthToken() int64

GetAuthToken gets the authToken

func (*BeginTransactionResponseMessage) GetIsUpdatable

func (msg *BeginTransactionResponseMessage) GetIsUpdatable() bool

GetIsUpdatable checks whether this message updatable or not

func (*BeginTransactionResponseMessage) GetMessageByteBufLength

func (msg *BeginTransactionResponseMessage) GetMessageByteBufLength() int

GetMessageByteBufLength gets the MessageByteBufLength. This method is called after the toBytes() is executed.

func (*BeginTransactionResponseMessage) GetRequestId

func (msg *BeginTransactionResponseMessage) GetRequestId() int64

GetRequestId gets the requestId for the message. This will be used as the CorrelationId

func (*BeginTransactionResponseMessage) GetSequenceNo

func (msg *BeginTransactionResponseMessage) GetSequenceNo() int64

GetSequenceNo gets the sequenceNo of the message

func (*BeginTransactionResponseMessage) GetSessionId

func (msg *BeginTransactionResponseMessage) GetSessionId() int64

GetSessionId gets the session id

func (*BeginTransactionResponseMessage) GetTimestamp

func (msg *BeginTransactionResponseMessage) GetTimestamp() int64

GetTimestamp gets the Timestamp

func (*BeginTransactionResponseMessage) GetTransactionId

func (msg *BeginTransactionResponseMessage) GetTransactionId() int64

func (*BeginTransactionResponseMessage) GetVerbId

func (msg *BeginTransactionResponseMessage) GetVerbId() int

GetVerbId gets verbId of the message

func (*BeginTransactionResponseMessage) MarshalBinary

func (msg *BeginTransactionResponseMessage) MarshalBinary() ([]byte, error)

func (*BeginTransactionResponseMessage) ReadHeader

ReadHeader reads the bytes from input stream and constructs a common header of network packet

func (*BeginTransactionResponseMessage) ReadPayload

ReadPayload reads the bytes from input stream and constructs message specific payload Attributes

func (*BeginTransactionResponseMessage) SetAuthToken

func (msg *BeginTransactionResponseMessage) SetAuthToken(authToken int64)

SetAuthToken sets the authToken

func (*BeginTransactionResponseMessage) SetDataOffset

func (msg *BeginTransactionResponseMessage) SetDataOffset(dataOffset int16)

SetDataOffset sets the offset at which data starts in the payload

func (*BeginTransactionResponseMessage) SetIsUpdatable

func (msg *BeginTransactionResponseMessage) SetIsUpdatable(updateFlag bool)

SetIsUpdatable sets the updatable flag

func (*BeginTransactionResponseMessage) SetMessageByteBufLength

func (msg *BeginTransactionResponseMessage) SetMessageByteBufLength(bufLength int)

SetMessageByteBufLength sets the message buffer length

func (*BeginTransactionResponseMessage) SetRequestId

func (msg *BeginTransactionResponseMessage) SetRequestId(requestId int64)

SetRequestId sets the request id

func (*BeginTransactionResponseMessage) SetSequenceNo

func (msg *BeginTransactionResponseMessage) SetSequenceNo(sequenceNo int64)

SetSequenceNo sets the sequenceNo

func (*BeginTransactionResponseMessage) SetSessionId

func (msg *BeginTransactionResponseMessage) SetSessionId(sessionId int64)

SetSessionId sets the session id

func (*BeginTransactionResponseMessage) SetTimestamp

func (msg *BeginTransactionResponseMessage) SetTimestamp(timestamp int64) tgdb.TGError

SetTimestamp sets the timestamp

func (*BeginTransactionResponseMessage) SetTransactionId

func (msg *BeginTransactionResponseMessage) SetTransactionId(txnId int64)

func (*BeginTransactionResponseMessage) SetVerbId

func (msg *BeginTransactionResponseMessage) SetVerbId(verbId int)

SetVerbId sets verbId of the message

func (*BeginTransactionResponseMessage) String

func (*BeginTransactionResponseMessage) ToBytes

func (msg *BeginTransactionResponseMessage) ToBytes() ([]byte, int, tgdb.TGError)

ToBytes converts a message object into byte format to be sent over the network to TGDB server

func (*BeginTransactionResponseMessage) UnmarshalBinary

func (msg *BeginTransactionResponseMessage) UnmarshalBinary(data []byte) error

UnmarshalBinary modifies the receiver so it must take a pointer receiver.

func (*BeginTransactionResponseMessage) UpdateSequenceAndTimeStamp

func (msg *BeginTransactionResponseMessage) UpdateSequenceAndTimeStamp(timestamp int64) tgdb.TGError

UpdateSequenceAndTimeStamp updates the SequenceAndTimeStamp, if message is mutable @param timestamp @return TGMessage on success, error on failure

func (*BeginTransactionResponseMessage) WriteHeader

WriteHeader exports the values of the common message header Attributes to output stream

func (*BeginTransactionResponseMessage) WritePayload

WritePayload exports the values of the message specific payload Attributes to output stream

type BlobAttribute

type BlobAttribute struct {
	*AbstractAttribute
	// contains filtered or unexported fields
}

func DefaultBlobAttribute

func DefaultBlobAttribute() *BlobAttribute

Create NewTGDecimal Attribute Instance

func NewBlobAttribute

func NewBlobAttribute(attrDesc *AttributeDescriptor) *BlobAttribute

func NewBlobAttributeWithDesc

func NewBlobAttributeWithDesc(ownerEntity tgdb.TGEntity, attrDesc *AttributeDescriptor, value interface{}) *BlobAttribute

func NewBlobAttributeWithOwner

func NewBlobAttributeWithOwner(ownerEntity tgdb.TGEntity) *BlobAttribute

func (*BlobAttribute) GetAsByteBuffer

func (obj *BlobAttribute) GetAsByteBuffer() *bytes.Buffer

func (*BlobAttribute) GetAsBytes

func (obj *BlobAttribute) GetAsBytes() []byte

func (*BlobAttribute) GetAttributeDescriptor

func (obj *BlobAttribute) GetAttributeDescriptor() tgdb.TGAttributeDescriptor

GetAttributeDescriptor returns the AttributeDescriptor for this attribute

func (*BlobAttribute) GetEntityId

func (obj *BlobAttribute) GetEntityId() int64

func (*BlobAttribute) GetIsCached

func (obj *BlobAttribute) GetIsCached() bool

func (*BlobAttribute) GetIsModified

func (obj *BlobAttribute) GetIsModified() bool

GetIsModified checks whether the attribute modified or not

func (*BlobAttribute) GetName

func (obj *BlobAttribute) GetName() string

GetName gets the Name for this attribute as the most generic form

func (*BlobAttribute) GetOwner

func (obj *BlobAttribute) GetOwner() tgdb.TGEntity

GetOwner gets owner Entity of this attribute

func (*BlobAttribute) GetValue

func (obj *BlobAttribute) GetValue() interface{}

GetValue gets the value for this attribute as the most generic form

func (*BlobAttribute) IsNull

func (obj *BlobAttribute) IsNull() bool

IsNull checks whether the attribute value is null or not

func (*BlobAttribute) MarshalBinary

func (obj *BlobAttribute) MarshalBinary() ([]byte, error)

func (*BlobAttribute) ReadExternal

func (obj *BlobAttribute) ReadExternal(is tgdb.TGInputStream) tgdb.TGError

ReadExternal reads the byte format from an external input stream and constructs a system object

func (*BlobAttribute) ReadValue

func (obj *BlobAttribute) ReadValue(is tgdb.TGInputStream) tgdb.TGError

ReadValue reads the value from input stream

func (*BlobAttribute) ResetIsModified

func (obj *BlobAttribute) ResetIsModified()

ResetIsModified resets the IsModified flag - recursively, if needed

func (*BlobAttribute) SetBlob

func (obj *BlobAttribute) SetBlob(b []byte)

func (*BlobAttribute) SetEntityId

func (obj *BlobAttribute) SetEntityId(eId int64)

func (*BlobAttribute) SetIsCached

func (obj *BlobAttribute) SetIsCached(flag bool)

func (*BlobAttribute) SetOwner

func (obj *BlobAttribute) SetOwner(ownerEntity tgdb.TGEntity)

SetOwner sets the owner entity - Need this indirection to traverse the chain

func (*BlobAttribute) SetValue

func (obj *BlobAttribute) SetValue(value interface{}) tgdb.TGError

SetValue sets the value for this attribute. Appropriate data conversion to its attribute desc will be performed If the object is Null, then the object is explicitly set, but no value is provided.

func (*BlobAttribute) String

func (obj *BlobAttribute) String() string

func (*BlobAttribute) UnmarshalBinary

func (obj *BlobAttribute) UnmarshalBinary(data []byte) error

func (*BlobAttribute) WriteExternal

func (obj *BlobAttribute) WriteExternal(os tgdb.TGOutputStream) tgdb.TGError

WriteExternal writes a system object into an appropriate byte format onto an external output stream

func (*BlobAttribute) WriteValue

func (obj *BlobAttribute) WriteValue(os tgdb.TGOutputStream) tgdb.TGError

WriteValue writes the value to output stream

type BlockingChannelResponse

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

func DefaultBlockingChannelResponse

func DefaultBlockingChannelResponse(reqId int64) *BlockingChannelResponse

func NewBlockingChannelResponse

func NewBlockingChannelResponse(reqId, rTimeout int64) *BlockingChannelResponse

func (*BlockingChannelResponse) Await

func (obj *BlockingChannelResponse) Await(tester tgdb.StatusTester)

Await waits (loops) till the channel response receives reply message from the server

func (*BlockingChannelResponse) GetCallback

func (obj *BlockingChannelResponse) GetCallback() tgdb.Callback

GetCallback gets a Callback object

func (*BlockingChannelResponse) GetReply

func (obj *BlockingChannelResponse) GetReply() tgdb.TGMessage

GetReply gets Reply object

func (*BlockingChannelResponse) GetRequestId

func (obj *BlockingChannelResponse) GetRequestId() int64

GetRequestId gets Request id

func (*BlockingChannelResponse) GetStatus

GetStatus gets Status

func (*BlockingChannelResponse) IsBlocking

func (obj *BlockingChannelResponse) IsBlocking() bool

IsBlocking checks whether this channel response is blocking or not

func (*BlockingChannelResponse) Reset

func (obj *BlockingChannelResponse) Reset()

Reset resets the state of channel response and initializes everything

func (*BlockingChannelResponse) SetReply

func (obj *BlockingChannelResponse) SetReply(msg tgdb.TGMessage)

SetReply sets the reply message received from the server

func (*BlockingChannelResponse) SetRequestId

func (obj *BlockingChannelResponse) SetRequestId(reqId int64)

SetRequestId sets Request id

func (*BlockingChannelResponse) Signal

func (obj *BlockingChannelResponse) Signal(cStatus tgdb.ChannelResponseStatus)

Signal lets other listeners of channel response know the status of this channel response

func (*BlockingChannelResponse) String

func (obj *BlockingChannelResponse) String() string

func (*BlockingChannelResponse) Test

Test checks whether the channel response is in WAIT mode or not

type BooleanAttribute

type BooleanAttribute struct {
	*AbstractAttribute
}

func DefaultBooleanAttribute

func DefaultBooleanAttribute() *BooleanAttribute

Create New Attribute Instance

func NewBooleanAttribute

func NewBooleanAttribute(attrDesc *AttributeDescriptor) *BooleanAttribute

func NewBooleanAttributeWithDesc

func NewBooleanAttributeWithDesc(ownerEntity tgdb.TGEntity, attrDesc *AttributeDescriptor, value interface{}) *BooleanAttribute

func NewBooleanAttributeWithOwner

func NewBooleanAttributeWithOwner(ownerEntity tgdb.TGEntity) *BooleanAttribute

func (*BooleanAttribute) GetAttributeDescriptor

func (obj *BooleanAttribute) GetAttributeDescriptor() tgdb.TGAttributeDescriptor

GetAttributeDescriptor returns the AttributeDescriptor for this attribute

func (*BooleanAttribute) GetIsModified

func (obj *BooleanAttribute) GetIsModified() bool

GetIsModified checks whether the attribute modified or not

func (*BooleanAttribute) GetName

func (obj *BooleanAttribute) GetName() string

GetName gets the Name for this attribute as the most generic form

func (*BooleanAttribute) GetOwner

func (obj *BooleanAttribute) GetOwner() tgdb.TGEntity

GetOwner gets owner Entity of this attribute

func (*BooleanAttribute) GetValue

func (obj *BooleanAttribute) GetValue() interface{}

GetValue gets the value for this attribute as the most generic form

func (*BooleanAttribute) IsNull

func (obj *BooleanAttribute) IsNull() bool

IsNull checks whether the attribute value is null or not

func (*BooleanAttribute) MarshalBinary

func (obj *BooleanAttribute) MarshalBinary() ([]byte, error)

func (*BooleanAttribute) ReadExternal

func (obj *BooleanAttribute) ReadExternal(is tgdb.TGInputStream) tgdb.TGError

ReadExternal reads the byte format from an external input stream and constructs a system object

func (*BooleanAttribute) ReadValue

func (obj *BooleanAttribute) ReadValue(is tgdb.TGInputStream) tgdb.TGError

ReadValue reads the value from input stream

func (*BooleanAttribute) ResetIsModified

func (obj *BooleanAttribute) ResetIsModified()

ResetIsModified resets the IsModified flag - recursively, if needed

func (*BooleanAttribute) SetBoolean

func (obj *BooleanAttribute) SetBoolean(b bool)

func (*BooleanAttribute) SetOwner

func (obj *BooleanAttribute) SetOwner(ownerEntity tgdb.TGEntity)

SetOwner sets the owner entity - Need this indirection to traverse the chain

func (*BooleanAttribute) SetValue

func (obj *BooleanAttribute) SetValue(value interface{}) tgdb.TGError

SetValue sets the value for this attribute. Appropriate data conversion to its attribute desc will be performed If the object is Null, then the object is explicitly set, but no value is provided.

func (*BooleanAttribute) String

func (obj *BooleanAttribute) String() string

func (*BooleanAttribute) UnmarshalBinary

func (obj *BooleanAttribute) UnmarshalBinary(data []byte) error

func (*BooleanAttribute) WriteExternal

func (obj *BooleanAttribute) WriteExternal(os tgdb.TGOutputStream) tgdb.TGError

WriteExternal writes a system object into an appropriate byte format onto an external output stream

func (*BooleanAttribute) WriteValue

func (obj *BooleanAttribute) WriteValue(os tgdb.TGOutputStream) tgdb.TGError

WriteValue writes the value to output stream

type ByteArrayEntity

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

func DefaultByteArrayEntity

func DefaultByteArrayEntity() *ByteArrayEntity

func NewByteArrayEntity

func NewByteArrayEntity(value []byte) *ByteArrayEntity

func NewByteArrayEntityAsInt

func NewByteArrayEntityAsInt(value int64) *ByteArrayEntity

func (*ByteArrayEntity) GetEntityId

func (obj *ByteArrayEntity) GetEntityId() []byte

func (*ByteArrayEntity) ReadExternal

func (obj *ByteArrayEntity) ReadExternal(is tgdb.TGInputStream) tgdb.TGError

ReadExternal reads the byte format from an external input stream and constructs a system object

func (*ByteArrayEntity) ToBytes

func (obj *ByteArrayEntity) ToBytes() ([]byte, tgdb.TGError)

ToBytes converts the Entity Id in binary format

func (*ByteArrayEntity) WriteExternal

func (obj *ByteArrayEntity) WriteExternal(os tgdb.TGOutputStream) tgdb.TGError

WriteExternal writes a system object into an appropriate byte format onto an external output stream

type ByteAttribute

type ByteAttribute struct {
	*AbstractAttribute
}

func DefaultByteAttribute

func DefaultByteAttribute() *ByteAttribute

Create New Attribute Instance

func NewByteAttribute

func NewByteAttribute(attrDesc *AttributeDescriptor) *ByteAttribute

func NewByteAttributeWithDesc

func NewByteAttributeWithDesc(ownerEntity tgdb.TGEntity, attrDesc *AttributeDescriptor, value interface{}) *ByteAttribute

func NewByteAttributeWithOwner

func NewByteAttributeWithOwner(ownerEntity tgdb.TGEntity) *ByteAttribute

func (*ByteAttribute) GetAttributeDescriptor

func (obj *ByteAttribute) GetAttributeDescriptor() tgdb.TGAttributeDescriptor

GetAttributeDescriptor returns the AttributeDescriptor for this attribute

func (*ByteAttribute) GetIsModified

func (obj *ByteAttribute) GetIsModified() bool

GetIsModified checks whether the attribute modified or not

func (*ByteAttribute) GetName

func (obj *ByteAttribute) GetName() string

GetName gets the Name for this attribute as the most generic form

func (*ByteAttribute) GetOwner

func (obj *ByteAttribute) GetOwner() tgdb.TGEntity

GetOwner gets owner Entity of this attribute

func (*ByteAttribute) GetValue

func (obj *ByteAttribute) GetValue() interface{}

GetValue gets the value for this attribute as the most generic form

func (*ByteAttribute) IsNull

func (obj *ByteAttribute) IsNull() bool

IsNull checks whether the attribute value is null or not

func (*ByteAttribute) MarshalBinary

func (obj *ByteAttribute) MarshalBinary() ([]byte, error)

func (*ByteAttribute) ReadExternal

func (obj *ByteAttribute) ReadExternal(is tgdb.TGInputStream) tgdb.TGError

ReadExternal reads the byte format from an external input stream and constructs a system object

func (*ByteAttribute) ReadValue

func (obj *ByteAttribute) ReadValue(is tgdb.TGInputStream) tgdb.TGError

ReadValue reads the value from input stream

func (*ByteAttribute) ResetIsModified

func (obj *ByteAttribute) ResetIsModified()

ResetIsModified resets the IsModified flag - recursively, if needed

func (*ByteAttribute) SetByte

func (obj *ByteAttribute) SetByte(b uint8)

func (*ByteAttribute) SetOwner

func (obj *ByteAttribute) SetOwner(ownerEntity tgdb.TGEntity)

SetOwner sets the owner entity - Need this indirection to traverse the chain

func (*ByteAttribute) SetValue

func (obj *ByteAttribute) SetValue(value interface{}) tgdb.TGError

SetValue sets the value for this attribute. Appropriate data conversion to its attribute desc will be performed If the object is Null, then the object is explicitly set, but no value is provided.

func (*ByteAttribute) String

func (obj *ByteAttribute) String() string

func (*ByteAttribute) UnmarshalBinary

func (obj *ByteAttribute) UnmarshalBinary(data []byte) error

func (*ByteAttribute) WriteExternal

func (obj *ByteAttribute) WriteExternal(os tgdb.TGOutputStream) tgdb.TGError

WriteExternal writes a system object into an appropriate byte format onto an external output stream

func (*ByteAttribute) WriteValue

func (obj *ByteAttribute) WriteValue(os tgdb.TGOutputStream) tgdb.TGError

WriteValue writes the value to output stream

type CacheStatisticsImpl

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

func DefaultCacheStatisticsImpl

func DefaultCacheStatisticsImpl() *CacheStatisticsImpl

func NewCacheStatisticsImpl

func NewCacheStatisticsImpl(_dataCacheMaxEntries, _dataCacheEntries int,
	_dataCacheHits, _dataCacheMisses, _dataCacheMaxMemory int64,
	_indexCacheMaxEntries, _indexCacheEntries int,
	_indexCacheHits, _indexCacheMisses, _indexCacheMaxMemory int64) *CacheStatisticsImpl

func (*CacheStatisticsImpl) GetDataCacheEntries

func (obj *CacheStatisticsImpl) GetDataCacheEntries() int

GetDataCacheEntries returns the data-cache entries

func (*CacheStatisticsImpl) GetDataCacheHits

func (obj *CacheStatisticsImpl) GetDataCacheHits() int64

GetDataCacheHits returns the data-cache hits

func (*CacheStatisticsImpl) GetDataCacheMaxEntries

func (obj *CacheStatisticsImpl) GetDataCacheMaxEntries() int

GetDataCacheMaxEntries returns the data-cache max entries

func (*CacheStatisticsImpl) GetDataCacheMaxMemory

func (obj *CacheStatisticsImpl) GetDataCacheMaxMemory() int64

GetDataCacheMaxMemory returns the data-cache max memory

func (*CacheStatisticsImpl) GetDataCacheMisses

func (obj *CacheStatisticsImpl) GetDataCacheMisses() int64

GetDataCacheMisses returns the data-cache misses

func (*CacheStatisticsImpl) GetIndexCacheEntries

func (obj *CacheStatisticsImpl) GetIndexCacheEntries() int

GetIndexCacheEntries returns the index-cache entries

func (*CacheStatisticsImpl) GetIndexCacheHits

func (obj *CacheStatisticsImpl) GetIndexCacheHits() int64

GetIndexCacheHits returns the index-cache hits

func (*CacheStatisticsImpl) GetIndexCacheMaxEntries

func (obj *CacheStatisticsImpl) GetIndexCacheMaxEntries() int

GetIndexCacheMaxEntries returns the index-cache max entries

func (*CacheStatisticsImpl) GetIndexCacheMaxMemory

func (obj *CacheStatisticsImpl) GetIndexCacheMaxMemory() int64

GetIndexCacheMaxMemory returns the index-cache max memory

func (*CacheStatisticsImpl) GetIndexCacheMisses

func (obj *CacheStatisticsImpl) GetIndexCacheMisses() int64

GetIndexCacheMisses returns the index-cache misses

func (*CacheStatisticsImpl) MarshalBinary

func (obj *CacheStatisticsImpl) MarshalBinary() ([]byte, error)

func (*CacheStatisticsImpl) String

func (obj *CacheStatisticsImpl) String() string

func (*CacheStatisticsImpl) UnmarshalBinary

func (obj *CacheStatisticsImpl) UnmarshalBinary(data []byte) error

type ChannelDisconnected

type ChannelDisconnected struct {
	*TGDBError
}

func DefaultTGChannelDisconnected

func DefaultTGChannelDisconnected() *ChannelDisconnected

Create New ChannelDisconnected Instance

func NewTGChannelDisconnected

func NewTGChannelDisconnected(eCode string, eType int, eMsg, eDetails string) *ChannelDisconnected

func NewTGChannelDisconnectedWithMsg

func NewTGChannelDisconnectedWithMsg(msg string) *ChannelDisconnected

func (*ChannelDisconnected) Error

func (e *ChannelDisconnected) Error() string

func (*ChannelDisconnected) GetErrorCode

func (e *ChannelDisconnected) GetErrorCode() string

func (*ChannelDisconnected) GetErrorDetails

func (e *ChannelDisconnected) GetErrorDetails() string

func (*ChannelDisconnected) GetErrorMsg

func (e *ChannelDisconnected) GetErrorMsg() string

func (*ChannelDisconnected) GetErrorType

func (e *ChannelDisconnected) GetErrorType() int

type ChannelMessageTracer

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

func DefaultChannelMessageTracer

func DefaultChannelMessageTracer() *ChannelMessageTracer

func NewChannelMessageTracer

func NewChannelMessageTracer(queue *SimpleQueue, client, traceDir string) *ChannelMessageTracer

func (*ChannelMessageTracer) Start

func (obj *ChannelMessageTracer) Start()

Start starts the channel message tracer

func (*ChannelMessageTracer) Stop

func (obj *ChannelMessageTracer) Stop()

Stop stops the channel message tracer

func (*ChannelMessageTracer) String

func (obj *ChannelMessageTracer) String() string

type ChannelReader

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

func DefaultChannelReader

func DefaultChannelReader() *ChannelReader

func NewChannelReader

func NewChannelReader(rChannel tgdb.TGChannel) *ChannelReader

func (*ChannelReader) Start

func (obj *ChannelReader) Start()

Start starts the channel reader

func (*ChannelReader) Stop

func (obj *ChannelReader) Stop()

Stop stops the channel reader

func (*ChannelReader) String

func (obj *ChannelReader) String() string

type ChannelTracer

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

func DefaultChannelTracer

func DefaultChannelTracer() *ChannelTracer

func NewChannelTracer

func NewChannelTracer(client, traceDir string) *ChannelTracer

func (*ChannelTracer) Start

func (obj *ChannelTracer) Start()

Start starts the channel tracer

func (*ChannelTracer) Stop

func (obj *ChannelTracer) Stop()

Stop stops the channel tracer

func (*ChannelTracer) String

func (obj *ChannelTracer) String() string

func (*ChannelTracer) Trace

func (obj *ChannelTracer) Trace(msg tgdb.TGMessage)

Trace traces the path the message has taken

type CharAttribute

type CharAttribute struct {
	*AbstractAttribute
}

func DefaultCharAttribute

func DefaultCharAttribute() *CharAttribute

Create NewTGDecimal Attribute Instance

func NewCharAttribute

func NewCharAttribute(attrDesc *AttributeDescriptor) *CharAttribute

func NewCharAttributeWithDesc

func NewCharAttributeWithDesc(ownerEntity tgdb.TGEntity, attrDesc *AttributeDescriptor, value interface{}) *CharAttribute

func NewCharAttributeWithOwner

func NewCharAttributeWithOwner(ownerEntity tgdb.TGEntity) *CharAttribute

func (*CharAttribute) GetAttributeDescriptor

func (obj *CharAttribute) GetAttributeDescriptor() tgdb.TGAttributeDescriptor

GetAttributeDescriptor returns the AttributeDescriptor for this attribute

func (*CharAttribute) GetIsModified

func (obj *CharAttribute) GetIsModified() bool

GetIsModified checks whether the attribute modified or not

func (*CharAttribute) GetName

func (obj *CharAttribute) GetName() string

GetName gets the Name for this attribute as the most generic form

func (*CharAttribute) GetOwner

func (obj *CharAttribute) GetOwner() tgdb.TGEntity

GetOwner gets owner Entity of this attribute

func (*CharAttribute) GetValue

func (obj *CharAttribute) GetValue() interface{}

GetValue gets the value for this attribute as the most generic form

func (*CharAttribute) IsNull

func (obj *CharAttribute) IsNull() bool

IsNull checks whether the attribute value is null or not

func (*CharAttribute) MarshalBinary

func (obj *CharAttribute) MarshalBinary() ([]byte, error)

func (*CharAttribute) ReadExternal

func (obj *CharAttribute) ReadExternal(is tgdb.TGInputStream) tgdb.TGError

ReadExternal reads the byte format from an external input stream and constructs a system object

func (*CharAttribute) ReadValue

func (obj *CharAttribute) ReadValue(is tgdb.TGInputStream) tgdb.TGError

ReadValue reads the value from input stream

func (*CharAttribute) ResetIsModified

func (obj *CharAttribute) ResetIsModified()

ResetIsModified resets the IsModified flag - recursively, if needed

func (*CharAttribute) SetChar

func (obj *CharAttribute) SetChar(v int32)

func (*CharAttribute) SetOwner

func (obj *CharAttribute) SetOwner(ownerEntity tgdb.TGEntity)

SetOwner sets the owner entity - Need this indirection to traverse the chain

func (*CharAttribute) SetValue

func (obj *CharAttribute) SetValue(value interface{}) tgdb.TGError

SetValue sets the value for this attribute. Appropriate data conversion to its attribute desc will be performed If the object is Null, then the object is explicitly set, but no value is provided.

func (*CharAttribute) String

func (obj *CharAttribute) String() string

func (*CharAttribute) UnmarshalBinary

func (obj *CharAttribute) UnmarshalBinary(data []byte) error

func (*CharAttribute) WriteExternal

func (obj *CharAttribute) WriteExternal(os tgdb.TGOutputStream) tgdb.TGError

WriteExternal writes a system object into an appropriate byte format onto an external output stream

func (*CharAttribute) WriteValue

func (obj *CharAttribute) WriteValue(os tgdb.TGOutputStream) tgdb.TGError

WriteValue writes the value to output stream

type ClobAttribute

type ClobAttribute struct {
	*BlobAttribute
}

func DefaultClobAttribute

func DefaultClobAttribute() *ClobAttribute

Create New Attribute Instance

func NewClobAttribute

func NewClobAttribute(attrDesc *AttributeDescriptor) *ClobAttribute

func NewClobAttributeWithDesc

func NewClobAttributeWithDesc(ownerEntity tgdb.TGEntity, attrDesc *AttributeDescriptor, value interface{}) *ClobAttribute

func NewClobAttributeWithOwner

func NewClobAttributeWithOwner(ownerEntity tgdb.TGEntity) *ClobAttribute

func (*ClobAttribute) GetAttributeDescriptor

func (obj *ClobAttribute) GetAttributeDescriptor() tgdb.TGAttributeDescriptor

GetAttributeDescriptor returns the AttributeDescriptor for this attribute

func (*ClobAttribute) GetIsModified

func (obj *ClobAttribute) GetIsModified() bool

GetIsModified checks whether the attribute modified or not

func (*ClobAttribute) GetName

func (obj *ClobAttribute) GetName() string

GetName gets the Name for this attribute as the most generic form

func (*ClobAttribute) GetOwner

func (obj *ClobAttribute) GetOwner() tgdb.TGEntity

GetOwner gets owner Entity of this attribute

func (*ClobAttribute) GetValue

func (obj *ClobAttribute) GetValue() interface{}

GetValue gets the value for this attribute as the most generic form

func (*ClobAttribute) IsNull

func (obj *ClobAttribute) IsNull() bool

IsNull checks whether the attribute value is null or not

func (*ClobAttribute) MarshalBinary

func (obj *ClobAttribute) MarshalBinary() ([]byte, error)

func (*ClobAttribute) ReadExternal

func (obj *ClobAttribute) ReadExternal(is tgdb.TGInputStream) tgdb.TGError

ReadExternal reads the byte format from an external input stream and constructs a system object

func (*ClobAttribute) ReadValue

func (obj *ClobAttribute) ReadValue(is tgdb.TGInputStream) tgdb.TGError

ReadValue reads the value from input stream

func (*ClobAttribute) ResetIsModified

func (obj *ClobAttribute) ResetIsModified()

ResetIsModified resets the IsModified flag - recursively, if needed

func (*ClobAttribute) SetCharBuffer

func (obj *ClobAttribute) SetCharBuffer(b string)

func (*ClobAttribute) SetOwner

func (obj *ClobAttribute) SetOwner(ownerEntity tgdb.TGEntity)

SetOwner sets the owner entity - Need this indirection to traverse the chain

func (*ClobAttribute) SetValue

func (obj *ClobAttribute) SetValue(value interface{}) tgdb.TGError

SetValue sets the value for this attribute. Appropriate data conversion to its attribute desc will be performed If the object is Null, then the object is explicitly set, but no value is provided.

func (*ClobAttribute) String

func (obj *ClobAttribute) String() string

func (*ClobAttribute) UnmarshalBinary

func (obj *ClobAttribute) UnmarshalBinary(data []byte) error

func (*ClobAttribute) WriteExternal

func (obj *ClobAttribute) WriteExternal(os tgdb.TGOutputStream) tgdb.TGError

WriteExternal writes a system object into an appropriate byte format onto an external output stream

func (*ClobAttribute) WriteValue

func (obj *ClobAttribute) WriteValue(os tgdb.TGOutputStream) tgdb.TGError

WriteValue writes the value to output stream

type CommandVerbs

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

func GetVerb

func GetVerb(id int) *CommandVerbs

Return the commandVerbs given its id @param id VerbId @return commandVerbs associated to the id

func NewVerbId

func NewVerbId(id int, name, impl string) *CommandVerbs

func VerbIdFromBytes

func VerbIdFromBytes(buffer []byte) (*CommandVerbs, tgdb.TGError)

VerbIdFromBytes extracts message type from the input buffer in the byte format

func (*CommandVerbs) GetID

func (obj *CommandVerbs) GetID() int

func (*CommandVerbs) GetImplementor

func (obj *CommandVerbs) GetImplementor() string

func (*CommandVerbs) GetName

func (obj *CommandVerbs) GetName() string

type CommitTransactionRequest

type CommitTransactionRequest struct {
	*AbstractProtocolMessage
	// contains filtered or unexported fields
}

func DefaultCommitTransactionRequestMessage

func DefaultCommitTransactionRequestMessage() *CommitTransactionRequest

func NewCommitTransactionRequestMessage

func NewCommitTransactionRequestMessage(authToken, sessionId int64) *CommitTransactionRequest

Create New Message Instance

func (*CommitTransactionRequest) AddCommitLists

func (msg *CommitTransactionRequest) AddCommitLists(addedList, updatedList, removedList map[int64]tgdb.TGEntity, attrDescriptors []tgdb.TGAttributeDescriptor) *CommitTransactionRequest

func (*CommitTransactionRequest) FromBytes

func (msg *CommitTransactionRequest) FromBytes(buffer []byte) (tgdb.TGMessage, tgdb.TGError)

FromBytes constructs a message object from the input buffer in the byte format

func (*CommitTransactionRequest) GetAddedList

func (msg *CommitTransactionRequest) GetAddedList() map[int64]tgdb.TGEntity

func (*CommitTransactionRequest) GetAttrDescSet

func (msg *CommitTransactionRequest) GetAttrDescSet() []tgdb.TGAttributeDescriptor

func (*CommitTransactionRequest) GetAuthToken

func (msg *CommitTransactionRequest) GetAuthToken() int64

GetAuthToken gets the authToken

func (*CommitTransactionRequest) GetIsUpdatable

func (msg *CommitTransactionRequest) GetIsUpdatable() bool

GetIsUpdatable checks whether this message updatable or not

func (*CommitTransactionRequest) GetMessageByteBufLength

func (msg *CommitTransactionRequest) GetMessageByteBufLength() int

GetMessageByteBufLength gets the MessageByteBufLength. This method is called after the toBytes() is executed.

func (*CommitTransactionRequest) GetRemovedList

func (msg *CommitTransactionRequest) GetRemovedList() map[int64]tgdb.TGEntity

func (*CommitTransactionRequest) GetRequestId

func (msg *CommitTransactionRequest) GetRequestId() int64

GetRequestId gets the requestId for the message. This will be used as the CorrelationId

func (*CommitTransactionRequest) GetSequenceNo

func (msg *CommitTransactionRequest) GetSequenceNo() int64

GetSequenceNo gets the sequenceNo of the message

func (*CommitTransactionRequest) GetSessionId

func (msg *CommitTransactionRequest) GetSessionId() int64

GetSessionId gets the session id

func (*CommitTransactionRequest) GetTimestamp

func (msg *CommitTransactionRequest) GetTimestamp() int64

GetTimestamp gets the Timestamp

func (*CommitTransactionRequest) GetUpdatedList

func (msg *CommitTransactionRequest) GetUpdatedList() map[int64]tgdb.TGEntity

func (*CommitTransactionRequest) GetVerbId

func (msg *CommitTransactionRequest) GetVerbId() int

GetVerbId gets verbId of the message

func (*CommitTransactionRequest) MarshalBinary

func (msg *CommitTransactionRequest) MarshalBinary() ([]byte, error)

func (*CommitTransactionRequest) ReadHeader

ReadHeader reads the bytes from input stream and constructs a common header of network packet

func (*CommitTransactionRequest) ReadPayload

ReadPayload reads the bytes from input stream and constructs message specific payload Attributes

func (*CommitTransactionRequest) SetAuthToken

func (msg *CommitTransactionRequest) SetAuthToken(authToken int64)

SetAuthToken sets the authToken

func (*CommitTransactionRequest) SetDataOffset

func (msg *CommitTransactionRequest) SetDataOffset(dataOffset int16)

SetDataOffset sets the offset at which data starts in the payload

func (*CommitTransactionRequest) SetIsUpdatable

func (msg *CommitTransactionRequest) SetIsUpdatable(updateFlag bool)

SetIsUpdatable sets the updatable flag

func (*CommitTransactionRequest) SetMessageByteBufLength

func (msg *CommitTransactionRequest) SetMessageByteBufLength(bufLength int)

SetMessageByteBufLength sets the message buffer length

func (*CommitTransactionRequest) SetRequestId

func (msg *CommitTransactionRequest) SetRequestId(requestId int64)

SetRequestId sets the request id

func (*CommitTransactionRequest) SetSequenceNo

func (msg *CommitTransactionRequest) SetSequenceNo(sequenceNo int64)

SetSequenceNo sets the sequenceNo

func (*CommitTransactionRequest) SetSessionId

func (msg *CommitTransactionRequest) SetSessionId(sessionId int64)

SetSessionId sets the session id

func (*CommitTransactionRequest) SetTimestamp

func (msg *CommitTransactionRequest) SetTimestamp(timestamp int64) tgdb.TGError

SetTimestamp sets the timestamp

func (*CommitTransactionRequest) SetVerbId

func (msg *CommitTransactionRequest) SetVerbId(verbId int)

SetVerbId sets verbId of the message

func (*CommitTransactionRequest) String

func (msg *CommitTransactionRequest) String() string

func (*CommitTransactionRequest) ToBytes

func (msg *CommitTransactionRequest) ToBytes() ([]byte, int, tgdb.TGError)

ToBytes converts a message object into byte format to be sent over the network to TGDB server

func (*CommitTransactionRequest) UnmarshalBinary

func (msg *CommitTransactionRequest) UnmarshalBinary(data []byte) error

UnmarshalBinary modifies the receiver so it must take a pointer receiver.

func (*CommitTransactionRequest) UpdateSequenceAndTimeStamp

func (msg *CommitTransactionRequest) UpdateSequenceAndTimeStamp(timestamp int64) tgdb.TGError

UpdateSequenceAndTimeStamp updates the SequenceAndTimeStamp, if message is mutable @param timestamp @return TGMessage on success, error on failure

func (*CommitTransactionRequest) WriteHeader

WriteHeader exports the values of the common message header Attributes to output stream

func (*CommitTransactionRequest) WritePayload

WritePayload exports the values of the message specific payload Attributes to output stream

type CommitTransactionResponse

type CommitTransactionResponse struct {
	*AbstractProtocolMessage
	// contains filtered or unexported fields
}

func DefaultCommitTransactionResponseMessage

func DefaultCommitTransactionResponseMessage() *CommitTransactionResponse

func NewCommitTransactionResponseMessage

func NewCommitTransactionResponseMessage(authToken, sessionId int64) *CommitTransactionResponse

Create New Message Instance

func (*CommitTransactionResponse) FromBytes

func (msg *CommitTransactionResponse) FromBytes(buffer []byte) (tgdb.TGMessage, tgdb.TGError)

FromBytes constructs a message object from the input buffer in the byte format

func (*CommitTransactionResponse) GetAddedEntityCount

func (msg *CommitTransactionResponse) GetAddedEntityCount() int

func (*CommitTransactionResponse) GetAddedIdList

func (msg *CommitTransactionResponse) GetAddedIdList() []int64

func (*CommitTransactionResponse) GetAttrDescCount

func (msg *CommitTransactionResponse) GetAttrDescCount() int

func (*CommitTransactionResponse) GetAttrDescIdList

func (msg *CommitTransactionResponse) GetAttrDescIdList() []int64

func (*CommitTransactionResponse) GetAuthToken

func (msg *CommitTransactionResponse) GetAuthToken() int64

GetAuthToken gets the authToken

func (*CommitTransactionResponse) GetException

func (msg *CommitTransactionResponse) GetException() *TransactionException

func (*CommitTransactionResponse) GetIsUpdatable

func (msg *CommitTransactionResponse) GetIsUpdatable() bool

GetIsUpdatable checks whether this message updatable or not

func (*CommitTransactionResponse) GetMessageByteBufLength

func (msg *CommitTransactionResponse) GetMessageByteBufLength() int

GetMessageByteBufLength gets the MessageByteBufLength. This method is called after the toBytes() is executed.

func (*CommitTransactionResponse) GetRemovedEntityCount

func (msg *CommitTransactionResponse) GetRemovedEntityCount() int

func (*CommitTransactionResponse) GetRemovedIdList

func (msg *CommitTransactionResponse) GetRemovedIdList() []int64

func (*CommitTransactionResponse) GetRequestId

func (msg *CommitTransactionResponse) GetRequestId() int64

GetRequestId gets the requestId for the message. This will be used as the CorrelationId

func (*CommitTransactionResponse) GetSequenceNo

func (msg *CommitTransactionResponse) GetSequenceNo() int64

GetSequenceNo gets the sequenceNo of the message

func (*CommitTransactionResponse) GetSessionId

func (msg *CommitTransactionResponse) GetSessionId() int64

GetSessionId gets the session id

func (*CommitTransactionResponse) GetTimestamp

func (msg *CommitTransactionResponse) GetTimestamp() int64

GetTimestamp gets the Timestamp

func (*CommitTransactionResponse) GetUpdatedEntityCount

func (msg *CommitTransactionResponse) GetUpdatedEntityCount() int

func (*CommitTransactionResponse) GetUpdatedIdList

func (msg *CommitTransactionResponse) GetUpdatedIdList() []int64

func (*CommitTransactionResponse) GetVerbId

func (msg *CommitTransactionResponse) GetVerbId() int

GetVerbId gets verbId of the message

func (*CommitTransactionResponse) HasException

func (msg *CommitTransactionResponse) HasException() bool

func (*CommitTransactionResponse) MarshalBinary

func (msg *CommitTransactionResponse) MarshalBinary() ([]byte, error)

func (*CommitTransactionResponse) ReadHeader

ReadHeader reads the bytes from input stream and constructs a common header of network packet

func (*CommitTransactionResponse) ReadPayload

ReadPayload reads the bytes from input stream and constructs message specific payload Attributes

func (*CommitTransactionResponse) SetAddEntityCount

func (msg *CommitTransactionResponse) SetAddEntityCount(count int)

func (*CommitTransactionResponse) SetAddedIdList

func (msg *CommitTransactionResponse) SetAddedIdList(list []int64)

func (*CommitTransactionResponse) SetAttrDescCount

func (msg *CommitTransactionResponse) SetAttrDescCount(count int)

func (*CommitTransactionResponse) SetAttrDescId

func (msg *CommitTransactionResponse) SetAttrDescId(list []int64)

func (*CommitTransactionResponse) SetAuthToken

func (msg *CommitTransactionResponse) SetAuthToken(authToken int64)

SetAuthToken sets the authToken

func (*CommitTransactionResponse) SetDataOffset

func (msg *CommitTransactionResponse) SetDataOffset(dataOffset int16)

SetDataOffset sets the offset at which data starts in the payload

func (*CommitTransactionResponse) SetIsUpdatable

func (msg *CommitTransactionResponse) SetIsUpdatable(updateFlag bool)

SetIsUpdatable sets the updatable flag

func (*CommitTransactionResponse) SetMessageByteBufLength

func (msg *CommitTransactionResponse) SetMessageByteBufLength(bufLength int)

SetMessageByteBufLength sets the message buffer length

func (*CommitTransactionResponse) SetRemovedEntityCount

func (msg *CommitTransactionResponse) SetRemovedEntityCount(count int)

func (*CommitTransactionResponse) SetRemovedIdList

func (msg *CommitTransactionResponse) SetRemovedIdList(list []int64)

func (*CommitTransactionResponse) SetRequestId

func (msg *CommitTransactionResponse) SetRequestId(requestId int64)

SetRequestId sets the request id

func (*CommitTransactionResponse) SetSequenceNo

func (msg *CommitTransactionResponse) SetSequenceNo(sequenceNo int64)

SetSequenceNo sets the sequenceNo

func (*CommitTransactionResponse) SetSessionId

func (msg *CommitTransactionResponse) SetSessionId(sessionId int64)

SetSessionId sets the session id

func (*CommitTransactionResponse) SetTimestamp

func (msg *CommitTransactionResponse) SetTimestamp(timestamp int64) tgdb.TGError

SetTimestamp sets the timestamp

func (*CommitTransactionResponse) SetUpdatedEntityCount

func (msg *CommitTransactionResponse) SetUpdatedEntityCount(count int)

func (*CommitTransactionResponse) SetUpdatedIdList

func (msg *CommitTransactionResponse) SetUpdatedIdList(list []int64)

func (*CommitTransactionResponse) SetVerbId

func (msg *CommitTransactionResponse) SetVerbId(verbId int)

SetVerbId sets verbId of the message

func (*CommitTransactionResponse) String

func (msg *CommitTransactionResponse) String() string

func (*CommitTransactionResponse) ToBytes

func (msg *CommitTransactionResponse) ToBytes() ([]byte, int, tgdb.TGError)

ToBytes converts a message object into byte format to be sent over the network to TGDB server

func (*CommitTransactionResponse) UnmarshalBinary

func (msg *CommitTransactionResponse) UnmarshalBinary(data []byte) error

UnmarshalBinary modifies the receiver so it must take a pointer receiver.

func (*CommitTransactionResponse) UpdateSequenceAndTimeStamp

func (msg *CommitTransactionResponse) UpdateSequenceAndTimeStamp(timestamp int64) tgdb.TGError

UpdateSequenceAndTimeStamp updates the SequenceAndTimeStamp, if message is mutable @param timestamp @return TGMessage on success, error on failure

func (*CommitTransactionResponse) WriteHeader

WriteHeader exports the values of the common message header Attributes to output stream

func (*CommitTransactionResponse) WritePayload

WritePayload exports the values of the message specific payload Attributes to output stream

type CompositeKey

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

func NewCompositeKey

func NewCompositeKey(graphMetadata *GraphMetadata, typeName string) *CompositeKey

func (*CompositeKey) GetAttributes

func (obj *CompositeKey) GetAttributes() map[string]tgdb.TGAttribute

func (*CompositeKey) GetKeyName

func (obj *CompositeKey) GetKeyName() string

func (*CompositeKey) MarshalBinary

func (obj *CompositeKey) MarshalBinary() ([]byte, error)

func (*CompositeKey) ReadExternal

func (obj *CompositeKey) ReadExternal(is tgdb.TGInputStream) tgdb.TGError

ReadExternal reads the byte format from an external input stream and constructs a system object

func (*CompositeKey) SetAttributes

func (obj *CompositeKey) SetAttributes(attrs map[string]tgdb.TGAttribute)

func (*CompositeKey) SetKeyName

func (obj *CompositeKey) SetKeyName(name string)

func (*CompositeKey) SetOrCreateAttribute

func (obj *CompositeKey) SetOrCreateAttribute(name string, value interface{}) tgdb.TGError

Dynamically set the attribute to this entity. If the AttributeDescriptor doesn't exist in the database, create a new one.

func (*CompositeKey) UnmarshalBinary

func (obj *CompositeKey) UnmarshalBinary(data []byte) error

func (*CompositeKey) WriteExternal

func (obj *CompositeKey) WriteExternal(os tgdb.TGOutputStream) tgdb.TGError

WriteExternal writes a system object into an appropriate byte format onto an external output stream

type ConfigName

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

func GetConfig

func GetConfig(name string) *ConfigName

func GetConfigFromKey

func GetConfigFromKey(key int) *ConfigName

GetConfigFromKey returns the TGConfigName given its full qualified string form or its alias Name.

func GetConfigFromName

func GetConfigFromName(name string) *ConfigName

GetConfigFromKey returns the TGConfigName for specified Name

func NewConfigName

func NewConfigName(name, alias string, value string) *ConfigName

func (*ConfigName) GetAlias

func (c *ConfigName) GetAlias() string

GetAlias gets configuration Alias

func (*ConfigName) GetDefaultValue

func (c *ConfigName) GetDefaultValue() string

GetDefaultValue gets configuration Default Value

func (*ConfigName) GetDesc

func (c *ConfigName) GetDesc() string

GetDesc gets configuration description

func (*ConfigName) GetName

func (c *ConfigName) GetName() string

GetName gets configuration Name

func (*ConfigName) SetDesc

func (c *ConfigName) SetDesc(desc string)

SetDesc sets configuration description

type ConnectionInfoImpl

type ConnectionInfoImpl struct {
	ListenerName         string
	ClientID             string
	SessionID            int64
	UserName             string
	RemoteAddress        string
	CreatedTimeInSeconds int64
}

func DefaultConnectionInfoImpl

func DefaultConnectionInfoImpl() *ConnectionInfoImpl

func NewConnectionInfoImpl

func NewConnectionInfoImpl(_listnerName, _clientID string, _sessionID int64,
	_userName, _remoteAddress string, _createdTimeInSeconds int64) *ConnectionInfoImpl

func (*ConnectionInfoImpl) GetClientID

func (obj *ConnectionInfoImpl) GetClientID() string

GetClientID returns a client ID of listener

func (*ConnectionInfoImpl) GetCreatedTimeInSeconds

func (obj *ConnectionInfoImpl) GetCreatedTimeInSeconds() int64

GetCreatedTimeInSeconds returns a time when the listener was created

func (*ConnectionInfoImpl) GetListenerName

func (obj *ConnectionInfoImpl) GetListenerName() string

GetListenerName returns a Name of a particular listener

func (*ConnectionInfoImpl) GetRemoteAddress

func (obj *ConnectionInfoImpl) GetRemoteAddress() string

GetRemoteAddress returns a remote address of listener

func (*ConnectionInfoImpl) GetSessionID

func (obj *ConnectionInfoImpl) GetSessionID() int64

GetSessionID returns a session ID of listener

func (*ConnectionInfoImpl) GetUserName

func (obj *ConnectionInfoImpl) GetUserName() string

GetUserName returns a user-Name associated with listener

func (*ConnectionInfoImpl) MarshalBinary

func (obj *ConnectionInfoImpl) MarshalBinary() ([]byte, error)

func (*ConnectionInfoImpl) String

func (obj *ConnectionInfoImpl) String() string

func (*ConnectionInfoImpl) UnmarshalBinary

func (obj *ConnectionInfoImpl) UnmarshalBinary(data []byte) error

type ConnectionPoolImpl

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

func NewTGConnectionPool

func NewTGConnectionPool(url tgdb.TGChannelUrl, poolSize int, props *SortedProperties, connType tgdb.TypeConnection) *ConnectionPoolImpl

func (*ConnectionPoolImpl) AdminLock

func (obj *ConnectionPoolImpl) AdminLock()

AdminLock locks the connection pool so that the list of connections can be updated

func (*ConnectionPoolImpl) AdminUnlock

func (obj *ConnectionPoolImpl) AdminUnlock()

AdminUnlock unlocks the connection pool so that the list of connections can be updated

func (*ConnectionPoolImpl) Connect

func (obj *ConnectionPoolImpl) Connect() tgdb.TGError

Connect establishes connection from this pool of available/configured connections to the TGDB server Exception could be BadAuthentication or BadUrl

func (*ConnectionPoolImpl) Disconnect

func (obj *ConnectionPoolImpl) Disconnect() tgdb.TGError

Disconnect breaks the connection from the TGDB server and returns the connection back to this connection pool for reuse

func (*ConnectionPoolImpl) Get

Get a free connection The property ConnectionReserveTimeoutSeconds or tgdb.connectionpool.ConnectionReserveTimeoutSeconds specifies the time to wait in seconds. It has the following meaning 0 : Indefinite -1 : Immediate &gt; : That many seconds

func (*ConnectionPoolImpl) GetActiveConnections

func (obj *ConnectionPoolImpl) GetActiveConnections() map[int64]tgdb.TGConnection

GetActiveConnections returns all the Active/In-Use connections

func (*ConnectionPoolImpl) GetConnection

func (obj *ConnectionPoolImpl) GetConnection() (tgdb.TGConnection, tgdb.TGError)

GetConnection returns an available connection from the pool that is NOT being used or nil if timeout elapses

func (*ConnectionPoolImpl) GetConnectionList

func (obj *ConnectionPoolImpl) GetConnectionList() []tgdb.TGConnection

GetConnectionList returns all the connections = Active/In-Use + Un-used/Initialized

func (*ConnectionPoolImpl) GetConnectionProperties

func (obj *ConnectionPoolImpl) GetConnectionProperties() tgdb.TGProperties

GetConnectionProperties returns all the connection properties

func (*ConnectionPoolImpl) GetNoOfActiveConnections

func (obj *ConnectionPoolImpl) GetNoOfActiveConnections() int

GetNoOfActiveConnections returns the count of Active/In-Use connections

func (*ConnectionPoolImpl) GetPoolSize

func (obj *ConnectionPoolImpl) GetPoolSize() int

GetPoolSize gets pool size

func (*ConnectionPoolImpl) GetPoolState

func (obj *ConnectionPoolImpl) GetPoolState() int

GetPoolState returns current state of the connection pool

func (*ConnectionPoolImpl) ReleaseConnection

func (obj *ConnectionPoolImpl) ReleaseConnection(conn tgdb.TGConnection) (tgdb.TGConnectionPool, tgdb.TGError)

ReleaseConnection frees the connection and sends back to the pool

func (*ConnectionPoolImpl) SetExceptionListener

func (obj *ConnectionPoolImpl) SetExceptionListener(listener tgdb.TGConnectionExceptionListener)

SetExceptionListener sets exception listener

func (*ConnectionPoolImpl) String

func (obj *ConnectionPoolImpl) String() string

type ConnectionTimeout

type ConnectionTimeout struct {
	*TGDBError
}

func DefaultTGConnectionTimeout

func DefaultTGConnectionTimeout() *ConnectionTimeout

Create New ConnectionTimeout Instance

func NewTGConnectionTimeout

func NewTGConnectionTimeout(eCode string, eType int, eMsg, eDetails string) *ConnectionTimeout

func NewTGConnectionTimeoutWithMsg

func NewTGConnectionTimeoutWithMsg(msg string) *ConnectionTimeout

func (*ConnectionTimeout) Error

func (e *ConnectionTimeout) Error() string

func (*ConnectionTimeout) GetErrorCode

func (e *ConnectionTimeout) GetErrorCode() string

func (*ConnectionTimeout) GetErrorDetails

func (e *ConnectionTimeout) GetErrorDetails() string

func (*ConnectionTimeout) GetErrorMsg

func (e *ConnectionTimeout) GetErrorMsg() string

func (*ConnectionTimeout) GetErrorType

func (e *ConnectionTimeout) GetErrorType() int

type DataCryptoGrapher

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

func DefaultDataCryptoGrapher

func DefaultDataCryptoGrapher() *DataCryptoGrapher

func NewDataCryptoGrapher

func NewDataCryptoGrapher(sessionId int64, serverCertBytes []byte) (*DataCryptoGrapher, tgdb.TGError)

func (*DataCryptoGrapher) Decrypt

func (obj *DataCryptoGrapher) Decrypt(is tgdb.TGInputStream) ([]byte, tgdb.TGError)

Decrypt decrypts the buffer func (obj *DataCryptoGrapher) Decrypt(encBuffer []byte) ([]byte, types.TGError) {

func (*DataCryptoGrapher) Encrypt

func (obj *DataCryptoGrapher) Encrypt(rawBuf []byte) ([]byte, tgdb.TGError)

Encrypt encrypts the buffer

func (*DataCryptoGrapher) String

func (obj *DataCryptoGrapher) String() string

type DatabaseStatisticsImpl

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

func DefaultDatabaseStatisticsImpl

func DefaultDatabaseStatisticsImpl() *DatabaseStatisticsImpl

func NewDatabaseStatisticsImpl

func NewDatabaseStatisticsImpl(_dbSize int64, _numDataSegments int, _dataSize, _dataUsed, _dataFree int64,
	_dataBlockSize, _numIndexSegments int, _indexSize, _indexUsed, _indexFree int64, _blockSize int) *DatabaseStatisticsImpl

func (*DatabaseStatisticsImpl) GetBlockSize

func (obj *DatabaseStatisticsImpl) GetBlockSize() int

GetBlockSize returns the block size

func (*DatabaseStatisticsImpl) GetDataBlockSize

func (obj *DatabaseStatisticsImpl) GetDataBlockSize() int

GetDataBlockSize returns the block size of data

func (*DatabaseStatisticsImpl) GetDataFree

func (obj *DatabaseStatisticsImpl) GetDataFree() int64

GetDataFree returns the free data size

func (*DatabaseStatisticsImpl) GetDataSize

func (obj *DatabaseStatisticsImpl) GetDataSize() int64

GetDataSize returns data size

func (*DatabaseStatisticsImpl) GetDataUsed

func (obj *DatabaseStatisticsImpl) GetDataUsed() int64

GetDataUsed returns the size of data used

func (*DatabaseStatisticsImpl) GetDbSize

func (obj *DatabaseStatisticsImpl) GetDbSize() int64

GetDbSize returns the size of database

func (*DatabaseStatisticsImpl) GetIndexFree

func (obj *DatabaseStatisticsImpl) GetIndexFree() int64

GetIndexFree returns the free index size

func (*DatabaseStatisticsImpl) GetIndexSize

func (obj *DatabaseStatisticsImpl) GetIndexSize() int64

GetIndexSize returns the index size

func (*DatabaseStatisticsImpl) GetIndexUsed

func (obj *DatabaseStatisticsImpl) GetIndexUsed() int64

GetIndexUsed returns the size of index used

func (*DatabaseStatisticsImpl) GetNumDataSegments

func (obj *DatabaseStatisticsImpl) GetNumDataSegments() int

GetNumDataSegments returns the number of data segments

func (*DatabaseStatisticsImpl) GetNumIndexSegments

func (obj *DatabaseStatisticsImpl) GetNumIndexSegments() int

GetNumIndexSegments returns the number of index segments

func (*DatabaseStatisticsImpl) MarshalBinary

func (obj *DatabaseStatisticsImpl) MarshalBinary() ([]byte, error)

func (*DatabaseStatisticsImpl) String

func (obj *DatabaseStatisticsImpl) String() string

func (*DatabaseStatisticsImpl) UnmarshalBinary

func (obj *DatabaseStatisticsImpl) UnmarshalBinary(data []byte) error

type DecryptBufferRequestMessage

type DecryptBufferRequestMessage struct {
	*AbstractProtocolMessage
	// contains filtered or unexported fields
}

func DefaultDecryptBufferRequestMessage

func DefaultDecryptBufferRequestMessage() *DecryptBufferRequestMessage

func NewDecryptBufferRequestMessage

func NewDecryptBufferRequestMessage(authToken, sessionId int64) *DecryptBufferRequestMessage

Create New Message Instance

func (*DecryptBufferRequestMessage) FromBytes

func (msg *DecryptBufferRequestMessage) FromBytes(buffer []byte) (tgdb.TGMessage, tgdb.TGError)

FromBytes constructs a message object from the input buffer in the byte format

func (*DecryptBufferRequestMessage) GetAuthToken

func (msg *DecryptBufferRequestMessage) GetAuthToken() int64

GetAuthToken gets the authToken

func (*DecryptBufferRequestMessage) GetEncryptedBuffer

func (msg *DecryptBufferRequestMessage) GetEncryptedBuffer() []byte

func (*DecryptBufferRequestMessage) GetIsUpdatable

func (msg *DecryptBufferRequestMessage) GetIsUpdatable() bool

GetIsUpdatable checks whether this message updatable or not

func (*DecryptBufferRequestMessage) GetMessageByteBufLength

func (msg *DecryptBufferRequestMessage) GetMessageByteBufLength() int

GetMessageByteBufLength gets the MessageByteBufLength. This method is called after the toBytes() is executed.

func (*DecryptBufferRequestMessage) GetRequestId

func (msg *DecryptBufferRequestMessage) GetRequestId() int64

GetRequestId gets the requestId for the message. This will be used as the CorrelationId

func (*DecryptBufferRequestMessage) GetSequenceNo

func (msg *DecryptBufferRequestMessage) GetSequenceNo() int64

GetSequenceNo gets the sequenceNo of the message

func (*DecryptBufferRequestMessage) GetSessionId

func (msg *DecryptBufferRequestMessage) GetSessionId() int64

GetSessionId gets the session id

func (*DecryptBufferRequestMessage) GetTimestamp

func (msg *DecryptBufferRequestMessage) GetTimestamp() int64

GetTimestamp gets the Timestamp

func (*DecryptBufferRequestMessage) GetVerbId

func (msg *DecryptBufferRequestMessage) GetVerbId() int

GetVerbId gets verbId of the message

func (*DecryptBufferRequestMessage) MarshalBinary

func (msg *DecryptBufferRequestMessage) MarshalBinary() ([]byte, error)

func (*DecryptBufferRequestMessage) ReadHeader

ReadHeader reads the bytes from input stream and constructs a common header of network packet

func (*DecryptBufferRequestMessage) ReadPayload

ReadPayload reads the bytes from input stream and constructs message specific payload Attributes

func (*DecryptBufferRequestMessage) SetAuthToken

func (msg *DecryptBufferRequestMessage) SetAuthToken(authToken int64)

SetAuthToken sets the authToken

func (*DecryptBufferRequestMessage) SetDataOffset

func (msg *DecryptBufferRequestMessage) SetDataOffset(dataOffset int16)

SetDataOffset sets the offset at which data starts in the payload

func (*DecryptBufferRequestMessage) SetEncryptedBuffer

func (msg *DecryptBufferRequestMessage) SetEncryptedBuffer(buf []byte)

func (*DecryptBufferRequestMessage) SetIsUpdatable

func (msg *DecryptBufferRequestMessage) SetIsUpdatable(updateFlag bool)

SetIsUpdatable sets the updatable flag

func (*DecryptBufferRequestMessage) SetMessageByteBufLength

func (msg *DecryptBufferRequestMessage) SetMessageByteBufLength(bufLength int)

SetMessageByteBufLength sets the message buffer length

func (*DecryptBufferRequestMessage) SetRequestId

func (msg *DecryptBufferRequestMessage) SetRequestId(requestId int64)

SetRequestId sets the request id

func (*DecryptBufferRequestMessage) SetSequenceNo

func (msg *DecryptBufferRequestMessage) SetSequenceNo(sequenceNo int64)

SetSequenceNo sets the sequenceNo

func (*DecryptBufferRequestMessage) SetSessionId

func (msg *DecryptBufferRequestMessage) SetSessionId(sessionId int64)

SetSessionId sets the session id

func (*DecryptBufferRequestMessage) SetTimestamp

func (msg *DecryptBufferRequestMessage) SetTimestamp(timestamp int64) tgdb.TGError

SetTimestamp sets the timestamp

func (*DecryptBufferRequestMessage) SetVerbId

func (msg *DecryptBufferRequestMessage) SetVerbId(verbId int)

SetVerbId sets verbId of the message

func (*DecryptBufferRequestMessage) String

func (msg *DecryptBufferRequestMessage) String() string

func (*DecryptBufferRequestMessage) ToBytes

func (msg *DecryptBufferRequestMessage) ToBytes() ([]byte, int, tgdb.TGError)

ToBytes converts a message object into byte format to be sent over the network to TGDB server

func (*DecryptBufferRequestMessage) UnmarshalBinary

func (msg *DecryptBufferRequestMessage) UnmarshalBinary(data []byte) error

UnmarshalBinary modifies the receiver so it must take a pointer receiver.

func (*DecryptBufferRequestMessage) UpdateSequenceAndTimeStamp

func (msg *DecryptBufferRequestMessage) UpdateSequenceAndTimeStamp(timestamp int64) tgdb.TGError

UpdateSequenceAndTimeStamp updates the SequenceAndTimeStamp, if message is mutable @param timestamp @return TGMessage on success, error on failure

func (*DecryptBufferRequestMessage) WriteHeader

WriteHeader exports the values of the common message header Attributes to output stream

func (*DecryptBufferRequestMessage) WritePayload

WritePayload exports the values of the message specific payload Attributes to output stream

type DecryptBufferResponseMessage

type DecryptBufferResponseMessage struct {
	*AbstractProtocolMessage
	// contains filtered or unexported fields
}

func DefaultDecryptBufferResponseMessage

func DefaultDecryptBufferResponseMessage() *DecryptBufferResponseMessage

func NewDecryptBufferResponseMessage

func NewDecryptBufferResponseMessage(authToken, sessionId int64) *DecryptBufferResponseMessage

Create New Message Instance

func (*DecryptBufferResponseMessage) FromBytes

func (msg *DecryptBufferResponseMessage) FromBytes(buffer []byte) (tgdb.TGMessage, tgdb.TGError)

FromBytes constructs a message object from the input buffer in the byte format

func (*DecryptBufferResponseMessage) GetAuthToken

func (msg *DecryptBufferResponseMessage) GetAuthToken() int64

GetAuthToken gets the authToken

func (*DecryptBufferResponseMessage) GetDecryptedBuffer

func (msg *DecryptBufferResponseMessage) GetDecryptedBuffer() []byte

func (*DecryptBufferResponseMessage) GetIsUpdatable

func (msg *DecryptBufferResponseMessage) GetIsUpdatable() bool

GetIsUpdatable checks whether this message updatable or not

func (*DecryptBufferResponseMessage) GetMessageByteBufLength

func (msg *DecryptBufferResponseMessage) GetMessageByteBufLength() int

GetMessageByteBufLength gets the MessageByteBufLength. This method is called after the toBytes() is executed.

func (*DecryptBufferResponseMessage) GetRequestId

func (msg *DecryptBufferResponseMessage) GetRequestId() int64

GetRequestId gets the requestId for the message. This will be used as the CorrelationId

func (*DecryptBufferResponseMessage) GetSequenceNo

func (msg *DecryptBufferResponseMessage) GetSequenceNo() int64

GetSequenceNo gets the sequenceNo of the message

func (*DecryptBufferResponseMessage) GetSessionId

func (msg *DecryptBufferResponseMessage) GetSessionId() int64

GetSessionId gets the session id

func (*DecryptBufferResponseMessage) GetTimestamp

func (msg *DecryptBufferResponseMessage) GetTimestamp() int64

GetTimestamp gets the Timestamp

func (*DecryptBufferResponseMessage) GetVerbId

func (msg *DecryptBufferResponseMessage) GetVerbId() int

GetVerbId gets verbId of the message

func (*DecryptBufferResponseMessage) MarshalBinary

func (msg *DecryptBufferResponseMessage) MarshalBinary() ([]byte, error)

func (*DecryptBufferResponseMessage) ReadHeader

ReadHeader reads the bytes from input stream and constructs a common header of network packet

func (*DecryptBufferResponseMessage) ReadPayload

ReadPayload reads the bytes from input stream and constructs message specific payload Attributes

func (*DecryptBufferResponseMessage) SetAuthToken

func (msg *DecryptBufferResponseMessage) SetAuthToken(authToken int64)

SetAuthToken sets the authToken

func (*DecryptBufferResponseMessage) SetDataOffset

func (msg *DecryptBufferResponseMessage) SetDataOffset(dataOffset int16)

SetDataOffset sets the offset at which data starts in the payload

func (*DecryptBufferResponseMessage) SetDecryptedBuffer

func (msg *DecryptBufferResponseMessage) SetDecryptedBuffer(buf []byte)

func (*DecryptBufferResponseMessage) SetIsUpdatable

func (msg *DecryptBufferResponseMessage) SetIsUpdatable(updateFlag bool)

SetIsUpdatable sets the updatable flag

func (*DecryptBufferResponseMessage) SetMessageByteBufLength

func (msg *DecryptBufferResponseMessage) SetMessageByteBufLength(bufLength int)

SetMessageByteBufLength sets the message buffer length

func (*DecryptBufferResponseMessage) SetRequestId

func (msg *DecryptBufferResponseMessage) SetRequestId(requestId int64)

SetRequestId sets the request id

func (*DecryptBufferResponseMessage) SetSequenceNo

func (msg *DecryptBufferResponseMessage) SetSequenceNo(sequenceNo int64)

SetSequenceNo sets the sequenceNo

func (*DecryptBufferResponseMessage) SetSessionId

func (msg *DecryptBufferResponseMessage) SetSessionId(sessionId int64)

SetSessionId sets the session id

func (*DecryptBufferResponseMessage) SetTimestamp

func (msg *DecryptBufferResponseMessage) SetTimestamp(timestamp int64) tgdb.TGError

SetTimestamp sets the timestamp

func (*DecryptBufferResponseMessage) SetVerbId

func (msg *DecryptBufferResponseMessage) SetVerbId(verbId int)

SetVerbId sets verbId of the message

func (*DecryptBufferResponseMessage) String

func (msg *DecryptBufferResponseMessage) String() string

func (*DecryptBufferResponseMessage) ToBytes

func (msg *DecryptBufferResponseMessage) ToBytes() ([]byte, int, tgdb.TGError)

ToBytes converts a message object into byte format to be sent over the network to TGDB server

func (*DecryptBufferResponseMessage) UnmarshalBinary

func (msg *DecryptBufferResponseMessage) UnmarshalBinary(data []byte) error

UnmarshalBinary modifies the receiver so it must take a pointer receiver.

func (*DecryptBufferResponseMessage) UpdateSequenceAndTimeStamp

func (msg *DecryptBufferResponseMessage) UpdateSequenceAndTimeStamp(timestamp int64) tgdb.TGError

UpdateSequenceAndTimeStamp updates the SequenceAndTimeStamp, if message is mutable @param timestamp @return TGMessage on success, error on failure

func (*DecryptBufferResponseMessage) WriteHeader

WriteHeader exports the values of the common message header Attributes to output stream

func (*DecryptBufferResponseMessage) WritePayload

WritePayload exports the values of the message specific payload Attributes to output stream

type DisconnectChannelRequestMessage

type DisconnectChannelRequestMessage struct {
	*AuthenticatedMessage
}

func DefaultDisconnectChannelRequestMessage

func DefaultDisconnectChannelRequestMessage() *DisconnectChannelRequestMessage

func NewDisconnectChannelRequestMessage

func NewDisconnectChannelRequestMessage(authToken, sessionId int64) *DisconnectChannelRequestMessage

Create New Message Instance

func (*DisconnectChannelRequestMessage) FromBytes

func (msg *DisconnectChannelRequestMessage) FromBytes(buffer []byte) (tgdb.TGMessage, tgdb.TGError)

FromBytes constructs a message object from the input buffer in the byte format

func (*DisconnectChannelRequestMessage) GetAuthToken

func (msg *DisconnectChannelRequestMessage) GetAuthToken() int64

GetAuthToken gets the authToken

func (*DisconnectChannelRequestMessage) GetIsUpdatable

func (msg *DisconnectChannelRequestMessage) GetIsUpdatable() bool

GetIsUpdatable checks whether this message updatable or not

func (*DisconnectChannelRequestMessage) GetMessageByteBufLength

func (msg *DisconnectChannelRequestMessage) GetMessageByteBufLength() int

GetMessageByteBufLength gets the MessageByteBufLength. This method is called after the toBytes() is executed.

func (*DisconnectChannelRequestMessage) GetRequestId

func (msg *DisconnectChannelRequestMessage) GetRequestId() int64

GetRequestId gets the requestId for the message. This will be used as the CorrelationId

func (*DisconnectChannelRequestMessage) GetSequenceNo

func (msg *DisconnectChannelRequestMessage) GetSequenceNo() int64

GetSequenceNo gets the sequenceNo of the message

func (*DisconnectChannelRequestMessage) GetSessionId

func (msg *DisconnectChannelRequestMessage) GetSessionId() int64

GetSessionId gets the session id

func (*DisconnectChannelRequestMessage) GetTimestamp

func (msg *DisconnectChannelRequestMessage) GetTimestamp() int64

GetTimestamp gets the Timestamp

func (*DisconnectChannelRequestMessage) GetVerbId

func (msg *DisconnectChannelRequestMessage) GetVerbId() int

GetVerbId gets verbId of the message

func (*DisconnectChannelRequestMessage) MarshalBinary

func (msg *DisconnectChannelRequestMessage) MarshalBinary() ([]byte, error)

func (*DisconnectChannelRequestMessage) ReadHeader

ReadHeader reads the bytes from input stream and constructs a common header of network packet

func (*DisconnectChannelRequestMessage) ReadPayload

ReadPayload reads the bytes from input stream and constructs message specific payload Attributes

func (*DisconnectChannelRequestMessage) SetAuthToken

func (msg *DisconnectChannelRequestMessage) SetAuthToken(authToken int64)

SetAuthToken sets the authToken

func (*DisconnectChannelRequestMessage) SetDataOffset

func (msg *DisconnectChannelRequestMessage) SetDataOffset(dataOffset int16)

SetDataOffset sets the offset at which data starts in the payload

func (*DisconnectChannelRequestMessage) SetIsUpdatable

func (msg *DisconnectChannelRequestMessage) SetIsUpdatable(updateFlag bool)

SetIsUpdatable sets the updatable flag

func (*DisconnectChannelRequestMessage) SetMessageByteBufLength

func (msg *DisconnectChannelRequestMessage) SetMessageByteBufLength(bufLength int)

SetMessageByteBufLength sets the message buffer length

func (*DisconnectChannelRequestMessage) SetRequestId

func (msg *DisconnectChannelRequestMessage) SetRequestId(requestId int64)

SetRequestId sets the request id

func (*DisconnectChannelRequestMessage) SetSequenceNo

func (msg *DisconnectChannelRequestMessage) SetSequenceNo(sequenceNo int64)

SetSequenceNo sets the sequenceNo

func (*DisconnectChannelRequestMessage) SetSessionId

func (msg *DisconnectChannelRequestMessage) SetSessionId(sessionId int64)

SetSessionId sets the session id

func (*DisconnectChannelRequestMessage) SetTimestamp

func (msg *DisconnectChannelRequestMessage) SetTimestamp(timestamp int64) tgdb.TGError

SetTimestamp sets the timestamp

func (*DisconnectChannelRequestMessage) SetVerbId

func (msg *DisconnectChannelRequestMessage) SetVerbId(verbId int)

SetVerbId sets verbId of the message

func (*DisconnectChannelRequestMessage) String

func (*DisconnectChannelRequestMessage) ToBytes

func (msg *DisconnectChannelRequestMessage) ToBytes() ([]byte, int, tgdb.TGError)

ToBytes converts a message object into byte format to be sent over the network to TGDB server

func (*DisconnectChannelRequestMessage) UnmarshalBinary

func (msg *DisconnectChannelRequestMessage) UnmarshalBinary(data []byte) error

UnmarshalBinary modifies the receiver so it must take a pointer receiver.

func (*DisconnectChannelRequestMessage) UpdateSequenceAndTimeStamp

func (msg *DisconnectChannelRequestMessage) UpdateSequenceAndTimeStamp(timestamp int64) tgdb.TGError

UpdateSequenceAndTimeStamp updates the SequenceAndTimeStamp, if message is mutable @param timestamp @return TGMessage on success, error on failure

func (*DisconnectChannelRequestMessage) WriteHeader

WriteHeader exports the values of the common message header Attributes to output stream

func (*DisconnectChannelRequestMessage) WritePayload

WritePayload exports the values of the message specific payload Attributes to output stream

type DoubleAttribute

type DoubleAttribute struct {
	*AbstractAttribute
}

func DefaultDoubleAttribute

func DefaultDoubleAttribute() *DoubleAttribute

Create NewTGDecimal Attribute Instance

func NewDoubleAttribute

func NewDoubleAttribute(attrDesc *AttributeDescriptor) *DoubleAttribute

func NewDoubleAttributeWithDesc

func NewDoubleAttributeWithDesc(ownerEntity tgdb.TGEntity, attrDesc *AttributeDescriptor, value interface{}) *DoubleAttribute

func NewDoubleAttributeWithOwner

func NewDoubleAttributeWithOwner(ownerEntity tgdb.TGEntity) *DoubleAttribute

func (*DoubleAttribute) GetAttributeDescriptor

func (obj *DoubleAttribute) GetAttributeDescriptor() tgdb.TGAttributeDescriptor

GetAttributeDescriptor returns the AttributeDescriptor for this attribute

func (*DoubleAttribute) GetIsModified

func (obj *DoubleAttribute) GetIsModified() bool

GetIsModified checks whether the attribute modified or not

func (*DoubleAttribute) GetName

func (obj *DoubleAttribute) GetName() string

GetName gets the Name for this attribute as the most generic form

func (*DoubleAttribute) GetOwner

func (obj *DoubleAttribute) GetOwner() tgdb.TGEntity

GetOwner gets owner Entity of this attribute

func (*DoubleAttribute) GetValue

func (obj *DoubleAttribute) GetValue() interface{}

GetValue gets the value for this attribute as the most generic form

func (*DoubleAttribute) IsNull

func (obj *DoubleAttribute) IsNull() bool

IsNull checks whether the attribute value is null or not

func (*DoubleAttribute) MarshalBinary

func (obj *DoubleAttribute) MarshalBinary() ([]byte, error)

func (*DoubleAttribute) ReadExternal

func (obj *DoubleAttribute) ReadExternal(is tgdb.TGInputStream) tgdb.TGError

ReadExternal reads the byte format from an external input stream and constructs a system object

func (*DoubleAttribute) ReadValue

func (obj *DoubleAttribute) ReadValue(is tgdb.TGInputStream) tgdb.TGError

ReadValue reads the value from input stream

func (*DoubleAttribute) ResetIsModified

func (obj *DoubleAttribute) ResetIsModified()

ResetIsModified resets the IsModified flag - recursively, if needed

func (*DoubleAttribute) SetDouble

func (obj *DoubleAttribute) SetDouble(b float64)

func (*DoubleAttribute) SetOwner

func (obj *DoubleAttribute) SetOwner(ownerEntity tgdb.TGEntity)

SetOwner sets the owner entity - Need this indirection to traverse the chain

func (*DoubleAttribute) SetValue

func (obj *DoubleAttribute) SetValue(value interface{}) tgdb.TGError

SetValue sets the value for this attribute. Appropriate data conversion to its attribute desc will be performed If the object is Null, then the object is explicitly set, but no value is provided.

func (*DoubleAttribute) String

func (obj *DoubleAttribute) String() string

func (*DoubleAttribute) UnmarshalBinary

func (obj *DoubleAttribute) UnmarshalBinary(data []byte) error

func (*DoubleAttribute) WriteExternal

func (obj *DoubleAttribute) WriteExternal(os tgdb.TGOutputStream) tgdb.TGError

WriteExternal writes a system object into an appropriate byte format onto an external output stream

func (*DoubleAttribute) WriteValue

func (obj *DoubleAttribute) WriteValue(os tgdb.TGOutputStream) tgdb.TGError

WriteValue writes the value to output stream

type DumpStacktraceRequestMessage

type DumpStacktraceRequestMessage struct {
	*AbstractProtocolMessage
}

func DefaultDumpStacktraceRequestMessage

func DefaultDumpStacktraceRequestMessage() *DumpStacktraceRequestMessage

func NewDumpStacktraceRequestMessage

func NewDumpStacktraceRequestMessage(authToken, sessionId int64) *DumpStacktraceRequestMessage

Create New Message Instance

func (*DumpStacktraceRequestMessage) FromBytes

func (msg *DumpStacktraceRequestMessage) FromBytes(buffer []byte) (tgdb.TGMessage, tgdb.TGError)

FromBytes constructs a message object from the input buffer in the byte format

func (*DumpStacktraceRequestMessage) GetAuthToken

func (msg *DumpStacktraceRequestMessage) GetAuthToken() int64

GetAuthToken gets the authToken

func (*DumpStacktraceRequestMessage) GetIsUpdatable

func (msg *DumpStacktraceRequestMessage) GetIsUpdatable() bool

GetIsUpdatable checks whether this message updatable or not

func (*DumpStacktraceRequestMessage) GetMessageByteBufLength

func (msg *DumpStacktraceRequestMessage) GetMessageByteBufLength() int

GetMessageByteBufLength gets the MessageByteBufLength. This method is called after the toBytes() is executed.

func (*DumpStacktraceRequestMessage) GetRequestId

func (msg *DumpStacktraceRequestMessage) GetRequestId() int64

GetRequestId gets the requestId for the message. This will be used as the CorrelationId

func (*DumpStacktraceRequestMessage) GetSequenceNo

func (msg *DumpStacktraceRequestMessage) GetSequenceNo() int64

GetSequenceNo gets the sequenceNo of the message

func (*DumpStacktraceRequestMessage) GetSessionId

func (msg *DumpStacktraceRequestMessage) GetSessionId() int64

GetSessionId gets the session id

func (*DumpStacktraceRequestMessage) GetTimestamp

func (msg *DumpStacktraceRequestMessage) GetTimestamp() int64

GetTimestamp gets the Timestamp

func (*DumpStacktraceRequestMessage) GetVerbId

func (msg *DumpStacktraceRequestMessage) GetVerbId() int

GetVerbId gets verbId of the message

func (*DumpStacktraceRequestMessage) MarshalBinary

func (msg *DumpStacktraceRequestMessage) MarshalBinary() ([]byte, error)

func (*DumpStacktraceRequestMessage) ReadHeader

ReadHeader reads the bytes from input stream and constructs a common header of network packet

func (*DumpStacktraceRequestMessage) ReadPayload

ReadPayload reads the bytes from input stream and constructs message specific payload Attributes

func (*DumpStacktraceRequestMessage) SetAuthToken

func (msg *DumpStacktraceRequestMessage) SetAuthToken(authToken int64)

SetAuthToken sets the authToken

func (*DumpStacktraceRequestMessage) SetDataOffset

func (msg *DumpStacktraceRequestMessage) SetDataOffset(dataOffset int16)

SetDataOffset sets the offset at which data starts in the payload

func (*DumpStacktraceRequestMessage) SetIsUpdatable

func (msg *DumpStacktraceRequestMessage) SetIsUpdatable(updateFlag bool)

SetIsUpdatable sets the updatable flag

func (*DumpStacktraceRequestMessage) SetMessageByteBufLength

func (msg *DumpStacktraceRequestMessage) SetMessageByteBufLength(bufLength int)

SetMessageByteBufLength sets the message buffer length

func (*DumpStacktraceRequestMessage) SetRequestId

func (msg *DumpStacktraceRequestMessage) SetRequestId(requestId int64)

SetRequestId sets the request id

func (*DumpStacktraceRequestMessage) SetSequenceNo

func (msg *DumpStacktraceRequestMessage) SetSequenceNo(sequenceNo int64)

SetSequenceNo sets the sequenceNo

func (*DumpStacktraceRequestMessage) SetSessionId

func (msg *DumpStacktraceRequestMessage) SetSessionId(sessionId int64)

SetSessionId sets the session id

func (*DumpStacktraceRequestMessage) SetTimestamp

func (msg *DumpStacktraceRequestMessage) SetTimestamp(timestamp int64) tgdb.TGError

SetTimestamp sets the timestamp

func (*DumpStacktraceRequestMessage) SetVerbId

func (msg *DumpStacktraceRequestMessage) SetVerbId(verbId int)

SetVerbId sets verbId of the message

func (*DumpStacktraceRequestMessage) String

func (msg *DumpStacktraceRequestMessage) String() string

func (*DumpStacktraceRequestMessage) ToBytes

func (msg *DumpStacktraceRequestMessage) ToBytes() ([]byte, int, tgdb.TGError)

ToBytes converts a message object into byte format to be sent over the network to TGDB server

func (*DumpStacktraceRequestMessage) UnmarshalBinary

func (msg *DumpStacktraceRequestMessage) UnmarshalBinary(data []byte) error

UnmarshalBinary modifies the receiver so it must take a pointer receiver.

func (*DumpStacktraceRequestMessage) UpdateSequenceAndTimeStamp

func (msg *DumpStacktraceRequestMessage) UpdateSequenceAndTimeStamp(timestamp int64) tgdb.TGError

UpdateSequenceAndTimeStamp updates the SequenceAndTimeStamp, if message is mutable @param Timestamp @return TGMessage on success, error on failure

func (*DumpStacktraceRequestMessage) WriteHeader

WriteHeader exports the values of the common message header Attributes to output stream

func (*DumpStacktraceRequestMessage) WritePayload

WritePayload exports the values of the message specific payload Attributes to output stream

type Edge

type Edge struct {
	*AbstractEntity

	FromNode tgdb.TGNode
	ToNode   tgdb.TGNode
	// contains filtered or unexported fields
}

func DefaultEdge

func DefaultEdge() *Edge

func NewEdge

func NewEdge(gmd *GraphMetadata) *Edge

func NewEdgeWithDirection

func NewEdgeWithDirection(gmd *GraphMetadata, fromNode tgdb.TGNode, toNode tgdb.TGNode, directionType tgdb.TGDirectionType) *Edge

func NewEdgeWithEdgeType

func NewEdgeWithEdgeType(gmd *GraphMetadata, fromNode tgdb.TGNode, toNode tgdb.TGNode, edgeType tgdb.TGEdgeType) *Edge

func (*Edge) GetAttribute

func (obj *Edge) GetAttribute(attrName string) tgdb.TGAttribute

GetAttribute gets the attribute for the Name specified

func (*Edge) GetAttributes

func (obj *Edge) GetAttributes() ([]tgdb.TGAttribute, tgdb.TGError)

GetAttributes lists of all the Attributes set

func (*Edge) GetDirectionType

func (obj *Edge) GetDirectionType() tgdb.TGDirectionType

GetDirectionType gets direction type as one of the constants

func (*Edge) GetEntityKind

func (obj *Edge) GetEntityKind() tgdb.TGEntityKind

GetEntityKind returns the EntityKind as a constant

func (*Edge) GetEntityType

func (obj *Edge) GetEntityType() tgdb.TGEntityType

GetEntityType returns the EntityType

func (*Edge) GetFromNode

func (obj *Edge) GetFromNode() tgdb.TGNode

func (*Edge) GetGraphMetadata

func (obj *Edge) GetGraphMetadata() tgdb.TGGraphMetadata

GetGraphMetadata returns the Graph Meta Data - New in GO Lang

func (*Edge) GetIsDeleted

func (obj *Edge) GetIsDeleted() bool

GetIsDeleted checks whether this entity is already deleted in the system or not

func (*Edge) GetIsInitialized

func (obj *Edge) GetIsInitialized() bool

func (*Edge) GetIsNew

func (obj *Edge) GetIsNew() bool

GetIsNew checks whether this entity that is currently being added to the system is new or not

func (*Edge) GetModifiedAttributes

func (obj *Edge) GetModifiedAttributes() []tgdb.TGAttribute

func (*Edge) GetToNode

func (obj *Edge) GetToNode() tgdb.TGNode

func (*Edge) GetVersion

func (obj *Edge) GetVersion() int

GetVersion gets the version of the Entity

func (*Edge) GetVertices

func (obj *Edge) GetVertices() []tgdb.TGNode

GetVertices gets array of NODE (Entity) types for this EDGE (Entity) type

func (*Edge) GetVirtualId

func (obj *Edge) GetVirtualId() int64

GetVirtualId gets Entity identifier At the time of creation before reaching the server, it is the virtual id Upon successful creation, server returns a valid entity id that gets set in place of virtual id

func (*Edge) IsAttributeSet

func (obj *Edge) IsAttributeSet(attrName string) bool

IsAttributeSet checks whether this entity is an Attribute set or not

func (*Edge) MarshalBinary

func (obj *Edge) MarshalBinary() ([]byte, error)

func (*Edge) ReadExternal

func (obj *Edge) ReadExternal(is tgdb.TGInputStream) tgdb.TGError

ReadExternal reads the byte format from an external input stream and constructs a system object

func (*Edge) ResetModifiedAttributes

func (obj *Edge) ResetModifiedAttributes()

ResetModifiedAttributes resets the dirty flag on Attributes

func (*Edge) SetAttribute

func (obj *Edge) SetAttribute(attr tgdb.TGAttribute) tgdb.TGError

SetAttribute associates the specified Attribute to this Entity

func (*Edge) SetDirectionType

func (obj *Edge) SetDirectionType(dirType tgdb.TGDirectionType)

func (*Edge) SetEntityId

func (obj *Edge) SetEntityId(id int64)

SetEntityId sets Entity id and reset Virtual id after creation

func (*Edge) SetFromNode

func (obj *Edge) SetFromNode(node tgdb.TGNode)

func (*Edge) SetIsDeleted

func (obj *Edge) SetIsDeleted(flag bool)

SetIsDeleted set the deleted flag

func (*Edge) SetIsInitialized

func (obj *Edge) SetIsInitialized(flag bool)

SetIsInitialized set the initialized flag

func (*Edge) SetIsNew

func (obj *Edge) SetIsNew(flag bool)

SetIsNew sets the flag that this is a new entity

func (*Edge) SetOrCreateAttribute

func (obj *Edge) SetOrCreateAttribute(name string, value interface{}) tgdb.TGError

SetOrCreateAttribute dynamically associates the attribute to this entity If the AttributeDescriptor doesn't exist in the database, create a new one

func (*Edge) SetToNode

func (obj *Edge) SetToNode(node tgdb.TGNode)

func (*Edge) SetVersion

func (obj *Edge) SetVersion(version int)

SetVersion sets the version of the Entity

func (*Edge) String

func (obj *Edge) String() string

func (*Edge) UnmarshalBinary

func (obj *Edge) UnmarshalBinary(data []byte) error

func (*Edge) WriteExternal

func (obj *Edge) WriteExternal(os tgdb.TGOutputStream) tgdb.TGError

WriteExternal writes a system object into an appropriate byte format onto an external output stream

type EdgeType

type EdgeType struct {
	*EntityType
	// contains filtered or unexported fields
}

func DefaultEdgeType

func DefaultEdgeType() *EdgeType

func NewEdgeType

func NewEdgeType(name string, directionType tgdb.TGDirectionType, parent tgdb.TGEntityType) *EdgeType

func (*EdgeType) AddAttributeDescriptor

func (obj *EdgeType) AddAttributeDescriptor(attrName string, attrDesc tgdb.TGAttributeDescriptor)

AddAttributeDescriptor add an attribute descriptor to the map

func (*EdgeType) DerivedFrom

func (obj *EdgeType) DerivedFrom() tgdb.TGEntityType

DerivedFrom gets the parent Entity Type

func (*EdgeType) GetAttributeDescriptor

func (obj *EdgeType) GetAttributeDescriptor(attrName string) tgdb.TGAttributeDescriptor

GetAttributeDescriptor gets the attribute descriptor for the specified Name

func (*EdgeType) GetAttributeDescriptors

func (obj *EdgeType) GetAttributeDescriptors() []tgdb.TGAttributeDescriptor

GetAttributeDescriptors returns a collection of attribute descriptors associated with this Entity Type

func (*EdgeType) GetDirectionType

func (obj *EdgeType) GetDirectionType() tgdb.TGDirectionType

GetDirectionType gets direction type as one of the constants

func (*EdgeType) GetEntityTypeId

func (obj *EdgeType) GetEntityTypeId() int

GetEntityTypeId gets Entity Type id

func (*EdgeType) GetFromNodeType

func (obj *EdgeType) GetFromNodeType() tgdb.TGNodeType

GetFromNodeType gets From-Node Type

func (*EdgeType) GetFromTypeId

func (obj *EdgeType) GetFromTypeId() int

GetFromTypeId gets From-Node ID

func (*EdgeType) GetName

func (obj *EdgeType) GetName() string

GetName gets the system object's Name

func (*EdgeType) GetNumEntries

func (obj *EdgeType) GetNumEntries() int64

func (*EdgeType) GetSystemType

func (obj *EdgeType) GetSystemType() tgdb.TGSystemType

GetSystemType gets system object's type

func (*EdgeType) GetToNodeType

func (obj *EdgeType) GetToNodeType() tgdb.TGNodeType

GetToNodeType gets To-Node Type

func (*EdgeType) GetToTypeId

func (obj *EdgeType) GetToTypeId() int

GetToTypeId gets To-Node ID

func (*EdgeType) MarshalBinary

func (obj *EdgeType) MarshalBinary() ([]byte, error)

func (*EdgeType) ReadExternal

func (obj *EdgeType) ReadExternal(is tgdb.TGInputStream) tgdb.TGError

ReadExternal reads the byte format from an external input stream and constructs a system object

func (*EdgeType) SetAttributeDesc

func (obj *EdgeType) SetAttributeDesc(attrName string, attrDesc *AttributeDescriptor)

func (*EdgeType) SetAttributeMap

func (obj *EdgeType) SetAttributeMap(attrMap map[string]*AttributeDescriptor)

func (*EdgeType) SetDirectionType

func (obj *EdgeType) SetDirectionType(dirType tgdb.TGDirectionType)

func (*EdgeType) SetEntityTypeId

func (obj *EdgeType) SetEntityTypeId(eTypeId int)

SetEntityTypeId sets Entity Type id

func (*EdgeType) SetFromNodeType

func (obj *EdgeType) SetFromNodeType(fromNode tgdb.TGNodeType)

SetFromNodeType sets From-Node Type

func (*EdgeType) SetFromTypeId

func (obj *EdgeType) SetFromTypeId(fromTypeId int)

SetFromTypeId sets From-Node ID

func (*EdgeType) SetName

func (obj *EdgeType) SetName(eTypeName string)

SetName sets the system object's Name

func (*EdgeType) SetNumEntries

func (obj *EdgeType) SetNumEntries(num int64)

func (*EdgeType) SetParent

func (obj *EdgeType) SetParent(parentEntity tgdb.TGEntityType)

func (*EdgeType) SetSystemType

func (obj *EdgeType) SetSystemType(eSysType tgdb.TGSystemType)

SetSystemType sets system object's type

func (*EdgeType) SetToNodeType

func (obj *EdgeType) SetToNodeType(toNode tgdb.TGNodeType)

SetToNodeType sets From-Node Type

func (*EdgeType) SetToTypeId

func (obj *EdgeType) SetToTypeId(toTypeId int)

SetToTypeId sets To-Node ID

func (*EdgeType) String

func (obj *EdgeType) String() string

func (*EdgeType) UnmarshalBinary

func (obj *EdgeType) UnmarshalBinary(data []byte) error

func (*EdgeType) UpdateMetadata

func (obj *EdgeType) UpdateMetadata(gmd *GraphMetadata) tgdb.TGError

func (*EdgeType) WriteExternal

func (obj *EdgeType) WriteExternal(os tgdb.TGOutputStream) tgdb.TGError

WriteExternal writes a system object into an appropriate byte format onto an external output stream

type ElementType

type ElementType int

======= Various Element Types for Gremlin Results =======

const (
	ElementTypeInvalid ElementType = iota
	ElementTypeList
	ElementTypeAttr
	ElementTypeAttrValue
	ElementTypeAttrValueTransient
	ElementTypeEntity
	ElementTypeMap
)

func (ElementType) String

func (elementType ElementType) String() string

type EntityType

type EntityType struct {
	SysType tgdb.TGSystemType

	Name string

	Attributes map[string]*AttributeDescriptor
	// contains filtered or unexported fields
}

func DefaultEntityType

func DefaultEntityType() *EntityType

func NewEntityType

func NewEntityType(name string, parent *EntityType) *EntityType

func (*EntityType) AddAttributeDescriptor

func (obj *EntityType) AddAttributeDescriptor(attrName string, attrDesc tgdb.TGAttributeDescriptor)

AddAttributeDescriptor add an attribute descriptor to the map

func (*EntityType) DerivedFrom

func (obj *EntityType) DerivedFrom() tgdb.TGEntityType

DerivedFrom gets the parent Entity Type

func (*EntityType) GetAttributeDescriptor

func (obj *EntityType) GetAttributeDescriptor(attrName string) tgdb.TGAttributeDescriptor

GetAttributeDescriptor gets the attribute descriptor for the specified Name

func (*EntityType) GetAttributeDescriptors

func (obj *EntityType) GetAttributeDescriptors() []tgdb.TGAttributeDescriptor

GetAttributeDescriptors returns a collection of attribute descriptors associated with this Entity Type

func (*EntityType) GetEntityTypeId

func (obj *EntityType) GetEntityTypeId() int

GetEntityTypeId gets Entity Type id

func (*EntityType) GetName

func (obj *EntityType) GetName() string

GetName gets the Name for this entity type as the most generic form

func (*EntityType) GetSystemType

func (obj *EntityType) GetSystemType() tgdb.TGSystemType

func (*EntityType) MarshalBinary

func (obj *EntityType) MarshalBinary() ([]byte, error)

func (*EntityType) ReadExternal

func (obj *EntityType) ReadExternal(is tgdb.TGInputStream) tgdb.TGError

ReadExternal reads the byte format from an external input stream and constructs a system object

func (*EntityType) SetAttributeDesc

func (obj *EntityType) SetAttributeDesc(attrName string, attrDesc *AttributeDescriptor)

func (*EntityType) SetAttributeMap

func (obj *EntityType) SetAttributeMap(attrMap map[string]*AttributeDescriptor)

func (*EntityType) SetEntityTypeId

func (obj *EntityType) SetEntityTypeId(eTypeId int)

SetEntityTypeId sets Entity Type id

func (*EntityType) SetName

func (obj *EntityType) SetName(eTypeName string)

SetName sets the system object's Name

func (*EntityType) SetParent

func (obj *EntityType) SetParent(parentEntity tgdb.TGEntityType)

func (*EntityType) SetSystemType

func (obj *EntityType) SetSystemType(eSysType tgdb.TGSystemType)

SetSystemType sets system object's type

func (*EntityType) String

func (obj *EntityType) String() string

func (*EntityType) UnmarshalBinary

func (obj *EntityType) UnmarshalBinary(data []byte) error

func (*EntityType) UpdateMetadata

func (obj *EntityType) UpdateMetadata(gmd *GraphMetadata) tgdb.TGError

func (*EntityType) WriteExternal

func (obj *EntityType) WriteExternal(os tgdb.TGOutputStream) tgdb.TGError

WriteExternal writes a system object into an appropriate byte format onto an external output stream

type ExceptionChannelType

type ExceptionChannelType int

======= Exception channel Type =======

const (
	RethrowException ExceptionChannelType = iota
	RetryOperation
	Disconnected
)

func (ExceptionChannelType) ChannelException

func (proType ExceptionChannelType) ChannelException() *ExceptionHandleResult

type ExceptionHandleResult

type ExceptionHandleResult struct {
	ExceptionType    ExceptionChannelType // types.TGExceptionType
	ExceptionMessage string
}

type ExceptionMessage

type ExceptionMessage struct {
	*AbstractProtocolMessage
	// contains filtered or unexported fields
}

func BuildFromException

func BuildFromException(ex tgdb.TGError) *ExceptionMessage

func DefaultExceptionMessage

func DefaultExceptionMessage() *ExceptionMessage

func NewExceptionMessage

func NewExceptionMessage(authToken, sessionId int64) *ExceptionMessage

Create New Message Instance

func NewExceptionMessageWithType

func NewExceptionMessageWithType(exType int, msg string) *ExceptionMessage

func NewExceptionMessageWithTypeWithServerErrorCode

func NewExceptionMessageWithTypeWithServerErrorCode(exType int, msg string, sCode int) *ExceptionMessage

func (*ExceptionMessage) FromBytes

func (msg *ExceptionMessage) FromBytes(buffer []byte) (tgdb.TGMessage, tgdb.TGError)

FromBytes constructs a message object from the input buffer in the byte format

func (*ExceptionMessage) GetAuthToken

func (msg *ExceptionMessage) GetAuthToken() int64

GetAuthToken gets the authToken

func (*ExceptionMessage) GetExceptionMsg

func (msg *ExceptionMessage) GetExceptionMsg() string

func (*ExceptionMessage) GetExceptionType

func (msg *ExceptionMessage) GetExceptionType() int

func (*ExceptionMessage) GetIsUpdatable

func (msg *ExceptionMessage) GetIsUpdatable() bool

GetIsUpdatable checks whether this message updatable or not

func (*ExceptionMessage) GetMessageByteBufLength

func (msg *ExceptionMessage) GetMessageByteBufLength() int

GetMessageByteBufLength gets the MessageByteBufLength. This method is called after the toBytes() is executed.

func (*ExceptionMessage) GetRequestId

func (msg *ExceptionMessage) GetRequestId() int64

GetRequestId gets the requestId for the message. This will be used as the CorrelationId

func (*ExceptionMessage) GetSequenceNo

func (msg *ExceptionMessage) GetSequenceNo() int64

GetSequenceNo gets the sequenceNo of the message

func (*ExceptionMessage) GetServerErrorCode

func (msg *ExceptionMessage) GetServerErrorCode() int

func (*ExceptionMessage) GetSessionId

func (msg *ExceptionMessage) GetSessionId() int64

GetSessionId gets the session id

func (*ExceptionMessage) GetTimestamp

func (msg *ExceptionMessage) GetTimestamp() int64

GetTimestamp gets the Timestamp

func (*ExceptionMessage) GetVerbId

func (msg *ExceptionMessage) GetVerbId() int

GetVerbId gets verbId of the message

func (*ExceptionMessage) MarshalBinary

func (msg *ExceptionMessage) MarshalBinary() ([]byte, error)

func (*ExceptionMessage) ReadHeader

func (msg *ExceptionMessage) ReadHeader(is tgdb.TGInputStream) tgdb.TGError

ReadHeader reads the bytes from input stream and constructs a common header of network packet

func (*ExceptionMessage) ReadPayload

func (msg *ExceptionMessage) ReadPayload(is tgdb.TGInputStream) tgdb.TGError

ReadPayload reads the bytes from input stream and constructs message specific payload Attributes

func (*ExceptionMessage) SetAuthToken

func (msg *ExceptionMessage) SetAuthToken(authToken int64)

SetAuthToken sets the authToken

func (*ExceptionMessage) SetDataOffset

func (msg *ExceptionMessage) SetDataOffset(dataOffset int16)

SetDataOffset sets the offset at which data starts in the payload

func (*ExceptionMessage) SetExceptionMsg

func (msg *ExceptionMessage) SetExceptionMsg(exMsg string)

func (*ExceptionMessage) SetExceptionType

func (msg *ExceptionMessage) SetExceptionType(exType int)

func (*ExceptionMessage) SetIsUpdatable

func (msg *ExceptionMessage) SetIsUpdatable(updateFlag bool)

SetIsUpdatable sets the updatable flag

func (*ExceptionMessage) SetMessageByteBufLength

func (msg *ExceptionMessage) SetMessageByteBufLength(bufLength int)

SetMessageByteBufLength sets the message buffer length

func (*ExceptionMessage) SetRequestId

func (msg *ExceptionMessage) SetRequestId(requestId int64)

SetRequestId sets the request id

func (*ExceptionMessage) SetSequenceNo

func (msg *ExceptionMessage) SetSequenceNo(sequenceNo int64)

SetSequenceNo sets the sequenceNo

func (*ExceptionMessage) SetServerErrorCode

func (msg *ExceptionMessage) SetServerErrorCode(sCode int)

func (*ExceptionMessage) SetSessionId

func (msg *ExceptionMessage) SetSessionId(sessionId int64)

SetSessionId sets the session id

func (*ExceptionMessage) SetTimestamp

func (msg *ExceptionMessage) SetTimestamp(timestamp int64) tgdb.TGError

SetTimestamp sets the timestamp

func (*ExceptionMessage) SetVerbId

func (msg *ExceptionMessage) SetVerbId(verbId int)

SetVerbId sets verbId of the message

func (*ExceptionMessage) String

func (msg *ExceptionMessage) String() string

func (*ExceptionMessage) ToBytes

func (msg *ExceptionMessage) ToBytes() ([]byte, int, tgdb.TGError)

ToBytes converts a message object into byte format to be sent over the network to TGDB server

func (*ExceptionMessage) UnmarshalBinary

func (msg *ExceptionMessage) UnmarshalBinary(data []byte) error

UnmarshalBinary modifies the receiver so it must take a pointer receiver.

func (*ExceptionMessage) UpdateSequenceAndTimeStamp

func (msg *ExceptionMessage) UpdateSequenceAndTimeStamp(timestamp int64) tgdb.TGError

UpdateSequenceAndTimeStamp updates the SequenceAndTimeStamp, if message is mutable @param timestamp @return TGMessage on success, error on failure

func (*ExceptionMessage) WriteHeader

func (msg *ExceptionMessage) WriteHeader(os tgdb.TGOutputStream) tgdb.TGError

WriteHeader exports the values of the common message header Attributes to output stream

func (*ExceptionMessage) WritePayload

func (msg *ExceptionMessage) WritePayload(os tgdb.TGOutputStream) tgdb.TGError

WritePayload exports the values of the message specific payload Attributes to output stream

type FloatAttribute

type FloatAttribute struct {
	*AbstractAttribute
}

func DefaultFloatAttribute

func DefaultFloatAttribute() *FloatAttribute

Create NewTGDecimal Attribute Instance

func NewFloatAttribute

func NewFloatAttribute(attrDesc *AttributeDescriptor) *FloatAttribute

func NewFloatAttributeWithDesc

func NewFloatAttributeWithDesc(ownerEntity tgdb.TGEntity, attrDesc *AttributeDescriptor, value interface{}) *FloatAttribute

func NewFloatAttributeWithOwner

func NewFloatAttributeWithOwner(ownerEntity tgdb.TGEntity) *FloatAttribute

func (*FloatAttribute) GetAttributeDescriptor

func (obj *FloatAttribute) GetAttributeDescriptor() tgdb.TGAttributeDescriptor

GetAttributeDescriptor returns the AttributeDescriptor for this attribute

func (*FloatAttribute) GetIsModified

func (obj *FloatAttribute) GetIsModified() bool

GetIsModified checks whether the attribute modified or not

func (*FloatAttribute) GetName

func (obj *FloatAttribute) GetName() string

GetName gets the Name for this attribute as the most generic form

func (*FloatAttribute) GetOwner

func (obj *FloatAttribute) GetOwner() tgdb.TGEntity

GetOwner gets owner Entity of this attribute

func (*FloatAttribute) GetValue

func (obj *FloatAttribute) GetValue() interface{}

GetValue gets the value for this attribute as the most generic form

func (*FloatAttribute) IsNull

func (obj *FloatAttribute) IsNull() bool

IsNull checks whether the attribute value is null or not

func (*FloatAttribute) MarshalBinary

func (obj *FloatAttribute) MarshalBinary() ([]byte, error)

func (*FloatAttribute) ReadExternal

func (obj *FloatAttribute) ReadExternal(is tgdb.TGInputStream) tgdb.TGError

ReadExternal reads the byte format from an external input stream and constructs a system object

func (*FloatAttribute) ReadValue

func (obj *FloatAttribute) ReadValue(is tgdb.TGInputStream) tgdb.TGError

ReadValue reads the value from input stream

func (*FloatAttribute) ResetIsModified

func (obj *FloatAttribute) ResetIsModified()

ResetIsModified resets the IsModified flag - recursively, if needed

func (*FloatAttribute) SetFloat

func (obj *FloatAttribute) SetFloat(b float32)

func (*FloatAttribute) SetOwner

func (obj *FloatAttribute) SetOwner(ownerEntity tgdb.TGEntity)

SetOwner sets the owner entity - Need this indirection to traverse the chain

func (*FloatAttribute) SetValue

func (obj *FloatAttribute) SetValue(value interface{}) tgdb.TGError

SetValue sets the value for this attribute. Appropriate data conversion to its attribute desc will be performed If the object is Null, then the object is explicitly set, but no value is provided.

func (*FloatAttribute) String

func (obj *FloatAttribute) String() string

func (*FloatAttribute) UnmarshalBinary

func (obj *FloatAttribute) UnmarshalBinary(data []byte) error

func (*FloatAttribute) WriteExternal

func (obj *FloatAttribute) WriteExternal(os tgdb.TGOutputStream) tgdb.TGError

WriteExternal writes a system object into an appropriate byte format onto an external output stream

func (*FloatAttribute) WriteValue

func (obj *FloatAttribute) WriteValue(os tgdb.TGOutputStream) tgdb.TGError

WriteValue writes the value to output stream

type GeneralException

type GeneralException struct {
	*TGDBError
}

func DefaultTGGeneralException

func DefaultTGGeneralException() *GeneralException

Create New GeneralException Instance

func NewTGGeneralException

func NewTGGeneralException(eCode string, eType int, eMsg, eDetails string) *GeneralException

func NewTGGeneralExceptionWithMsg

func NewTGGeneralExceptionWithMsg(msg string) *GeneralException

func (*GeneralException) Error

func (e *GeneralException) Error() string

func (*GeneralException) GetErrorCode

func (e *GeneralException) GetErrorCode() string

func (*GeneralException) GetErrorDetails

func (e *GeneralException) GetErrorDetails() string

func (*GeneralException) GetErrorMsg

func (e *GeneralException) GetErrorMsg() string

func (*GeneralException) GetErrorType

func (e *GeneralException) GetErrorType() int

type GetEntityRequestMessage

type GetEntityRequestMessage struct {
	*AbstractProtocolMessage
	// contains filtered or unexported fields
}

func DefaultGetEntityRequestMessage

func DefaultGetEntityRequestMessage() *GetEntityRequestMessage

func NewGetEntityRequestMessage

func NewGetEntityRequestMessage(authToken, sessionId int64) *GetEntityRequestMessage

Create New Message Instance

func (*GetEntityRequestMessage) FromBytes

func (msg *GetEntityRequestMessage) FromBytes(buffer []byte) (tgdb.TGMessage, tgdb.TGError)

FromBytes constructs a message object from the input buffer in the byte format

func (*GetEntityRequestMessage) GetAuthToken

func (msg *GetEntityRequestMessage) GetAuthToken() int64

GetAuthToken gets the authToken

func (*GetEntityRequestMessage) GetBatchSize

func (msg *GetEntityRequestMessage) GetBatchSize() int

func (*GetEntityRequestMessage) GetCommand

func (msg *GetEntityRequestMessage) GetCommand() int16

func (*GetEntityRequestMessage) GetEdgeLimit

func (msg *GetEntityRequestMessage) GetEdgeLimit() int

func (*GetEntityRequestMessage) GetFetchSize

func (msg *GetEntityRequestMessage) GetFetchSize() int

func (*GetEntityRequestMessage) GetIsUpdatable

func (msg *GetEntityRequestMessage) GetIsUpdatable() bool

GetIsUpdatable checks whether this message updatable or not

func (*GetEntityRequestMessage) GetKey

func (msg *GetEntityRequestMessage) GetKey() tgdb.TGKey

func (*GetEntityRequestMessage) GetMessageByteBufLength

func (msg *GetEntityRequestMessage) GetMessageByteBufLength() int

GetMessageByteBufLength gets the MessageByteBufLength. This method is called after the toBytes() is executed.

func (*GetEntityRequestMessage) GetRequestId

func (msg *GetEntityRequestMessage) GetRequestId() int64

GetRequestId gets the requestId for the message. This will be used as the CorrelationId

func (*GetEntityRequestMessage) GetResultId

func (msg *GetEntityRequestMessage) GetResultId() int

func (*GetEntityRequestMessage) GetSequenceNo

func (msg *GetEntityRequestMessage) GetSequenceNo() int64

GetSequenceNo gets the sequenceNo of the message

func (*GetEntityRequestMessage) GetSessionId

func (msg *GetEntityRequestMessage) GetSessionId() int64

GetSessionId gets the session id

func (*GetEntityRequestMessage) GetTimestamp

func (msg *GetEntityRequestMessage) GetTimestamp() int64

GetTimestamp gets the Timestamp

func (*GetEntityRequestMessage) GetTraversalDepth

func (msg *GetEntityRequestMessage) GetTraversalDepth() int

func (*GetEntityRequestMessage) GetVerbId

func (msg *GetEntityRequestMessage) GetVerbId() int

GetVerbId gets verbId of the message

func (*GetEntityRequestMessage) MarshalBinary

func (msg *GetEntityRequestMessage) MarshalBinary() ([]byte, error)

func (*GetEntityRequestMessage) ReadHeader

ReadHeader reads the bytes from input stream and constructs a common header of network packet

func (*GetEntityRequestMessage) ReadPayload

func (msg *GetEntityRequestMessage) ReadPayload(is tgdb.TGInputStream) tgdb.TGError

ReadPayload reads the bytes from input stream and constructs message specific payload Attributes

func (*GetEntityRequestMessage) SetAuthToken

func (msg *GetEntityRequestMessage) SetAuthToken(authToken int64)

SetAuthToken sets the authToken

func (*GetEntityRequestMessage) SetBatchSize

func (msg *GetEntityRequestMessage) SetBatchSize(size int)

func (*GetEntityRequestMessage) SetCommand

func (msg *GetEntityRequestMessage) SetCommand(cmd int16)

func (*GetEntityRequestMessage) SetDataOffset

func (msg *GetEntityRequestMessage) SetDataOffset(dataOffset int16)

SetDataOffset sets the offset at which data starts in the payload

func (*GetEntityRequestMessage) SetEdgeLimit

func (msg *GetEntityRequestMessage) SetEdgeLimit(size int)

func (*GetEntityRequestMessage) SetFetchSize

func (msg *GetEntityRequestMessage) SetFetchSize(size int)

func (*GetEntityRequestMessage) SetIsUpdatable

func (msg *GetEntityRequestMessage) SetIsUpdatable(updateFlag bool)

SetIsUpdatable sets the updatable flag

func (*GetEntityRequestMessage) SetKey

func (msg *GetEntityRequestMessage) SetKey(key tgdb.TGKey)

func (*GetEntityRequestMessage) SetMessageByteBufLength

func (msg *GetEntityRequestMessage) SetMessageByteBufLength(bufLength int)

SetMessageByteBufLength sets the message buffer length

func (*GetEntityRequestMessage) SetRequestId

func (msg *GetEntityRequestMessage) SetRequestId(requestId int64)

SetRequestId sets the request id

func (*GetEntityRequestMessage) SetResultId

func (msg *GetEntityRequestMessage) SetResultId(resultId int)

func (*GetEntityRequestMessage) SetSequenceNo

func (msg *GetEntityRequestMessage) SetSequenceNo(sequenceNo int64)

SetSequenceNo sets the sequenceNo

func (*GetEntityRequestMessage) SetSessionId

func (msg *GetEntityRequestMessage) SetSessionId(sessionId int64)

SetSessionId sets the session id

func (*GetEntityRequestMessage) SetTimestamp

func (msg *GetEntityRequestMessage) SetTimestamp(timestamp int64) tgdb.TGError

SetTimestamp sets the timestamp

func (*GetEntityRequestMessage) SetTraversalDepth

func (msg *GetEntityRequestMessage) SetTraversalDepth(depth int)

func (*GetEntityRequestMessage) SetVerbId

func (msg *GetEntityRequestMessage) SetVerbId(verbId int)

SetVerbId sets verbId of the message

func (*GetEntityRequestMessage) String

func (msg *GetEntityRequestMessage) String() string

func (*GetEntityRequestMessage) ToBytes

func (msg *GetEntityRequestMessage) ToBytes() ([]byte, int, tgdb.TGError)

ToBytes converts a message object into byte format to be sent over the network to TGDB server

func (*GetEntityRequestMessage) UnmarshalBinary

func (msg *GetEntityRequestMessage) UnmarshalBinary(data []byte) error

UnmarshalBinary modifies the receiver so it must take a pointer receiver.

func (*GetEntityRequestMessage) UpdateSequenceAndTimeStamp

func (msg *GetEntityRequestMessage) UpdateSequenceAndTimeStamp(timestamp int64) tgdb.TGError

UpdateSequenceAndTimeStamp updates the SequenceAndTimeStamp, if message is mutable @param timestamp @return TGMessage on success, error on failure

func (*GetEntityRequestMessage) WriteHeader

WriteHeader exports the values of the common message header Attributes to output stream

func (*GetEntityRequestMessage) WritePayload

func (msg *GetEntityRequestMessage) WritePayload(os tgdb.TGOutputStream) tgdb.TGError

WritePayload exports the values of the message specific payload Attributes to output stream

type GetEntityResponseMessage

type GetEntityResponseMessage struct {
	*AbstractProtocolMessage
	// contains filtered or unexported fields
}

func DefaultGetEntityResponseMessage

func DefaultGetEntityResponseMessage() *GetEntityResponseMessage

func NewGetEntityResponseMessage

func NewGetEntityResponseMessage(authToken, sessionId int64) *GetEntityResponseMessage

Create a new message instance

func (*GetEntityResponseMessage) FromBytes

func (msg *GetEntityResponseMessage) FromBytes(buffer []byte) (tgdb.TGMessage, tgdb.TGError)

FromBytes constructs a message object from the input buffer in the byte format

func (*GetEntityResponseMessage) GetAuthToken

func (msg *GetEntityResponseMessage) GetAuthToken() int64

GetAuthToken gets the authToken

func (*GetEntityResponseMessage) GetEntityStream

func (msg *GetEntityResponseMessage) GetEntityStream() tgdb.TGInputStream

func (*GetEntityResponseMessage) GetHasResult

func (msg *GetEntityResponseMessage) GetHasResult() bool

func (*GetEntityResponseMessage) GetIsUpdatable

func (msg *GetEntityResponseMessage) GetIsUpdatable() bool

GetIsUpdatable checks whether this message updatable or not

func (*GetEntityResponseMessage) GetMessageByteBufLength

func (msg *GetEntityResponseMessage) GetMessageByteBufLength() int

GetMessageByteBufLength gets the MessageByteBufLength. This method is called after the toBytes() is executed.

func (*GetEntityResponseMessage) GetRequestId

func (msg *GetEntityResponseMessage) GetRequestId() int64

GetRequestId gets the requestId for the message. This will be used as the CorrelationId

func (*GetEntityResponseMessage) GetResultCount

func (msg *GetEntityResponseMessage) GetResultCount() int

func (*GetEntityResponseMessage) GetResultId

func (msg *GetEntityResponseMessage) GetResultId() int

func (*GetEntityResponseMessage) GetSequenceNo

func (msg *GetEntityResponseMessage) GetSequenceNo() int64

GetSequenceNo gets the sequenceNo of the message

func (*GetEntityResponseMessage) GetSessionId

func (msg *GetEntityResponseMessage) GetSessionId() int64

GetSessionId gets the session id

func (*GetEntityResponseMessage) GetTimestamp

func (msg *GetEntityResponseMessage) GetTimestamp() int64

GetTimestamp gets the Timestamp

func (*GetEntityResponseMessage) GetTotalCount

func (msg *GetEntityResponseMessage) GetTotalCount() int

func (*GetEntityResponseMessage) GetVerbId

func (msg *GetEntityResponseMessage) GetVerbId() int

GetVerbId gets verbId of the message

func (*GetEntityResponseMessage) MarshalBinary

func (msg *GetEntityResponseMessage) MarshalBinary() ([]byte, error)

func (*GetEntityResponseMessage) ReadHeader

ReadHeader reads the bytes from input stream and constructs a common header of network packet

func (*GetEntityResponseMessage) ReadPayload

ReadPayload reads the bytes from input stream and constructs message specific payload Attributes

func (*GetEntityResponseMessage) SetAuthToken

func (msg *GetEntityResponseMessage) SetAuthToken(authToken int64)

SetAuthToken sets the authToken

func (*GetEntityResponseMessage) SetDataOffset

func (msg *GetEntityResponseMessage) SetDataOffset(dataOffset int16)

SetDataOffset sets the offset at which data starts in the payload

func (*GetEntityResponseMessage) SetEntityStream

func (msg *GetEntityResponseMessage) SetEntityStream(eStream tgdb.TGInputStream)

func (*GetEntityResponseMessage) SetHasResult

func (msg *GetEntityResponseMessage) SetHasResult(rFlag bool)

func (*GetEntityResponseMessage) SetIsUpdatable

func (msg *GetEntityResponseMessage) SetIsUpdatable(updateFlag bool)

SetIsUpdatable sets the updatable flag

func (*GetEntityResponseMessage) SetMessageByteBufLength

func (msg *GetEntityResponseMessage) SetMessageByteBufLength(bufLength int)

SetMessageByteBufLength sets the message buffer length

func (*GetEntityResponseMessage) SetRequestId

func (msg *GetEntityResponseMessage) SetRequestId(requestId int64)

SetRequestId sets the request id

func (*GetEntityResponseMessage) SetResultCount

func (msg *GetEntityResponseMessage) SetResultCount(rCount int)

func (*GetEntityResponseMessage) SetResultId

func (msg *GetEntityResponseMessage) SetResultId(resultId int)

func (*GetEntityResponseMessage) SetSequenceNo

func (msg *GetEntityResponseMessage) SetSequenceNo(sequenceNo int64)

SetSequenceNo sets the sequenceNo

func (*GetEntityResponseMessage) SetSessionId

func (msg *GetEntityResponseMessage) SetSessionId(sessionId int64)

SetSessionId sets the session id

func (*GetEntityResponseMessage) SetTimestamp

func (msg *GetEntityResponseMessage) SetTimestamp(timestamp int64) tgdb.TGError

SetTimestamp sets the timestamp

func (*GetEntityResponseMessage) SetTotalCount

func (msg *GetEntityResponseMessage) SetTotalCount(tCount int)

func (*GetEntityResponseMessage) SetVerbId

func (msg *GetEntityResponseMessage) SetVerbId(verbId int)

SetVerbId sets verbId of the message

func (*GetEntityResponseMessage) String

func (msg *GetEntityResponseMessage) String() string

func (*GetEntityResponseMessage) ToBytes

func (msg *GetEntityResponseMessage) ToBytes() ([]byte, int, tgdb.TGError)

ToBytes converts a message object into byte format to be sent over the network to TGDB server

func (*GetEntityResponseMessage) UnmarshalBinary

func (msg *GetEntityResponseMessage) UnmarshalBinary(data []byte) error

UnmarshalBinary modifies the receiver so it must take a pointer receiver.

func (*GetEntityResponseMessage) UpdateSequenceAndTimeStamp

func (msg *GetEntityResponseMessage) UpdateSequenceAndTimeStamp(timestamp int64) tgdb.TGError

UpdateSequenceAndTimeStamp updates the SequenceAndTimeStamp, if message is mutable @param timestamp @return TGMessage on success, error on failure

func (*GetEntityResponseMessage) WriteHeader

WriteHeader exports the values of the common message header Attributes to output stream

func (*GetEntityResponseMessage) WritePayload

WritePayload exports the values of the message specific payload Attributes to output stream

type GetLargeObjectRequestMessage

type GetLargeObjectRequestMessage struct {
	*AbstractProtocolMessage
	// contains filtered or unexported fields
}

func DefaultGetLargeObjectRequestMessage

func DefaultGetLargeObjectRequestMessage() *GetLargeObjectRequestMessage

func NewGetLargeObjectRequestMessage

func NewGetLargeObjectRequestMessage(authToken, sessionId int64) *GetLargeObjectRequestMessage

Create New Message Instance

func (*GetLargeObjectRequestMessage) FromBytes

func (msg *GetLargeObjectRequestMessage) FromBytes(buffer []byte) (tgdb.TGMessage, tgdb.TGError)

FromBytes constructs a message object from the input buffer in the byte format

func (*GetLargeObjectRequestMessage) GetAuthToken

func (msg *GetLargeObjectRequestMessage) GetAuthToken() int64

GetAuthToken gets the authToken

func (*GetLargeObjectRequestMessage) GetDecryptFlag

func (msg *GetLargeObjectRequestMessage) GetDecryptFlag() bool

func (*GetLargeObjectRequestMessage) GetEntityId

func (msg *GetLargeObjectRequestMessage) GetEntityId() int64

func (*GetLargeObjectRequestMessage) GetIsUpdatable

func (msg *GetLargeObjectRequestMessage) GetIsUpdatable() bool

GetIsUpdatable checks whether this message updatable or not

func (*GetLargeObjectRequestMessage) GetMessageByteBufLength

func (msg *GetLargeObjectRequestMessage) GetMessageByteBufLength() int

GetMessageByteBufLength gets the MessageByteBufLength. This method is called after the toBytes() is executed.

func (*GetLargeObjectRequestMessage) GetRequestId

func (msg *GetLargeObjectRequestMessage) GetRequestId() int64

GetRequestId gets the requestId for the message. This will be used as the CorrelationId

func (*GetLargeObjectRequestMessage) GetSequenceNo

func (msg *GetLargeObjectRequestMessage) GetSequenceNo() int64

GetSequenceNo gets the sequenceNo of the message

func (*GetLargeObjectRequestMessage) GetSessionId

func (msg *GetLargeObjectRequestMessage) GetSessionId() int64

GetSessionId gets the session id

func (*GetLargeObjectRequestMessage) GetTimestamp

func (msg *GetLargeObjectRequestMessage) GetTimestamp() int64

GetTimestamp gets the Timestamp

func (*GetLargeObjectRequestMessage) GetVerbId

func (msg *GetLargeObjectRequestMessage) GetVerbId() int

GetVerbId gets verbId of the message

func (*GetLargeObjectRequestMessage) MarshalBinary

func (msg *GetLargeObjectRequestMessage) MarshalBinary() ([]byte, error)

func (*GetLargeObjectRequestMessage) ReadHeader

ReadHeader reads the bytes from input stream and constructs a common header of network packet

func (*GetLargeObjectRequestMessage) ReadPayload

ReadPayload reads the bytes from input stream and constructs message specific payload Attributes

func (*GetLargeObjectRequestMessage) SetAuthToken

func (msg *GetLargeObjectRequestMessage) SetAuthToken(authToken int64)

SetAuthToken sets the authToken

func (*GetLargeObjectRequestMessage) SetDataOffset

func (msg *GetLargeObjectRequestMessage) SetDataOffset(dataOffset int16)

SetDataOffset sets the offset at which data starts in the payload

func (*GetLargeObjectRequestMessage) SetDecryption

func (msg *GetLargeObjectRequestMessage) SetDecryption(flag bool)

func (*GetLargeObjectRequestMessage) SetEntityId

func (msg *GetLargeObjectRequestMessage) SetEntityId(id int64)

func (*GetLargeObjectRequestMessage) SetIsUpdatable

func (msg *GetLargeObjectRequestMessage) SetIsUpdatable(updateFlag bool)

SetIsUpdatable sets the updatable flag

func (*GetLargeObjectRequestMessage) SetMessageByteBufLength

func (msg *GetLargeObjectRequestMessage) SetMessageByteBufLength(bufLength int)

SetMessageByteBufLength sets the message buffer length

func (*GetLargeObjectRequestMessage) SetRequestId

func (msg *GetLargeObjectRequestMessage) SetRequestId(requestId int64)

SetRequestId sets the request id

func (*GetLargeObjectRequestMessage) SetSequenceNo

func (msg *GetLargeObjectRequestMessage) SetSequenceNo(sequenceNo int64)

SetSequenceNo sets the sequenceNo

func (*GetLargeObjectRequestMessage) SetSessionId

func (msg *GetLargeObjectRequestMessage) SetSessionId(sessionId int64)

SetSessionId sets the session id

func (*GetLargeObjectRequestMessage) SetTimestamp

func (msg *GetLargeObjectRequestMessage) SetTimestamp(timestamp int64) tgdb.TGError

SetTimestamp sets the timestamp

func (*GetLargeObjectRequestMessage) SetVerbId

func (msg *GetLargeObjectRequestMessage) SetVerbId(verbId int)

SetVerbId sets verbId of the message

func (*GetLargeObjectRequestMessage) String

func (msg *GetLargeObjectRequestMessage) String() string

func (*GetLargeObjectRequestMessage) ToBytes

func (msg *GetLargeObjectRequestMessage) ToBytes() ([]byte, int, tgdb.TGError)

ToBytes converts a message object into byte format to be sent over the network to TGDB server

func (*GetLargeObjectRequestMessage) UnmarshalBinary

func (msg *GetLargeObjectRequestMessage) UnmarshalBinary(data []byte) error

UnmarshalBinary modifies the receiver so it must take a pointer receiver.

func (*GetLargeObjectRequestMessage) UpdateSequenceAndTimeStamp

func (msg *GetLargeObjectRequestMessage) UpdateSequenceAndTimeStamp(timestamp int64) tgdb.TGError

UpdateSequenceAndTimeStamp updates the SequenceAndTimeStamp, if message is mutable @param timestamp @return TGMessage on success, error on failure

func (*GetLargeObjectRequestMessage) WriteHeader

WriteHeader exports the values of the common message header Attributes to output stream

func (*GetLargeObjectRequestMessage) WritePayload

WritePayload exports the values of the message specific payload Attributes to output stream

type GetLargeObjectResponseMessage

type GetLargeObjectResponseMessage struct {
	*AbstractProtocolMessage
	// contains filtered or unexported fields
}

func DefaultGetLargeObjectResponseMessage

func DefaultGetLargeObjectResponseMessage() *GetLargeObjectResponseMessage

func NewGetLargeObjectResponseMessage

func NewGetLargeObjectResponseMessage(authToken, sessionId int64) *GetLargeObjectResponseMessage

Create New Message Instance

func (*GetLargeObjectResponseMessage) FromBytes

func (msg *GetLargeObjectResponseMessage) FromBytes(buffer []byte) (tgdb.TGMessage, tgdb.TGError)

FromBytes constructs a message object from the input buffer in the byte format

func (*GetLargeObjectResponseMessage) GetAuthToken

func (msg *GetLargeObjectResponseMessage) GetAuthToken() int64

GetAuthToken gets the authToken

func (*GetLargeObjectResponseMessage) GetBuffer

func (msg *GetLargeObjectResponseMessage) GetBuffer() []byte

func (*GetLargeObjectResponseMessage) GetEntityId

func (msg *GetLargeObjectResponseMessage) GetEntityId() int64

func (*GetLargeObjectResponseMessage) GetIsUpdatable

func (msg *GetLargeObjectResponseMessage) GetIsUpdatable() bool

GetIsUpdatable checks whether this message updatable or not

func (*GetLargeObjectResponseMessage) GetMessageByteBufLength

func (msg *GetLargeObjectResponseMessage) GetMessageByteBufLength() int

GetMessageByteBufLength gets the MessageByteBufLength. This method is called after the toBytes() is executed.

func (*GetLargeObjectResponseMessage) GetRequestId

func (msg *GetLargeObjectResponseMessage) GetRequestId() int64

GetRequestId gets the requestId for the message. This will be used as the CorrelationId

func (*GetLargeObjectResponseMessage) GetSequenceNo

func (msg *GetLargeObjectResponseMessage) GetSequenceNo() int64

GetSequenceNo gets the sequenceNo of the message

func (*GetLargeObjectResponseMessage) GetSessionId

func (msg *GetLargeObjectResponseMessage) GetSessionId() int64

GetSessionId gets the session id

func (*GetLargeObjectResponseMessage) GetTimestamp

func (msg *GetLargeObjectResponseMessage) GetTimestamp() int64

GetTimestamp gets the Timestamp

func (*GetLargeObjectResponseMessage) GetVerbId

func (msg *GetLargeObjectResponseMessage) GetVerbId() int

GetVerbId gets verbId of the message

func (*GetLargeObjectResponseMessage) MarshalBinary

func (msg *GetLargeObjectResponseMessage) MarshalBinary() ([]byte, error)

func (*GetLargeObjectResponseMessage) ReadHeader

ReadHeader reads the bytes from input stream and constructs a common header of network packet

func (*GetLargeObjectResponseMessage) ReadPayload

ReadPayload reads the bytes from input stream and constructs message specific payload Attributes

func (*GetLargeObjectResponseMessage) SetAuthToken

func (msg *GetLargeObjectResponseMessage) SetAuthToken(authToken int64)

SetAuthToken sets the authToken

func (*GetLargeObjectResponseMessage) SetDataOffset

func (msg *GetLargeObjectResponseMessage) SetDataOffset(dataOffset int16)

SetDataOffset sets the offset at which data starts in the payload

func (*GetLargeObjectResponseMessage) SetEntityId

func (msg *GetLargeObjectResponseMessage) SetEntityId(id int64)

func (*GetLargeObjectResponseMessage) SetIsUpdatable

func (msg *GetLargeObjectResponseMessage) SetIsUpdatable(updateFlag bool)

SetIsUpdatable sets the updatable flag

func (*GetLargeObjectResponseMessage) SetMessageByteBufLength

func (msg *GetLargeObjectResponseMessage) SetMessageByteBufLength(bufLength int)

SetMessageByteBufLength sets the message buffer length

func (*GetLargeObjectResponseMessage) SetRequestId

func (msg *GetLargeObjectResponseMessage) SetRequestId(requestId int64)

SetRequestId sets the request id

func (*GetLargeObjectResponseMessage) SetSequenceNo

func (msg *GetLargeObjectResponseMessage) SetSequenceNo(sequenceNo int64)

SetSequenceNo sets the sequenceNo

func (*GetLargeObjectResponseMessage) SetSessionId

func (msg *GetLargeObjectResponseMessage) SetSessionId(sessionId int64)

SetSessionId sets the session id

func (*GetLargeObjectResponseMessage) SetTimestamp

func (msg *GetLargeObjectResponseMessage) SetTimestamp(timestamp int64) tgdb.TGError

SetTimestamp sets the timestamp

func (*GetLargeObjectResponseMessage) SetVerbId

func (msg *GetLargeObjectResponseMessage) SetVerbId(verbId int)

SetVerbId sets verbId of the message

func (*GetLargeObjectResponseMessage) String

func (msg *GetLargeObjectResponseMessage) String() string

func (*GetLargeObjectResponseMessage) ToBytes

func (msg *GetLargeObjectResponseMessage) ToBytes() ([]byte, int, tgdb.TGError)

ToBytes converts a message object into byte format to be sent over the network to TGDB server

func (*GetLargeObjectResponseMessage) UnmarshalBinary

func (msg *GetLargeObjectResponseMessage) UnmarshalBinary(data []byte) error

UnmarshalBinary modifies the receiver so it must take a pointer receiver.

func (*GetLargeObjectResponseMessage) UpdateSequenceAndTimeStamp

func (msg *GetLargeObjectResponseMessage) UpdateSequenceAndTimeStamp(timestamp int64) tgdb.TGError

UpdateSequenceAndTimeStamp updates the SequenceAndTimeStamp, if message is mutable @param timestamp @return TGMessage on success, error on failure

func (*GetLargeObjectResponseMessage) WriteHeader

WriteHeader exports the values of the common message header Attributes to output stream

func (*GetLargeObjectResponseMessage) WritePayload

WritePayload exports the values of the message specific payload Attributes to output stream

type Graph

type Graph struct {
	*Node
	// contains filtered or unexported fields
}

func DefaultGraph

func DefaultGraph() *Graph

func NewGraph

func NewGraph(gmd *GraphMetadata) *Graph

func NewGraphWithName

func NewGraphWithName(gmd *GraphMetadata, name string) *Graph

func (*Graph) AddEdge

func (obj *Graph) AddEdge(edge tgdb.TGEdge)

func (*Graph) AddEdgeWithDirectionType

func (obj *Graph) AddEdgeWithDirectionType(node tgdb.TGNode, edgeType tgdb.TGEdgeType, directionType tgdb.TGDirectionType) tgdb.TGEdge

func (*Graph) AddEdges

func (obj *Graph) AddEdges(edges []tgdb.TGEdge) (tgdb.TGGraph, tgdb.TGError)

func (*Graph) AddNode

func (obj *Graph) AddNode(node tgdb.TGNode) (tgdb.TGGraph, tgdb.TGError)

func (*Graph) CreateGraph

func (obj *Graph) CreateGraph(name string) (tgdb.TGGraph, tgdb.TGError)

func (*Graph) GetAttribute

func (obj *Graph) GetAttribute(attrName string) tgdb.TGAttribute

GetAttribute gets the attribute for the Name specified

func (*Graph) GetAttributes

func (obj *Graph) GetAttributes() ([]tgdb.TGAttribute, tgdb.TGError)

GetAttributes lists of all the Attributes set

func (*Graph) GetEdges

func (obj *Graph) GetEdges() []tgdb.TGEdge

func (*Graph) GetEdgesForDirectionType

func (obj *Graph) GetEdgesForDirectionType(directionType tgdb.TGDirectionType) []tgdb.TGEdge

func (*Graph) GetEdgesForEdgeType

func (obj *Graph) GetEdgesForEdgeType(edgeType tgdb.TGEdgeType, direction tgdb.TGDirection) []tgdb.TGEdge

func (*Graph) GetEntityKind

func (obj *Graph) GetEntityKind() tgdb.TGEntityKind

GetEntityKind returns the EntityKind as a constant

func (*Graph) GetEntityType

func (obj *Graph) GetEntityType() tgdb.TGEntityType

GetEntityType returns the EntityType

func (*Graph) GetGraphMetadata

func (obj *Graph) GetGraphMetadata() tgdb.TGGraphMetadata

GetGraphMetadata returns the Graph Meta Data - New in GO Lang

func (*Graph) GetIsDeleted

func (obj *Graph) GetIsDeleted() bool

GetIsDeleted checks whether this entity is already deleted in the system or not

func (*Graph) GetIsNew

func (obj *Graph) GetIsNew() bool

GetIsNew checks whether this entity that is currently being added to the system is new or not

func (*Graph) GetModifiedAttributes

func (obj *Graph) GetModifiedAttributes() []tgdb.TGAttribute

func (*Graph) GetName

func (obj *Graph) GetName() string

func (*Graph) GetNode

func (obj *Graph) GetNode(filter tgdb.TGFilter) (tgdb.TGNode, tgdb.TGError)

func (*Graph) GetVersion

func (obj *Graph) GetVersion() int

GetVersion gets the version of the Entity

func (*Graph) GetVirtualId

func (obj *Graph) GetVirtualId() int64

GetVirtualId gets Entity identifier At the time of creation before reaching the server, it is the virtual id Upon successful creation, server returns a valid entity id that gets set in place of virtual id

func (*Graph) IsAttributeSet

func (obj *Graph) IsAttributeSet(attrName string) bool

IsAttributeSet checks whether this entity is an Attribute set or not

func (*Graph) ListNodes

func (obj *Graph) ListNodes(filter tgdb.TGFilter, recurseAllSubGraphs bool) (tgdb.TGNode, tgdb.TGError)

func (*Graph) MarshalBinary

func (obj *Graph) MarshalBinary() ([]byte, error)

func (*Graph) ReadExternal

func (obj *Graph) ReadExternal(is tgdb.TGInputStream) tgdb.TGError

ReadExternal reads the byte format from an external input stream and constructs a system object

func (*Graph) RemoveGraph

func (obj *Graph) RemoveGraph(name string) (tgdb.TGGraph, tgdb.TGError)

func (*Graph) RemoveNode

func (obj *Graph) RemoveNode(node tgdb.TGNode) (tgdb.TGGraph, tgdb.TGError)

func (*Graph) RemoveNodes

func (obj *Graph) RemoveNodes(filter tgdb.TGFilter) int

func (*Graph) ResetModifiedAttributes

func (obj *Graph) ResetModifiedAttributes()

ResetModifiedAttributes resets the dirty flag on Attributes

func (*Graph) SetAttribute

func (obj *Graph) SetAttribute(attr tgdb.TGAttribute) tgdb.TGError

SetAttribute associates the specified Attribute to this Entity

func (*Graph) SetEntityId

func (obj *Graph) SetEntityId(id int64)

SetEntityId sets Entity id and reset Virtual id after creation

func (*Graph) SetIsDeleted

func (obj *Graph) SetIsDeleted(flag bool)

SetIsDeleted set the deleted flag

func (*Graph) SetIsInitialized

func (obj *Graph) SetIsInitialized(flag bool)

SetIsInitialized set the initialized flag

func (*Graph) SetIsNew

func (obj *Graph) SetIsNew(flag bool)

SetIsNew sets the flag that this is a new entity

func (*Graph) SetName

func (obj *Graph) SetName(name string)

func (*Graph) SetOrCreateAttribute

func (obj *Graph) SetOrCreateAttribute(name string, value interface{}) tgdb.TGError

SetOrCreateAttribute dynamically associates the attribute to this entity If the AttributeDescriptor doesn't exist in the database, create a new one

func (*Graph) SetVersion

func (obj *Graph) SetVersion(version int)

SetVersion sets the version of the Entity

func (*Graph) String

func (obj *Graph) String() string

func (*Graph) UnmarshalBinary

func (obj *Graph) UnmarshalBinary(data []byte) error

func (*Graph) WriteExternal

func (obj *Graph) WriteExternal(os tgdb.TGOutputStream) tgdb.TGError

WriteExternal writes a system object into an appropriate byte format onto an external output stream

type GraphManager

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

func NewGraphManager

func NewGraphManager(gmd GraphMetadata) GraphManager

func (*GraphManager) CreateEdge

func (obj *GraphManager) CreateEdge(fromNode tgdb.TGNode, toNode tgdb.TGNode, edgeType int) (tgdb.TGEdge, tgdb.TGError)

CreateEdge creates an Edge

func (*GraphManager) CreateEdgeWithDirection

func (obj *GraphManager) CreateEdgeWithDirection(fromNode tgdb.TGNode, toNode tgdb.TGNode, directionType tgdb.TGDirectionType) (tgdb.TGEdge, tgdb.TGError)

CreateEdgeWithDirection creates an Edge with direction

func (*GraphManager) CreateGraph

func (obj *GraphManager) CreateGraph(name string) (tgdb.TGGraph, tgdb.TGError)

CreateGraph creates a SubGraph at the Root level.

func (*GraphManager) CreateNode

func (obj *GraphManager) CreateNode() (tgdb.TGNode, tgdb.TGError)

CreateNode creates Node within this Graph. There is a default Root Graph.

func (*GraphManager) CreateNodeForNodeType

func (obj *GraphManager) CreateNodeForNodeType(nodeType tgdb.TGNodeType) (tgdb.TGNode, tgdb.TGError)

CreateNodeForNodeType creates Node of particular Type

func (*GraphManager) CreateQuery

func (obj *GraphManager) CreateQuery(filter tgdb.TGFilter) tgdb.TGQuery

CreateQuery creates a Reusable Query

func (*GraphManager) DeleteNode

func (obj *GraphManager) DeleteNode(filter tgdb.TGFilter) (tgdb.TGGraphManager, tgdb.TGError)

DeleteNode removes this node from the graph

func (*GraphManager) DeleteNodes

func (obj *GraphManager) DeleteNodes(filter tgdb.TGFilter) (tgdb.TGGraphManager, tgdb.TGError)

DeleteNodes removes the nodes from this graph that match the filter

func (*GraphManager) GetGraphMetadata

func (obj *GraphManager) GetGraphMetadata() tgdb.TGGraphMetadata

GetGraphMetadata gets the Graph Metadata

func (*GraphManager) GetName

func (obj *GraphManager) GetName() string

GetName gets Graph Manager's Name

func (*GraphManager) QueryNodes

func (obj *GraphManager) QueryNodes(filter tgdb.TGFilter, args ...interface{}) tgdb.TGResultSet

QueryNodes gets Nodes based on the Filter condition with a set of Arguments

func (*GraphManager) Traverse

func (obj *GraphManager) Traverse(descriptor tgdb.TGTraversalDescriptor, startingPoints []tgdb.TGNode) tgdb.TGResultSet

Traverse follows the graph using the traversal descriptor

type GraphMetadata

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

func DefaultGraphMetadata

func DefaultGraphMetadata() *GraphMetadata

func NewGraphMetadata

func NewGraphMetadata(gof *GraphObjectFactory) *GraphMetadata

func (*GraphMetadata) CreateAttributeDescriptor

func (obj *GraphMetadata) CreateAttributeDescriptor(attrName string, attrType int, isArray bool) tgdb.TGAttributeDescriptor

CreateAttributeDescriptor creates Attribute Descriptor

func (*GraphMetadata) CreateAttributeDescriptorForDataType

func (obj *GraphMetadata) CreateAttributeDescriptorForDataType(attrName string, dataTypeClassName string) tgdb.TGAttributeDescriptor

CreateAttributeDescriptorForDataType creates Attribute Descriptor for data/attribute type - New in GO Lang

func (*GraphMetadata) CreateCompositeKey

func (obj *GraphMetadata) CreateCompositeKey(nodeTypeName string) tgdb.TGKey

CreateCompositeKey creates composite key

func (*GraphMetadata) CreateEdgeType

func (obj *GraphMetadata) CreateEdgeType(typeName string, parentEdgeType tgdb.TGEdgeType) tgdb.TGEdgeType

CreateEdgeType creates Edge Type

func (*GraphMetadata) CreateNodeType

func (obj *GraphMetadata) CreateNodeType(typeName string, parentNodeType tgdb.TGNodeType) tgdb.TGNodeType

CreateNodeType creates a Node Type

func (*GraphMetadata) GetAttributeDescriptor

func (obj *GraphMetadata) GetAttributeDescriptor(attrName string) (tgdb.TGAttributeDescriptor, tgdb.TGError)

GetAttributeDescriptor gets the Attribute Descriptor by Name

func (*GraphMetadata) GetAttributeDescriptorById

func (obj *GraphMetadata) GetAttributeDescriptorById(id int64) (tgdb.TGAttributeDescriptor, tgdb.TGError)

GetAttributeDescriptorById gets the Attribute Descriptor by Name

func (*GraphMetadata) GetAttributeDescriptors

func (obj *GraphMetadata) GetAttributeDescriptors() ([]tgdb.TGAttributeDescriptor, tgdb.TGError)

GetAttributeDescriptors gets a list of Attribute Descriptors

func (*GraphMetadata) GetAttributeDescriptorsById

func (obj *GraphMetadata) GetAttributeDescriptorsById() map[int64]tgdb.TGAttributeDescriptor

func (*GraphMetadata) GetConnection

func (obj *GraphMetadata) GetConnection() tgdb.TGConnection

func (*GraphMetadata) GetEdgeType

func (obj *GraphMetadata) GetEdgeType(typeName string) (tgdb.TGEdgeType, tgdb.TGError)

GetEdgeType returns the Edge by Name

func (*GraphMetadata) GetEdgeTypeById

func (obj *GraphMetadata) GetEdgeTypeById(id int) (tgdb.TGEdgeType, tgdb.TGError)

GetEdgeTypeById returns the Edge Type by id

func (*GraphMetadata) GetEdgeTypes

func (obj *GraphMetadata) GetEdgeTypes() ([]tgdb.TGEdgeType, tgdb.TGError)

GetEdgeTypes returns a set of know edge Type

func (*GraphMetadata) GetEdgeTypesById

func (obj *GraphMetadata) GetEdgeTypesById() map[int]tgdb.TGEdgeType

func (*GraphMetadata) GetGraphObjectFactory

func (obj *GraphMetadata) GetGraphObjectFactory() *GraphObjectFactory

func (*GraphMetadata) GetNewAttributeDescriptors

func (obj *GraphMetadata) GetNewAttributeDescriptors() ([]tgdb.TGAttributeDescriptor, tgdb.TGError)

func (*GraphMetadata) GetNodeType

func (obj *GraphMetadata) GetNodeType(typeName string) (tgdb.TGNodeType, tgdb.TGError)

GetNodeType gets Node Type by Name

func (*GraphMetadata) GetNodeTypeById

func (obj *GraphMetadata) GetNodeTypeById(id int) (tgdb.TGNodeType, tgdb.TGError)

GetNodeTypeById returns the Node types by id

func (*GraphMetadata) GetNodeTypes

func (obj *GraphMetadata) GetNodeTypes() ([]tgdb.TGNodeType, tgdb.TGError)

GetNodeTypes returns a set of Node Type defined in the System

func (*GraphMetadata) GetNodeTypesById

func (obj *GraphMetadata) GetNodeTypesById() map[int]tgdb.TGNodeType

func (*GraphMetadata) IsInitialized

func (obj *GraphMetadata) IsInitialized() bool

func (*GraphMetadata) MarshalBinary

func (obj *GraphMetadata) MarshalBinary() ([]byte, error)

func (*GraphMetadata) ReadExternal

func (obj *GraphMetadata) ReadExternal(is tgdb.TGInputStream) tgdb.TGError

ReadExternal reads the byte format from an external input stream and constructs a system object

func (*GraphMetadata) SetAttributeDescriptors

func (obj *GraphMetadata) SetAttributeDescriptors(attrDesc map[string]tgdb.TGAttributeDescriptor)

func (*GraphMetadata) SetAttributeDescriptorsById

func (obj *GraphMetadata) SetAttributeDescriptorsById(attrDescId map[int64]tgdb.TGAttributeDescriptor)

func (*GraphMetadata) SetEdgeTypes

func (obj *GraphMetadata) SetEdgeTypes(edgeTypes map[string]tgdb.TGEdgeType)

func (*GraphMetadata) SetEdgeTypesById

func (obj *GraphMetadata) SetEdgeTypesById(edgeTypesId map[int]tgdb.TGEdgeType)

func (*GraphMetadata) SetInitialized

func (obj *GraphMetadata) SetInitialized(flag bool)

func (*GraphMetadata) SetNodeTypes

func (obj *GraphMetadata) SetNodeTypes(nodeTypes map[string]tgdb.TGNodeType)

func (*GraphMetadata) SetNodeTypesById

func (obj *GraphMetadata) SetNodeTypesById(nodeTypes map[int]tgdb.TGNodeType)

func (*GraphMetadata) UnmarshalBinary

func (obj *GraphMetadata) UnmarshalBinary(data []byte) error

func (*GraphMetadata) UpdateMetadata

func (obj *GraphMetadata) UpdateMetadata(attrDescList []tgdb.TGAttributeDescriptor, nodeTypeList []tgdb.TGNodeType, edgeTypeList []tgdb.TGEdgeType) tgdb.TGError

func (*GraphMetadata) WriteExternal

func (obj *GraphMetadata) WriteExternal(os tgdb.TGOutputStream) tgdb.TGError

WriteExternal writes a system object into an appropriate byte format onto an external output stream

type GraphObjectFactory

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

func DefaultGraphObjectFactory

func DefaultGraphObjectFactory() *GraphObjectFactory

func NewGraphObjectFactory

func NewGraphObjectFactory(conn tgdb.TGConnection) *GraphObjectFactory

func (*GraphObjectFactory) CreateCompositeKey

func (obj *GraphObjectFactory) CreateCompositeKey(nodeTypeName string) (tgdb.TGKey, tgdb.TGError)

CreateCompositeKey creates a CompositeKey for a SystemTypeNode. The composite key can also be a single key

func (*GraphObjectFactory) CreateEdgeWithDirection

func (obj *GraphObjectFactory) CreateEdgeWithDirection(fromNode tgdb.TGNode, toNode tgdb.TGNode, directionType tgdb.TGDirectionType) (tgdb.TGEdge, tgdb.TGError)

CreateEdgeWithDirection creates an Edge with a direction

func (*GraphObjectFactory) CreateEdgeWithEdgeType

func (obj *GraphObjectFactory) CreateEdgeWithEdgeType(fromNode tgdb.TGNode, toNode tgdb.TGNode, edgeType tgdb.TGEdgeType) (tgdb.TGEdge, tgdb.TGError)

CreateEdgeWithEdgeType creates an Edge

func (*GraphObjectFactory) CreateEntity

func (obj *GraphObjectFactory) CreateEntity(entityKind tgdb.TGEntityKind) (tgdb.TGEntity, tgdb.TGError)

CreateEntity creates entity based on the entity kind specified

func (*GraphObjectFactory) CreateEntityId

func (obj *GraphObjectFactory) CreateEntityId(buf []byte) (tgdb.TGEntityId, tgdb.TGError)

CreateEntityId creates entity id from input buffer

func (*GraphObjectFactory) CreateGraph

func (obj *GraphObjectFactory) CreateGraph(name string) (tgdb.TGGraph, tgdb.TGError)

CreateGraph creates a Graph

func (*GraphObjectFactory) CreateNode

func (obj *GraphObjectFactory) CreateNode() (tgdb.TGNode, tgdb.TGError)

CreateNode creates a Node

func (*GraphObjectFactory) CreateNodeInGraph

func (obj *GraphObjectFactory) CreateNodeInGraph(nodeType tgdb.TGNodeType) (tgdb.TGNode, tgdb.TGError)

CreateNodeInGraph creates Node within this Graph. There is a default Root Graph.

func (*GraphObjectFactory) GetConnection

func (obj *GraphObjectFactory) GetConnection() tgdb.TGConnection

func (*GraphObjectFactory) GetGraphMetaData

func (obj *GraphObjectFactory) GetGraphMetaData() *GraphMetadata

func (*GraphObjectFactory) MarshalBinary

func (obj *GraphObjectFactory) MarshalBinary() ([]byte, error)

func (*GraphObjectFactory) UnmarshalBinary

func (obj *GraphObjectFactory) UnmarshalBinary(data []byte) error

type HandShakeRequestMessage

type HandShakeRequestMessage struct {
	*AbstractProtocolMessage
	// contains filtered or unexported fields
}

func DefaultHandShakeRequestMessage

func DefaultHandShakeRequestMessage() *HandShakeRequestMessage

func NewHandShakeRequestMessage

func NewHandShakeRequestMessage(authToken, sessionId int64) *HandShakeRequestMessage

Create New Message Instance

func (*HandShakeRequestMessage) FromBytes

func (msg *HandShakeRequestMessage) FromBytes(buffer []byte) (tgdb.TGMessage, tgdb.TGError)

FromBytes constructs a message object from the input buffer in the byte format

func (*HandShakeRequestMessage) GetAuthToken

func (msg *HandShakeRequestMessage) GetAuthToken() int64

GetAuthToken gets the authToken

func (*HandShakeRequestMessage) GetChallenge

func (msg *HandShakeRequestMessage) GetChallenge() int64

func (*HandShakeRequestMessage) GetIsUpdatable

func (msg *HandShakeRequestMessage) GetIsUpdatable() bool

GetIsUpdatable checks whether this message updatable or not

func (*HandShakeRequestMessage) GetMessageByteBufLength

func (msg *HandShakeRequestMessage) GetMessageByteBufLength() int

GetMessageByteBufLength gets the MessageByteBufLength. This method is called after the toBytes() is executed.

func (*HandShakeRequestMessage) GetRequestId

func (msg *HandShakeRequestMessage) GetRequestId() int64

GetRequestId gets the requestId for the message. This will be used as the CorrelationId

func (*HandShakeRequestMessage) GetRequestType

func (msg *HandShakeRequestMessage) GetRequestType() int

func (*HandShakeRequestMessage) GetSequenceNo

func (msg *HandShakeRequestMessage) GetSequenceNo() int64

GetSequenceNo gets the sequenceNo of the message

func (*HandShakeRequestMessage) GetSessionId

func (msg *HandShakeRequestMessage) GetSessionId() int64

GetSessionId gets the session id

func (*HandShakeRequestMessage) GetSslMode

func (msg *HandShakeRequestMessage) GetSslMode() bool

func (*HandShakeRequestMessage) GetTimestamp

func (msg *HandShakeRequestMessage) GetTimestamp() int64

GetTimestamp gets the Timestamp

func (*HandShakeRequestMessage) GetVerbId

func (msg *HandShakeRequestMessage) GetVerbId() int

GetVerbId gets verbId of the message

func (*HandShakeRequestMessage) GetVersion

func (msg *HandShakeRequestMessage) GetVersion() int64

func (*HandShakeRequestMessage) MarshalBinary

func (msg *HandShakeRequestMessage) MarshalBinary() ([]byte, error)

func (*HandShakeRequestMessage) ReadHeader

ReadHeader reads the bytes from input stream and constructs a common header of network packet

func (*HandShakeRequestMessage) ReadPayload

func (msg *HandShakeRequestMessage) ReadPayload(is tgdb.TGInputStream) tgdb.TGError

ReadPayload reads the bytes from input stream and constructs message specific payload Attributes

func (*HandShakeRequestMessage) SetAuthToken

func (msg *HandShakeRequestMessage) SetAuthToken(authToken int64)

SetAuthToken sets the authToken

func (*HandShakeRequestMessage) SetChallenge

func (msg *HandShakeRequestMessage) SetChallenge(challenge int64)

func (*HandShakeRequestMessage) SetDataOffset

func (msg *HandShakeRequestMessage) SetDataOffset(dataOffset int16)

SetDataOffset sets the offset at which data starts in the payload

func (*HandShakeRequestMessage) SetIsUpdatable

func (msg *HandShakeRequestMessage) SetIsUpdatable(updateFlag bool)

SetIsUpdatable sets the updatable flag

func (*HandShakeRequestMessage) SetMessageByteBufLength

func (msg *HandShakeRequestMessage) SetMessageByteBufLength(bufLength int)

SetMessageByteBufLength sets the message buffer length

func (*HandShakeRequestMessage) SetRequestId

func (msg *HandShakeRequestMessage) SetRequestId(requestId int64)

SetRequestId sets the request id

func (*HandShakeRequestMessage) SetRequestType

func (msg *HandShakeRequestMessage) SetRequestType(rType int)

func (*HandShakeRequestMessage) SetSequenceNo

func (msg *HandShakeRequestMessage) SetSequenceNo(sequenceNo int64)

SetSequenceNo sets the sequenceNo

func (*HandShakeRequestMessage) SetSessionId

func (msg *HandShakeRequestMessage) SetSessionId(sessionId int64)

SetSessionId sets the session id

func (*HandShakeRequestMessage) SetSslMode

func (msg *HandShakeRequestMessage) SetSslMode(mode bool)

func (*HandShakeRequestMessage) SetTimestamp

func (msg *HandShakeRequestMessage) SetTimestamp(timestamp int64) tgdb.TGError

SetTimestamp sets the timestamp

func (*HandShakeRequestMessage) SetVerbId

func (msg *HandShakeRequestMessage) SetVerbId(verbId int)

SetVerbId sets verbId of the message

func (*HandShakeRequestMessage) SetVersion

func (msg *HandShakeRequestMessage) SetVersion(version int64)

func (*HandShakeRequestMessage) String

func (msg *HandShakeRequestMessage) String() string

func (*HandShakeRequestMessage) ToBytes

func (msg *HandShakeRequestMessage) ToBytes() ([]byte, int, tgdb.TGError)

ToBytes converts a message object into byte format to be sent over the network to TGDB server

func (*HandShakeRequestMessage) UnmarshalBinary

func (msg *HandShakeRequestMessage) UnmarshalBinary(data []byte) error

UnmarshalBinary modifies the receiver so it must take a pointer receiver.

func (*HandShakeRequestMessage) UpdateSequenceAndTimeStamp

func (msg *HandShakeRequestMessage) UpdateSequenceAndTimeStamp(timestamp int64) tgdb.TGError

UpdateSequenceAndTimeStamp updates the SequenceAndTimeStamp, if message is mutable @param timestamp @return TGMessage on success, error on failure

func (*HandShakeRequestMessage) WriteHeader

WriteHeader exports the values of the common message header Attributes to output stream

func (*HandShakeRequestMessage) WritePayload

func (msg *HandShakeRequestMessage) WritePayload(os tgdb.TGOutputStream) tgdb.TGError

WritePayload exports the values of the message specific payload Attributes to output stream

type HandShakeResponseMessage

type HandShakeResponseMessage struct {
	*AbstractProtocolMessage
	// contains filtered or unexported fields
}

func DefaultHandShakeResponseMessage

func DefaultHandShakeResponseMessage() *HandShakeResponseMessage

func NewHandShakeResponseMessage

func NewHandShakeResponseMessage(authToken, sessionId int64) *HandShakeResponseMessage

Create New Message Instance

func (*HandShakeResponseMessage) FromBytes

func (msg *HandShakeResponseMessage) FromBytes(buffer []byte) (tgdb.TGMessage, tgdb.TGError)

FromBytes constructs a message object from the input buffer in the byte format

func (*HandShakeResponseMessage) GetAuthToken

func (msg *HandShakeResponseMessage) GetAuthToken() int64

GetAuthToken gets the authToken

func (*HandShakeResponseMessage) GetChallenge

func (msg *HandShakeResponseMessage) GetChallenge() int64

func (*HandShakeResponseMessage) GetErrorMessage

func (msg *HandShakeResponseMessage) GetErrorMessage() string

func (*HandShakeResponseMessage) GetIsUpdatable

func (msg *HandShakeResponseMessage) GetIsUpdatable() bool

GetIsUpdatable checks whether this message updatable or not

func (*HandShakeResponseMessage) GetMessageByteBufLength

func (msg *HandShakeResponseMessage) GetMessageByteBufLength() int

GetMessageByteBufLength gets the MessageByteBufLength. This method is called after the toBytes() is executed.

func (*HandShakeResponseMessage) GetRequestId

func (msg *HandShakeResponseMessage) GetRequestId() int64

GetRequestId gets the requestId for the message. This will be used as the CorrelationId

func (*HandShakeResponseMessage) GetResponseStatus

func (msg *HandShakeResponseMessage) GetResponseStatus() int

func (*HandShakeResponseMessage) GetSequenceNo

func (msg *HandShakeResponseMessage) GetSequenceNo() int64

GetSequenceNo gets the sequenceNo of the message

func (*HandShakeResponseMessage) GetSessionId

func (msg *HandShakeResponseMessage) GetSessionId() int64

GetSessionId gets the session id

func (*HandShakeResponseMessage) GetTimestamp

func (msg *HandShakeResponseMessage) GetTimestamp() int64

GetTimestamp gets the Timestamp

func (*HandShakeResponseMessage) GetVerbId

func (msg *HandShakeResponseMessage) GetVerbId() int

GetVerbId gets verbId of the message

func (*HandShakeResponseMessage) GetVersion

func (msg *HandShakeResponseMessage) GetVersion() int64

func (*HandShakeResponseMessage) MarshalBinary

func (msg *HandShakeResponseMessage) MarshalBinary() ([]byte, error)

func (*HandShakeResponseMessage) ReadHeader

ReadHeader reads the bytes from input stream and constructs a common header of network packet

func (*HandShakeResponseMessage) ReadPayload

ReadPayload reads the bytes from input stream and constructs message specific payload Attributes

func (*HandShakeResponseMessage) SetAuthToken

func (msg *HandShakeResponseMessage) SetAuthToken(authToken int64)

SetAuthToken sets the authToken

func (*HandShakeResponseMessage) SetChallenge

func (msg *HandShakeResponseMessage) SetChallenge(challenge int64)

func (*HandShakeResponseMessage) SetDataOffset

func (msg *HandShakeResponseMessage) SetDataOffset(dataOffset int16)

SetDataOffset sets the offset at which data starts in the payload

func (*HandShakeResponseMessage) SetErrorMessage

func (msg *HandShakeResponseMessage) SetErrorMessage(errMsg string)

func (*HandShakeResponseMessage) SetIsUpdatable

func (msg *HandShakeResponseMessage) SetIsUpdatable(updateFlag bool)

SetIsUpdatable sets the updatable flag

func (*HandShakeResponseMessage) SetMessageByteBufLength

func (msg *HandShakeResponseMessage) SetMessageByteBufLength(bufLength int)

SetMessageByteBufLength sets the message buffer length

func (*HandShakeResponseMessage) SetRequestId

func (msg *HandShakeResponseMessage) SetRequestId(requestId int64)

SetRequestId sets the request id

func (*HandShakeResponseMessage) SetResponseStatus

func (msg *HandShakeResponseMessage) SetResponseStatus(rStatus int)

func (*HandShakeResponseMessage) SetSequenceNo

func (msg *HandShakeResponseMessage) SetSequenceNo(sequenceNo int64)

SetSequenceNo sets the sequenceNo

func (*HandShakeResponseMessage) SetSessionId

func (msg *HandShakeResponseMessage) SetSessionId(sessionId int64)

SetSessionId sets the session id

func (*HandShakeResponseMessage) SetTimestamp

func (msg *HandShakeResponseMessage) SetTimestamp(timestamp int64) tgdb.TGError

SetTimestamp sets the timestamp

func (*HandShakeResponseMessage) SetVerbId

func (msg *HandShakeResponseMessage) SetVerbId(verbId int)

SetVerbId sets verbId of the message

func (*HandShakeResponseMessage) SetVersion

func (msg *HandShakeResponseMessage) SetVersion(version int64)

func (*HandShakeResponseMessage) String

func (msg *HandShakeResponseMessage) String() string

func (*HandShakeResponseMessage) ToBytes

func (msg *HandShakeResponseMessage) ToBytes() ([]byte, int, tgdb.TGError)

ToBytes converts a message object into byte format to be sent over the network to TGDB server

func (*HandShakeResponseMessage) UnmarshalBinary

func (msg *HandShakeResponseMessage) UnmarshalBinary(data []byte) error

UnmarshalBinary modifies the receiver so it must take a pointer receiver.

func (*HandShakeResponseMessage) UpdateSequenceAndTimeStamp

func (msg *HandShakeResponseMessage) UpdateSequenceAndTimeStamp(timestamp int64) tgdb.TGError

UpdateSequenceAndTimeStamp updates the SequenceAndTimeStamp, if message is mutable @param timestamp @return TGMessage on success, error on failure

func (*HandShakeResponseMessage) WriteHeader

WriteHeader exports the values of the common message header Attributes to output stream

func (*HandShakeResponseMessage) WritePayload

WritePayload exports the values of the message specific payload Attributes to output stream

type IOException

type IOException struct {
	*TGDBError
}

func DefaultTGIOException

func DefaultTGIOException() *IOException

Create New IOException Instance

func NewTGIOException

func NewTGIOException(eCode string, eType int, eMsg, eDetails string) *IOException

func NewTGIOExceptionWithMsg

func NewTGIOExceptionWithMsg(msg string) *IOException

func (*IOException) Error

func (e *IOException) Error() string

func (*IOException) GetErrorCode

func (e *IOException) GetErrorCode() string

func (*IOException) GetErrorDetails

func (e *IOException) GetErrorDetails() string

func (*IOException) GetErrorMsg

func (e *IOException) GetErrorMsg() string

func (*IOException) GetErrorType

func (e *IOException) GetErrorType() int

type IndexInfoImpl

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

func DefaultIndexInfoImpl

func DefaultIndexInfoImpl() *IndexInfoImpl

func NewIndexInfoImpl

func NewIndexInfoImpl(sysId int, name string, indexType byte,
	isUnique bool, attributes, nodeTypes []string, entries int64, status string) *IndexInfoImpl

func (*IndexInfoImpl) GetAttributeNames

func (obj *IndexInfoImpl) GetAttributeNames() []string

GetAttributes returns a collection of attribute names

func (*IndexInfoImpl) GetName

func (obj *IndexInfoImpl) GetName() string

GetName returns the index Name

func (*IndexInfoImpl) GetNodeTypes

func (obj *IndexInfoImpl) GetNodeTypes() []string

GetNodeTypes returns a collection of node types

func (*IndexInfoImpl) GetNumEntries

func (obj *IndexInfoImpl) GetNumEntries() int64

GetNumEntries returns the number of entries for the index

func (*IndexInfoImpl) GetStatus

func (obj *IndexInfoImpl) GetStatus() string

GetStatus returns the status of the index

func (*IndexInfoImpl) GetSystemId

func (obj *IndexInfoImpl) GetSystemId() int

GetSystemId returns the system ID

func (*IndexInfoImpl) GetType

func (obj *IndexInfoImpl) GetType() byte

GetType returns the index type

func (*IndexInfoImpl) IsUnique

func (obj *IndexInfoImpl) IsUnique() bool

IsUnique returns the information whether the index is unique

func (*IndexInfoImpl) MarshalBinary

func (obj *IndexInfoImpl) MarshalBinary() ([]byte, error)

func (*IndexInfoImpl) String

func (obj *IndexInfoImpl) String() string

func (*IndexInfoImpl) UnmarshalBinary

func (obj *IndexInfoImpl) UnmarshalBinary(data []byte) error

type IntegerAttribute

type IntegerAttribute struct {
	*AbstractAttribute
}

func DefaultIntegerAttribute

func DefaultIntegerAttribute() *IntegerAttribute

Create NewTGDecimal Attribute Instance

func NewIntegerAttribute

func NewIntegerAttribute(attrDesc *AttributeDescriptor) *IntegerAttribute

func NewIntegerAttributeWithDesc

func NewIntegerAttributeWithDesc(ownerEntity tgdb.TGEntity, attrDesc *AttributeDescriptor, value interface{}) *IntegerAttribute

func NewIntegerAttributeWithOwner

func NewIntegerAttributeWithOwner(ownerEntity tgdb.TGEntity) *IntegerAttribute

func (*IntegerAttribute) GetAttributeDescriptor

func (obj *IntegerAttribute) GetAttributeDescriptor() tgdb.TGAttributeDescriptor

GetAttributeDescriptor returns the AttributeDescriptor for this attribute

func (*IntegerAttribute) GetIsModified

func (obj *IntegerAttribute) GetIsModified() bool

GetIsModified checks whether the attribute modified or not

func (*IntegerAttribute) GetName

func (obj *IntegerAttribute) GetName() string

GetName gets the Name for this attribute as the most generic form

func (*IntegerAttribute) GetOwner

func (obj *IntegerAttribute) GetOwner() tgdb.TGEntity

GetOwner gets owner Entity of this attribute

func (*IntegerAttribute) GetValue

func (obj *IntegerAttribute) GetValue() interface{}

GetValue gets the value for this attribute as the most generic form

func (*IntegerAttribute) IsNull

func (obj *IntegerAttribute) IsNull() bool

IsNull checks whether the attribute value is null or not

func (*IntegerAttribute) MarshalBinary

func (obj *IntegerAttribute) MarshalBinary() ([]byte, error)

func (*IntegerAttribute) ReadExternal

func (obj *IntegerAttribute) ReadExternal(is tgdb.TGInputStream) tgdb.TGError

ReadExternal reads the byte format from an external input stream and constructs a system object

func (*IntegerAttribute) ReadValue

func (obj *IntegerAttribute) ReadValue(is tgdb.TGInputStream) tgdb.TGError

ReadValue reads the value from input stream

func (*IntegerAttribute) ResetIsModified

func (obj *IntegerAttribute) ResetIsModified()

ResetIsModified resets the IsModified flag - recursively, if needed

func (*IntegerAttribute) SetInteger

func (obj *IntegerAttribute) SetInteger(b int)

func (*IntegerAttribute) SetOwner

func (obj *IntegerAttribute) SetOwner(ownerEntity tgdb.TGEntity)

SetOwner sets the owner entity - Need this indirection to traverse the chain

func (*IntegerAttribute) SetValue

func (obj *IntegerAttribute) SetValue(value interface{}) tgdb.TGError

SetValue sets the value for this attribute. Appropriate data conversion to its attribute desc will be performed If the object is Null, then the object is explicitly set, but no value is provided.

func (*IntegerAttribute) String

func (obj *IntegerAttribute) String() string

func (*IntegerAttribute) UnmarshalBinary

func (obj *IntegerAttribute) UnmarshalBinary(data []byte) error

func (*IntegerAttribute) WriteExternal

func (obj *IntegerAttribute) WriteExternal(os tgdb.TGOutputStream) tgdb.TGError

WriteExternal writes a system object into an appropriate byte format onto an external output stream

func (*IntegerAttribute) WriteValue

func (obj *IntegerAttribute) WriteValue(os tgdb.TGOutputStream) tgdb.TGError

WriteValue writes the value to output stream

type InvalidMessage

type InvalidMessage struct {
	*AbstractProtocolMessage
}

func DefaultInvalidMessage

func DefaultInvalidMessage() *InvalidMessage

func NewInvalidMessage

func NewInvalidMessage(authToken, sessionId int64) *InvalidMessage

Create New Message Instance

func (*InvalidMessage) FromBytes

func (msg *InvalidMessage) FromBytes(buffer []byte) (tgdb.TGMessage, tgdb.TGError)

FromBytes constructs a message object from the input buffer in the byte format

func (*InvalidMessage) GetAuthToken

func (msg *InvalidMessage) GetAuthToken() int64

GetAuthToken gets the authToken

func (*InvalidMessage) GetIsUpdatable

func (msg *InvalidMessage) GetIsUpdatable() bool

GetIsUpdatable checks whether this message updatable or not

func (*InvalidMessage) GetMessageByteBufLength

func (msg *InvalidMessage) GetMessageByteBufLength() int

GetMessageByteBufLength gets the MessageByteBufLength. This method is called after the toBytes() is executed.

func (*InvalidMessage) GetRequestId

func (msg *InvalidMessage) GetRequestId() int64

GetRequestId gets the requestId for the message. This will be used as the CorrelationId

func (*InvalidMessage) GetSequenceNo

func (msg *InvalidMessage) GetSequenceNo() int64

GetSequenceNo gets the sequenceNo of the message

func (*InvalidMessage) GetSessionId

func (msg *InvalidMessage) GetSessionId() int64

GetSessionId gets the session id

func (*InvalidMessage) GetTimestamp

func (msg *InvalidMessage) GetTimestamp() int64

GetTimestamp gets the Timestamp

func (*InvalidMessage) GetVerbId

func (msg *InvalidMessage) GetVerbId() int

GetVerbId gets verbId of the message

func (*InvalidMessage) MarshalBinary

func (msg *InvalidMessage) MarshalBinary() ([]byte, error)

func (*InvalidMessage) ReadHeader

func (msg *InvalidMessage) ReadHeader(is tgdb.TGInputStream) tgdb.TGError

ReadHeader reads the bytes from input stream and constructs a common header of network packet

func (*InvalidMessage) ReadPayload

func (msg *InvalidMessage) ReadPayload(is tgdb.TGInputStream) tgdb.TGError

ReadPayload reads the bytes from input stream and constructs message specific payload Attributes

func (*InvalidMessage) SetAuthToken

func (msg *InvalidMessage) SetAuthToken(authToken int64)

SetAuthToken sets the authToken

func (*InvalidMessage) SetDataOffset

func (msg *InvalidMessage) SetDataOffset(dataOffset int16)

SetDataOffset sets the offset at which data starts in the payload

func (*InvalidMessage) SetIsUpdatable

func (msg *InvalidMessage) SetIsUpdatable(updateFlag bool)

SetIsUpdatable sets the updatable flag

func (*InvalidMessage) SetMessageByteBufLength

func (msg *InvalidMessage) SetMessageByteBufLength(bufLength int)

SetMessageByteBufLength sets the message buffer length

func (*InvalidMessage) SetRequestId

func (msg *InvalidMessage) SetRequestId(requestId int64)

SetRequestId sets the request id

func (*InvalidMessage) SetSequenceNo

func (msg *InvalidMessage) SetSequenceNo(sequenceNo int64)

SetSequenceNo sets the sequenceNo

func (*InvalidMessage) SetSessionId

func (msg *InvalidMessage) SetSessionId(sessionId int64)

SetSessionId sets the session id

func (*InvalidMessage) SetTimestamp

func (msg *InvalidMessage) SetTimestamp(timestamp int64) tgdb.TGError

SetTimestamp sets the timestamp

func (*InvalidMessage) SetVerbId

func (msg *InvalidMessage) SetVerbId(verbId int)

SetVerbId sets verbId of the message

func (*InvalidMessage) String

func (msg *InvalidMessage) String() string

func (*InvalidMessage) ToBytes

func (msg *InvalidMessage) ToBytes() ([]byte, int, tgdb.TGError)

ToBytes converts a message object into byte format to be sent over the network to TGDB server

func (*InvalidMessage) UnmarshalBinary

func (msg *InvalidMessage) UnmarshalBinary(data []byte) error

UnmarshalBinary modifies the receiver so it must take a pointer receiver.

func (*InvalidMessage) UpdateSequenceAndTimeStamp

func (msg *InvalidMessage) UpdateSequenceAndTimeStamp(timestamp int64) tgdb.TGError

UpdateSequenceAndTimeStamp updates the SequenceAndTimeStamp, if message is mutable @param timestamp @return TGMessage on success, error on failure

func (*InvalidMessage) WriteHeader

func (msg *InvalidMessage) WriteHeader(os tgdb.TGOutputStream) tgdb.TGError

WriteHeader exports the values of the common message header Attributes to output stream

func (*InvalidMessage) WritePayload

func (msg *InvalidMessage) WritePayload(os tgdb.TGOutputStream) tgdb.TGError

WritePayload exports the values of the message specific payload Attributes to output stream

type InvalidMessageLength

type InvalidMessageLength struct {
	*TGDBError
}

func DefaultTGInvalidMessageLength

func DefaultTGInvalidMessageLength() *InvalidMessageLength

Create New InvalidMessageLength Instance

func NewTGInvalidMessageLength

func NewTGInvalidMessageLength(eCode string, eType int, eMsg, eDetails string) *InvalidMessageLength

func NewTGInvalidMessageLengthWithMsg

func NewTGInvalidMessageLengthWithMsg(msg string) *InvalidMessageLength

func (*InvalidMessageLength) Error

func (e *InvalidMessageLength) Error() string

func (*InvalidMessageLength) GetErrorCode

func (e *InvalidMessageLength) GetErrorCode() string

func (*InvalidMessageLength) GetErrorDetails

func (e *InvalidMessageLength) GetErrorDetails() string

func (*InvalidMessageLength) GetErrorMsg

func (e *InvalidMessageLength) GetErrorMsg() string

func (*InvalidMessageLength) GetErrorType

func (e *InvalidMessageLength) GetErrorType() int

type KvPair

type KvPair struct {
	KeyName  string
	KeyValue string
}

type LinkUrl

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

func DefaultLinkUrl

func DefaultLinkUrl() *LinkUrl

func NewLinkUrl

func NewLinkUrl(sUrl string) *LinkUrl

func NewLinkUrlWithComponents

func NewLinkUrlWithComponents(proto tgdb.TGProtocol, host string, port int) *LinkUrl

func ParseChannelUrl

func ParseChannelUrl(cUrl string) *LinkUrl

func (*LinkUrl) GetFTUrls

func (obj *LinkUrl) GetFTUrls() []tgdb.TGChannelUrl

GetFTUrls gets the Fault Tolerant URLs

func (*LinkUrl) GetHost

func (obj *LinkUrl) GetHost() string

GetHost gets the host part of the URL

func (*LinkUrl) GetPort

func (obj *LinkUrl) GetPort() int

GetPort gets the port on which it is connected

func (*LinkUrl) GetProperties

func (obj *LinkUrl) GetProperties() tgdb.TGProperties

GetProperties gets the URL Properties

func (*LinkUrl) GetProtocol

func (obj *LinkUrl) GetProtocol() tgdb.TGProtocol

GetProtocol gets the protocol used as part of the URL

func (*LinkUrl) GetUrlAsString

func (obj *LinkUrl) GetUrlAsString() string

GetUrlAsString gets the string form of the URL

func (*LinkUrl) GetUser

func (obj *LinkUrl) GetUser() string

GetUser gets the user associated with the URL

func (*LinkUrl) String

func (obj *LinkUrl) String() string

type Logger

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

func (*Logger) CheckAndUpdateFileHandle

func (m *Logger) CheckAndUpdateFileHandle() error

func (*Logger) Debug

func (m *Logger) Debug(logMsg string)

Debug logs Debug Statements

func (*Logger) Error

func (m *Logger) Error(logMsg string)

Error logs Error Statements

func (*Logger) Fatal

func (m *Logger) Fatal(logMsg string)

Fatal logs Fatal Statements

func (*Logger) GetAbsoluteFileName

func (m *Logger) GetAbsoluteFileName() string

func (*Logger) GetFileAndLine

func (m *Logger) GetFileAndLine(callDepth int) (string, int)

GetFileAndLine returns the file and line from the stack at the given call depth

func (*Logger) GetFileCount

func (m *Logger) GetFileCount() int

func (*Logger) GetFileNameBase

func (m *Logger) GetFileNameBase() string

func (*Logger) GetFileSize

func (m *Logger) GetFileSize() int

func (*Logger) GetLogBaseDir

func (m *Logger) GetLogBaseDir() string

func (*Logger) GetLogLevel

func (m *Logger) GetLogLevel() tgdb.LogLevel

GetLogLevel gets Log Level

func (*Logger) GetLogPrefix

func (m *Logger) GetLogPrefix() string

GetLogPrefix gets Log Prefix

func (*Logger) Info

func (m *Logger) Info(logMsg string)

Info logs Informative Statements

func (*Logger) IsDebug

func (m *Logger) IsDebug() bool

func (*Logger) IsError

func (m *Logger) IsError() bool

func (*Logger) IsInfo

func (m *Logger) IsInfo() bool

func (*Logger) IsTrace

func (m *Logger) IsTrace() bool

func (*Logger) IsWarning

func (m *Logger) IsWarning() bool

func (*Logger) Log

func (m *Logger) Log(logMsg string)

Log is a generic function that introspects the log level configuration set for the current session, and appropriately calls the level specific logging functions

func (*Logger) SetFileCount

func (m *Logger) SetFileCount(count int)

func (*Logger) SetFileNameBase

func (m *Logger) SetFileNameBase(baseFileName string) error

func (*Logger) SetFileSize

func (m *Logger) SetFileSize(size int)

func (*Logger) SetLogBaseDir

func (m *Logger) SetLogBaseDir(logBaseDr string) error

func (*Logger) SetLogFormatFlags

func (m *Logger) SetLogFormatFlags(flags int)

SetLogFormatFlags sets Log Format

func (*Logger) SetLogLevel

func (m *Logger) SetLogLevel(level tgdb.LogLevel)

SetLogLevel sets Log Level

func (*Logger) SetLogPrefix

func (m *Logger) SetLogPrefix(prefix string)

SetLogPrefix sets Log Prefix

func (*Logger) SetLogWriter

func (m *Logger) SetLogWriter(writer io.Writer)

SetLogWriter sets Log Writer

func (*Logger) String

func (m *Logger) String() string

Additional Method to help debugging

func (*Logger) Trace

func (m *Logger) Trace(logMsg string)

Trace logs Trace (Down-to-the-wire) Statements

func (*Logger) UpdateFileHandle

func (m *Logger) UpdateFileHandle() error

func (*Logger) Warning

func (m *Logger) Warning(logMsg string)

Warning logs Warning Statements

type LongAttribute

type LongAttribute struct {
	*AbstractAttribute
}

func DefaultLongAttribute

func DefaultLongAttribute() *LongAttribute

Create NewTGDecimal Attribute Instance

func NewLongAttribute

func NewLongAttribute(attrDesc *AttributeDescriptor) *LongAttribute

func NewLongAttributeWithDesc

func NewLongAttributeWithDesc(ownerEntity tgdb.TGEntity, attrDesc *AttributeDescriptor, value interface{}) *LongAttribute

func NewLongAttributeWithOwner

func NewLongAttributeWithOwner(ownerEntity tgdb.TGEntity) *LongAttribute

func (*LongAttribute) GetAttributeDescriptor

func (obj *LongAttribute) GetAttributeDescriptor() tgdb.TGAttributeDescriptor

GetAttributeDescriptor returns the AttributeDescriptor for this attribute

func (*LongAttribute) GetIsModified

func (obj *LongAttribute) GetIsModified() bool

GetIsModified checks whether the attribute modified or not

func (*LongAttribute) GetName

func (obj *LongAttribute) GetName() string

GetName gets the Name for this attribute as the most generic form

func (*LongAttribute) GetOwner

func (obj *LongAttribute) GetOwner() tgdb.TGEntity

GetOwner gets owner Entity of this attribute

func (*LongAttribute) GetValue

func (obj *LongAttribute) GetValue() interface{}

GetValue gets the value for this attribute as the most generic form

func (*LongAttribute) IsNull

func (obj *LongAttribute) IsNull() bool

IsNull checks whether the attribute value is null or not

func (*LongAttribute) MarshalBinary

func (obj *LongAttribute) MarshalBinary() ([]byte, error)

func (*LongAttribute) ReadExternal

func (obj *LongAttribute) ReadExternal(is tgdb.TGInputStream) tgdb.TGError

ReadExternal reads the byte format from an external input stream and constructs a system object

func (*LongAttribute) ReadValue

func (obj *LongAttribute) ReadValue(is tgdb.TGInputStream) tgdb.TGError

ReadValue reads the value from input stream

func (*LongAttribute) ResetIsModified

func (obj *LongAttribute) ResetIsModified()

ResetIsModified resets the IsModified flag - recursively, if needed

func (*LongAttribute) SetLong

func (obj *LongAttribute) SetLong(b int64)

func (*LongAttribute) SetOwner

func (obj *LongAttribute) SetOwner(ownerEntity tgdb.TGEntity)

SetOwner sets the owner entity - Need this indirection to traverse the chain

func (*LongAttribute) SetValue

func (obj *LongAttribute) SetValue(value interface{}) tgdb.TGError

SetValue sets the value for this attribute. Appropriate data conversion to its attribute desc will be performed If the object is Null, then the object is explicitly set, but no value is provided.

func (*LongAttribute) String

func (obj *LongAttribute) String() string

func (*LongAttribute) UnmarshalBinary

func (obj *LongAttribute) UnmarshalBinary(data []byte) error

func (*LongAttribute) WriteExternal

func (obj *LongAttribute) WriteExternal(os tgdb.TGOutputStream) tgdb.TGError

WriteExternal writes a system object into an appropriate byte format onto an external output stream

func (*LongAttribute) WriteValue

func (obj *LongAttribute) WriteValue(os tgdb.TGOutputStream) tgdb.TGError

WriteValue writes the value to output stream

type MemoryInfoImpl

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

func DefaultMemoryInfoImpl

func DefaultMemoryInfoImpl() *MemoryInfoImpl

func NewMemoryInfoImpl

func NewMemoryInfoImpl(_freeMemory, _maxMemory, _usedMemory int64, _sharedMemoryFileLocation string) *MemoryInfoImpl

func (*MemoryInfoImpl) GetFreeMemory

func (obj *MemoryInfoImpl) GetFreeMemory() int64

GetFreeMemory returns the free memory size from server

func (*MemoryInfoImpl) GetMaxMemory

func (obj *MemoryInfoImpl) GetMaxMemory() int64

GetMaxMemory returns the max memory size from server

func (*MemoryInfoImpl) GetSharedMemoryFileLocation

func (obj *MemoryInfoImpl) GetSharedMemoryFileLocation() string

GetSharedMemoryFileLocation returns the shared memory file location

func (*MemoryInfoImpl) GetUsedMemory

func (obj *MemoryInfoImpl) GetUsedMemory() int64

GetUsedMemory returns the used memory size from server

func (*MemoryInfoImpl) MarshalBinary

func (obj *MemoryInfoImpl) MarshalBinary() ([]byte, error)

func (*MemoryInfoImpl) String

func (obj *MemoryInfoImpl) String() string

func (*MemoryInfoImpl) UnmarshalBinary

func (obj *MemoryInfoImpl) UnmarshalBinary(data []byte) error

type MessageHeader

type MessageHeader struct {
	BufLength int // Length of the message including the header
	// contains filtered or unexported fields
}

*

  • The Server describes the pdu header as below.
  • struct _tg_pduheader_t_ { tg_int32 length; //length of the message including the header tg_int32 magic; //Magic to recognize this is our message tg_int16 protVersion; //protocol version tg_pduverb verbId; //we write the verb as a short value tg_uint64 sequenceNo; //message SystemTypeSequence No from the client tg_uint64 timestamp; //Timestamp of the message sent. tg_uint64 requestId; //Unique _request Identifier from the client, which is returned tg_int32 dataOffset; //Offset from where the payload begins }

NOTE: DO NOT CHANGE THIS ORDER OF STRUCTURE ELEMENTS

func (*MessageHeader) HeaderGetAuthToken

func (hdr *MessageHeader) HeaderGetAuthToken() int64

func (*MessageHeader) HeaderGetDataOffset

func (hdr *MessageHeader) HeaderGetDataOffset() int16

func (*MessageHeader) HeaderGetMessageByteBufLength

func (hdr *MessageHeader) HeaderGetMessageByteBufLength() int

func (*MessageHeader) HeaderGetRequestId

func (hdr *MessageHeader) HeaderGetRequestId() int64

func (*MessageHeader) HeaderGetSequenceNo

func (hdr *MessageHeader) HeaderGetSequenceNo() int64

func (*MessageHeader) HeaderGetSessionId

func (hdr *MessageHeader) HeaderGetSessionId() int64

func (*MessageHeader) HeaderGetTimestamp

func (hdr *MessageHeader) HeaderGetTimestamp() int64

func (*MessageHeader) HeaderGetVerbId

func (hdr *MessageHeader) HeaderGetVerbId() int

func (*MessageHeader) HeaderSetAuthToken

func (hdr *MessageHeader) HeaderSetAuthToken(authToken int64)

func (*MessageHeader) HeaderSetDataOffset

func (hdr *MessageHeader) HeaderSetDataOffset(dataOffset int16)

func (*MessageHeader) HeaderSetMessageByteBufLength

func (hdr *MessageHeader) HeaderSetMessageByteBufLength(bufLength int)

func (*MessageHeader) HeaderSetRequestId

func (hdr *MessageHeader) HeaderSetRequestId(requestId int64)

func (*MessageHeader) HeaderSetSequenceNo

func (hdr *MessageHeader) HeaderSetSequenceNo(sequenceNo int64)

func (*MessageHeader) HeaderSetSessionId

func (hdr *MessageHeader) HeaderSetSessionId(sessionId int64)

func (*MessageHeader) HeaderSetTimestamp

func (hdr *MessageHeader) HeaderSetTimestamp(timestamp int64)

func (*MessageHeader) HeaderSetVerbId

func (hdr *MessageHeader) HeaderSetVerbId(verbId int)

type MetadataRequest

type MetadataRequest struct {
	*AbstractProtocolMessage
}

func DefaultMetadataRequestMessage

func DefaultMetadataRequestMessage() *MetadataRequest

func NewMetadataRequestMessage

func NewMetadataRequestMessage(authToken, sessionId int64) *MetadataRequest

Create New Message Instance

func (*MetadataRequest) FromBytes

func (msg *MetadataRequest) FromBytes(buffer []byte) (tgdb.TGMessage, tgdb.TGError)

FromBytes constructs a message object from the input buffer in the byte format

func (*MetadataRequest) GetAuthToken

func (msg *MetadataRequest) GetAuthToken() int64

GetAuthToken gets the authToken

func (*MetadataRequest) GetIsUpdatable

func (msg *MetadataRequest) GetIsUpdatable() bool

GetIsUpdatable checks whether this message updatable or not

func (*MetadataRequest) GetMessageByteBufLength

func (msg *MetadataRequest) GetMessageByteBufLength() int

GetMessageByteBufLength gets the MessageByteBufLength. This method is called after the toBytes() is executed.

func (*MetadataRequest) GetRequestId

func (msg *MetadataRequest) GetRequestId() int64

GetRequestId gets the requestId for the message. This will be used as the CorrelationId

func (*MetadataRequest) GetSequenceNo

func (msg *MetadataRequest) GetSequenceNo() int64

GetSequenceNo gets the sequenceNo of the message

func (*MetadataRequest) GetSessionId

func (msg *MetadataRequest) GetSessionId() int64

GetSessionId gets the session id

func (*MetadataRequest) GetTimestamp

func (msg *MetadataRequest) GetTimestamp() int64

GetTimestamp gets the Timestamp

func (*MetadataRequest) GetVerbId

func (msg *MetadataRequest) GetVerbId() int

GetVerbId gets verbId of the message

func (*MetadataRequest) MarshalBinary

func (msg *MetadataRequest) MarshalBinary() ([]byte, error)

func (*MetadataRequest) ReadHeader

func (msg *MetadataRequest) ReadHeader(is tgdb.TGInputStream) tgdb.TGError

ReadHeader reads the bytes from input stream and constructs a common header of network packet

func (*MetadataRequest) ReadPayload

func (msg *MetadataRequest) ReadPayload(is tgdb.TGInputStream) tgdb.TGError

ReadPayload reads the bytes from input stream and constructs message specific payload Attributes

func (*MetadataRequest) SetAuthToken

func (msg *MetadataRequest) SetAuthToken(authToken int64)

SetAuthToken sets the authToken

func (*MetadataRequest) SetDataOffset

func (msg *MetadataRequest) SetDataOffset(dataOffset int16)

SetDataOffset sets the offset at which data starts in the payload

func (*MetadataRequest) SetIsUpdatable

func (msg *MetadataRequest) SetIsUpdatable(updateFlag bool)

SetIsUpdatable sets the updatable flag

func (*MetadataRequest) SetMessageByteBufLength

func (msg *MetadataRequest) SetMessageByteBufLength(bufLength int)

SetMessageByteBufLength sets the message buffer length

func (*MetadataRequest) SetRequestId

func (msg *MetadataRequest) SetRequestId(requestId int64)

SetRequestId sets the request id

func (*MetadataRequest) SetSequenceNo

func (msg *MetadataRequest) SetSequenceNo(sequenceNo int64)

SetSequenceNo sets the sequenceNo

func (*MetadataRequest) SetSessionId

func (msg *MetadataRequest) SetSessionId(sessionId int64)

SetSessionId sets the session id

func (*MetadataRequest) SetTimestamp

func (msg *MetadataRequest) SetTimestamp(timestamp int64) tgdb.TGError

SetTimestamp sets the timestamp

func (*MetadataRequest) SetVerbId

func (msg *MetadataRequest) SetVerbId(verbId int)

SetVerbId sets verbId of the message

func (*MetadataRequest) String

func (msg *MetadataRequest) String() string

func (*MetadataRequest) ToBytes

func (msg *MetadataRequest) ToBytes() ([]byte, int, tgdb.TGError)

ToBytes converts a message object into byte format to be sent over the network to TGDB server

func (*MetadataRequest) UnmarshalBinary

func (msg *MetadataRequest) UnmarshalBinary(data []byte) error

UnmarshalBinary modifies the receiver so it must take a pointer receiver.

func (*MetadataRequest) UpdateSequenceAndTimeStamp

func (msg *MetadataRequest) UpdateSequenceAndTimeStamp(timestamp int64) tgdb.TGError

UpdateSequenceAndTimeStamp updates the SequenceAndTimeStamp, if message is mutable @param timestamp @return TGMessage on success, error on failure

func (*MetadataRequest) WriteHeader

func (msg *MetadataRequest) WriteHeader(os tgdb.TGOutputStream) tgdb.TGError

WriteHeader exports the values of the common message header Attributes to output stream

func (*MetadataRequest) WritePayload

func (msg *MetadataRequest) WritePayload(os tgdb.TGOutputStream) tgdb.TGError

WritePayload exports the values of the message specific payload Attributes to output stream

type MetadataResponse

type MetadataResponse struct {
	*AbstractProtocolMessage
	// contains filtered or unexported fields
}

func DefaultMetadataResponseMessage

func DefaultMetadataResponseMessage() *MetadataResponse

func NewMetadataResponseMessage

func NewMetadataResponseMessage(authToken, sessionId int64) *MetadataResponse

Create New Message Instance

func (*MetadataResponse) FromBytes

func (msg *MetadataResponse) FromBytes(buffer []byte) (tgdb.TGMessage, tgdb.TGError)

FromBytes constructs a message object from the input buffer in the byte format

func (*MetadataResponse) GetAttrDescList

func (msg *MetadataResponse) GetAttrDescList() []tgdb.TGAttributeDescriptor

func (*MetadataResponse) GetAuthToken

func (msg *MetadataResponse) GetAuthToken() int64

GetAuthToken gets the authToken

func (*MetadataResponse) GetEdgeTypeList

func (msg *MetadataResponse) GetEdgeTypeList() []tgdb.TGEdgeType

func (*MetadataResponse) GetIsUpdatable

func (msg *MetadataResponse) GetIsUpdatable() bool

GetIsUpdatable checks whether this message updatable or not

func (*MetadataResponse) GetMessageByteBufLength

func (msg *MetadataResponse) GetMessageByteBufLength() int

GetMessageByteBufLength gets the MessageByteBufLength. This method is called after the toBytes() is executed.

func (*MetadataResponse) GetNodeTypeList

func (msg *MetadataResponse) GetNodeTypeList() []tgdb.TGNodeType

func (*MetadataResponse) GetRequestId

func (msg *MetadataResponse) GetRequestId() int64

GetRequestId gets the requestId for the message. This will be used as the CorrelationId

func (*MetadataResponse) GetSequenceNo

func (msg *MetadataResponse) GetSequenceNo() int64

GetSequenceNo gets the sequenceNo of the message

func (*MetadataResponse) GetSessionId

func (msg *MetadataResponse) GetSessionId() int64

GetSessionId gets the session id

func (*MetadataResponse) GetTimestamp

func (msg *MetadataResponse) GetTimestamp() int64

GetTimestamp gets the Timestamp

func (*MetadataResponse) GetVerbId

func (msg *MetadataResponse) GetVerbId() int

GetVerbId gets verbId of the message

func (*MetadataResponse) MarshalBinary

func (msg *MetadataResponse) MarshalBinary() ([]byte, error)

func (*MetadataResponse) ReadHeader

func (msg *MetadataResponse) ReadHeader(is tgdb.TGInputStream) tgdb.TGError

ReadHeader reads the bytes from input stream and constructs a common header of network packet

func (*MetadataResponse) ReadPayload

func (msg *MetadataResponse) ReadPayload(is tgdb.TGInputStream) tgdb.TGError

ReadPayload reads the bytes from input stream and constructs message specific payload Attributes

func (*MetadataResponse) SetAuthToken

func (msg *MetadataResponse) SetAuthToken(authToken int64)

SetAuthToken sets the authToken

func (*MetadataResponse) SetDataOffset

func (msg *MetadataResponse) SetDataOffset(dataOffset int16)

SetDataOffset sets the offset at which data starts in the payload

func (*MetadataResponse) SetIsUpdatable

func (msg *MetadataResponse) SetIsUpdatable(updateFlag bool)

SetIsUpdatable sets the updatable flag

func (*MetadataResponse) SetMessageByteBufLength

func (msg *MetadataResponse) SetMessageByteBufLength(bufLength int)

SetMessageByteBufLength sets the message buffer length

func (*MetadataResponse) SetRequestId

func (msg *MetadataResponse) SetRequestId(requestId int64)

SetRequestId sets the request id

func (*MetadataResponse) SetSequenceNo

func (msg *MetadataResponse) SetSequenceNo(sequenceNo int64)

SetSequenceNo sets the sequenceNo

func (*MetadataResponse) SetSessionId

func (msg *MetadataResponse) SetSessionId(sessionId int64)

SetSessionId sets the session id

func (*MetadataResponse) SetTimestamp

func (msg *MetadataResponse) SetTimestamp(timestamp int64) tgdb.TGError

SetTimestamp sets the timestamp

func (*MetadataResponse) SetVerbId

func (msg *MetadataResponse) SetVerbId(verbId int)

SetVerbId sets verbId of the message

func (*MetadataResponse) String

func (msg *MetadataResponse) String() string

func (*MetadataResponse) ToBytes

func (msg *MetadataResponse) ToBytes() ([]byte, int, tgdb.TGError)

ToBytes converts a message object into byte format to be sent over the network to TGDB server

func (*MetadataResponse) UnmarshalBinary

func (msg *MetadataResponse) UnmarshalBinary(data []byte) error

UnmarshalBinary modifies the receiver so it must take a pointer receiver.

func (*MetadataResponse) UpdateSequenceAndTimeStamp

func (msg *MetadataResponse) UpdateSequenceAndTimeStamp(timestamp int64) tgdb.TGError

UpdateSequenceAndTimeStamp updates the SequenceAndTimeStamp, if message is mutable @param timestamp @return TGMessage on success, error on failure

func (*MetadataResponse) WriteHeader

func (msg *MetadataResponse) WriteHeader(os tgdb.TGOutputStream) tgdb.TGError

WriteHeader exports the values of the common message header Attributes to output stream

func (*MetadataResponse) WritePayload

func (msg *MetadataResponse) WritePayload(os tgdb.TGOutputStream) tgdb.TGError

WritePayload exports the values of the message specific payload Attributes to output stream

type NetListenerInfoImpl

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

func DefaultNetListenerInfoImpl

func DefaultNetListenerInfoImpl() *NetListenerInfoImpl

func NewNetListenerInfoImpl

func NewNetListenerInfoImpl(_currentConnections, _maxConnections int, _listenerName, _portNumber string) *NetListenerInfoImpl

func (*NetListenerInfoImpl) GetCurrentConnections

func (obj *NetListenerInfoImpl) GetCurrentConnections() int

GetCurrentConnections returns the count of current connections

func (*NetListenerInfoImpl) GetListenerName

func (obj *NetListenerInfoImpl) GetListenerName() string

GetListenerName returns the listener Name

func (*NetListenerInfoImpl) GetMaxConnections

func (obj *NetListenerInfoImpl) GetMaxConnections() int

GetMaxConnections returns the count of max connections

func (*NetListenerInfoImpl) GetPortNumber

func (obj *NetListenerInfoImpl) GetPortNumber() string

GetPortNumber returns the port detail of this listener

func (*NetListenerInfoImpl) MarshalBinary

func (obj *NetListenerInfoImpl) MarshalBinary() ([]byte, error)

func (*NetListenerInfoImpl) String

func (obj *NetListenerInfoImpl) String() string

func (*NetListenerInfoImpl) UnmarshalBinary

func (obj *NetListenerInfoImpl) UnmarshalBinary(data []byte) error

type Node

type Node struct {
	*AbstractEntity
	Edges []tgdb.TGEdge
}

func DefaultNode

func DefaultNode() *Node

func NewNode

func NewNode(gmd *GraphMetadata) *Node

func NewNodeWithType

func NewNodeWithType(gmd *GraphMetadata, nodeType tgdb.TGNodeType) *Node

func (*Node) AddEdge

func (obj *Node) AddEdge(edge tgdb.TGEdge)

func (*Node) AddEdgeWithDirectionType

func (obj *Node) AddEdgeWithDirectionType(node tgdb.TGNode, edgeType tgdb.TGEdgeType, directionType tgdb.TGDirectionType) tgdb.TGEdge

func (*Node) GetAttribute

func (obj *Node) GetAttribute(attrName string) tgdb.TGAttribute

GetAttribute gets the attribute for the Name specified

func (*Node) GetAttributes

func (obj *Node) GetAttributes() ([]tgdb.TGAttribute, tgdb.TGError)

GetAttributes lists of all the Attributes set

func (*Node) GetEdges

func (obj *Node) GetEdges() []tgdb.TGEdge

func (*Node) GetEdgesForDirectionType

func (obj *Node) GetEdgesForDirectionType(directionType tgdb.TGDirectionType) []tgdb.TGEdge

func (*Node) GetEdgesForEdgeType

func (obj *Node) GetEdgesForEdgeType(edgeType tgdb.TGEdgeType, direction tgdb.TGDirection) []tgdb.TGEdge

func (*Node) GetEntityKind

func (obj *Node) GetEntityKind() tgdb.TGEntityKind

GetEntityKind returns the EntityKind as a constant

func (*Node) GetEntityType

func (obj *Node) GetEntityType() tgdb.TGEntityType

GetEntityType returns the EntityType

func (*Node) GetGraphMetadata

func (obj *Node) GetGraphMetadata() tgdb.TGGraphMetadata

GetGraphMetadata returns the Graph Meta Data - New in GO Lang

func (*Node) GetIsDeleted

func (obj *Node) GetIsDeleted() bool

GetIsDeleted checks whether this entity is already deleted in the system or not

func (*Node) GetIsInitialized

func (obj *Node) GetIsInitialized() bool

func (*Node) GetIsNew

func (obj *Node) GetIsNew() bool

GetIsNew checks whether this entity that is currently being added to the system is new or not

func (*Node) GetModifiedAttributes

func (obj *Node) GetModifiedAttributes() []tgdb.TGAttribute

func (*Node) GetVersion

func (obj *Node) GetVersion() int

GetVersion gets the version of the Entity

func (*Node) GetVirtualId

func (obj *Node) GetVirtualId() int64

GetVirtualId gets Entity identifier At the time of creation before reaching the server, it is the virtual id Upon successful creation, server returns a valid entity id that gets set in place of virtual id

func (*Node) IsAttributeSet

func (obj *Node) IsAttributeSet(attrName string) bool

IsAttributeSet checks whether this entity is an Attribute set or not

func (*Node) MarshalBinary

func (obj *Node) MarshalBinary() ([]byte, error)

func (*Node) ReadExternal

func (obj *Node) ReadExternal(is tgdb.TGInputStream) tgdb.TGError

ReadExternal reads the byte format from an external input stream and constructs a system object

func (*Node) ResetModifiedAttributes

func (obj *Node) ResetModifiedAttributes()

ResetModifiedAttributes resets the dirty flag on Attributes

func (*Node) SetAttribute

func (obj *Node) SetAttribute(attr tgdb.TGAttribute) tgdb.TGError

SetAttribute associates the specified Attribute to this Entity

func (*Node) SetEntityId

func (obj *Node) SetEntityId(id int64)

SetEntityId sets Entity id and reset Virtual id after creation

func (*Node) SetIsDeleted

func (obj *Node) SetIsDeleted(flag bool)

SetIsDeleted set the deleted flag

func (*Node) SetIsInitialized

func (obj *Node) SetIsInitialized(flag bool)

SetIsInitialized set the initialized flag

func (*Node) SetIsNew

func (obj *Node) SetIsNew(flag bool)

SetIsNew sets the flag that this is a new entity

func (*Node) SetOrCreateAttribute

func (obj *Node) SetOrCreateAttribute(name string, value interface{}) tgdb.TGError

SetOrCreateAttribute dynamically associates the attribute to this entity If the AttributeDescriptor doesn't exist in the database, create a new one

func (*Node) SetVersion

func (obj *Node) SetVersion(version int)

SetVersion sets the version of the Entity

func (*Node) String

func (obj *Node) String() string

func (*Node) UnmarshalBinary

func (obj *Node) UnmarshalBinary(data []byte) error

func (*Node) WriteExternal

func (obj *Node) WriteExternal(os tgdb.TGOutputStream) tgdb.TGError

WriteExternal writes a system object into an appropriate byte format onto an external output stream

type NodeType

type NodeType struct {
	*EntityType
	// contains filtered or unexported fields
}

func DefaultNodeType

func DefaultNodeType() *NodeType

func NewNodeType

func NewNodeType(name string, parent tgdb.TGEntityType) *NodeType

func (*NodeType) AddAttributeDescriptor

func (obj *NodeType) AddAttributeDescriptor(attrName string, attrDesc tgdb.TGAttributeDescriptor)

AddAttributeDescriptor add an attribute descriptor to the map

func (*NodeType) DerivedFrom

func (obj *NodeType) DerivedFrom() tgdb.TGEntityType

DerivedFrom gets the parent Entity Type

func (*NodeType) GetAttributeDescriptor

func (obj *NodeType) GetAttributeDescriptor(attrName string) tgdb.TGAttributeDescriptor

GetAttributeDescriptor gets the attribute descriptor for the specified Name

func (*NodeType) GetAttributeDescriptors

func (obj *NodeType) GetAttributeDescriptors() []tgdb.TGAttributeDescriptor

GetAttributeDescriptors returns a collection of attribute descriptors associated with this Entity Type

func (*NodeType) GetEntityTypeId

func (obj *NodeType) GetEntityTypeId() int

GetEntityTypeId gets Entity Type id

func (*NodeType) GetIndexIds

func (obj *NodeType) GetIndexIds() []int

func (*NodeType) GetName

func (obj *NodeType) GetName() string

GetName gets the system object's Name

func (*NodeType) GetNumEntries

func (obj *NodeType) GetNumEntries() int64

func (*NodeType) GetPKeyAttributeDescriptors

func (obj *NodeType) GetPKeyAttributeDescriptors() []tgdb.TGAttributeDescriptor

GetPKeyAttributeDescriptors returns a set of primary key descriptors

func (*NodeType) GetSystemType

func (obj *NodeType) GetSystemType() tgdb.TGSystemType

GetSystemType gets system object's type

func (*NodeType) MarshalBinary

func (obj *NodeType) MarshalBinary() ([]byte, error)

func (*NodeType) ReadExternal

func (obj *NodeType) ReadExternal(is tgdb.TGInputStream) tgdb.TGError

ReadExternal reads the byte format from an external input stream and constructs a system object

func (*NodeType) SetAttributeDesc

func (obj *NodeType) SetAttributeDesc(attrName string, attrDesc *AttributeDescriptor)

func (*NodeType) SetAttributeMap

func (obj *NodeType) SetAttributeMap(attrMap map[string]*AttributeDescriptor)

func (*NodeType) SetEntityTypeId

func (obj *NodeType) SetEntityTypeId(eTypeId int)

SetEntityTypeId sets Entity Type id

func (*NodeType) SetName

func (obj *NodeType) SetName(eTypeName string)

SetName sets the system object's Name

func (*NodeType) SetNumEntries

func (obj *NodeType) SetNumEntries(num int64)

func (*NodeType) SetPKeyAttributeDescriptors

func (obj *NodeType) SetPKeyAttributeDescriptors(keys []*AttributeDescriptor)

SetPKeyAttributeDescriptors sets primary key descriptors

func (*NodeType) SetParent

func (obj *NodeType) SetParent(parentEntity tgdb.TGEntityType)

func (*NodeType) SetSystemType

func (obj *NodeType) SetSystemType(eSysType tgdb.TGSystemType)

SetSystemType sets system object's type

func (*NodeType) String

func (obj *NodeType) String() string

func (*NodeType) UnmarshalBinary

func (obj *NodeType) UnmarshalBinary(data []byte) error

func (*NodeType) UpdateMetadata

func (obj *NodeType) UpdateMetadata(gmd *GraphMetadata) tgdb.TGError

func (*NodeType) WriteExternal

func (obj *NodeType) WriteExternal(os tgdb.TGOutputStream) tgdb.TGError

WriteExternal writes a system object into an appropriate byte format onto an external output stream

type NumberAttribute

type NumberAttribute struct {
	*AbstractAttribute
}

func DefaultNumberAttribute

func DefaultNumberAttribute() *NumberAttribute

Create NewTGDecimal Attribute Instance

func NewNumberAttribute

func NewNumberAttribute(attrDesc *AttributeDescriptor) *NumberAttribute

func NewNumberAttributeWithDesc

func NewNumberAttributeWithDesc(ownerEntity tgdb.TGEntity, attrDesc *AttributeDescriptor, value interface{}) *NumberAttribute

func NewNumberAttributeWithOwner

func NewNumberAttributeWithOwner(ownerEntity tgdb.TGEntity) *NumberAttribute

func (*NumberAttribute) GetAttributeDescriptor

func (obj *NumberAttribute) GetAttributeDescriptor() tgdb.TGAttributeDescriptor

GetAttributeDescriptor returns the AttributeDescriptor for this attribute

func (*NumberAttribute) GetIsModified

func (obj *NumberAttribute) GetIsModified() bool

GetIsModified checks whether the attribute modified or not

func (*NumberAttribute) GetName

func (obj *NumberAttribute) GetName() string

GetName gets the Name for this attribute as the most generic form

func (*NumberAttribute) GetOwner

func (obj *NumberAttribute) GetOwner() tgdb.TGEntity

GetOwner gets owner Entity of this attribute

func (*NumberAttribute) GetValue

func (obj *NumberAttribute) GetValue() interface{}

GetValue gets the value for this attribute as the most generic form

func (*NumberAttribute) IsNull

func (obj *NumberAttribute) IsNull() bool

IsNull checks whether the attribute value is null or not

func (*NumberAttribute) MarshalBinary

func (obj *NumberAttribute) MarshalBinary() ([]byte, error)

func (*NumberAttribute) ReadExternal

func (obj *NumberAttribute) ReadExternal(is tgdb.TGInputStream) tgdb.TGError

ReadExternal reads the byte format from an external input stream and constructs a system object

func (*NumberAttribute) ReadValue

func (obj *NumberAttribute) ReadValue(is tgdb.TGInputStream) tgdb.TGError

ReadValue reads the value from input stream

func (*NumberAttribute) ResetIsModified

func (obj *NumberAttribute) ResetIsModified()

ResetIsModified resets the IsModified flag - recursively, if needed

func (*NumberAttribute) SetDecimal

func (obj *NumberAttribute) SetDecimal(b TGDecimal, precision, scale int)

func (*NumberAttribute) SetOwner

func (obj *NumberAttribute) SetOwner(ownerEntity tgdb.TGEntity)

SetOwner sets the owner entity - Need this indirection to traverse the chain

func (*NumberAttribute) SetValue

func (obj *NumberAttribute) SetValue(value interface{}) tgdb.TGError

SetValue sets the value for this attribute. Appropriate data conversion to its attribute desc will be performed If the object is Null, then the object is explicitly set, but no value is provided.

func (*NumberAttribute) String

func (obj *NumberAttribute) String() string

func (*NumberAttribute) UnmarshalBinary

func (obj *NumberAttribute) UnmarshalBinary(data []byte) error

func (*NumberAttribute) WriteExternal

func (obj *NumberAttribute) WriteExternal(os tgdb.TGOutputStream) tgdb.TGError

WriteExternal writes a system object into an appropriate byte format onto an external output stream

func (*NumberAttribute) WriteValue

func (obj *NumberAttribute) WriteValue(os tgdb.TGOutputStream) tgdb.TGError

WriteValue writes the value to output stream

type PingMessage

type PingMessage struct {
	*AbstractProtocolMessage
}

func DefaultPingMessage

func DefaultPingMessage() *PingMessage

func NewPingMessage

func NewPingMessage(authToken, sessionId int64) *PingMessage

Create New Message Instance

func (*PingMessage) FromBytes

func (msg *PingMessage) FromBytes(buffer []byte) (tgdb.TGMessage, tgdb.TGError)

FromBytes constructs a message object from the input buffer in the byte format

func (*PingMessage) GetAuthToken

func (msg *PingMessage) GetAuthToken() int64

GetAuthToken gets the authToken

func (*PingMessage) GetIsUpdatable

func (msg *PingMessage) GetIsUpdatable() bool

GetIsUpdatable checks whether this message updatable or not

func (*PingMessage) GetMessageByteBufLength

func (msg *PingMessage) GetMessageByteBufLength() int

GetMessageByteBufLength gets the MessageByteBufLength. This method is called after the toBytes() is executed.

func (*PingMessage) GetRequestId

func (msg *PingMessage) GetRequestId() int64

GetRequestId gets the requestId for the message. This will be used as the CorrelationId

func (*PingMessage) GetSequenceNo

func (msg *PingMessage) GetSequenceNo() int64

GetSequenceNo gets the sequenceNo of the message

func (*PingMessage) GetSessionId

func (msg *PingMessage) GetSessionId() int64

GetSessionId gets the session id

func (*PingMessage) GetTimestamp

func (msg *PingMessage) GetTimestamp() int64

GetTimestamp gets the Timestamp

func (*PingMessage) GetVerbId

func (msg *PingMessage) GetVerbId() int

GetVerbId gets verbId of the message

func (*PingMessage) MarshalBinary

func (msg *PingMessage) MarshalBinary() ([]byte, error)

func (*PingMessage) ReadHeader

func (msg *PingMessage) ReadHeader(is tgdb.TGInputStream) tgdb.TGError

ReadHeader reads the bytes from input stream and constructs a common header of network packet

func (*PingMessage) ReadPayload

func (msg *PingMessage) ReadPayload(is tgdb.TGInputStream) tgdb.TGError

ReadPayload reads the bytes from input stream and constructs message specific payload Attributes

func (*PingMessage) SetAuthToken

func (msg *PingMessage) SetAuthToken(authToken int64)

SetAuthToken sets the authToken

func (*PingMessage) SetDataOffset

func (msg *PingMessage) SetDataOffset(dataOffset int16)

SetDataOffset sets the offset at which data starts in the payload

func (*PingMessage) SetIsUpdatable

func (msg *PingMessage) SetIsUpdatable(updateFlag bool)

SetIsUpdatable sets the updatable flag

func (*PingMessage) SetMessageByteBufLength

func (msg *PingMessage) SetMessageByteBufLength(bufLength int)

SetMessageByteBufLength sets the message buffer length

func (*PingMessage) SetRequestId

func (msg *PingMessage) SetRequestId(requestId int64)

SetRequestId sets the request id

func (*PingMessage) SetSequenceNo

func (msg *PingMessage) SetSequenceNo(sequenceNo int64)

SetSequenceNo sets the sequenceNo

func (*PingMessage) SetSessionId

func (msg *PingMessage) SetSessionId(sessionId int64)

SetSessionId sets the session id

func (*PingMessage) SetTimestamp

func (msg *PingMessage) SetTimestamp(timestamp int64) tgdb.TGError

SetTimestamp sets the timestamp

func (*PingMessage) SetVerbId

func (msg *PingMessage) SetVerbId(verbId int)

SetVerbId sets verbId of the message

func (*PingMessage) String

func (msg *PingMessage) String() string

func (*PingMessage) ToBytes

func (msg *PingMessage) ToBytes() ([]byte, int, tgdb.TGError)

ToBytes converts a message object into byte format to be sent over the network to TGDB server

func (*PingMessage) UnmarshalBinary

func (msg *PingMessage) UnmarshalBinary(data []byte) error

UnmarshalBinary modifies the receiver so it must take a pointer receiver.

func (*PingMessage) UpdateSequenceAndTimeStamp

func (msg *PingMessage) UpdateSequenceAndTimeStamp(timestamp int64) tgdb.TGError

UpdateSequenceAndTimeStamp updates the SequenceAndTimeStamp, if message is mutable @param timestamp @return TGMessage on success, error on failure

func (*PingMessage) WriteHeader

func (msg *PingMessage) WriteHeader(os tgdb.TGOutputStream) tgdb.TGError

WriteHeader exports the values of the common message header Attributes to output stream

func (*PingMessage) WritePayload

func (msg *PingMessage) WritePayload(os tgdb.TGOutputStream) tgdb.TGError

WritePayload exports the values of the message specific payload Attributes to output stream

type ProtocolDataInputStream

type ProtocolDataInputStream struct {
	Buf    []byte
	BufLen int
	// contains filtered or unexported fields
}

func DefaultProtocolDataInputStream

func DefaultProtocolDataInputStream() *ProtocolDataInputStream

func NewProtocolDataInputStream

func NewProtocolDataInputStream(buf []byte) *ProtocolDataInputStream

Create New Input Stream Instance

func (*ProtocolDataInputStream) Available

func (msg *ProtocolDataInputStream) Available() (int, tgdb.TGError)

Available checks whether there is any data available on the stream to read

func (*ProtocolDataInputStream) GetPosition

func (msg *ProtocolDataInputStream) GetPosition() int64

GetPosition gets the current position of internal cursor

func (*ProtocolDataInputStream) GetReferenceMap

func (msg *ProtocolDataInputStream) GetReferenceMap() map[int64]tgdb.TGEntity

GetReferenceMap returns a user maintained reference map

func (*ProtocolDataInputStream) Mark

func (msg *ProtocolDataInputStream) Mark(readlimit int)

Mark marks the current position

func (*ProtocolDataInputStream) MarkSupported

func (msg *ProtocolDataInputStream) MarkSupported() bool

MarkSupported checks whether the marking is supported or not

func (*ProtocolDataInputStream) MarshalBinary

func (msg *ProtocolDataInputStream) MarshalBinary() ([]byte, error)

func (*ProtocolDataInputStream) Read

func (msg *ProtocolDataInputStream) Read() (int, tgdb.TGError)

Read reads the current byte

func (*ProtocolDataInputStream) ReadAtOffset

func (msg *ProtocolDataInputStream) ReadAtOffset(b []byte, off int, length int) (int, tgdb.TGError)

ReadAtOffset is similar to readFully.

func (*ProtocolDataInputStream) ReadBoolean

func (msg *ProtocolDataInputStream) ReadBoolean() (bool, tgdb.TGError)

func (*ProtocolDataInputStream) ReadByte

func (msg *ProtocolDataInputStream) ReadByte() (byte, tgdb.TGError)

func (*ProtocolDataInputStream) ReadBytes

func (msg *ProtocolDataInputStream) ReadBytes() ([]byte, tgdb.TGError)

ReadBytes reads an encoded byte array. writeBytes encodes the length, and the byte[]. This is equivalent to do a readInt, and read(byte[])

func (*ProtocolDataInputStream) ReadChar

func (msg *ProtocolDataInputStream) ReadChar() (string, tgdb.TGError)

func (*ProtocolDataInputStream) ReadDouble

func (msg *ProtocolDataInputStream) ReadDouble() (float64, tgdb.TGError)

func (*ProtocolDataInputStream) ReadFloat

func (msg *ProtocolDataInputStream) ReadFloat() (float32, tgdb.TGError)

func (*ProtocolDataInputStream) ReadFully

func (msg *ProtocolDataInputStream) ReadFully(b []byte) ([]byte, tgdb.TGError)

func (*ProtocolDataInputStream) ReadFullyAtPos

func (msg *ProtocolDataInputStream) ReadFullyAtPos(b []byte, readCurPos, readLen int) ([]byte, tgdb.TGError)

func (*ProtocolDataInputStream) ReadInt

func (msg *ProtocolDataInputStream) ReadInt() (int, tgdb.TGError)

func (*ProtocolDataInputStream) ReadIntoBuffer

func (msg *ProtocolDataInputStream) ReadIntoBuffer(b []byte) (int, tgdb.TGError)

ReadIntoBuffer copies bytes in specified buffer The buffer cannot be NIL

func (*ProtocolDataInputStream) ReadLine

func (msg *ProtocolDataInputStream) ReadLine() (string, tgdb.TGError)

func (*ProtocolDataInputStream) ReadLong

func (msg *ProtocolDataInputStream) ReadLong() (int64, tgdb.TGError)

func (*ProtocolDataInputStream) ReadShort

func (msg *ProtocolDataInputStream) ReadShort() (int16, tgdb.TGError)

func (*ProtocolDataInputStream) ReadUTF

func (msg *ProtocolDataInputStream) ReadUTF() (string, tgdb.TGError)

func (*ProtocolDataInputStream) ReadUTFString

func (msg *ProtocolDataInputStream) ReadUTFString(utfLen int) (string, tgdb.TGError)

func (*ProtocolDataInputStream) ReadUnsignedByte

func (msg *ProtocolDataInputStream) ReadUnsignedByte() (int, tgdb.TGError)

func (*ProtocolDataInputStream) ReadUnsignedShort

func (msg *ProtocolDataInputStream) ReadUnsignedShort() (uint16, tgdb.TGError)

func (*ProtocolDataInputStream) ReadVarLong

func (msg *ProtocolDataInputStream) ReadVarLong() (int64, tgdb.TGError)

ReadVarLong reads a Variable long field

func (*ProtocolDataInputStream) Reset

func (msg *ProtocolDataInputStream) Reset()

Reset brings internal moving cursor back to the old position

func (*ProtocolDataInputStream) SetPosition

func (msg *ProtocolDataInputStream) SetPosition(position int64) int64

SetPosition sets the position of reading.

func (*ProtocolDataInputStream) SetReferenceMap

func (msg *ProtocolDataInputStream) SetReferenceMap(rMap map[int64]tgdb.TGEntity)

SetReferenceMap sets a user maintained map as reference data

func (*ProtocolDataInputStream) Skip

Skip skips n bytes

func (*ProtocolDataInputStream) SkipBytes

func (msg *ProtocolDataInputStream) SkipBytes(n int) (int, tgdb.TGError)

func (*ProtocolDataInputStream) String

func (msg *ProtocolDataInputStream) String() string

func (*ProtocolDataInputStream) UnmarshalBinary

func (msg *ProtocolDataInputStream) UnmarshalBinary(data []byte) error

type ProtocolDataOutputStream

type ProtocolDataOutputStream struct {
	Buf []byte
	// contains filtered or unexported fields
}

func DefaultProtocolDataOutputStream

func DefaultProtocolDataOutputStream() *ProtocolDataOutputStream

func NewProtocolDataOutputStream

func NewProtocolDataOutputStream(len int) *ProtocolDataOutputStream

Create New Input Stream Instance

func (*ProtocolDataOutputStream) Ensure

func (msg *ProtocolDataOutputStream) Ensure(len int)

func (*ProtocolDataOutputStream) GetBuffer

func (msg *ProtocolDataOutputStream) GetBuffer() []byte

GetBuffer gets the underlying Buffer

func (*ProtocolDataOutputStream) GetLength

func (msg *ProtocolDataOutputStream) GetLength() int

GetLength gets the total write length

func (*ProtocolDataOutputStream) GetPosition

func (msg *ProtocolDataOutputStream) GetPosition() int

GetPosition gets the current write position

func (*ProtocolDataOutputStream) MarshalBinary

func (msg *ProtocolDataOutputStream) MarshalBinary() ([]byte, error)

func (*ProtocolDataOutputStream) SkipNBytes

func (msg *ProtocolDataOutputStream) SkipNBytes(n int)

SkipNBytes skips n bytes. Allocate if necessary

func (*ProtocolDataOutputStream) String

func (msg *ProtocolDataOutputStream) String() string

func (*ProtocolDataOutputStream) ToByteArray

func (msg *ProtocolDataOutputStream) ToByteArray() ([]byte, tgdb.TGError)

ToByteArray returns a new constructed byte array of the data that is being streamed.

func (*ProtocolDataOutputStream) UnmarshalBinary

func (msg *ProtocolDataOutputStream) UnmarshalBinary(data []byte) error

func (*ProtocolDataOutputStream) WriteBoolean

func (msg *ProtocolDataOutputStream) WriteBoolean(value bool)

func (*ProtocolDataOutputStream) WriteBooleanAt

func (msg *ProtocolDataOutputStream) WriteBooleanAt(pos int, value bool) (int, tgdb.TGError)

WriteBooleanAt writes boolean at a given position. Buffer should have sufficient space to write the content.

func (*ProtocolDataOutputStream) WriteByte

func (msg *ProtocolDataOutputStream) WriteByte(value int)

func (*ProtocolDataOutputStream) WriteByteAt

func (msg *ProtocolDataOutputStream) WriteByteAt(pos int, value int) (int, tgdb.TGError)

WriteByteAt writes a byte at the position. Buffer should have sufficient space to write the content.

func (*ProtocolDataOutputStream) WriteBytes

func (msg *ProtocolDataOutputStream) WriteBytes(buf []byte) tgdb.TGError

WriteBytes writes the len, and the byte array into the buffer

func (*ProtocolDataOutputStream) WriteBytesAt

func (msg *ProtocolDataOutputStream) WriteBytesAt(pos int, s string) (int, tgdb.TGError)

WriteBytesAt writes string at the position. Buffer should have sufficient space to write the content.

func (*ProtocolDataOutputStream) WriteBytesFromPos

func (msg *ProtocolDataOutputStream) WriteBytesFromPos(value []byte, writePos, writeLen int) tgdb.TGError

func (*ProtocolDataOutputStream) WriteBytesFromString

func (msg *ProtocolDataOutputStream) WriteBytesFromString(value string) tgdb.TGError

func (*ProtocolDataOutputStream) WriteChar

func (msg *ProtocolDataOutputStream) WriteChar(value int)

func (*ProtocolDataOutputStream) WriteCharAt

func (msg *ProtocolDataOutputStream) WriteCharAt(pos int, value int) (int, tgdb.TGError)

WriteCharAt writes a Java Char at the position. Buffer should have sufficient space to write the content.

func (*ProtocolDataOutputStream) WriteChars

func (msg *ProtocolDataOutputStream) WriteChars(value string)

func (*ProtocolDataOutputStream) WriteCharsAt

func (msg *ProtocolDataOutputStream) WriteCharsAt(pos int, s string) (int, tgdb.TGError)

WriteCharsAt writes Chars at the position. Buffer should have sufficient space to write the content.

func (*ProtocolDataOutputStream) WriteDouble

func (msg *ProtocolDataOutputStream) WriteDouble(value float64)

func (*ProtocolDataOutputStream) WriteDoubleAt

func (msg *ProtocolDataOutputStream) WriteDoubleAt(pos int, value float64) (int, tgdb.TGError)

WriteDoubleAt writes Double at the position. Buffer should have sufficient space to write the content.

func (*ProtocolDataOutputStream) WriteFloat

func (msg *ProtocolDataOutputStream) WriteFloat(value float32)

func (*ProtocolDataOutputStream) WriteFloatAt

func (msg *ProtocolDataOutputStream) WriteFloatAt(pos int, value float32) (int, tgdb.TGError)

WriteFloatAt writes Float at the position. Buffer should have sufficient space to write the content.

func (*ProtocolDataOutputStream) WriteInt

func (msg *ProtocolDataOutputStream) WriteInt(value int)

func (*ProtocolDataOutputStream) WriteIntAt

func (msg *ProtocolDataOutputStream) WriteIntAt(pos int, value int) (int, tgdb.TGError)

WriteIntAt writes Integer at the position.Buffer should have sufficient space to write the content.

func (*ProtocolDataOutputStream) WriteLong

func (msg *ProtocolDataOutputStream) WriteLong(value int64)

func (*ProtocolDataOutputStream) WriteLongAsBytes

func (msg *ProtocolDataOutputStream) WriteLongAsBytes(value int64) tgdb.TGError

WriteLongAsBytes writes Long in byte format

func (*ProtocolDataOutputStream) WriteLongAt

func (msg *ProtocolDataOutputStream) WriteLongAt(pos int, value int64) (int, tgdb.TGError)

WriteLongAt writes Long at the position. Buffer should have sufficient space to write the content.

func (*ProtocolDataOutputStream) WriteShort

func (msg *ProtocolDataOutputStream) WriteShort(value int)

func (*ProtocolDataOutputStream) WriteShortAt

func (msg *ProtocolDataOutputStream) WriteShortAt(pos int, value int) (int, tgdb.TGError)

WriteShortAt writes a Java Char at the position. Buffer should have sufficient space to write the content.

func (*ProtocolDataOutputStream) WriteUTF

func (msg *ProtocolDataOutputStream) WriteUTF(str string) tgdb.TGError

func (*ProtocolDataOutputStream) WriteUTFString

func (msg *ProtocolDataOutputStream) WriteUTFString(str string) (int, tgdb.TGError)

WriteUTFString writes UTFString

func (*ProtocolDataOutputStream) WriteVarLong

func (msg *ProtocolDataOutputStream) WriteVarLong(value int64) tgdb.TGError

WriteVarLong writes a long value as varying length into the buffer.

type ProtocolNotSupported

type ProtocolNotSupported struct {
	*TGDBError
}

func DefaultTGProtocolNotSupported

func DefaultTGProtocolNotSupported() *ProtocolNotSupported

Create New ProtocolNotSupported Instance

func NewTGProtocolNotSupported

func NewTGProtocolNotSupported(eCode string, eType int, eMsg, eDetails string) *ProtocolNotSupported

func NewTGProtocolNotSupportedWithMsg

func NewTGProtocolNotSupportedWithMsg(msg string) *ProtocolNotSupported

func (*ProtocolNotSupported) Error

func (e *ProtocolNotSupported) Error() string

func (*ProtocolNotSupported) GetErrorCode

func (e *ProtocolNotSupported) GetErrorCode() string

func (*ProtocolNotSupported) GetErrorDetails

func (e *ProtocolNotSupported) GetErrorDetails() string

func (*ProtocolNotSupported) GetErrorMsg

func (e *ProtocolNotSupported) GetErrorMsg() string

func (*ProtocolNotSupported) GetErrorType

func (e *ProtocolNotSupported) GetErrorType() int

type QueryError

type QueryError struct {
	*TGDBError
}

/////////////// Exception Handling for TGDBQuery related error

func DefaultQueryError

func DefaultQueryError() *QueryError

func NewQueryError

func NewQueryError(eServerErrorCode int, eType int, eMsg string) *QueryError

type QueryRequestMessage

type QueryRequestMessage struct {
	*AbstractProtocolMessage
	// contains filtered or unexported fields
}

func DefaultQueryRequestMessage

func DefaultQueryRequestMessage() *QueryRequestMessage

func NewQueryRequestMessage

func NewQueryRequestMessage(authToken, sessionId int64) *QueryRequestMessage

Create New Message Instance

func (*QueryRequestMessage) FromBytes

func (msg *QueryRequestMessage) FromBytes(buffer []byte) (tgdb.TGMessage, tgdb.TGError)

FromBytes constructs a message object from the input buffer in the byte format

func (*QueryRequestMessage) GetAuthToken

func (msg *QueryRequestMessage) GetAuthToken() int64

GetAuthToken gets the authToken

func (*QueryRequestMessage) GetBatchSize

func (msg *QueryRequestMessage) GetBatchSize() int

func (*QueryRequestMessage) GetCommand

func (msg *QueryRequestMessage) GetCommand() int

func (*QueryRequestMessage) GetEdgeFilter

func (msg *QueryRequestMessage) GetEdgeFilter() string

func (*QueryRequestMessage) GetEdgeLimit

func (msg *QueryRequestMessage) GetEdgeLimit() int

func (*QueryRequestMessage) GetEndCondition

func (msg *QueryRequestMessage) GetEndCondition() string

func (*QueryRequestMessage) GetFetchSize

func (msg *QueryRequestMessage) GetFetchSize() int

func (*QueryRequestMessage) GetIsUpdatable

func (msg *QueryRequestMessage) GetIsUpdatable() bool

GetIsUpdatable checks whether this message updatable or not

func (*QueryRequestMessage) GetMessageByteBufLength

func (msg *QueryRequestMessage) GetMessageByteBufLength() int

GetMessageByteBufLength gets the MessageByteBufLength. This method is called after the toBytes() is executed.

func (*QueryRequestMessage) GetQuery

func (msg *QueryRequestMessage) GetQuery() string

func (*QueryRequestMessage) GetQueryHashId

func (msg *QueryRequestMessage) GetQueryHashId() int64

func (*QueryRequestMessage) GetQueryObject

func (msg *QueryRequestMessage) GetQueryObject() tgdb.TGQuery

func (*QueryRequestMessage) GetRequestId

func (msg *QueryRequestMessage) GetRequestId() int64

GetRequestId gets the requestId for the message. This will be used as the CorrelationId

func (*QueryRequestMessage) GetSequenceNo

func (msg *QueryRequestMessage) GetSequenceNo() int64

GetSequenceNo gets the sequenceNo of the message

func (*QueryRequestMessage) GetSessionId

func (msg *QueryRequestMessage) GetSessionId() int64

GetSessionId gets the session id

func (*QueryRequestMessage) GetSortAttrName

func (msg *QueryRequestMessage) GetSortAttrName() string

func (*QueryRequestMessage) GetSortOrderDsc

func (msg *QueryRequestMessage) GetSortOrderDsc() bool

func (*QueryRequestMessage) GetSortResultLimit

func (msg *QueryRequestMessage) GetSortResultLimit() int

func (*QueryRequestMessage) GetTimestamp

func (msg *QueryRequestMessage) GetTimestamp() int64

GetTimestamp gets the Timestamp

func (*QueryRequestMessage) GetTraversalCondition

func (msg *QueryRequestMessage) GetTraversalCondition() string

func (*QueryRequestMessage) GetTraversalDepth

func (msg *QueryRequestMessage) GetTraversalDepth() int

func (*QueryRequestMessage) GetVerbId

func (msg *QueryRequestMessage) GetVerbId() int

GetVerbId gets verbId of the message

func (*QueryRequestMessage) MarshalBinary

func (msg *QueryRequestMessage) MarshalBinary() ([]byte, error)

func (*QueryRequestMessage) ReadHeader

func (msg *QueryRequestMessage) ReadHeader(is tgdb.TGInputStream) tgdb.TGError

ReadHeader reads the bytes from input stream and constructs a common header of network packet

func (*QueryRequestMessage) ReadPayload

func (msg *QueryRequestMessage) ReadPayload(is tgdb.TGInputStream) tgdb.TGError

ReadPayload reads the bytes from input stream and constructs message specific payload Attributes

func (*QueryRequestMessage) SetAuthToken

func (msg *QueryRequestMessage) SetAuthToken(authToken int64)

SetAuthToken sets the authToken

func (*QueryRequestMessage) SetBatchSize

func (msg *QueryRequestMessage) SetBatchSize(size int)

func (*QueryRequestMessage) SetCommand

func (msg *QueryRequestMessage) SetCommand(cmd int)

func (*QueryRequestMessage) SetDataOffset

func (msg *QueryRequestMessage) SetDataOffset(dataOffset int16)

SetDataOffset sets the offset at which data starts in the payload

func (*QueryRequestMessage) SetEdgeFilter

func (msg *QueryRequestMessage) SetEdgeFilter(expr string)

func (*QueryRequestMessage) SetEdgeLimit

func (msg *QueryRequestMessage) SetEdgeLimit(size int)

func (*QueryRequestMessage) SetEndCondition

func (msg *QueryRequestMessage) SetEndCondition(expr string)

func (*QueryRequestMessage) SetFetchSize

func (msg *QueryRequestMessage) SetFetchSize(size int)

func (*QueryRequestMessage) SetIsUpdatable

func (msg *QueryRequestMessage) SetIsUpdatable(updateFlag bool)

SetIsUpdatable sets the updatable flag

func (*QueryRequestMessage) SetMessageByteBufLength

func (msg *QueryRequestMessage) SetMessageByteBufLength(bufLength int)

SetMessageByteBufLength sets the message buffer length

func (*QueryRequestMessage) SetQuery

func (msg *QueryRequestMessage) SetQuery(expr string)

func (*QueryRequestMessage) SetQueryHashId

func (msg *QueryRequestMessage) SetQueryHashId(hash int64)

func (*QueryRequestMessage) SetQueryObject

func (msg *QueryRequestMessage) SetQueryObject(query tgdb.TGQuery)

func (*QueryRequestMessage) SetRequestId

func (msg *QueryRequestMessage) SetRequestId(requestId int64)

SetRequestId sets the request id

func (*QueryRequestMessage) SetSequenceNo

func (msg *QueryRequestMessage) SetSequenceNo(sequenceNo int64)

SetSequenceNo sets the sequenceNo

func (*QueryRequestMessage) SetSessionId

func (msg *QueryRequestMessage) SetSessionId(sessionId int64)

SetSessionId sets the session id

func (*QueryRequestMessage) SetSortAttrName

func (msg *QueryRequestMessage) SetSortAttrName(name string)

func (*QueryRequestMessage) SetSortOrderDsc

func (msg *QueryRequestMessage) SetSortOrderDsc(order bool)

func (*QueryRequestMessage) SetSortResultLimit

func (msg *QueryRequestMessage) SetSortResultLimit(limit int)

func (*QueryRequestMessage) SetTimestamp

func (msg *QueryRequestMessage) SetTimestamp(timestamp int64) tgdb.TGError

SetTimestamp sets the timestamp

func (*QueryRequestMessage) SetTraversalCondition

func (msg *QueryRequestMessage) SetTraversalCondition(expr string)

func (*QueryRequestMessage) SetTraversalDepth

func (msg *QueryRequestMessage) SetTraversalDepth(depth int)

func (*QueryRequestMessage) SetVerbId

func (msg *QueryRequestMessage) SetVerbId(verbId int)

SetVerbId sets verbId of the message

func (*QueryRequestMessage) String

func (msg *QueryRequestMessage) String() string

func (*QueryRequestMessage) ToBytes

func (msg *QueryRequestMessage) ToBytes() ([]byte, int, tgdb.TGError)

ToBytes converts a message object into byte format to be sent over the network to TGDB server

func (*QueryRequestMessage) UnmarshalBinary

func (msg *QueryRequestMessage) UnmarshalBinary(data []byte) error

UnmarshalBinary modifies the receiver so it must take a pointer receiver.

func (*QueryRequestMessage) UpdateSequenceAndTimeStamp

func (msg *QueryRequestMessage) UpdateSequenceAndTimeStamp(timestamp int64) tgdb.TGError

UpdateSequenceAndTimeStamp updates the SequenceAndTimeStamp, if message is mutable @param timestamp @return TGMessage on success, error on failure

func (*QueryRequestMessage) WriteHeader

func (msg *QueryRequestMessage) WriteHeader(os tgdb.TGOutputStream) tgdb.TGError

WriteHeader exports the values of the common message header Attributes to output stream

func (*QueryRequestMessage) WritePayload

func (msg *QueryRequestMessage) WritePayload(os tgdb.TGOutputStream) tgdb.TGError

WritePayload exports the values of the message specific payload Attributes to output stream

type QueryResponseMessage

type QueryResponseMessage struct {
	*AbstractProtocolMessage
	// contains filtered or unexported fields
}

func DefaultQueryResponseMessage

func DefaultQueryResponseMessage() *QueryResponseMessage

func NewQueryResponseMessage

func NewQueryResponseMessage(authToken, sessionId int64) *QueryResponseMessage

Create New Message Instance

func (*QueryResponseMessage) FromBytes

func (msg *QueryResponseMessage) FromBytes(buffer []byte) (tgdb.TGMessage, tgdb.TGError)

FromBytes constructs a message object from the input buffer in the byte format

func (*QueryResponseMessage) GetAuthToken

func (msg *QueryResponseMessage) GetAuthToken() int64

GetAuthToken gets the authToken

func (*QueryResponseMessage) GetEntityStream

func (msg *QueryResponseMessage) GetEntityStream() tgdb.TGInputStream

func (*QueryResponseMessage) GetHasResult

func (msg *QueryResponseMessage) GetHasResult() bool

func (*QueryResponseMessage) GetIsUpdatable

func (msg *QueryResponseMessage) GetIsUpdatable() bool

GetIsUpdatable checks whether this message updatable or not

func (*QueryResponseMessage) GetMessageByteBufLength

func (msg *QueryResponseMessage) GetMessageByteBufLength() int

GetMessageByteBufLength gets the MessageByteBufLength. This method is called after the toBytes() is executed.

func (*QueryResponseMessage) GetQueryHashId

func (msg *QueryResponseMessage) GetQueryHashId() int64

func (*QueryResponseMessage) GetRequestId

func (msg *QueryResponseMessage) GetRequestId() int64

GetRequestId gets the requestId for the message. This will be used as the CorrelationId

func (*QueryResponseMessage) GetResult

func (msg *QueryResponseMessage) GetResult() int

func (*QueryResponseMessage) GetResultCount

func (msg *QueryResponseMessage) GetResultCount() int

func (*QueryResponseMessage) GetResultTypeAnnot

func (msg *QueryResponseMessage) GetResultTypeAnnot() string

func (*QueryResponseMessage) GetSequenceNo

func (msg *QueryResponseMessage) GetSequenceNo() int64

GetSequenceNo gets the sequenceNo of the message

func (*QueryResponseMessage) GetSessionId

func (msg *QueryResponseMessage) GetSessionId() int64

GetSessionId gets the session id

func (*QueryResponseMessage) GetTimestamp

func (msg *QueryResponseMessage) GetTimestamp() int64

GetTimestamp gets the Timestamp

func (*QueryResponseMessage) GetTotalCount

func (msg *QueryResponseMessage) GetTotalCount() int

func (*QueryResponseMessage) GetVerbId

func (msg *QueryResponseMessage) GetVerbId() int

GetVerbId gets verbId of the message

func (*QueryResponseMessage) MarshalBinary

func (msg *QueryResponseMessage) MarshalBinary() ([]byte, error)

func (*QueryResponseMessage) ReadHeader

func (msg *QueryResponseMessage) ReadHeader(is tgdb.TGInputStream) tgdb.TGError

ReadHeader reads the bytes from input stream and constructs a common header of network packet

func (*QueryResponseMessage) ReadPayload

func (msg *QueryResponseMessage) ReadPayload(is tgdb.TGInputStream) tgdb.TGError

ReadPayload reads the bytes from input stream and constructs message specific payload Attributes

func (*QueryResponseMessage) SetAuthToken

func (msg *QueryResponseMessage) SetAuthToken(authToken int64)

SetAuthToken sets the authToken

func (*QueryResponseMessage) SetDataOffset

func (msg *QueryResponseMessage) SetDataOffset(dataOffset int16)

SetDataOffset sets the offset at which data starts in the payload

func (*QueryResponseMessage) SetEntityStream

func (msg *QueryResponseMessage) SetEntityStream(eStream tgdb.TGInputStream)

func (*QueryResponseMessage) SetHasResult

func (msg *QueryResponseMessage) SetHasResult(resultFlag bool)

func (*QueryResponseMessage) SetIsUpdatable

func (msg *QueryResponseMessage) SetIsUpdatable(updateFlag bool)

SetIsUpdatable sets the updatable flag

func (*QueryResponseMessage) SetMessageByteBufLength

func (msg *QueryResponseMessage) SetMessageByteBufLength(bufLength int)

SetMessageByteBufLength sets the message buffer length

func (*QueryResponseMessage) SetQueryHashId

func (msg *QueryResponseMessage) SetQueryHashId(id int64)

func (*QueryResponseMessage) SetRequestId

func (msg *QueryResponseMessage) SetRequestId(requestId int64)

SetRequestId sets the request id

func (*QueryResponseMessage) SetResult

func (msg *QueryResponseMessage) SetResult(size int)

func (*QueryResponseMessage) SetResultCount

func (msg *QueryResponseMessage) SetResultCount(size int)

func (*QueryResponseMessage) SetResultTypeAnnot

func (msg *QueryResponseMessage) SetResultTypeAnnot(anon string)

func (*QueryResponseMessage) SetSequenceNo

func (msg *QueryResponseMessage) SetSequenceNo(sequenceNo int64)

SetSequenceNo sets the sequenceNo

func (*QueryResponseMessage) SetSessionId

func (msg *QueryResponseMessage) SetSessionId(sessionId int64)

SetSessionId sets the session id

func (*QueryResponseMessage) SetTimestamp

func (msg *QueryResponseMessage) SetTimestamp(timestamp int64) tgdb.TGError

SetTimestamp sets the timestamp

func (*QueryResponseMessage) SetTotalCount

func (msg *QueryResponseMessage) SetTotalCount(count int)

func (*QueryResponseMessage) SetVerbId

func (msg *QueryResponseMessage) SetVerbId(verbId int)

SetVerbId sets verbId of the message

func (*QueryResponseMessage) String

func (msg *QueryResponseMessage) String() string

func (*QueryResponseMessage) ToBytes

func (msg *QueryResponseMessage) ToBytes() ([]byte, int, tgdb.TGError)

ToBytes converts a message object into byte format to be sent over the network to TGDB server

func (*QueryResponseMessage) UnmarshalBinary

func (msg *QueryResponseMessage) UnmarshalBinary(data []byte) error

UnmarshalBinary modifies the receiver so it must take a pointer receiver.

func (*QueryResponseMessage) UpdateSequenceAndTimeStamp

func (msg *QueryResponseMessage) UpdateSequenceAndTimeStamp(timestamp int64) tgdb.TGError

UpdateSequenceAndTimeStamp updates the SequenceAndTimeStamp, if message is mutable @param timestamp @return TGMessage on success, error on failure

func (*QueryResponseMessage) WriteHeader

func (msg *QueryResponseMessage) WriteHeader(os tgdb.TGOutputStream) tgdb.TGError

WriteHeader exports the values of the common message header Attributes to output stream

func (*QueryResponseMessage) WritePayload

func (msg *QueryResponseMessage) WritePayload(os tgdb.TGOutputStream) tgdb.TGError

WritePayload exports the values of the message specific payload Attributes to output stream

type ResultDataDescriptor

type ResultDataDescriptor struct {
	DataType      int
	Annot         string
	IsItMap       bool
	IsItArray     bool
	HasType       bool
	ContainedSize int
	ScalarType    int
	SysObject     tgdb.TGSystemObject
	KeyDesc       tgdb.TGResultDataDescriptor
	ValueDesc     tgdb.TGResultDataDescriptor
	ContainedDesc []tgdb.TGResultDataDescriptor
}

func DefaultResultDataDescriptor

func DefaultResultDataDescriptor() *ResultDataDescriptor

func NewResultDataDescriptor

func NewResultDataDescriptor(typeOfDataDescriptor int) *ResultDataDescriptor

func NewResultDataDescriptorWithScalarAnnot

func NewResultDataDescriptorWithScalarAnnot(typeOfDataDescriptor int, scalarAnnot string) *ResultDataDescriptor

func (*ResultDataDescriptor) GetContainedDataSize

func (obj *ResultDataDescriptor) GetContainedDataSize() int

func (*ResultDataDescriptor) GetContainedDescriptor

func (obj *ResultDataDescriptor) GetContainedDescriptor(position int) tgdb.TGResultDataDescriptor

func (*ResultDataDescriptor) GetContainedDescriptors

func (obj *ResultDataDescriptor) GetContainedDescriptors() []tgdb.TGResultDataDescriptor

func (*ResultDataDescriptor) GetDataType

func (obj *ResultDataDescriptor) GetDataType() int

func (*ResultDataDescriptor) GetKeyDescriptor

func (obj *ResultDataDescriptor) GetKeyDescriptor() tgdb.TGResultDataDescriptor

func (*ResultDataDescriptor) GetScalarType

func (obj *ResultDataDescriptor) GetScalarType() int

func (*ResultDataDescriptor) GetSystemObject

func (obj *ResultDataDescriptor) GetSystemObject() tgdb.TGSystemObject

func (*ResultDataDescriptor) GetValueDescriptor

func (obj *ResultDataDescriptor) GetValueDescriptor() tgdb.TGResultDataDescriptor

func (*ResultDataDescriptor) HasConcreteType

func (obj *ResultDataDescriptor) HasConcreteType() bool

func (*ResultDataDescriptor) IsArray

func (obj *ResultDataDescriptor) IsArray() bool

func (*ResultDataDescriptor) IsMap

func (obj *ResultDataDescriptor) IsMap() bool

func (*ResultDataDescriptor) SetContainedDataSize

func (obj *ResultDataDescriptor) SetContainedDataSize(dataSize int)

func (*ResultDataDescriptor) SetContainedDescriptors

func (obj *ResultDataDescriptor) SetContainedDescriptors(containedDesc []tgdb.TGResultDataDescriptor)

func (*ResultDataDescriptor) SetDataType

func (obj *ResultDataDescriptor) SetDataType(dataType int)

//////////// setters for ResultDataDescriptor

func (*ResultDataDescriptor) SetHasConcreteType

func (obj *ResultDataDescriptor) SetHasConcreteType(hasType bool)

func (*ResultDataDescriptor) SetIsArray

func (obj *ResultDataDescriptor) SetIsArray(isArray bool)

func (*ResultDataDescriptor) SetIsMap

func (obj *ResultDataDescriptor) SetIsMap(isMap bool)

func (*ResultDataDescriptor) SetKeyDescriptor

func (obj *ResultDataDescriptor) SetKeyDescriptor(keyDesc tgdb.TGResultDataDescriptor)

func (*ResultDataDescriptor) SetScalarType

func (obj *ResultDataDescriptor) SetScalarType(scalarType int)

func (*ResultDataDescriptor) SetSystemObject

func (obj *ResultDataDescriptor) SetSystemObject(sysObject tgdb.TGSystemObject)

func (*ResultDataDescriptor) SetValueDescriptor

func (obj *ResultDataDescriptor) SetValueDescriptor(valueDesc tgdb.TGResultDataDescriptor)

type ResultSet

type ResultSet struct {
	ResultList []interface{}
	MetaData   tgdb.TGResultSetMetaData
	// contains filtered or unexported fields
}

func DefaultResultSet

func DefaultResultSet() *ResultSet

func NewResultSet

func NewResultSet(conn tgdb.TGConnection, resultId int) *ResultSet

func (*ResultSet) AddEntityToResultSet

func (obj *ResultSet) AddEntityToResultSet(entity tgdb.TGEntity) tgdb.TGResultSet

AddEntityToResultSet adds another entity to the result set

func (*ResultSet) Close

func (obj *ResultSet) Close() tgdb.TGResultSet

Close closes the result set

func (*ResultSet) Count

func (obj *ResultSet) Count() int

Count returns nos of entities returned by the query. The result set has a cursor which prefetches "n" rows as per the query constraint. If the nos of entities returned by the query is less than prefetch count, then all are returned.

func (*ResultSet) First

func (obj *ResultSet) First() interface{}

First returns the first entity in the result set

func (*ResultSet) GetAt

func (obj *ResultSet) GetAt(position int) interface{}

GetAt gets the entity at the position.

func (*ResultSet) GetConnection

func (obj *ResultSet) GetConnection() tgdb.TGConnection

func (*ResultSet) GetCurrentPos

func (obj *ResultSet) GetCurrentPos() int

func (*ResultSet) GetExceptions

func (obj *ResultSet) GetExceptions() []tgdb.TGError

GetExceptions gets the Exceptions in the result set

func (*ResultSet) GetIsOpen

func (obj *ResultSet) GetIsOpen() bool

func (*ResultSet) GetMetadata

func (obj *ResultSet) GetMetadata() tgdb.TGResultSetMetaData

func (*ResultSet) GetPosition

func (obj *ResultSet) GetPosition() int

GetPosition gets the Current cursor position. A result set upon creation is set to the position 0.

func (*ResultSet) GetResultId

func (obj *ResultSet) GetResultId() int

func (*ResultSet) GetResults

func (obj *ResultSet) GetResults() []interface{}

func (*ResultSet) HasExceptions

func (obj *ResultSet) HasExceptions() bool

HasExceptions checks whether the result set has any exceptions

func (*ResultSet) HasNext

func (obj *ResultSet) HasNext() bool

HasNext Check whether there is next entry in result set

func (*ResultSet) Last

func (obj *ResultSet) Last() interface{}

Last returns the last Entity in the result set

func (*ResultSet) MarshalBinary

func (obj *ResultSet) MarshalBinary() ([]byte, error)

func (*ResultSet) Next

func (obj *ResultSet) Next() interface{}

Next returns the next entity w.r.t to the current cursor position in the result set

func (*ResultSet) Prev

func (obj *ResultSet) Prev() interface{}

Skip skips a number of position

func (*ResultSet) SetResultTypeAnnotation

func (obj *ResultSet) SetResultTypeAnnotation(annot string) tgdb.TGError

func (*ResultSet) Skip

func (obj *ResultSet) Skip(position int) tgdb.TGResultSet

Skip skips a number of position

func (*ResultSet) String

func (obj *ResultSet) String() string

func (*ResultSet) ToCollection

func (obj *ResultSet) ToCollection() []interface{}

ToCollection converts the result set into a collection

func (*ResultSet) UnmarshalBinary

func (obj *ResultSet) UnmarshalBinary(data []byte) error

type ResultSetMetadata

type ResultSetMetadata struct {
	ResultDataDescriptor *tgdb.TGResultDataDescriptor
	ResultType           int
	Annot                string
}

func DefaultResultSetMetadata

func DefaultResultSetMetadata() *ResultSetMetadata

///////// Constructor Initialization starts

func NewResultSetMetadataWithAnnot

func NewResultSetMetadataWithAnnot(annot string) *ResultSetMetadata

func (*ResultSetMetadata) ConstructDataDescriptor

func (obj *ResultSetMetadata) ConstructDataDescriptor(gmd tgdb.TGGraphMetadata, annot string) *tgdb.TGResultDataDescriptor

func (*ResultSetMetadata) ConstructPathDataDescriptor

func (obj *ResultSetMetadata) ConstructPathDataDescriptor(gmd tgdb.TGGraphMetadata, annot string) *tgdb.TGResultDataDescriptor

func (*ResultSetMetadata) GetAnnot

func (obj *ResultSetMetadata) GetAnnot() string

func (*ResultSetMetadata) GetResultDataDescriptor

func (obj *ResultSetMetadata) GetResultDataDescriptor() *tgdb.TGResultDataDescriptor

func (*ResultSetMetadata) GetResultType

func (obj *ResultSetMetadata) GetResultType() int

func (*ResultSetMetadata) Initialize

func (obj *ResultSetMetadata) Initialize(gmd tgdb.TGGraphMetadata)

func (*ResultSetMetadata) SetAnnot

func (obj *ResultSetMetadata) SetAnnot(annot string)

type RetryIOException

type RetryIOException struct {
	*TGDBError
}

func DefaultTGRetryIOException

func DefaultTGRetryIOException() *RetryIOException

Create New RetryIOException Instance

func NewTGRetryIOException

func NewTGRetryIOException(eCode string, eType int, eMsg, eDetails string) *RetryIOException

func NewTGRetryIOExceptionWithMsg

func NewTGRetryIOExceptionWithMsg(msg string) *RetryIOException

func (*RetryIOException) Error

func (e *RetryIOException) Error() string

func (*RetryIOException) GetErrorCode

func (e *RetryIOException) GetErrorCode() string

func (*RetryIOException) GetErrorDetails

func (e *RetryIOException) GetErrorDetails() string

func (*RetryIOException) GetErrorMsg

func (e *RetryIOException) GetErrorMsg() string

func (*RetryIOException) GetErrorType

func (e *RetryIOException) GetErrorType() int

type RollbackTransactionRequestMessage

type RollbackTransactionRequestMessage struct {
	*AbstractProtocolMessage
}

func DefaultRollbackTransactionRequestMessage

func DefaultRollbackTransactionRequestMessage() *RollbackTransactionRequestMessage

func NewRollbackTransactionRequestMessage

func NewRollbackTransactionRequestMessage(authToken, sessionId int64) *RollbackTransactionRequestMessage

Create New Message Instance

func (*RollbackTransactionRequestMessage) FromBytes

func (msg *RollbackTransactionRequestMessage) FromBytes(buffer []byte) (tgdb.TGMessage, tgdb.TGError)

FromBytes constructs a message object from the input buffer in the byte format

func (*RollbackTransactionRequestMessage) GetAuthToken

func (msg *RollbackTransactionRequestMessage) GetAuthToken() int64

GetAuthToken gets the authToken

func (*RollbackTransactionRequestMessage) GetIsUpdatable

func (msg *RollbackTransactionRequestMessage) GetIsUpdatable() bool

GetIsUpdatable checks whether this message updatable or not

func (*RollbackTransactionRequestMessage) GetMessageByteBufLength

func (msg *RollbackTransactionRequestMessage) GetMessageByteBufLength() int

GetMessageByteBufLength gets the MessageByteBufLength. This method is called after the toBytes() is executed.

func (*RollbackTransactionRequestMessage) GetRequestId

func (msg *RollbackTransactionRequestMessage) GetRequestId() int64

GetRequestId gets the requestId for the message. This will be used as the CorrelationId

func (*RollbackTransactionRequestMessage) GetSequenceNo

func (msg *RollbackTransactionRequestMessage) GetSequenceNo() int64

GetSequenceNo gets the sequenceNo of the message

func (*RollbackTransactionRequestMessage) GetSessionId

func (msg *RollbackTransactionRequestMessage) GetSessionId() int64

GetSessionId gets the session id

func (*RollbackTransactionRequestMessage) GetTimestamp

func (msg *RollbackTransactionRequestMessage) GetTimestamp() int64

GetTimestamp gets the Timestamp

func (*RollbackTransactionRequestMessage) GetVerbId

func (msg *RollbackTransactionRequestMessage) GetVerbId() int

GetVerbId gets verbId of the message

func (*RollbackTransactionRequestMessage) MarshalBinary

func (msg *RollbackTransactionRequestMessage) MarshalBinary() ([]byte, error)

func (*RollbackTransactionRequestMessage) ReadHeader

ReadHeader reads the bytes from input stream and constructs a common header of network packet

func (*RollbackTransactionRequestMessage) ReadPayload

ReadPayload reads the bytes from input stream and constructs message specific payload Attributes

func (*RollbackTransactionRequestMessage) SetAuthToken

func (msg *RollbackTransactionRequestMessage) SetAuthToken(authToken int64)

SetAuthToken sets the authToken

func (*RollbackTransactionRequestMessage) SetDataOffset

func (msg *RollbackTransactionRequestMessage) SetDataOffset(dataOffset int16)

SetDataOffset sets the offset at which data starts in the payload

func (*RollbackTransactionRequestMessage) SetIsUpdatable

func (msg *RollbackTransactionRequestMessage) SetIsUpdatable(updateFlag bool)

SetIsUpdatable sets the updatable flag

func (*RollbackTransactionRequestMessage) SetMessageByteBufLength

func (msg *RollbackTransactionRequestMessage) SetMessageByteBufLength(bufLength int)

SetMessageByteBufLength sets the message buffer length

func (*RollbackTransactionRequestMessage) SetRequestId

func (msg *RollbackTransactionRequestMessage) SetRequestId(requestId int64)

SetRequestId sets the request id

func (*RollbackTransactionRequestMessage) SetSequenceNo

func (msg *RollbackTransactionRequestMessage) SetSequenceNo(sequenceNo int64)

SetSequenceNo sets the sequenceNo

func (*RollbackTransactionRequestMessage) SetSessionId

func (msg *RollbackTransactionRequestMessage) SetSessionId(sessionId int64)

SetSessionId sets the session id

func (*RollbackTransactionRequestMessage) SetTimestamp

func (msg *RollbackTransactionRequestMessage) SetTimestamp(timestamp int64) tgdb.TGError

SetTimestamp sets the timestamp

func (*RollbackTransactionRequestMessage) SetVerbId

func (msg *RollbackTransactionRequestMessage) SetVerbId(verbId int)

SetVerbId sets verbId of the message

func (*RollbackTransactionRequestMessage) String

func (*RollbackTransactionRequestMessage) ToBytes

func (msg *RollbackTransactionRequestMessage) ToBytes() ([]byte, int, tgdb.TGError)

ToBytes converts a message object into byte format to be sent over the network to TGDB server

func (*RollbackTransactionRequestMessage) UnmarshalBinary

func (msg *RollbackTransactionRequestMessage) UnmarshalBinary(data []byte) error

UnmarshalBinary modifies the receiver so it must take a pointer receiver.

func (*RollbackTransactionRequestMessage) UpdateSequenceAndTimeStamp

func (msg *RollbackTransactionRequestMessage) UpdateSequenceAndTimeStamp(timestamp int64) tgdb.TGError

UpdateSequenceAndTimeStamp updates the SequenceAndTimeStamp, if message is mutable @param timestamp @return TGMessage on success, error on failure

func (*RollbackTransactionRequestMessage) WriteHeader

WriteHeader exports the values of the common message header Attributes to output stream

func (*RollbackTransactionRequestMessage) WritePayload

WritePayload exports the values of the message specific payload Attributes to output stream

type RollbackTransactionResponseMessage

type RollbackTransactionResponseMessage struct {
	*AbstractProtocolMessage
}

func DefaultRollbackTransactionResponseMessage

func DefaultRollbackTransactionResponseMessage() *RollbackTransactionResponseMessage

func NewRollbackTransactionResponseMessage

func NewRollbackTransactionResponseMessage(authToken, sessionId int64) *RollbackTransactionResponseMessage

Create New Message Instance

func (*RollbackTransactionResponseMessage) FromBytes

func (msg *RollbackTransactionResponseMessage) FromBytes(buffer []byte) (tgdb.TGMessage, tgdb.TGError)

FromBytes constructs a message object from the input buffer in the byte format

func (*RollbackTransactionResponseMessage) GetAuthToken

func (msg *RollbackTransactionResponseMessage) GetAuthToken() int64

GetAuthToken gets the authToken

func (*RollbackTransactionResponseMessage) GetIsUpdatable

func (msg *RollbackTransactionResponseMessage) GetIsUpdatable() bool

GetIsUpdatable checks whether this message updatable or not

func (*RollbackTransactionResponseMessage) GetMessageByteBufLength

func (msg *RollbackTransactionResponseMessage) GetMessageByteBufLength() int

GetMessageByteBufLength gets the MessageByteBufLength. This method is called after the toBytes() is executed.

func (*RollbackTransactionResponseMessage) GetRequestId

func (msg *RollbackTransactionResponseMessage) GetRequestId() int64

GetRequestId gets the requestId for the message. This will be used as the CorrelationId

func (*RollbackTransactionResponseMessage) GetSequenceNo

func (msg *RollbackTransactionResponseMessage) GetSequenceNo() int64

GetSequenceNo gets the sequenceNo of the message

func (*RollbackTransactionResponseMessage) GetSessionId

func (msg *RollbackTransactionResponseMessage) GetSessionId() int64

GetSessionId gets the session id

func (*RollbackTransactionResponseMessage) GetTimestamp

func (msg *RollbackTransactionResponseMessage) GetTimestamp() int64

GetTimestamp gets the Timestamp

func (*RollbackTransactionResponseMessage) GetVerbId

func (msg *RollbackTransactionResponseMessage) GetVerbId() int

GetVerbId gets verbId of the message

func (*RollbackTransactionResponseMessage) MarshalBinary

func (msg *RollbackTransactionResponseMessage) MarshalBinary() ([]byte, error)

func (*RollbackTransactionResponseMessage) ReadHeader

ReadHeader reads the bytes from input stream and constructs a common header of network packet

func (*RollbackTransactionResponseMessage) ReadPayload

ReadPayload reads the bytes from input stream and constructs message specific payload Attributes

func (*RollbackTransactionResponseMessage) SetAuthToken

func (msg *RollbackTransactionResponseMessage) SetAuthToken(authToken int64)

SetAuthToken sets the authToken

func (*RollbackTransactionResponseMessage) SetDataOffset

func (msg *RollbackTransactionResponseMessage) SetDataOffset(dataOffset int16)

SetDataOffset sets the offset at which data starts in the payload

func (*RollbackTransactionResponseMessage) SetIsUpdatable

func (msg *RollbackTransactionResponseMessage) SetIsUpdatable(updateFlag bool)

SetIsUpdatable sets the updatable flag

func (*RollbackTransactionResponseMessage) SetMessageByteBufLength

func (msg *RollbackTransactionResponseMessage) SetMessageByteBufLength(bufLength int)

SetMessageByteBufLength sets the message buffer length

func (*RollbackTransactionResponseMessage) SetRequestId

func (msg *RollbackTransactionResponseMessage) SetRequestId(requestId int64)

SetRequestId sets the request id

func (*RollbackTransactionResponseMessage) SetSequenceNo

func (msg *RollbackTransactionResponseMessage) SetSequenceNo(sequenceNo int64)

SetSequenceNo sets the sequenceNo

func (*RollbackTransactionResponseMessage) SetSessionId

func (msg *RollbackTransactionResponseMessage) SetSessionId(sessionId int64)

SetSessionId sets the session id

func (*RollbackTransactionResponseMessage) SetTimestamp

func (msg *RollbackTransactionResponseMessage) SetTimestamp(timestamp int64) tgdb.TGError

SetTimestamp sets the timestamp

func (*RollbackTransactionResponseMessage) SetVerbId

func (msg *RollbackTransactionResponseMessage) SetVerbId(verbId int)

SetVerbId sets verbId of the message

func (*RollbackTransactionResponseMessage) String

func (*RollbackTransactionResponseMessage) ToBytes

ToBytes converts a message object into byte format to be sent over the network to TGDB server

func (*RollbackTransactionResponseMessage) UnmarshalBinary

func (msg *RollbackTransactionResponseMessage) UnmarshalBinary(data []byte) error

UnmarshalBinary modifies the receiver so it must take a pointer receiver.

func (*RollbackTransactionResponseMessage) UpdateSequenceAndTimeStamp

func (msg *RollbackTransactionResponseMessage) UpdateSequenceAndTimeStamp(timestamp int64) tgdb.TGError

UpdateSequenceAndTimeStamp updates the SequenceAndTimeStamp, if message is mutable @param timestamp @return TGMessage on success, error on failure

func (*RollbackTransactionResponseMessage) WriteHeader

WriteHeader exports the values of the common message header Attributes to output stream

func (*RollbackTransactionResponseMessage) WritePayload

WritePayload exports the values of the message specific payload Attributes to output stream

type SSLChannel

type SSLChannel struct {
	*AbstractChannel
	// contains filtered or unexported fields
}

func DefaultSSLChannel

func DefaultSSLChannel() *SSLChannel

func NewSSLChannel

func NewSSLChannel(linkUrl *LinkUrl, props *SortedProperties) (*SSLChannel, tgdb.TGError)

func (*SSLChannel) ChannelLock

func (obj *SSLChannel) ChannelLock()

ChannelLock locks the communication channel between TGDB client and server

func (*SSLChannel) ChannelUnlock

func (obj *SSLChannel) ChannelUnlock()

ChannelUnlock unlocks the communication channel between TGDB client and server

func (*SSLChannel) CloseSocket

func (obj *SSLChannel) CloseSocket() tgdb.TGError

CloseSocket closes the socket

func (*SSLChannel) Connect

func (obj *SSLChannel) Connect() tgdb.TGError

Connect connects the underlying channel using the URL end point

func (*SSLChannel) CreateSocket

func (obj *SSLChannel) CreateSocket() tgdb.TGError

CreateSocket creates the physical link socket

func (*SSLChannel) DisablePing

func (obj *SSLChannel) DisablePing()

DisablePing disables the pinging ability to the channel

func (*SSLChannel) Disconnect

func (obj *SSLChannel) Disconnect() tgdb.TGError

Disconnect disconnects the channel from its URL end point

func (*SSLChannel) EnablePing

func (obj *SSLChannel) EnablePing()

EnablePing enables the pinging ability to the channel

func (*SSLChannel) ExceptionLock

func (obj *SSLChannel) ExceptionLock()

ExceptionLock locks the communication channel between TGDB client and server in case of business exceptions

func (*SSLChannel) ExceptionUnlock

func (obj *SSLChannel) ExceptionUnlock()

ExceptionUnlock unlocks the communication channel between TGDB client and server in case of business exceptions

func (*SSLChannel) GetAuthToken

func (obj *SSLChannel) GetAuthToken() int64

GetAuthToken gets Authorization Token

func (*SSLChannel) GetChannelURL

func (obj *SSLChannel) GetChannelURL() tgdb.TGChannelUrl

GetChannelURL gets the channel URL

func (*SSLChannel) GetClientId

func (obj *SSLChannel) GetClientId() string

GetClientId gets Client Name

func (*SSLChannel) GetConnectionIndex

func (obj *SSLChannel) GetConnectionIndex() int

GetConnectionIndex gets the Connection Index

func (*SSLChannel) GetExceptionCondition

func (obj *SSLChannel) GetExceptionCondition() *sync.Cond

GetExceptionCondition gets the Exception Condition

func (*SSLChannel) GetIsClosed

func (obj *SSLChannel) GetIsClosed() bool

func (*SSLChannel) GetLinkState

func (obj *SSLChannel) GetLinkState() tgdb.LinkState

GetLinkState gets the Link/channel State

func (*SSLChannel) GetNoOfConnections

func (obj *SSLChannel) GetNoOfConnections() int32

GetNoOfConnections gets number of connections this channel has

func (*SSLChannel) GetPrimaryURL

func (obj *SSLChannel) GetPrimaryURL() tgdb.TGChannelUrl

GetPrimaryURL gets the Primary URL

func (*SSLChannel) GetProperties

func (obj *SSLChannel) GetProperties() tgdb.TGProperties

GetProperties gets the channel Properties

func (*SSLChannel) GetReader

func (obj *SSLChannel) GetReader() tgdb.TGChannelReader

GetReader gets the channel Reader

func (*SSLChannel) GetResponses

func (obj *SSLChannel) GetResponses() map[int64]tgdb.TGChannelResponse

GetResponses gets the channel Response Map

func (*SSLChannel) GetSessionId

func (obj *SSLChannel) GetSessionId() int64

GetSessionId gets Session id

func (*SSLChannel) GetTracer

func (obj *SSLChannel) GetTracer() tgdb.TGTracer

GetTracer gets the channel Tracer

func (*SSLChannel) IsChannelPingable

func (obj *SSLChannel) IsChannelPingable() bool

IsChannelPingable checks whether the channel is pingable or not

func (*SSLChannel) IsClosed

func (obj *SSLChannel) IsClosed() bool

IsClosed checks whether channel is open or closed

func (*SSLChannel) OnConnect

func (obj *SSLChannel) OnConnect() tgdb.TGError

OnConnect executes all the channel specific activities

func (*SSLChannel) ReadWireMsg

func (obj *SSLChannel) ReadWireMsg() (tgdb.TGMessage, tgdb.TGError)

ReadWireMsg reads the message from the wire in the form of byte stream

func (*SSLChannel) Send

func (obj *SSLChannel) Send(msg tgdb.TGMessage) tgdb.TGError

Send Message to the server, compress and/or encrypt. Hence it is abstraction, that the channel knows about it. @param msg The message that needs to be sent to the server

func (*SSLChannel) SendMessage

func (obj *SSLChannel) SendMessage(msg tgdb.TGMessage) tgdb.TGError

SendMessage sends a Message on this channel, and returns immediately - An Asynchronous or Non-Blocking operation

func (*SSLChannel) SendRequest

func (obj *SSLChannel) SendRequest(msg tgdb.TGMessage, response tgdb.TGChannelResponse) (tgdb.TGMessage, tgdb.TGError)

SendRequest sends a Message, waits for a response in the message format, and blocks the thread till it gets the response

func (*SSLChannel) SetChannelLinkState

func (obj *SSLChannel) SetChannelLinkState(state tgdb.LinkState)

SetChannelLinkState sets the Link/channel State

func (*SSLChannel) SetChannelURL

func (obj *SSLChannel) SetChannelURL(url tgdb.TGChannelUrl)

SetChannelURL sets the channel URL

func (*SSLChannel) SetConnectionIndex

func (obj *SSLChannel) SetConnectionIndex(index int)

SetConnectionIndex sets the connection index

func (*SSLChannel) SetIsClosed

func (obj *SSLChannel) SetIsClosed(flag bool)

func (*SSLChannel) SetNoOfConnections

func (obj *SSLChannel) SetNoOfConnections(count int32)

SetNoOfConnections sets number of connections

func (*SSLChannel) SetResponse

func (obj *SSLChannel) SetResponse(reqId int64, response tgdb.TGChannelResponse)

SetResponse sets the ChannelResponse Map

func (*SSLChannel) Start

func (obj *SSLChannel) Start() tgdb.TGError

Start starts the channel so that it can send and receive messages

func (*SSLChannel) Stop

func (obj *SSLChannel) Stop(bForcefully bool)

Stop stops the channel forcefully or gracefully

func (*SSLChannel) String

func (obj *SSLChannel) String() string

type SecurityException

type SecurityException struct {
	*TGDBError
}

func DefaultTGSecurityException

func DefaultTGSecurityException() *SecurityException

Create New SecurityException Instance

func NewTGSecurityException

func NewTGSecurityException(eCode string, eType int, eMsg, eDetails string) *SecurityException

func NewTGSecurityExceptionWithMsg

func NewTGSecurityExceptionWithMsg(msg string) *SecurityException

func (*SecurityException) Error

func (e *SecurityException) Error() string

func (*SecurityException) GetErrorCode

func (e *SecurityException) GetErrorCode() string

func (*SecurityException) GetErrorDetails

func (e *SecurityException) GetErrorDetails() string

func (*SecurityException) GetErrorMsg

func (e *SecurityException) GetErrorMsg() string

func (*SecurityException) GetErrorType

func (e *SecurityException) GetErrorType() int

type ServerInfoImpl

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

func DefaultServerInfoImpl

func DefaultServerInfoImpl() *ServerInfoImpl

func NewServerInfoImpl

func NewServerInfoImpl(_cacheInfo *CacheStatisticsImpl, _databaseInfo *DatabaseStatisticsImpl,
	_memoryInfo *ServerMemoryInfoImpl, _netListenersInfo []tgdb.TGNetListenerInfo,
	_serverStatusInfo *ServerStatusImpl, _transactionsInfo *TransactionStatisticsImpl) *ServerInfoImpl

func (*ServerInfoImpl) GetCacheInfo

func (obj *ServerInfoImpl) GetCacheInfo() tgdb.TGCacheStatistics

GetCacheInfo returns cache statistics information from server

func (*ServerInfoImpl) GetDatabaseInfo

func (obj *ServerInfoImpl) GetDatabaseInfo() tgdb.TGDatabaseStatistics

GetDatabaseInfo returns database statistics information from server

func (*ServerInfoImpl) GetMemoryInfo

func (obj *ServerInfoImpl) GetMemoryInfo(memType tgdb.MemType) tgdb.TGMemoryInfo

GetMemoryInfo returns object corresponding to specific memory type

func (*ServerInfoImpl) GetNetListenersInfo

func (obj *ServerInfoImpl) GetNetListenersInfo() []tgdb.TGNetListenerInfo

GetNetListenersInfo returns a collection of information on NetListeners

func (*ServerInfoImpl) GetServerStatus

func (obj *ServerInfoImpl) GetServerStatus() tgdb.TGServerStatus

GetServerStatus returns the information on Server Status including Name, version etc.

func (*ServerInfoImpl) GetTransactionsInfo

func (obj *ServerInfoImpl) GetTransactionsInfo() tgdb.TGTransactionStatistics

GetTransactionsInfo returns transaction statistics from server including processed transaction count, successful transaction count, average processing time etc.

func (*ServerInfoImpl) MarshalBinary

func (obj *ServerInfoImpl) MarshalBinary() ([]byte, error)

func (*ServerInfoImpl) String

func (obj *ServerInfoImpl) String() string

func (*ServerInfoImpl) UnmarshalBinary

func (obj *ServerInfoImpl) UnmarshalBinary(data []byte) error

type ServerLogDetails

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

func DefaultServerLogDetails

func DefaultServerLogDetails() *ServerLogDetails

func NewServerLogDetails

func NewServerLogDetails(logLevel TGLogLevel, _logComponent TGLogComponent) *ServerLogDetails

func (*ServerLogDetails) GetLogComponent

func (obj *ServerLogDetails) GetLogComponent() TGLogComponent

GetLogComponent returns the server log component

func (*ServerLogDetails) GetLogLevel

func (obj *ServerLogDetails) GetLogLevel() TGLogLevel

GetLogLevel returns the server log level

func (*ServerLogDetails) MarshalBinary

func (obj *ServerLogDetails) MarshalBinary() ([]byte, error)

func (*ServerLogDetails) SetLogComponent

func (obj *ServerLogDetails) SetLogComponent(comp TGLogComponent)

SetLogComponent sets the server log component

func (*ServerLogDetails) SetLogLevel

func (obj *ServerLogDetails) SetLogLevel(level TGLogLevel)

SetLogLevel sets the server log level

func (*ServerLogDetails) String

func (obj *ServerLogDetails) String() string

func (*ServerLogDetails) UnmarshalBinary

func (obj *ServerLogDetails) UnmarshalBinary(data []byte) error

type ServerMemoryInfoImpl

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

func DefaultServerMemoryInfoImpl

func DefaultServerMemoryInfoImpl() *ServerMemoryInfoImpl

func NewServerMemoryInfoImpl

func NewServerMemoryInfoImpl(_processMemory, _sharedMemory *MemoryInfoImpl) *ServerMemoryInfoImpl

func (*ServerMemoryInfoImpl) GetProcessMemory

func (obj *ServerMemoryInfoImpl) GetProcessMemory() tgdb.TGMemoryInfo

GetProcessMemory returns server process memory

func (*ServerMemoryInfoImpl) GetServerMemoryInfo

func (obj *ServerMemoryInfoImpl) GetServerMemoryInfo(memType tgdb.MemType) tgdb.TGMemoryInfo

GetMemoryInfo returns the memory info for the specified type

func (*ServerMemoryInfoImpl) GetSharedMemory

func (obj *ServerMemoryInfoImpl) GetSharedMemory() tgdb.TGMemoryInfo

GetSharedMemory returns server shared memory

func (*ServerMemoryInfoImpl) MarshalBinary

func (obj *ServerMemoryInfoImpl) MarshalBinary() ([]byte, error)

func (*ServerMemoryInfoImpl) String

func (obj *ServerMemoryInfoImpl) String() string

func (*ServerMemoryInfoImpl) UnmarshalBinary

func (obj *ServerMemoryInfoImpl) UnmarshalBinary(data []byte) error

type ServerStatusImpl

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

func DefaultServerStatusImpl

func DefaultServerStatusImpl() *ServerStatusImpl

func NewServerStatusImpl

func NewServerStatusImpl(_name string, _version *TGServerVersion, _processId string, _status tgdb.ServerStates, _uptime time.Duration) *ServerStatusImpl

func (*ServerStatusImpl) GetName

func (obj *ServerStatusImpl) GetName() string

GetName returns the Name of the server instance

func (*ServerStatusImpl) GetProcessId

func (obj *ServerStatusImpl) GetProcessId() string

GetProcessId returns the process ID of server

func (*ServerStatusImpl) GetServerStatus

func (obj *ServerStatusImpl) GetServerStatus() tgdb.ServerStates

GetServerStatus returns the state information of server

func (*ServerStatusImpl) GetServerVersion

func (obj *ServerStatusImpl) GetServerVersion() *TGServerVersion

GetServerVersion returns the server version information

func (*ServerStatusImpl) GetUptime

func (obj *ServerStatusImpl) GetUptime() time.Duration

GetUptime returns the uptime information of server

func (*ServerStatusImpl) MarshalBinary

func (obj *ServerStatusImpl) MarshalBinary() ([]byte, error)

func (*ServerStatusImpl) String

func (obj *ServerStatusImpl) String() string

func (*ServerStatusImpl) UnmarshalBinary

func (obj *ServerStatusImpl) UnmarshalBinary(data []byte) error

type SessionForcefullyTerminatedMessage

type SessionForcefullyTerminatedMessage struct {
	*ExceptionMessage
}

func DefaultSessionForcefullyTerminatedMessage

func DefaultSessionForcefullyTerminatedMessage() *SessionForcefullyTerminatedMessage

func NewSessionForcefullyTerminatedMessage

func NewSessionForcefullyTerminatedMessage(authToken, sessionId int64) *SessionForcefullyTerminatedMessage

Create New Message Instance

func (*SessionForcefullyTerminatedMessage) FromBytes

func (msg *SessionForcefullyTerminatedMessage) FromBytes(buffer []byte) (tgdb.TGMessage, tgdb.TGError)

FromBytes constructs a message object from the input buffer in the byte format

func (*SessionForcefullyTerminatedMessage) GetAuthToken

func (msg *SessionForcefullyTerminatedMessage) GetAuthToken() int64

GetAuthToken gets the authToken

func (*SessionForcefullyTerminatedMessage) GetIsUpdatable

func (msg *SessionForcefullyTerminatedMessage) GetIsUpdatable() bool

GetIsUpdatable checks whether this message updatable or not

func (*SessionForcefullyTerminatedMessage) GetKillString

func (msg *SessionForcefullyTerminatedMessage) GetKillString() string

func (*SessionForcefullyTerminatedMessage) GetMessageByteBufLength

func (msg *SessionForcefullyTerminatedMessage) GetMessageByteBufLength() int

GetMessageByteBufLength gets the MessageByteBufLength. This method is called after the toBytes() is executed.

func (*SessionForcefullyTerminatedMessage) GetRequestId

func (msg *SessionForcefullyTerminatedMessage) GetRequestId() int64

GetRequestId gets the requestId for the message. This will be used as the CorrelationId

func (*SessionForcefullyTerminatedMessage) GetSequenceNo

func (msg *SessionForcefullyTerminatedMessage) GetSequenceNo() int64

GetSequenceNo gets the sequenceNo of the message

func (*SessionForcefullyTerminatedMessage) GetSessionId

func (msg *SessionForcefullyTerminatedMessage) GetSessionId() int64

GetSessionId gets the session id

func (*SessionForcefullyTerminatedMessage) GetTimestamp

func (msg *SessionForcefullyTerminatedMessage) GetTimestamp() int64

GetTimestamp gets the Timestamp

func (*SessionForcefullyTerminatedMessage) GetVerbId

func (msg *SessionForcefullyTerminatedMessage) GetVerbId() int

GetVerbId gets verbId of the message

func (*SessionForcefullyTerminatedMessage) MarshalBinary

func (msg *SessionForcefullyTerminatedMessage) MarshalBinary() ([]byte, error)

func (*SessionForcefullyTerminatedMessage) ReadHeader

ReadHeader reads the bytes from input stream and constructs a common header of network packet

func (*SessionForcefullyTerminatedMessage) ReadPayload

ReadPayload reads the bytes from input stream and constructs message specific payload Attributes

func (*SessionForcefullyTerminatedMessage) SetAuthToken

func (msg *SessionForcefullyTerminatedMessage) SetAuthToken(authToken int64)

SetAuthToken sets the authToken

func (*SessionForcefullyTerminatedMessage) SetDataOffset

func (msg *SessionForcefullyTerminatedMessage) SetDataOffset(dataOffset int16)

SetDataOffset sets the offset at which data starts in the payload

func (*SessionForcefullyTerminatedMessage) SetIsUpdatable

func (msg *SessionForcefullyTerminatedMessage) SetIsUpdatable(updateFlag bool)

SetIsUpdatable sets the updatable flag

func (*SessionForcefullyTerminatedMessage) SetMessageByteBufLength

func (msg *SessionForcefullyTerminatedMessage) SetMessageByteBufLength(bufLength int)

SetMessageByteBufLength sets the message buffer length

func (*SessionForcefullyTerminatedMessage) SetRequestId

func (msg *SessionForcefullyTerminatedMessage) SetRequestId(requestId int64)

SetRequestId sets the request id

func (*SessionForcefullyTerminatedMessage) SetSequenceNo

func (msg *SessionForcefullyTerminatedMessage) SetSequenceNo(sequenceNo int64)

SetSequenceNo sets the sequenceNo

func (*SessionForcefullyTerminatedMessage) SetSessionId

func (msg *SessionForcefullyTerminatedMessage) SetSessionId(sessionId int64)

SetSessionId sets the session id

func (*SessionForcefullyTerminatedMessage) SetTimestamp

func (msg *SessionForcefullyTerminatedMessage) SetTimestamp(timestamp int64) tgdb.TGError

SetTimestamp sets the timestamp

func (*SessionForcefullyTerminatedMessage) SetVerbId

func (msg *SessionForcefullyTerminatedMessage) SetVerbId(verbId int)

SetVerbId sets verbId of the message

func (*SessionForcefullyTerminatedMessage) String

func (*SessionForcefullyTerminatedMessage) ToBytes

ToBytes converts a message object into byte format to be sent over the network to TGDB server

func (*SessionForcefullyTerminatedMessage) UnmarshalBinary

func (msg *SessionForcefullyTerminatedMessage) UnmarshalBinary(data []byte) error

UnmarshalBinary modifies the receiver so it must take a pointer receiver.

func (*SessionForcefullyTerminatedMessage) UpdateSequenceAndTimeStamp

func (msg *SessionForcefullyTerminatedMessage) UpdateSequenceAndTimeStamp(timestamp int64) tgdb.TGError

UpdateSequenceAndTimeStamp updates the SequenceAndTimeStamp, if message is mutable @param timestamp @return TGMessage on success, error on failure

func (*SessionForcefullyTerminatedMessage) WriteHeader

WriteHeader exports the values of the common message header Attributes to output stream

func (*SessionForcefullyTerminatedMessage) WritePayload

WritePayload exports the values of the message specific payload Attributes to output stream

type ShortAttribute

type ShortAttribute struct {
	*AbstractAttribute
}

func DefaultShortAttribute

func DefaultShortAttribute() *ShortAttribute

Create NewTGDecimal Attribute Instance

func NewShortAttribute

func NewShortAttribute(attrDesc *AttributeDescriptor) *ShortAttribute

func NewShortAttributeWithDesc

func NewShortAttributeWithDesc(ownerEntity tgdb.TGEntity, attrDesc *AttributeDescriptor, value interface{}) *ShortAttribute

func NewShortAttributeWithOwner

func NewShortAttributeWithOwner(ownerEntity tgdb.TGEntity) *ShortAttribute

func (*ShortAttribute) GetAttributeDescriptor

func (obj *ShortAttribute) GetAttributeDescriptor() tgdb.TGAttributeDescriptor

GetAttributeDescriptor returns the AttributeDescriptor for this attribute

func (*ShortAttribute) GetIsModified

func (obj *ShortAttribute) GetIsModified() bool

GetIsModified checks whether the attribute modified or not

func (*ShortAttribute) GetName

func (obj *ShortAttribute) GetName() string

GetName gets the Name for this attribute as the most generic form

func (*ShortAttribute) GetOwner

func (obj *ShortAttribute) GetOwner() tgdb.TGEntity

GetOwner gets owner Entity of this attribute

func (*ShortAttribute) GetValue

func (obj *ShortAttribute) GetValue() interface{}

GetValue gets the value for this attribute as the most generic form

func (*ShortAttribute) IsNull

func (obj *ShortAttribute) IsNull() bool

IsNull checks whether the attribute value is null or not

func (*ShortAttribute) MarshalBinary

func (obj *ShortAttribute) MarshalBinary() ([]byte, error)

func (*ShortAttribute) ReadExternal

func (obj *ShortAttribute) ReadExternal(is tgdb.TGInputStream) tgdb.TGError

ReadExternal reads the byte format from an external input stream and constructs a system object

func (*ShortAttribute) ReadValue

func (obj *ShortAttribute) ReadValue(is tgdb.TGInputStream) tgdb.TGError

ReadValue reads the value from input stream

func (*ShortAttribute) ResetIsModified

func (obj *ShortAttribute) ResetIsModified()

ResetIsModified resets the IsModified flag - recursively, if needed

func (*ShortAttribute) SetOwner

func (obj *ShortAttribute) SetOwner(ownerEntity tgdb.TGEntity)

SetOwner sets the owner entity - Need this indirection to traverse the chain

func (*ShortAttribute) SetShort

func (obj *ShortAttribute) SetShort(b int16)

func (*ShortAttribute) SetValue

func (obj *ShortAttribute) SetValue(value interface{}) tgdb.TGError

SetValue sets the value for this attribute. Appropriate data conversion to its attribute desc will be performed If the object is Null, then the object is explicitly set, but no value is provided.

func (*ShortAttribute) String

func (obj *ShortAttribute) String() string

func (*ShortAttribute) UnmarshalBinary

func (obj *ShortAttribute) UnmarshalBinary(data []byte) error

func (*ShortAttribute) WriteExternal

func (obj *ShortAttribute) WriteExternal(os tgdb.TGOutputStream) tgdb.TGError

WriteExternal writes a system object into an appropriate byte format onto an external output stream

func (*ShortAttribute) WriteValue

func (obj *ShortAttribute) WriteValue(os tgdb.TGOutputStream) tgdb.TGError

WriteValue writes the value to output stream

type SimpleQueue

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

SimpleQueue is a basic FIFO queue based on a circular list that re-sizes as needed.

func NewSimpleQueue

func NewSimpleQueue() *SimpleQueue

NewSimpleQueue returns a new queue with the given initial size.

func (*SimpleQueue) Dequeue

func (q *SimpleQueue) Dequeue() interface{}

Dequeue removes and returns an entry from the queue in first to last order.

func (*SimpleQueue) Enqueue

func (q *SimpleQueue) Enqueue(x interface{})

Enqueue adds an entry to the end of the queue.

func (*SimpleQueue) Items

func (q *SimpleQueue) Items() []interface{}

func (*SimpleQueue) Len

func (q *SimpleQueue) Len() int

type SimpleStack

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

SimpleStack is a basic LIFO stack that re-sizes as needed.

func NewSimpleStack

func NewSimpleStack() *SimpleStack

NewSimpleStack returns a new stack.

func (*SimpleStack) Items

func (s *SimpleStack) Items() []interface{}

func (*SimpleStack) Pop

func (s *SimpleStack) Pop() (interface{}, error)

Pop removes and returns a node from the stack in last to first order.

func (*SimpleStack) Push

func (s *SimpleStack) Push(e interface{})

Push adds a node to the stack.

func (*SimpleStack) Size

func (s *SimpleStack) Size() int

type SortedProperties

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

func NewSortedProperties

func NewSortedProperties() *SortedProperties

func (*SortedProperties) AddProperty

func (obj *SortedProperties) AddProperty(name, value string)

AddProperty checks whether a property already exists, else adds a new property in the form of Name=value pair

func (*SortedProperties) GetAllProperties

func (obj *SortedProperties) GetAllProperties() []*KvPair

func (*SortedProperties) GetProperty

func (obj *SortedProperties) GetProperty(conf tgdb.TGConfigName, value string) string

GetProperty gets the property either with value or default value

func (*SortedProperties) GetPropertyAsBoolean

func (obj *SortedProperties) GetPropertyAsBoolean(conf tgdb.TGConfigName) bool

GetPropertyAsInt gets Property as int value

func (*SortedProperties) GetPropertyAsInt

func (obj *SortedProperties) GetPropertyAsInt(conf tgdb.TGConfigName) int

GetPropertyAsInt gets Property as int value

func (*SortedProperties) GetPropertyAsLong

func (obj *SortedProperties) GetPropertyAsLong(conf tgdb.TGConfigName) int64

GetPropertyAsLong gets Property as long value

func (*SortedProperties) Len

func (obj *SortedProperties) Len() int

func (*SortedProperties) Less

func (obj *SortedProperties) Less(i, j int) bool

func (*SortedProperties) SetPassword

func (obj *SortedProperties) SetPassword(pwd string) tgdb.TGError

func (*SortedProperties) SetProperty

func (obj *SortedProperties) SetProperty(name, value string)

GetPropertyAsBoolean gets Property as bool value

func (*SortedProperties) SetUser

func (obj *SortedProperties) SetUser(user string) tgdb.TGError

func (*SortedProperties) Sort

func (obj *SortedProperties) Sort(props []*KvPair)

func (*SortedProperties) Swap

func (obj *SortedProperties) Swap(i, j int)

type StringAttribute

type StringAttribute struct {
	*AbstractAttribute
}

func DefaultStringAttribute

func DefaultStringAttribute() *StringAttribute

Create New Attribute Instance

func NewStringAttribute

func NewStringAttribute(attrDesc *AttributeDescriptor) *StringAttribute

func NewStringAttributeWithDesc

func NewStringAttributeWithDesc(ownerEntity tgdb.TGEntity, attrDesc *AttributeDescriptor, value interface{}) *StringAttribute

func NewStringAttributeWithOwner

func NewStringAttributeWithOwner(ownerEntity tgdb.TGEntity) *StringAttribute

func (*StringAttribute) GetAttributeDescriptor

func (obj *StringAttribute) GetAttributeDescriptor() tgdb.TGAttributeDescriptor

GetAttributeDescriptor returns the AttributeDescriptor for this attribute

func (*StringAttribute) GetIsModified

func (obj *StringAttribute) GetIsModified() bool

GetIsModified checks whether the attribute modified or not

func (*StringAttribute) GetName

func (obj *StringAttribute) GetName() string

GetName gets the Name for this attribute as the most generic form

func (*StringAttribute) GetOwner

func (obj *StringAttribute) GetOwner() tgdb.TGEntity

GetOwner gets owner Entity of this attribute

func (*StringAttribute) GetValue

func (obj *StringAttribute) GetValue() interface{}

GetValue gets the value for this attribute as the most generic form

func (*StringAttribute) IsNull

func (obj *StringAttribute) IsNull() bool

IsNull checks whether the attribute value is null or not

func (*StringAttribute) MarshalBinary

func (obj *StringAttribute) MarshalBinary() ([]byte, error)

func (*StringAttribute) ReadExternal

func (obj *StringAttribute) ReadExternal(is tgdb.TGInputStream) tgdb.TGError

ReadExternal reads the byte format from an external input stream and constructs a system object

func (*StringAttribute) ReadValue

func (obj *StringAttribute) ReadValue(is tgdb.TGInputStream) tgdb.TGError

ReadValue reads the value from input stream

func (*StringAttribute) ResetIsModified

func (obj *StringAttribute) ResetIsModified()

ResetIsModified resets the IsModified flag - recursively, if needed

func (*StringAttribute) SetOwner

func (obj *StringAttribute) SetOwner(ownerEntity tgdb.TGEntity)

SetOwner sets the owner entity - Need this indirection to traverse the chain

func (*StringAttribute) SetValue

func (obj *StringAttribute) SetValue(value interface{}) tgdb.TGError

SetValue sets the value for this attribute. Appropriate data conversion to its attribute desc will be performed If the object is Null, then the object is explicitly set, but no value is provided.

func (*StringAttribute) String

func (obj *StringAttribute) String() string

func (*StringAttribute) UnmarshalBinary

func (obj *StringAttribute) UnmarshalBinary(data []byte) error

func (*StringAttribute) WriteExternal

func (obj *StringAttribute) WriteExternal(os tgdb.TGOutputStream) tgdb.TGError

WriteExternal writes a system object into an appropriate byte format onto an external output stream

func (*StringAttribute) WriteValue

func (obj *StringAttribute) WriteValue(os tgdb.TGOutputStream) tgdb.TGError

WriteValue writes the value to output stream

type Success

type Success struct {
	*TGDBError
}

func DefaultTGSuccess

func DefaultTGSuccess() *Success

Create New Success Instance

func NewTGSuccess

func NewTGSuccess(eCode string, eType int, eMsg, eDetails string) *Success

func NewTGSuccessWithMsg

func NewTGSuccessWithMsg(msg string) *Success

func (*Success) Error

func (e *Success) Error() string

func (*Success) GetErrorCode

func (e *Success) GetErrorCode() string

func (*Success) GetErrorDetails

func (e *Success) GetErrorDetails() string

func (*Success) GetErrorMsg

func (e *Success) GetErrorMsg() string

func (*Success) GetErrorType

func (e *Success) GetErrorType() int

type TCPChannel

type TCPChannel struct {
	*AbstractChannel
	// contains filtered or unexported fields
}

func DefaultTCPChannel

func DefaultTCPChannel() *TCPChannel

func NewTCPChannel

func NewTCPChannel(linkUrl *LinkUrl, props *SortedProperties) *TCPChannel

func (*TCPChannel) ChannelLock

func (obj *TCPChannel) ChannelLock()

ChannelLock locks the communication channel between TGDB client and server

func (*TCPChannel) ChannelUnlock

func (obj *TCPChannel) ChannelUnlock()

ChannelUnlock unlocks the communication channel between TGDB client and server

func (*TCPChannel) CloseSocket

func (obj *TCPChannel) CloseSocket() tgdb.TGError

CloseSocket closes the socket

func (*TCPChannel) Connect

func (obj *TCPChannel) Connect() tgdb.TGError

Connect connects the underlying channel using the URL end point

func (*TCPChannel) CreateSocket

func (obj *TCPChannel) CreateSocket() tgdb.TGError

CreateSocket creates the physical link socket

func (*TCPChannel) DisablePing

func (obj *TCPChannel) DisablePing()

DisablePing disables the pinging ability to the channel

func (*TCPChannel) Disconnect

func (obj *TCPChannel) Disconnect() tgdb.TGError

Disconnect disconnects the channel from its URL end point

func (*TCPChannel) DoAuthenticate

func (obj *TCPChannel) DoAuthenticate() tgdb.TGError

func (*TCPChannel) DoAuthenticateForRESTConsumer

func (obj *TCPChannel) DoAuthenticateForRESTConsumer() tgdb.TGError

func (*TCPChannel) EnablePing

func (obj *TCPChannel) EnablePing()

EnablePing enables the pinging ability to the channel

func (*TCPChannel) ExceptionLock

func (obj *TCPChannel) ExceptionLock()

ExceptionLock locks the communication channel between TGDB client and server in case of business exceptions

func (*TCPChannel) ExceptionUnlock

func (obj *TCPChannel) ExceptionUnlock()

ExceptionUnlock unlocks the communication channel between TGDB client and server in case of business exceptions

func (*TCPChannel) GetAuthToken

func (obj *TCPChannel) GetAuthToken() int64

GetAuthToken gets Authorization Token

func (*TCPChannel) GetChannelURL

func (obj *TCPChannel) GetChannelURL() tgdb.TGChannelUrl

GetChannelURL gets the channel URL

func (*TCPChannel) GetClientId

func (obj *TCPChannel) GetClientId() string

GetClientId gets Client Name

func (*TCPChannel) GetConnectionIndex

func (obj *TCPChannel) GetConnectionIndex() int

GetConnectionIndex gets the Connection Index

func (*TCPChannel) GetExceptionCondition

func (obj *TCPChannel) GetExceptionCondition() *sync.Cond

GetExceptionCondition gets the Exception Condition

func (*TCPChannel) GetIsClosed

func (obj *TCPChannel) GetIsClosed() bool

func (*TCPChannel) GetLinkState

func (obj *TCPChannel) GetLinkState() tgdb.LinkState

GetLinkState gets the Link/channel State

func (*TCPChannel) GetNoOfConnections

func (obj *TCPChannel) GetNoOfConnections() int32

GetNoOfConnections gets number of connections this channel has

func (*TCPChannel) GetPrimaryURL

func (obj *TCPChannel) GetPrimaryURL() tgdb.TGChannelUrl

GetPrimaryURL gets the Primary URL

func (*TCPChannel) GetProperties

func (obj *TCPChannel) GetProperties() tgdb.TGProperties

GetProperties gets the channel Properties

func (*TCPChannel) GetReader

func (obj *TCPChannel) GetReader() tgdb.TGChannelReader

GetReader gets the channel Reader

func (*TCPChannel) GetResponses

func (obj *TCPChannel) GetResponses() map[int64]tgdb.TGChannelResponse

GetResponses gets the channel Response Map

func (*TCPChannel) GetSessionId

func (obj *TCPChannel) GetSessionId() int64

GetSessionId gets Session id

func (*TCPChannel) GetTracer

func (obj *TCPChannel) GetTracer() tgdb.TGTracer

GetTracer gets the channel Tracer

func (*TCPChannel) IsChannelPingable

func (obj *TCPChannel) IsChannelPingable() bool

IsChannelPingable checks whether the channel is pingable or not

func (*TCPChannel) IsClosed

func (obj *TCPChannel) IsClosed() bool

IsClosed checks whether channel is open or closed

func (*TCPChannel) OnConnect

func (obj *TCPChannel) OnConnect() tgdb.TGError

OnConnect executes all the channel specific activities

func (*TCPChannel) ReadWireMsg

func (obj *TCPChannel) ReadWireMsg() (tgdb.TGMessage, tgdb.TGError)

ReadWireMsg reads the message from the wire in the form of byte stream

func (*TCPChannel) Send

func (obj *TCPChannel) Send(msg tgdb.TGMessage) tgdb.TGError

Send sends the message to the server, compress and or encrypt. Hence it is abstraction, that the channel knows about it. @param msg The message that needs to be sent to the server

func (*TCPChannel) SendMessage

func (obj *TCPChannel) SendMessage(msg tgdb.TGMessage) tgdb.TGError

SendMessage sends a Message on this channel, and returns immediately - An Asynchronous or Non-Blocking operation

func (*TCPChannel) SendRequest

func (obj *TCPChannel) SendRequest(msg tgdb.TGMessage, response tgdb.TGChannelResponse) (tgdb.TGMessage, tgdb.TGError)

SendRequest sends a Message, waits for a response in the message format, and blocks the thread till it gets the response

func (*TCPChannel) SetAuthToken

func (obj *TCPChannel) SetAuthToken(token int64)

func (*TCPChannel) SetChannelLinkState

func (obj *TCPChannel) SetChannelLinkState(state tgdb.LinkState)

SetChannelLinkState sets the Link/channel State

func (*TCPChannel) SetChannelURL

func (obj *TCPChannel) SetChannelURL(url tgdb.TGChannelUrl)

SetChannelURL sets the channel URL

func (*TCPChannel) SetConnectionIndex

func (obj *TCPChannel) SetConnectionIndex(index int)

SetConnectionIndex sets the connection index

func (*TCPChannel) SetIsClosed

func (obj *TCPChannel) SetIsClosed(flag bool)

func (*TCPChannel) SetNoOfConnections

func (obj *TCPChannel) SetNoOfConnections(count int32)

SetNoOfConnections sets number of connections

func (*TCPChannel) SetResponse

func (obj *TCPChannel) SetResponse(reqId int64, response tgdb.TGChannelResponse)

SetResponse sets the ChannelResponse Map

func (*TCPChannel) Start

func (obj *TCPChannel) Start() tgdb.TGError

Start starts the channel so that it can send and receive messages

func (*TCPChannel) Stop

func (obj *TCPChannel) Stop(bForcefully bool)

Stop stops the channel forcefully or gracefully

func (*TCPChannel) String

func (obj *TCPChannel) String() string

type TGChannelFactory

type TGChannelFactory struct {
}

func GetChannelFactoryInstance

func GetChannelFactoryInstance() *TGChannelFactory

Get an instance of the Channel Factory

func (*TGChannelFactory) CreateChannel

func (obj *TGChannelFactory) CreateChannel(urlPath, userName, password string) (tgdb.TGChannel, tgdb.TGError)

Create a channel on the URL specified using the userName and password. A URL is represented as a string of the form

<protocol>://[user@]['['ipv6']'] | ipv4 [:][port][/]'{' Name:value;... '}'

@param urlPath A url string. @param userName The userName for the channel. The userId provided overrides all other userIds that can be inferred.

The rules for overriding are in this order
a. The argument 'userId' is the highest priority. If Null then
b. The user@url is considered. If that is Null
c. the "userID=value" from the URL string is considered.
d. If all of them is Null, then the default User associated to the installation will be taken.

@param password An encrypted password associated with the userName @return a Channel

func (*TGChannelFactory) CreateChannelWithProperties

func (obj *TGChannelFactory) CreateChannelWithProperties(urlPath, userName, password string, props map[string]string) (tgdb.TGChannel, tgdb.TGError)

Create a channel on the URL specified using the user Name and password @param urlPath A url as a string form @param userName The userName for the channel. The userId provided overrides all other userIds that can be infered.

The rules for overriding are in this order
a. The argument 'userId' is the highest priority. If Null then
b. The user@url is considered. If that is Null
c. the "userID=value" from the URL string is considered.
d. The user retrieved from the Properties is considered
e. If all of them is Null, then the default User associated to the installation will be taken.

@param password Encrypted password @param props A properties bag with Connection Properties. The URL inferred properties override this property bag. @return a connected channel

func (*TGChannelFactory) CreateChannelWithUrlProperties

func (obj *TGChannelFactory) CreateChannelWithUrlProperties(channelUrl tgdb.TGChannelUrl, props *SortedProperties) (tgdb.TGChannel, tgdb.TGError)

type TGCipherSuite

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

func GetCipherSuite

func GetCipherSuite(nameOrAlias string) *TGCipherSuite

GetCipherSuite returns the TGCipherSuite given its full qualified string form or its alias Name.

func GetCipherSuiteById

func GetCipherSuiteById(id uint16) *TGCipherSuite

GetCipherSuiteById returns the TGCipherSuite given its ID.

func NewCipherSuite

func NewCipherSuite(id uint16, name, key, encr, bitSize string) *TGCipherSuite

type TGClientVersion

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

func DefaultTGClientVersion

func DefaultTGClientVersion() *TGClientVersion

func GetClientVersion

func GetClientVersion() *TGClientVersion

func NewTGClientVersion

func NewTGClientVersion(maj, min, upd, hf byte, bld uint16, bldRev uint16, bType, edt byte) *TGClientVersion

func (*TGClientVersion) GetBuildNo

func (obj *TGClientVersion) GetBuildNo() uint16

func (*TGClientVersion) GetBuildRevision

func (obj *TGClientVersion) GetBuildRevision() uint16

func (*TGClientVersion) GetBuildType

func (obj *TGClientVersion) GetBuildType() byte

func (*TGClientVersion) GetEdition

func (obj *TGClientVersion) GetEdition() byte

func (*TGClientVersion) GetMajor

func (obj *TGClientVersion) GetMajor() byte

func (*TGClientVersion) GetMinor

func (obj *TGClientVersion) GetMinor() byte

func (*TGClientVersion) GetUpdate

func (obj *TGClientVersion) GetUpdate() byte

func (*TGClientVersion) GetVersionAsLong

func (obj *TGClientVersion) GetVersionAsLong() int64

func (*TGClientVersion) GetVersionString

func (obj *TGClientVersion) GetVersionString() string

type TGConnectionFactoryImpl

type TGConnectionFactoryImpl struct {
}

func (*TGConnectionFactoryImpl) CreateAdminConnection

func (obj *TGConnectionFactoryImpl) CreateAdminConnection(url, user, pwd string, env map[string]string) (tgdb.TGConnection, tgdb.TGError)

Create an admin connection on the url using the Name and password

func (*TGConnectionFactoryImpl) CreateConnection

func (obj *TGConnectionFactoryImpl) CreateConnection(url, user, pwd string, env map[string]string) (tgdb.TGConnection, tgdb.TGError)

@return TGConnection - an instance of connection to the server with a dedicated channel @throws com.tibco.tgdb.exception.TGException - If it cannot create a connection to the server successfully

func (*TGConnectionFactoryImpl) CreateConnectionPool

func (obj *TGConnectionFactoryImpl) CreateConnectionPool(url, user, pwd string, poolSize int, env map[string]string) (tgdb.TGConnectionPool, tgdb.TGError)

Create a connection Pool of pool size on the the url using the Name and password for a specific type of connections.

func (*TGConnectionFactoryImpl) CreateConnectionPoolWithType

func (obj *TGConnectionFactoryImpl) CreateConnectionPoolWithType(url, user, pwd string, poolSize int, env map[string]string, connType tgdb.TypeConnection) (tgdb.TGConnectionPool, tgdb.TGError)

Create a connection Pool of pool size on the the url using the Name and password. Each connection in the pool will default use a shared channel, but this can be overridden by setting the value property tgdb.connectionpool.useDedicatedChannel=true @param url The url for the channel used in the connection pool. @param userName The user Name for connection. @param password The password encrypted or un-encrypted @param poolSize the size of the pool @param env optional environment. This environment will override every other environment values infered, and is specific for this pool only @return A Connection Pool @throws com.tibco.tgdb.exception.TGException - If it cannot create a connection pool to the server successfully

type TGDBConnection

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

func DefaultTGDBConnection

func DefaultTGDBConnection() *TGDBConnection

func NewTGDBConnection

func NewTGDBConnection(conPool *ConnectionPoolImpl, channel tgdb.TGChannel, props tgdb.TGProperties) *TGDBConnection

func (*TGDBConnection) AttributeAdded

func (obj *TGDBConnection) AttributeAdded(attr tgdb.TGAttribute, owner tgdb.TGEntity)

AttributeAdded gets called when an attribute is Added to an entity.

func (*TGDBConnection) AttributeChanged

func (obj *TGDBConnection) AttributeChanged(attr tgdb.TGAttribute, oldValue, newValue interface{})

AttributeChanged gets called when an attribute is set.

func (*TGDBConnection) AttributeRemoved

func (obj *TGDBConnection) AttributeRemoved(attr tgdb.TGAttribute, owner tgdb.TGEntity)

AttributeRemoved gets called when an attribute is removed from the entity.

func (*TGDBConnection) CloseQuery

func (obj *TGDBConnection) CloseQuery(queryHashId int64) (tgdb.TGQuery, tgdb.TGError)

CloseQuery closes a specific query and associated objects

func (*TGDBConnection) Commit

func (obj *TGDBConnection) Commit() (tgdb.TGResultSet, tgdb.TGError)

Commit commits the current transaction on this connection

func (*TGDBConnection) Connect

func (obj *TGDBConnection) Connect() tgdb.TGError

Connect establishes a network connection to the TGDB server

func (*TGDBConnection) CreateQuery

func (obj *TGDBConnection) CreateQuery(expr string) (tgdb.TGQuery, tgdb.TGError)

CreateQuery creates a reusable query object that can be used to execute one or more statement

func (*TGDBConnection) DecryptBuffer

func (obj *TGDBConnection) DecryptBuffer(is tgdb.TGInputStream) ([]byte, tgdb.TGError)

DecryptBuffer decrypts the encrypted buffer by sending a DecryptBufferRequest to the server

func (*TGDBConnection) DecryptEntity

func (obj *TGDBConnection) DecryptEntity(entityId int64) ([]byte, tgdb.TGError)

DecryptEntity decrypts the encrypted entity using channel's data cryptographer

func (*TGDBConnection) DeleteEntity

func (obj *TGDBConnection) DeleteEntity(entity tgdb.TGEntity) tgdb.TGError

DeleteEntity marks an ENTITY for delete operation. Upon commit, the entity will be deleted from the database

func (*TGDBConnection) Disconnect

func (obj *TGDBConnection) Disconnect() tgdb.TGError

Disconnect breaks the connection from the TGDB server

func (*TGDBConnection) EncryptEntity

func (obj *TGDBConnection) EncryptEntity(rawBuffer []byte) ([]byte, tgdb.TGError)

EncryptEntity encrypts the encrypted entity using channel's data cryptographer

func (*TGDBConnection) EntityCreated

func (obj *TGDBConnection) EntityCreated(entity tgdb.TGEntity)

EntityCreated gets called when an entity is Added

func (*TGDBConnection) EntityDeleted

func (obj *TGDBConnection) EntityDeleted(entity tgdb.TGEntity)

EntityDeleted gets called when the entity is deleted

func (*TGDBConnection) ExecuteGremlinQuery

func (obj *TGDBConnection) ExecuteGremlinQuery(expr string, collection []interface{}, options tgdb.TGQueryOption) ([]interface{}, tgdb.TGError)

ExecuteGremlinQuery executes a Gremlin Grammer-Based query with query options

func (*TGDBConnection) ExecuteGremlinStrQuery

func (obj *TGDBConnection) ExecuteGremlinStrQuery(strQuery string, options tgdb.TGQueryOption) (tgdb.TGResultSet, tgdb.TGError)

ExecuteGremlinStrQuery executes a Gremlin Grammer-Based string query with query options

func (*TGDBConnection) ExecuteQuery

func (obj *TGDBConnection) ExecuteQuery(expr string, options tgdb.TGQueryOption) (tgdb.TGResultSet, tgdb.TGError)

ExecuteQuery executes an immediate query with associated query options

func (*TGDBConnection) ExecuteQueryWithFilter

func (obj *TGDBConnection) ExecuteQueryWithFilter(expr, edgeFilter, traversalCondition, endCondition string, options tgdb.TGQueryOption) (tgdb.TGResultSet, tgdb.TGError)

ExecuteQueryWithFilter executes an immediate query with specified filter & query options The query option is place holder at this time @param expr A subset of SQL-92 where clause @param edgeFilter filter used for selecting edges to be returned @param traversalCondition condition used for selecting edges to be traversed and returned @param endCondition condition used to stop the traversal @param option Query options for executing. Can be null, then it will use the default option

func (*TGDBConnection) ExecuteQueryWithId

func (obj *TGDBConnection) ExecuteQueryWithId(queryHashId int64, options tgdb.TGQueryOption) (tgdb.TGResultSet, tgdb.TGError)

ExecuteQueryWithId executes an immediate query for specified id & query options

func (*TGDBConnection) ExecuteTGDBQuery

func (obj *TGDBConnection) ExecuteTGDBQuery(expr string, options tgdb.TGQueryOption) (tgdb.TGResultSet, tgdb.TGError)

ExecuteTGDBQuery executes an immediate query with associated query options

func (*TGDBConnection) GetAddedList

func (obj *TGDBConnection) GetAddedList() map[int64]tgdb.TGEntity

GetAddedList gets a list of added entities

func (*TGDBConnection) GetChangedList

func (obj *TGDBConnection) GetChangedList() map[int64]tgdb.TGEntity

GetChangedList gets a list of changed entities

func (*TGDBConnection) GetChannel

func (obj *TGDBConnection) GetChannel() tgdb.TGChannel

GetChangedList gets the communication channel associated with this connection

func (*TGDBConnection) GetConnectionGraphObjectFactory

func (obj *TGDBConnection) GetConnectionGraphObjectFactory() *GraphObjectFactory

func (*TGDBConnection) GetConnectionId

func (obj *TGDBConnection) GetConnectionId() int64

GetConnectionId gets connection identifier

func (*TGDBConnection) GetConnectionPool

func (obj *TGDBConnection) GetConnectionPool() tgdb.TGConnectionPool

func (*TGDBConnection) GetConnectionProperties

func (obj *TGDBConnection) GetConnectionProperties() tgdb.TGProperties

GetConnectionProperties gets a list of connection properties

func (*TGDBConnection) GetEntities

func (obj *TGDBConnection) GetEntities(qryKey tgdb.TGKey, props tgdb.TGProperties) (tgdb.TGResultSet, tgdb.TGError)

GetEntities gets a result set of entities given an non-uniqueKey

func (*TGDBConnection) GetEntity

func (obj *TGDBConnection) GetEntity(qryKey tgdb.TGKey, options tgdb.TGQueryOption) (tgdb.TGEntity, tgdb.TGError)

GetEntity gets an Entity given an UniqueKey for the Object

func (*TGDBConnection) GetGraphMetadata

func (obj *TGDBConnection) GetGraphMetadata(refresh bool) (tgdb.TGGraphMetadata, tgdb.TGError)

GetGraphMetadata gets the Graph Metadata

func (*TGDBConnection) GetGraphObjectFactory

func (obj *TGDBConnection) GetGraphObjectFactory() (tgdb.TGGraphObjectFactory, tgdb.TGError)

GetGraphObjectFactory gets the Graph Object Factory for Object creation

func (*TGDBConnection) GetLargeObjectAsBytes

func (obj *TGDBConnection) GetLargeObjectAsBytes(entityId int64, decryptFlag bool) ([]byte, tgdb.TGError)

GetLargeObjectAsBytes gets an Binary Large Object Entity given an UniqueKey for the Object

func (*TGDBConnection) GetRemovedList

func (obj *TGDBConnection) GetRemovedList() map[int64]tgdb.TGEntity

GetRemovedList gets a list of removed entities

func (*TGDBConnection) InitMetadata

func (obj *TGDBConnection) InitMetadata() tgdb.TGError

func (*TGDBConnection) InsertEntity

func (obj *TGDBConnection) InsertEntity(entity tgdb.TGEntity) tgdb.TGError

InsertEntity marks an ENTITY for insert operation. Upon commit, the entity will be inserted in the database

func (*TGDBConnection) NodeAdded

func (obj *TGDBConnection) NodeAdded(graph tgdb.TGGraph, node tgdb.TGNode)

NodeAdded gets called when a node is Added

func (*TGDBConnection) NodeRemoved

func (obj *TGDBConnection) NodeRemoved(graph tgdb.TGGraph, node tgdb.TGNode)

NodeRemoved gets called when a node is removed

func (*TGDBConnection) Rollback

func (obj *TGDBConnection) Rollback() tgdb.TGError

Rollback rolls back the current transaction on this connection

func (*TGDBConnection) SetConnectionPool

func (obj *TGDBConnection) SetConnectionPool(connPool tgdb.TGConnectionPool)

SetConnectionPool sets connection pool

func (*TGDBConnection) SetConnectionProperties

func (obj *TGDBConnection) SetConnectionProperties(connProps tgdb.TGProperties)

SetConnectionProperties sets connection properties

func (*TGDBConnection) SetExceptionListener

func (obj *TGDBConnection) SetExceptionListener(listener tgdb.TGConnectionExceptionListener)

SetExceptionListener sets exception listener

func (*TGDBConnection) String

func (obj *TGDBConnection) String() string

func (*TGDBConnection) UpdateEntity

func (obj *TGDBConnection) UpdateEntity(entity tgdb.TGEntity) tgdb.TGError

UpdateEntity marks an ENTITY for update operation. Upon commit, the entity will be updated in the database When commit is called, the object is resolved to check if it is dirty. Entity.setAttribute calls make the entity dirty. If it is dirty, then the object is send to the server for update, otherwise it is ignored. Calling multiple times, does not change the behavior. The same entity cannot be updated on multiple connections. It will result an TGException of already associated to a connection.

type TGDBError

type TGDBError struct {
	ErrorCode            string
	ErrorType            int
	ErrorMsg             string
	ErrorDetails         string
	ErrorServerErrorCode int
}

func DefaultTGDBError

func DefaultTGDBError() *TGDBError

func GetPreDefinedErrors

func GetPreDefinedErrors(code string) *TGDBError

func NewTGDBError

func NewTGDBError(eCode string, eType int, eMsg, eDetails string) *TGDBError

func NewTGDBErrorWithServerErrorCode

func NewTGDBErrorWithServerErrorCode(eCode string, eType int, eMsg, eDetails string, eServerErrorCode int) *TGDBError

func (*TGDBError) Error

func (e *TGDBError) Error() string

func (*TGDBError) GetErrorCode

func (e *TGDBError) GetErrorCode() string

func (*TGDBError) GetErrorDetails

func (e *TGDBError) GetErrorDetails() string

func (*TGDBError) GetErrorMsg

func (e *TGDBError) GetErrorMsg() string

func (*TGDBError) GetErrorType

func (e *TGDBError) GetErrorType() int

func (*TGDBError) GetServerErrorCode

func (e *TGDBError) GetServerErrorCode() int

type TGDecimal

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

TGDecimal represents a fixed-point internalDecimal. It is immutable. decimalNumber = value * 10 ^ exp

func ByteArrayToBigDecimal

func ByteArrayToBigDecimal(buf []byte) (*TGDecimal, error)

func NewTGDecimal

func NewTGDecimal(value int64, exp int32) TGDecimal

NewTGDecimal returns a new fixed-point internalDecimal, value * 10 ^ exp.

func NewTGDecimalFromBigInt

func NewTGDecimalFromBigInt(value *big.Int, exp int32) TGDecimal

NewTGDecimalFromBigInt returns a new TGDecimal from a big.Int, value * 10 ^ exp

func NewTGDecimalFromFloat

func NewTGDecimalFromFloat(value float64) TGDecimal

NewTGDecimalFromFloat converts a float64 to TGDecimal. NOTE: this will panic on NaN, +/-inf

func NewTGDecimalFromFloat32

func NewTGDecimalFromFloat32(value float32) TGDecimal

NewTGDecimalFromFloat converts a float32 to TGDecimal. NOTE: this will panic on NaN, +/-inf

func NewTGDecimalFromFloatWithExponent

func NewTGDecimalFromFloatWithExponent(value float64, exp int32) TGDecimal

NewTGDecimalFromFloatWithExponent converts a float64 to TGDecimal, with an arbitrary number of fractional digits.

func NewTGDecimalFromString

func NewTGDecimalFromString(value string) (TGDecimal, error)

NewTGDecimalFromString returns a new TGDecimal from a string representation.

func (TGDecimal) Abs

func (d TGDecimal) Abs() TGDecimal

Abs returns the absolute value of the internalDecimal.

func (TGDecimal) Add

func (d TGDecimal) Add(d2 TGDecimal) TGDecimal

Add returns digits + d2.

func (TGDecimal) Ceil

func (d TGDecimal) Ceil() TGDecimal

Ceil returns the nearest integer value greater than or equal to digits.

func (TGDecimal) Coefficient

func (d TGDecimal) Coefficient() *big.Int

Coefficient returns the coefficient of the internalDecimal. It is scaled by 10^Exponent()

func (TGDecimal) Compare

func (d TGDecimal) Compare(d2 TGDecimal) int

Compare compares the numbers represented by digits and d2 and returns:

-1 when (digits < d2), 0 when (digits == d2), +1 when (digits > d2)

func (TGDecimal) Divide

func (d TGDecimal) Divide(d2 TGDecimal) TGDecimal

Divide returns digits / d2. If it doesn't divide exactly, the result will have DivisionPrecision digits after the internalDecimal point.

func (TGDecimal) DivideWithRounding

func (d TGDecimal) DivideWithRounding(d2 TGDecimal, precision int32) TGDecimal

TODO: Revisit later - for more testing DivideWithRounding divides and rounds to a given Precision i.e. to an integer multiple of 10^(-Precision)

for a positive quotient digit 5 is rounded up, away from 0
if the quotient is negative then digit 5 is rounded down, away from 0

func (TGDecimal) Exponent

func (d TGDecimal) Exponent() int32

Exponent returns the exponent, or Scale component of the internalDecimal.

func (TGDecimal) Float64

func (d TGDecimal) Float64() (f float64, exact bool)

Float64 returns the nearest float64 value for digits and a bool indicating whether f represents digits exactly.

func (TGDecimal) Floor

func (d TGDecimal) Floor() TGDecimal

Floor returns the nearest integer value less than or equal to digits.

func (*TGDecimal) GobDecode

func (d *TGDecimal) GobDecode(data []byte) error

GobDecode implements the gob.GobDecoder interface for gob serialization.

func (TGDecimal) GobEncode

func (d TGDecimal) GobEncode() ([]byte, error)

GobEncode implements the gob.GobEncoder interface for gob serialization.

func (TGDecimal) IntegerPart

func (d TGDecimal) IntegerPart() int64

IntegerPart returns the integer component of the internalDecimal.

func (TGDecimal) IsNegative

func (d TGDecimal) IsNegative() bool

IsNegative returns true when (digits < 0), false when (digits == 0), false when (digits > 0)

func (TGDecimal) IsPositive

func (d TGDecimal) IsPositive() bool

IsPositive returns true when (digits > 0), false when (digits == 0), false when (digits < 0)

func (TGDecimal) IsZero

func (d TGDecimal) IsZero() bool

IsZero returns true when (digits == 0), false when (digits > 0), false when (digits < 0)

func (TGDecimal) MarshalBinary

func (d TGDecimal) MarshalBinary() (data []byte, err error)

MarshalBinary implements the encoding.BinaryMarshaler interface.

func (TGDecimal) MarshalJSON

func (d TGDecimal) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (TGDecimal) MarshalText

func (d TGDecimal) MarshalText() (text []byte, err error)

MarshalText implements the encoding.TextMarshaler interface for XML serialization.

func (TGDecimal) Modulus

func (d TGDecimal) Modulus(d2 TGDecimal) TGDecimal

Modulus returns digits % d2.

func (TGDecimal) Multiply

func (d TGDecimal) Multiply(d2 TGDecimal) TGDecimal

Multiply returns digits * d2.

func (TGDecimal) Negate

func (d TGDecimal) Negate() TGDecimal

Negate returns -digits.

func (TGDecimal) Power

func (d TGDecimal) Power(d2 TGDecimal) TGDecimal

Power returns digits to the power d2

func (TGDecimal) QuotientRemainder

func (d TGDecimal) QuotientRemainder(d2 TGDecimal, precision int32) (TGDecimal, TGDecimal)

QuotientRemainder returns quotient q and remainder r such that

digits = d2 * q + r, q an integer multiple of 10^(-Precision)
0 <= r < abs(d2) * 10 ^(-Precision) if digits>=0
0 >= r > -abs(d2) * 10 ^(-Precision) if digits<0

func (TGDecimal) RationalNumber

func (d TGDecimal) RationalNumber() *big.Rat

RationalNumber returns a rational number representation of the internalDecimal.

func (TGDecimal) Round

func (d TGDecimal) Round(noOfPlaces int32) TGDecimal

Round rounds the internalDecimal to noOfPlaces internalDecimal places. If noOfPlaces < 0, it will round the integer part to the nearest 10^(-noOfPlaces).

func (TGDecimal) Shift

func (d TGDecimal) Shift(shift int32) TGDecimal

Shift shifts the internalDecimal in base 10. It shifts left when shift is positive and right if shift is negative. In other words, the given value for shift is added to the exponent of the internalDecimal.

func (TGDecimal) Sign

func (d TGDecimal) Sign() int

Sign returns -1 when (digits < 0), 0 when (digits == 0), +1 when (digits > 0)

func (TGDecimal) String

func (d TGDecimal) String() string

String returns the string representation of the internalDecimal with the fixed point.

func (TGDecimal) StringFixed

func (d TGDecimal) StringFixed(places int32) string

StringFixed returns a rounded fixed-point string with places digits after the internalDecimal point.

func (TGDecimal) StringScaled

func (d TGDecimal) StringScaled(exp int32) string

StringScaled first scales the internalDecimal then calls .String() on it. NOTE: buggy, unintuitive, and DEPRECATED! Use StringFixed instead.

func (TGDecimal) Subtract

func (d TGDecimal) Subtract(d2 TGDecimal) TGDecimal

Subtract returns digits - d2.

func (TGDecimal) Truncate

func (d TGDecimal) Truncate(precision int32) TGDecimal

Truncate truncates off digits from the number, without rounding.

func (*TGDecimal) UnmarshalBinary

func (d *TGDecimal) UnmarshalBinary(data []byte) error

UnmarshalBinary implements the encoding.BinaryUnmarshaler interface. As a string representation is already used when encoding to text, this method stores that string as []byte

func (*TGDecimal) UnmarshalJSON

func (d *TGDecimal) UnmarshalJSON(decimalBytes []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

func (*TGDecimal) UnmarshalText

func (d *TGDecimal) UnmarshalText(text []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface for XML deserialization.

type TGEnvironment

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

func NewTGEnvironment

func NewTGEnvironment() *TGEnvironment

func (*TGEnvironment) GetAsSortedProperties

func (obj *TGEnvironment) GetAsSortedProperties() tgdb.TGProperties

TODO: Revisit later - for more testing

func (*TGEnvironment) GetChannelClientId

func (obj *TGEnvironment) GetChannelClientId() string

func (*TGEnvironment) GetChannelConnectTimeout

func (obj *TGEnvironment) GetChannelConnectTimeout() int

func (*TGEnvironment) GetChannelDefaultHost

func (obj *TGEnvironment) GetChannelDefaultHost() string

func (*TGEnvironment) GetChannelDefaultPort

func (obj *TGEnvironment) GetChannelDefaultPort() int

func (*TGEnvironment) GetChannelDefaultUser

func (obj *TGEnvironment) GetChannelDefaultUser() string

func (*TGEnvironment) GetChannelFTHosts

func (obj *TGEnvironment) GetChannelFTHosts() string

func (*TGEnvironment) GetChannelPingInterval

func (obj *TGEnvironment) GetChannelPingInterval() int

func (*TGEnvironment) GetChannelReceiveSize

func (obj *TGEnvironment) GetChannelReceiveSize() int

func (*TGEnvironment) GetChannelSendSize

func (obj *TGEnvironment) GetChannelSendSize() int

func (*TGEnvironment) GetChannelUser

func (obj *TGEnvironment) GetChannelUser() string

func (*TGEnvironment) GetConnectionPoolDefaultPoolSize

func (obj *TGEnvironment) GetConnectionPoolDefaultPoolSize() int

func (*TGEnvironment) GetDefaultDateTimeFormat

func (obj *TGEnvironment) GetDefaultDateTimeFormat() string

func (*TGEnvironment) GetEnvironmentProperty

func (obj *TGEnvironment) GetEnvironmentProperty(name string) interface{}

func (*TGEnvironment) SetEnvironmentProperty

func (obj *TGEnvironment) SetEnvironmentProperty(name string, value string)

type TGLogComponent

type TGLogComponent int64

======= Server Log Component Types =======

const (
	TGLC_COMMON_COREMEMORY TGLogComponent = iota
	TGLC_COMMON_CORECOLLECTIONS
	TGLC_COMMON_COREPLATFORM
	TGLC_COMMON_CORESTRING
	TGLC_COMMON_UTILS
	TGLC_COMMON_GRAPH
	TGLC_COMMON_MODEL
	TGLC_COMMON_NET
	TGLC_COMMON_PDU
	TGLC_COMMON_SEC
	TGLC_COMMON_FILES
	TGLC_COMMON_RESV2

	//Server Components
	TGLC_SERVER_CDMP
	TGLC_SERVER_DB
	TGLC_SERVER_EXPIMP
	TGLC_SERVER_INDEX
	TGLC_SERVER_INDEXBTREE
	TGLC_SERVER_INDEXISAM
	TGLC_SERVER_QUERY
	TGLC_SERVER_QUERY_RESV1
	TGLC_SERVER_QUERY_RESV2
	TGLC_SERVER_TXN
	TGLC_SERVER_TXNLOG
	TGLC_SERVER_TXNWRITER
	TGLC_SERVER_STORAGE
	TGLC_SERVER_STORAGEPAGEMANAGER
	TGLC_SERVER_GRAPH
	TGLC_SERVER_MAIN
	TGLC_SERVER_RESV2
	TGLC_SERVER_RESV3
	TGLC_SERVER_RESV4

	//Security Components
	TGLC_SECURITY_DATA
	TGLC_SECURITY_NET
	TGLC_SECURITY_RESV1
	TGLC_SECURITY_RESV2

	TGLC_ADMIN_LANG
	TGLC_ADMIN_CMD
	TGLC_ADMIN_MAIN
	TGLC_ADMIN_AST
	TGLC_ADMIN_GREMLIN

	TGLC_CUDA_GRAPHMGR
	TGLC_CUDA_KERNELEXECUTIVE
	TGLC_CUDA_RESV1
)
const (
	TGLC_LOG_GLOBAL TGLogComponent = 0xFFFFFFFFFFFFFFF
)

type TGLogLevel

type TGLogLevel int

======= Server Log Level Types =======

const (
	TGLL_Console TGLogLevel = -2
	TGLL_Invalid TGLogLevel = -1
	TGLL_Fatal   TGLogLevel = iota
	TGLL_Error
	TGLL_Warn
	TGLL_Info
	TGLL_User
	TGLL_Debug
	TGLL_DebugFine
	TGLL_DebugFiner
	TGLL_MaxLogLevel
)

type TGLogManager

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

func DefaultTGLogManager

func DefaultTGLogManager() *TGLogManager

DefaultTGLogManager will be used by all TGDB GO API implementations internally. It uses

DefaultLogPrefix = "TGDB-GOAPI-Logger: "

and DefaultLogFlags = log.Ldate|log.Lmicroseconds|log.Lshortfile|log.LUTC ̰

func (*TGLogManager) GetLogger

func (m *TGLogManager) GetLogger() tgdb.TGLogger

// Not used for now

// NewTGLogManager facilitates a provision for a new Logger w/ new Destination (e.g. File, Pipe or Database) that // may have customized log levels and prefix to differentiate itself.

func NewTGLogManager(level int, logPrefix string, logWriter io.Writer, logFlags int) *TGLogManager {
	// We must register the concrete type for the encoder and decoder (which would
	// normally be on a separate machine from the encoder). On each end, this tells the
	// engine which concrete type is being sent that implements the interface.
	gob.Register(TGLogManager{})

	lOnce.Do(func() {
		globalLogManager = &TGLogManager{
			logger: NewLogger(level, logPrefix, logWriter, logFlags),
		}
	})
	return globalLogManager
}

GetLogger gets the logger instance handle

func (*TGLogManager) SetLogger

func (m *TGLogManager) SetLogger(logger tgdb.TGLogger)

SetLogger sets the logger instance handle

type TGQueryImpl

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

func DefaultQuery

func DefaultQuery() *TGQueryImpl

func NewQuery

func NewQuery(conn tgdb.TGConnection, queryHashId int64) *TGQueryImpl

func (*TGQueryImpl) Close

func (obj *TGQueryImpl) Close()

Close closes the Query

func (*TGQueryImpl) Execute

func (obj *TGQueryImpl) Execute() tgdb.TGResultSet

Execute executes the Query

func (*TGQueryImpl) GetQueryConnection

func (obj *TGQueryImpl) GetQueryConnection() tgdb.TGConnection

func (*TGQueryImpl) GetQueryId

func (obj *TGQueryImpl) GetQueryId() int64

func (*TGQueryImpl) GetQueryOption

func (obj *TGQueryImpl) GetQueryOption() *TGQueryOptionImpl

func (*TGQueryImpl) GetQueryParameters

func (obj *TGQueryImpl) GetQueryParameters() map[string]interface{}

func (*TGQueryImpl) MarshalBinary

func (obj *TGQueryImpl) MarshalBinary() ([]byte, error)

func (*TGQueryImpl) SetBoolean

func (obj *TGQueryImpl) SetBoolean(name string, value bool)

SetBoolean sets Boolean parameter

func (*TGQueryImpl) SetBytes

func (obj *TGQueryImpl) SetBytes(name string, value []byte)

SetBytes sets Byte Parameter

func (*TGQueryImpl) SetChar

func (obj *TGQueryImpl) SetChar(name string, value string)

SetChar sets Character Parameter

func (*TGQueryImpl) SetDate

func (obj *TGQueryImpl) SetDate(name string, value time.Time)

SetDate sets Date Parameter

func (*TGQueryImpl) SetDouble

func (obj *TGQueryImpl) SetDouble(name string, value float64)

SetDouble sets Double Parameter

func (*TGQueryImpl) SetFloat

func (obj *TGQueryImpl) SetFloat(name string, value float32)

SetFloat sets Float Parameter

func (*TGQueryImpl) SetInt

func (obj *TGQueryImpl) SetInt(name string, value int)

SetInt sets Integer Parameter

func (*TGQueryImpl) SetLong

func (obj *TGQueryImpl) SetLong(name string, value int64)

SetLong sets Long Parameter

func (*TGQueryImpl) SetNull

func (obj *TGQueryImpl) SetNull(name string)

SetNull sets the parameter to null

func (*TGQueryImpl) SetOption

func (obj *TGQueryImpl) SetOption(options tgdb.TGQueryOption)

SetOption sets the Query Option

func (*TGQueryImpl) SetQueryId

func (obj *TGQueryImpl) SetQueryId(qId int64)

func (*TGQueryImpl) SetQueryOption

func (obj *TGQueryImpl) SetQueryOption(queryOptions *TGQueryOptionImpl)

func (*TGQueryImpl) SetQueryParameters

func (obj *TGQueryImpl) SetQueryParameters(params map[string]interface{})

func (*TGQueryImpl) SetShort

func (obj *TGQueryImpl) SetShort(name string, value int16)

SetShort sets Short Parameter

func (*TGQueryImpl) SetString

func (obj *TGQueryImpl) SetString(name string, value string)

SetString sets String Parameter

func (*TGQueryImpl) String

func (obj *TGQueryImpl) String() string

func (*TGQueryImpl) UnmarshalBinary

func (obj *TGQueryImpl) UnmarshalBinary(data []byte) error

type TGQueryOptionImpl

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

func DefaultQueryOption

func DefaultQueryOption() *TGQueryOptionImpl

func NewQueryOption

func NewQueryOption() *TGQueryOptionImpl

func NewQueryOption(mutable bool) *TGQueryOptionImpl {

func (*TGQueryOptionImpl) AddProperty

func (obj *TGQueryOptionImpl) AddProperty(name, value string)

AddProperty checks whether a property already exists, else adds a new property in the form of Name=value pair

func (TGQueryOptionImpl) GetBatchSize

func (obj TGQueryOptionImpl) GetBatchSize() int

GetBatchSize gets the current value of the batch size

func (*TGQueryOptionImpl) GetEdgeLimit

func (obj *TGQueryOptionImpl) GetEdgeLimit() int

GetEdgeLimit gets the current value of edge limit

func (*TGQueryOptionImpl) GetIsMutable

func (obj *TGQueryOptionImpl) GetIsMutable() bool

func (*TGQueryOptionImpl) GetPreFetchSize

func (obj *TGQueryOptionImpl) GetPreFetchSize() int

GetPreFetchSize gets the current value of the pre-fetch size

func (*TGQueryOptionImpl) GetProperty

func (obj *TGQueryOptionImpl) GetProperty(cn tgdb.TGConfigName, value string) string

GetProperty gets the property either with value or default value

func (*TGQueryOptionImpl) GetPropertyAsBoolean

func (obj *TGQueryOptionImpl) GetPropertyAsBoolean(cn tgdb.TGConfigName) bool

GetPropertyAsBoolean gets Property as bool value

func (*TGQueryOptionImpl) GetPropertyAsInt

func (obj *TGQueryOptionImpl) GetPropertyAsInt(cn tgdb.TGConfigName) int

GetPropertyAsInt gets Property as int value

func (*TGQueryOptionImpl) GetPropertyAsLong

func (obj *TGQueryOptionImpl) GetPropertyAsLong(cn tgdb.TGConfigName) int64

GetPropertyAsLong gets Property as long value

func (*TGQueryOptionImpl) GetQueryOptionProperties

func (obj *TGQueryOptionImpl) GetQueryOptionProperties() *SortedProperties

func (*TGQueryOptionImpl) GetSortAttrName

func (obj *TGQueryOptionImpl) GetSortAttrName() string

GetSortAttrName gets sort attribute Name

func (*TGQueryOptionImpl) GetSortResultLimit

func (obj *TGQueryOptionImpl) GetSortResultLimit() int

GetSortResultLimit gets sort result limit

func (*TGQueryOptionImpl) GetTraversalDepth

func (obj *TGQueryOptionImpl) GetTraversalDepth() int

GetTraversalDepth gets the current value of traversal depth

func (*TGQueryOptionImpl) IsSortOrderDsc

func (obj *TGQueryOptionImpl) IsSortOrderDsc() bool

IsSortOrderDsc gets sort order desc

func (*TGQueryOptionImpl) MarshalBinary

func (obj *TGQueryOptionImpl) MarshalBinary() ([]byte, error)

func (TGQueryOptionImpl) SetBatchSize

func (obj TGQueryOptionImpl) SetBatchSize(size int) tgdb.TGError

SetBatchSize sets a limit on the batch. Default is 50

func (*TGQueryOptionImpl) SetEdgeLimit

func (obj *TGQueryOptionImpl) SetEdgeLimit(limit int) tgdb.TGError

SetEdgeLimit sets the number of edges per node to be returned in a query. Default is 0 which means unlimited.

func (*TGQueryOptionImpl) SetPreFetchSize

func (obj *TGQueryOptionImpl) SetPreFetchSize(size int) tgdb.TGError

SetPreFetchSize sets a limit on the number of entities(nodes and edges) return in a query. Default is 1000

func (*TGQueryOptionImpl) SetProperty

func (obj *TGQueryOptionImpl) SetProperty(name, value string)

SetProperty sets existing property value in the form of Name=value pair

func (*TGQueryOptionImpl) SetSortAttrName

func (obj *TGQueryOptionImpl) SetSortAttrName(name string) tgdb.TGError

SetSortAttrName sets sort attribute Name

func (*TGQueryOptionImpl) SetSortOrderDsc

func (obj *TGQueryOptionImpl) SetSortOrderDsc(isDsc bool) tgdb.TGError

SetSortOrderDsc sets sort order desc

func (*TGQueryOptionImpl) SetSortResultLimit

func (obj *TGQueryOptionImpl) SetSortResultLimit(limit int) tgdb.TGError

SetSortResultLimit sets sort result limit

func (*TGQueryOptionImpl) SetTraversalDepth

func (obj *TGQueryOptionImpl) SetTraversalDepth(depth int) tgdb.TGError

SetTraversalDepth sets the additional level of traversal from the query result set. Default is 3.

func (*TGQueryOptionImpl) SetUserAndPassword

func (obj *TGQueryOptionImpl) SetUserAndPassword(user, pwd string) tgdb.TGError

func (*TGQueryOptionImpl) String

func (obj *TGQueryOptionImpl) String() string

func (*TGQueryOptionImpl) UnmarshalBinary

func (obj *TGQueryOptionImpl) UnmarshalBinary(data []byte) error

type TGServerVersion

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

func DefaultTGServerVersion

func DefaultTGServerVersion() *TGServerVersion

func NewTGServerVersion

func NewTGServerVersion(ver int64) *TGServerVersion

func (*TGServerVersion) GetBuildNo

func (obj *TGServerVersion) GetBuildNo() uint16

func (*TGServerVersion) GetBuildType

func (obj *TGServerVersion) GetBuildType() byte

func (*TGServerVersion) GetEdition

func (obj *TGServerVersion) GetEdition() byte

func (*TGServerVersion) GetHotFixNo

func (obj *TGServerVersion) GetHotFixNo() byte

func (*TGServerVersion) GetMajor

func (obj *TGServerVersion) GetMajor() byte

func (*TGServerVersion) GetMinor

func (obj *TGServerVersion) GetMinor() byte

func (*TGServerVersion) GetServerVersion

func (obj *TGServerVersion) GetServerVersion() int64

func (*TGServerVersion) GetUnused

func (obj *TGServerVersion) GetUnused() byte

func (*TGServerVersion) GetUpdate

func (obj *TGServerVersion) GetUpdate() byte

func (*TGServerVersion) GetVersionString

func (obj *TGServerVersion) GetVersionString() string

type TGTransactionAlreadyInProgressException

type TGTransactionAlreadyInProgressException struct {
	*TransactionException
}

//////// TGTransactionAlreadyInProgressException //////////

func (*TGTransactionAlreadyInProgressException) Error

func (*TGTransactionAlreadyInProgressException) GetErrorCode

func (*TGTransactionAlreadyInProgressException) GetErrorDetails

func (e *TGTransactionAlreadyInProgressException) GetErrorDetails() string

func (*TGTransactionAlreadyInProgressException) GetErrorMsg

func (*TGTransactionAlreadyInProgressException) GetErrorType

func (e *TGTransactionAlreadyInProgressException) GetErrorType() int

type TGTransactionGeneralError

type TGTransactionGeneralError struct {
	*TransactionException
}

//////// TGTransactionGeneralError //////////

func (*TGTransactionGeneralError) Error

func (e *TGTransactionGeneralError) Error() string

func (*TGTransactionGeneralError) GetErrorCode

func (e *TGTransactionGeneralError) GetErrorCode() string

func (*TGTransactionGeneralError) GetErrorDetails

func (e *TGTransactionGeneralError) GetErrorDetails() string

func (*TGTransactionGeneralError) GetErrorMsg

func (e *TGTransactionGeneralError) GetErrorMsg() string

func (*TGTransactionGeneralError) GetErrorType

func (e *TGTransactionGeneralError) GetErrorType() int

type TGTransactionInBadState

type TGTransactionInBadState struct {
	*TransactionException
}

//////// TGTransactionInBadState //////////

func (*TGTransactionInBadState) Error

func (e *TGTransactionInBadState) Error() string

func (*TGTransactionInBadState) GetErrorCode

func (e *TGTransactionInBadState) GetErrorCode() string

func (*TGTransactionInBadState) GetErrorDetails

func (e *TGTransactionInBadState) GetErrorDetails() string

func (*TGTransactionInBadState) GetErrorMsg

func (e *TGTransactionInBadState) GetErrorMsg() string

func (*TGTransactionInBadState) GetErrorType

func (e *TGTransactionInBadState) GetErrorType() int

type TGTransactionMalFormed

type TGTransactionMalFormed struct {
	*TransactionException
}

//////// TGTransactionMalFormed //////////

func (*TGTransactionMalFormed) Error

func (e *TGTransactionMalFormed) Error() string

func (*TGTransactionMalFormed) GetErrorCode

func (e *TGTransactionMalFormed) GetErrorCode() string

func (*TGTransactionMalFormed) GetErrorDetails

func (e *TGTransactionMalFormed) GetErrorDetails() string

func (*TGTransactionMalFormed) GetErrorMsg

func (e *TGTransactionMalFormed) GetErrorMsg() string

func (*TGTransactionMalFormed) GetErrorType

func (e *TGTransactionMalFormed) GetErrorType() int

type TGTransactionOptimisticLockFailed

type TGTransactionOptimisticLockFailed struct {
	*TransactionException
}

//////// TGTransactionOptimisticLockFailed //////////

func (*TGTransactionOptimisticLockFailed) Error

func (*TGTransactionOptimisticLockFailed) GetErrorCode

func (e *TGTransactionOptimisticLockFailed) GetErrorCode() string

func (*TGTransactionOptimisticLockFailed) GetErrorDetails

func (e *TGTransactionOptimisticLockFailed) GetErrorDetails() string

func (*TGTransactionOptimisticLockFailed) GetErrorMsg

func (e *TGTransactionOptimisticLockFailed) GetErrorMsg() string

func (*TGTransactionOptimisticLockFailed) GetErrorType

func (e *TGTransactionOptimisticLockFailed) GetErrorType() int

type TGTransactionResourceExceeded

type TGTransactionResourceExceeded struct {
	*TransactionException
}

//////// TGTransactionResourceExceeded //////////

func (*TGTransactionResourceExceeded) Error

func (*TGTransactionResourceExceeded) GetErrorCode

func (e *TGTransactionResourceExceeded) GetErrorCode() string

func (*TGTransactionResourceExceeded) GetErrorDetails

func (e *TGTransactionResourceExceeded) GetErrorDetails() string

func (*TGTransactionResourceExceeded) GetErrorMsg

func (e *TGTransactionResourceExceeded) GetErrorMsg() string

func (*TGTransactionResourceExceeded) GetErrorType

func (e *TGTransactionResourceExceeded) GetErrorType() int

type TGTransactionUniqueConstraintViolation

type TGTransactionUniqueConstraintViolation struct {
	*TransactionException
}

//////// TGTransactionUniqueConstraintViolation //////////

func (*TGTransactionUniqueConstraintViolation) Error

func (*TGTransactionUniqueConstraintViolation) GetErrorCode

func (*TGTransactionUniqueConstraintViolation) GetErrorDetails

func (e *TGTransactionUniqueConstraintViolation) GetErrorDetails() string

func (*TGTransactionUniqueConstraintViolation) GetErrorMsg

func (*TGTransactionUniqueConstraintViolation) GetErrorType

func (e *TGTransactionUniqueConstraintViolation) GetErrorType() int

type TGTransactionUniqueIndexKeyAttributeNullError

type TGTransactionUniqueIndexKeyAttributeNullError struct {
	*TransactionException
}

//////// TGTransactionUniqueIndexKeyAttributeNullError //////////

func (*TGTransactionUniqueIndexKeyAttributeNullError) Error

func (*TGTransactionUniqueIndexKeyAttributeNullError) GetErrorCode

func (*TGTransactionUniqueIndexKeyAttributeNullError) GetErrorDetails

func (*TGTransactionUniqueIndexKeyAttributeNullError) GetErrorMsg

func (*TGTransactionUniqueIndexKeyAttributeNullError) GetErrorType

type TGTransactionVerificationError

type TGTransactionVerificationError struct {
	*TransactionException
}

//////// TGTransactionVerificationError //////////

func (*TGTransactionVerificationError) Error

func (*TGTransactionVerificationError) GetErrorCode

func (e *TGTransactionVerificationError) GetErrorCode() string

func (*TGTransactionVerificationError) GetErrorDetails

func (e *TGTransactionVerificationError) GetErrorDetails() string

func (*TGTransactionVerificationError) GetErrorMsg

func (e *TGTransactionVerificationError) GetErrorMsg() string

func (*TGTransactionVerificationError) GetErrorType

func (e *TGTransactionVerificationError) GetErrorType() int

type TimestampAttribute

type TimestampAttribute struct {
	*AbstractAttribute
}

func DefaultTimestampAttribute

func DefaultTimestampAttribute() *TimestampAttribute

Create NewTGDecimal Attribute Instance

func NewTimestampAttribute

func NewTimestampAttribute(attrDesc *AttributeDescriptor) *TimestampAttribute

func NewTimestampAttributeWithDesc

func NewTimestampAttributeWithDesc(ownerEntity tgdb.TGEntity, attrDesc *AttributeDescriptor, value interface{}) *TimestampAttribute

func NewTimestampAttributeWithOwner

func NewTimestampAttributeWithOwner(ownerEntity tgdb.TGEntity) *TimestampAttribute

func (*TimestampAttribute) GetAttributeDescriptor

func (obj *TimestampAttribute) GetAttributeDescriptor() tgdb.TGAttributeDescriptor

GetAttributeDescriptor returns the AttributeDescriptor for this attribute

func (*TimestampAttribute) GetIsModified

func (obj *TimestampAttribute) GetIsModified() bool

GetIsModified checks whether the attribute modified or not

func (*TimestampAttribute) GetName

func (obj *TimestampAttribute) GetName() string

GetName gets the Name for this attribute as the most generic form

func (*TimestampAttribute) GetOwner

func (obj *TimestampAttribute) GetOwner() tgdb.TGEntity

GetOwner gets owner Entity of this attribute

func (*TimestampAttribute) GetValue

func (obj *TimestampAttribute) GetValue() interface{}

GetValue gets the value for this attribute as the most generic form

func (*TimestampAttribute) IsNull

func (obj *TimestampAttribute) IsNull() bool

IsNull checks whether the attribute value is null or not

func (*TimestampAttribute) MarshalBinary

func (obj *TimestampAttribute) MarshalBinary() ([]byte, error)

func (*TimestampAttribute) ReadExternal

func (obj *TimestampAttribute) ReadExternal(is tgdb.TGInputStream) tgdb.TGError

ReadExternal reads the byte format from an external input stream and constructs a system object

func (*TimestampAttribute) ReadValue

func (obj *TimestampAttribute) ReadValue(is tgdb.TGInputStream) tgdb.TGError

ReadValue reads the value from input stream

func (*TimestampAttribute) ResetIsModified

func (obj *TimestampAttribute) ResetIsModified()

ResetIsModified resets the IsModified flag - recursively, if needed

func (*TimestampAttribute) SetCalendar

func (obj *TimestampAttribute) SetCalendar(b time.Time)

func (*TimestampAttribute) SetOwner

func (obj *TimestampAttribute) SetOwner(ownerEntity tgdb.TGEntity)

SetOwner sets the owner entity - Need this indirection to traverse the chain

func (*TimestampAttribute) SetValue

func (obj *TimestampAttribute) SetValue(value interface{}) tgdb.TGError

SetValue sets the value for this attribute. Appropriate data conversion to its attribute desc will be performed If the object is Null, then the object is explicitly set, but no value is provided.

func (*TimestampAttribute) String

func (obj *TimestampAttribute) String() string

func (*TimestampAttribute) UnmarshalBinary

func (obj *TimestampAttribute) UnmarshalBinary(data []byte) error

func (*TimestampAttribute) WriteExternal

func (obj *TimestampAttribute) WriteExternal(os tgdb.TGOutputStream) tgdb.TGError

WriteExternal writes a system object into an appropriate byte format onto an external output stream

func (*TimestampAttribute) WriteValue

func (obj *TimestampAttribute) WriteValue(os tgdb.TGOutputStream) tgdb.TGError

WriteValue writes the value to output stream

type TransactionException

type TransactionException struct {
	*TGDBError
}

func DefaultTGTransactionException

func DefaultTGTransactionException() *TransactionException

Create New TransactionException Instance

func NewTGTransactionAlreadyInProgressException

func NewTGTransactionAlreadyInProgressException(eMsg string) *TransactionException

func NewTGTransactionException

func NewTGTransactionException(eCode string, eType int, eMsg, eDetails string) *TransactionException

func NewTGTransactionExceptionWithMsg

func NewTGTransactionExceptionWithMsg(msg string) *TransactionException

func NewTGTransactionGeneralError

func NewTGTransactionGeneralError(eMsg string) *TransactionException

func NewTGTransactionInBadState

func NewTGTransactionInBadState(eMsg string) *TransactionException

func NewTGTransactionMalFormed

func NewTGTransactionMalFormed(eMsg string) *TransactionException

func NewTGTransactionOptimisticLockFailed

func NewTGTransactionOptimisticLockFailed(eMsg string) *TransactionException

func NewTGTransactionResourceExceeded

func NewTGTransactionResourceExceeded(eMsg string) *TransactionException

func NewTGTransactionUniqueConstraintViolation

func NewTGTransactionUniqueConstraintViolation(eMsg string) *TransactionException

func NewTGTransactionUniqueIndexKeyAttributeNullError

func NewTGTransactionUniqueIndexKeyAttributeNullError(eMsg string) *TransactionException

func NewTGTransactionVerificationError

func NewTGTransactionVerificationError(eMsg string) *TransactionException

func ProcessTransactionStatus

func ProcessTransactionStatus(is tgdb.TGInputStream, status int) *TransactionException

func (*TransactionException) Error

func (e *TransactionException) Error() string

func (*TransactionException) GetErrorCode

func (e *TransactionException) GetErrorCode() string

func (*TransactionException) GetErrorDetails

func (e *TransactionException) GetErrorDetails() string

func (*TransactionException) GetErrorMsg

func (e *TransactionException) GetErrorMsg() string

func (*TransactionException) GetErrorType

func (e *TransactionException) GetErrorType() int

type TransactionImpl

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

func DefaultTransaction

func DefaultTransaction() *TransactionImpl

func NewTransaction

func NewTransaction(txnId int64) *TransactionImpl

func (*TransactionImpl) GetTransactionId

func (obj *TransactionImpl) GetTransactionId() int64

func (*TransactionImpl) MarshalBinary

func (obj *TransactionImpl) MarshalBinary() ([]byte, error)

func (*TransactionImpl) ReadExternal

func (obj *TransactionImpl) ReadExternal(iStream tgdb.TGInputStream) tgdb.TGError

ReadExternal reads the byte format from an external input stream and constructs a system object

func (*TransactionImpl) String

func (obj *TransactionImpl) String() string

func (*TransactionImpl) UnmarshalBinary

func (obj *TransactionImpl) UnmarshalBinary(data []byte) error

func (*TransactionImpl) WriteExternal

func (obj *TransactionImpl) WriteExternal(oStream tgdb.TGOutputStream) tgdb.TGError

WriteExternal writes a system object into an appropriate byte format onto an external output stream

type TransactionStatisticsImpl

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

func DefaultTransactionStatisticsImpl

func DefaultTransactionStatisticsImpl() *TransactionStatisticsImpl

func NewTransactionStatisticsImpl

func NewTransactionStatisticsImpl(_averageProcessingTime float64, _pendingTransactionsCount int64, _transactionLoggerQueueDepth int,
	_transactionProcessorCount, _transactionProcessedCount, _transactionSuccessfulCount int64) *TransactionStatisticsImpl

func (*TransactionStatisticsImpl) GetAverageProcessingTime

func (obj *TransactionStatisticsImpl) GetAverageProcessingTime() float64

GetAverageProcessingTime returns the average processing time for the transactions

func (*TransactionStatisticsImpl) GetPendingTransactionsCount

func (obj *TransactionStatisticsImpl) GetPendingTransactionsCount() int64

GetPendingTransactionsCount returns the pending transactions count

func (*TransactionStatisticsImpl) GetTransactionLoggerQueueDepth

func (obj *TransactionStatisticsImpl) GetTransactionLoggerQueueDepth() int

GetTransactionLoggerQueueDepth returns the queue depth of transactionLogger

func (*TransactionStatisticsImpl) GetTransactionProcessedCount

func (obj *TransactionStatisticsImpl) GetTransactionProcessedCount() int64

GetTransactionProcessedCount returns the processed transaction count

func (*TransactionStatisticsImpl) GetTransactionProcessorsCount

func (obj *TransactionStatisticsImpl) GetTransactionProcessorsCount() int64

GetTransactionProcessorsCount returns the transaction processors count

func (*TransactionStatisticsImpl) GetTransactionSuccessfulCount

func (obj *TransactionStatisticsImpl) GetTransactionSuccessfulCount() int64

GetTransactionSuccessfulCount returns the successful transactions count

func (*TransactionStatisticsImpl) MarshalBinary

func (obj *TransactionStatisticsImpl) MarshalBinary() ([]byte, error)

func (*TransactionStatisticsImpl) String

func (obj *TransactionStatisticsImpl) String() string

func (*TransactionStatisticsImpl) UnmarshalBinary

func (obj *TransactionStatisticsImpl) UnmarshalBinary(data []byte) error

type TraverseRequestMessage

type TraverseRequestMessage struct {
	*AbstractProtocolMessage
}

func DefaultTraverseRequestMessage

func DefaultTraverseRequestMessage() *TraverseRequestMessage

func NewTraverseRequestMessage

func NewTraverseRequestMessage(authToken, sessionId int64) *TraverseRequestMessage

Create New Message Instance

func (*TraverseRequestMessage) FromBytes

func (msg *TraverseRequestMessage) FromBytes(buffer []byte) (tgdb.TGMessage, tgdb.TGError)

FromBytes constructs a message object from the input buffer in the byte format

func (*TraverseRequestMessage) GetAuthToken

func (msg *TraverseRequestMessage) GetAuthToken() int64

GetAuthToken gets the authToken

func (*TraverseRequestMessage) GetIsUpdatable

func (msg *TraverseRequestMessage) GetIsUpdatable() bool

GetIsUpdatable checks whether this message updatable or not

func (*TraverseRequestMessage) GetMessageByteBufLength

func (msg *TraverseRequestMessage) GetMessageByteBufLength() int

GetMessageByteBufLength gets the MessageByteBufLength. This method is called after the toBytes() is executed.

func (*TraverseRequestMessage) GetRequestId

func (msg *TraverseRequestMessage) GetRequestId() int64

GetRequestId gets the requestId for the message. This will be used as the CorrelationId

func (*TraverseRequestMessage) GetSequenceNo

func (msg *TraverseRequestMessage) GetSequenceNo() int64

GetSequenceNo gets the sequenceNo of the message

func (*TraverseRequestMessage) GetSessionId

func (msg *TraverseRequestMessage) GetSessionId() int64

GetSessionId gets the session id

func (*TraverseRequestMessage) GetTimestamp

func (msg *TraverseRequestMessage) GetTimestamp() int64

GetTimestamp gets the Timestamp

func (*TraverseRequestMessage) GetVerbId

func (msg *TraverseRequestMessage) GetVerbId() int

GetVerbId gets verbId of the message

func (*TraverseRequestMessage) MarshalBinary

func (msg *TraverseRequestMessage) MarshalBinary() ([]byte, error)

func (*TraverseRequestMessage) ReadHeader

ReadHeader reads the bytes from input stream and constructs a common header of network packet

func (*TraverseRequestMessage) ReadPayload

func (msg *TraverseRequestMessage) ReadPayload(is tgdb.TGInputStream) tgdb.TGError

ReadPayload reads the bytes from input stream and constructs message specific payload Attributes

func (*TraverseRequestMessage) SetAuthToken

func (msg *TraverseRequestMessage) SetAuthToken(authToken int64)

SetAuthToken sets the authToken

func (*TraverseRequestMessage) SetDataOffset

func (msg *TraverseRequestMessage) SetDataOffset(dataOffset int16)

SetDataOffset sets the offset at which data starts in the payload

func (*TraverseRequestMessage) SetIsUpdatable

func (msg *TraverseRequestMessage) SetIsUpdatable(updateFlag bool)

SetIsUpdatable sets the updatable flag

func (*TraverseRequestMessage) SetMessageByteBufLength

func (msg *TraverseRequestMessage) SetMessageByteBufLength(bufLength int)

SetMessageByteBufLength sets the message buffer length

func (*TraverseRequestMessage) SetRequestId

func (msg *TraverseRequestMessage) SetRequestId(requestId int64)

SetRequestId sets the request id

func (*TraverseRequestMessage) SetSequenceNo

func (msg *TraverseRequestMessage) SetSequenceNo(sequenceNo int64)

SetSequenceNo sets the sequenceNo

func (*TraverseRequestMessage) SetSessionId

func (msg *TraverseRequestMessage) SetSessionId(sessionId int64)

SetSessionId sets the session id

func (*TraverseRequestMessage) SetTimestamp

func (msg *TraverseRequestMessage) SetTimestamp(timestamp int64) tgdb.TGError

SetTimestamp sets the timestamp

func (*TraverseRequestMessage) SetVerbId

func (msg *TraverseRequestMessage) SetVerbId(verbId int)

SetVerbId sets verbId of the message

func (*TraverseRequestMessage) String

func (msg *TraverseRequestMessage) String() string

func (*TraverseRequestMessage) ToBytes

func (msg *TraverseRequestMessage) ToBytes() ([]byte, int, tgdb.TGError)

GetSessionId gets Session id

func (*TraverseRequestMessage) UnmarshalBinary

func (msg *TraverseRequestMessage) UnmarshalBinary(data []byte) error

UnmarshalBinary modifies the receiver so it must take a pointer receiver.

func (*TraverseRequestMessage) UpdateSequenceAndTimeStamp

func (msg *TraverseRequestMessage) UpdateSequenceAndTimeStamp(timestamp int64) tgdb.TGError

UpdateSequenceAndTimeStamp updates the SequenceAndTimeStamp, if message is mutable @param timestamp @return TGMessage on success, error on failure

func (*TraverseRequestMessage) WriteHeader

func (msg *TraverseRequestMessage) WriteHeader(os tgdb.TGOutputStream) tgdb.TGError

WriteHeader exports the values of the common message header Attributes to output stream

func (*TraverseRequestMessage) WritePayload

func (msg *TraverseRequestMessage) WritePayload(os tgdb.TGOutputStream) tgdb.TGError

WritePayload exports the values of the message specific payload Attributes to output stream

type TraverseResponseMessage

type TraverseResponseMessage struct {
	*AbstractProtocolMessage
}

func DefaultTraverseResponseMessage

func DefaultTraverseResponseMessage() *TraverseResponseMessage

func NewTraverseResponseMessage

func NewTraverseResponseMessage(authToken, sessionId int64) *TraverseResponseMessage

Create New Message Instance

func (*TraverseResponseMessage) FromBytes

func (msg *TraverseResponseMessage) FromBytes(buffer []byte) (tgdb.TGMessage, tgdb.TGError)

FromBytes constructs a message object from the input buffer in the byte format

func (*TraverseResponseMessage) GetAuthToken

func (msg *TraverseResponseMessage) GetAuthToken() int64

GetAuthToken gets the authToken

func (*TraverseResponseMessage) GetIsUpdatable

func (msg *TraverseResponseMessage) GetIsUpdatable() bool

GetIsUpdatable checks whether this message updatable or not

func (*TraverseResponseMessage) GetMessageByteBufLength

func (msg *TraverseResponseMessage) GetMessageByteBufLength() int

GetMessageByteBufLength gets the MessageByteBufLength. This method is called after the toBytes() is executed.

func (*TraverseResponseMessage) GetRequestId

func (msg *TraverseResponseMessage) GetRequestId() int64

GetRequestId gets the requestId for the message. This will be used as the CorrelationId

func (*TraverseResponseMessage) GetSequenceNo

func (msg *TraverseResponseMessage) GetSequenceNo() int64

GetSequenceNo gets the sequenceNo of the message

func (*TraverseResponseMessage) GetSessionId

func (msg *TraverseResponseMessage) GetSessionId() int64

GetSessionId gets the session id

func (*TraverseResponseMessage) GetTimestamp

func (msg *TraverseResponseMessage) GetTimestamp() int64

GetTimestamp gets the Timestamp

func (*TraverseResponseMessage) GetVerbId

func (msg *TraverseResponseMessage) GetVerbId() int

GetVerbId gets verbId of the message

func (*TraverseResponseMessage) MarshalBinary

func (msg *TraverseResponseMessage) MarshalBinary() ([]byte, error)

func (*TraverseResponseMessage) ReadHeader

ReadHeader reads the bytes from input stream and constructs a common header of network packet

func (*TraverseResponseMessage) ReadPayload

func (msg *TraverseResponseMessage) ReadPayload(is tgdb.TGInputStream) tgdb.TGError

ReadPayload reads the bytes from input stream and constructs message specific payload Attributes

func (*TraverseResponseMessage) SetAuthToken

func (msg *TraverseResponseMessage) SetAuthToken(authToken int64)

SetAuthToken sets the authToken

func (*TraverseResponseMessage) SetDataOffset

func (msg *TraverseResponseMessage) SetDataOffset(dataOffset int16)

SetDataOffset sets the offset at which data starts in the payload

func (*TraverseResponseMessage) SetIsUpdatable

func (msg *TraverseResponseMessage) SetIsUpdatable(updateFlag bool)

SetIsUpdatable sets the updatable flag

func (*TraverseResponseMessage) SetMessageByteBufLength

func (msg *TraverseResponseMessage) SetMessageByteBufLength(bufLength int)

SetMessageByteBufLength sets the message buffer length

func (*TraverseResponseMessage) SetRequestId

func (msg *TraverseResponseMessage) SetRequestId(requestId int64)

SetRequestId sets the request id

func (*TraverseResponseMessage) SetSequenceNo

func (msg *TraverseResponseMessage) SetSequenceNo(sequenceNo int64)

SetSequenceNo sets the sequenceNo

func (*TraverseResponseMessage) SetSessionId

func (msg *TraverseResponseMessage) SetSessionId(sessionId int64)

SetSessionId sets the session id

func (*TraverseResponseMessage) SetTimestamp

func (msg *TraverseResponseMessage) SetTimestamp(timestamp int64) tgdb.TGError

SetTimestamp sets the timestamp

func (*TraverseResponseMessage) SetVerbId

func (msg *TraverseResponseMessage) SetVerbId(verbId int)

SetVerbId sets verbId of the message

func (*TraverseResponseMessage) String

func (msg *TraverseResponseMessage) String() string

func (*TraverseResponseMessage) ToBytes

func (msg *TraverseResponseMessage) ToBytes() ([]byte, int, tgdb.TGError)

ToBytes converts a message object into byte format to be sent over the network to TGDB server

func (*TraverseResponseMessage) UnmarshalBinary

func (msg *TraverseResponseMessage) UnmarshalBinary(data []byte) error

UnmarshalBinary modifies the receiver so it must take a pointer receiver.

func (*TraverseResponseMessage) UpdateSequenceAndTimeStamp

func (msg *TraverseResponseMessage) UpdateSequenceAndTimeStamp(timestamp int64) tgdb.TGError

UpdateSequenceAndTimeStamp updates the SequenceAndTimeStamp, if message is mutable @param timestamp @return TGMessage on success, error on failure

func (*TraverseResponseMessage) WriteHeader

WriteHeader exports the values of the common message header Attributes to output stream

func (*TraverseResponseMessage) WritePayload

func (msg *TraverseResponseMessage) WritePayload(os tgdb.TGOutputStream) tgdb.TGError

WritePayload exports the values of the message specific payload Attributes to output stream

type TypeCoercionNotSupported

type TypeCoercionNotSupported struct {
	*TGDBError
}

func DefaultTGTypeCoercionNotSupported

func DefaultTGTypeCoercionNotSupported() *TypeCoercionNotSupported

Create New TypeCoercionNotSupported Instance

func NewTGTypeCoercionNotSupported

func NewTGTypeCoercionNotSupported(eCode string, eType int, eMsg, eDetails string) *TypeCoercionNotSupported

func NewTGTypeCoercionNotSupportedAttr

func NewTGTypeCoercionNotSupportedAttr(fromAttrTypeName, toAttrTypeName string) *TypeCoercionNotSupported

func NewTGTypeCoercionNotSupportedWithMsg

func NewTGTypeCoercionNotSupportedWithMsg(msg string) *TypeCoercionNotSupported

func (*TypeCoercionNotSupported) Error

func (e *TypeCoercionNotSupported) Error() string

func (*TypeCoercionNotSupported) GetErrorCode

func (e *TypeCoercionNotSupported) GetErrorCode() string

func (*TypeCoercionNotSupported) GetErrorDetails

func (e *TypeCoercionNotSupported) GetErrorDetails() string

func (*TypeCoercionNotSupported) GetErrorMsg

func (e *TypeCoercionNotSupported) GetErrorMsg() string

func (*TypeCoercionNotSupported) GetErrorType

func (e *TypeCoercionNotSupported) GetErrorType() int

type TypeNotSupported

type TypeNotSupported struct {
	*TGDBError
}

func DefaultTGTypeNotSupported

func DefaultTGTypeNotSupported() *TypeNotSupported

Create New TypeNotSupported Instance

func NewTGTypeNotSupported

func NewTGTypeNotSupported(eCode string, eType int, eMsg, eDetails string) *TypeNotSupported

func NewTGTypeNotSupportedAttr

func NewTGTypeNotSupportedAttr(attrTypeName string) *TypeNotSupported

func NewTGTypeNotSupportedWithMsg

func NewTGTypeNotSupportedWithMsg(msg string) *TypeNotSupported

func (*TypeNotSupported) Error

func (e *TypeNotSupported) Error() string

func (*TypeNotSupported) GetErrorCode

func (e *TypeNotSupported) GetErrorCode() string

func (*TypeNotSupported) GetErrorDetails

func (e *TypeNotSupported) GetErrorDetails() string

func (*TypeNotSupported) GetErrorMsg

func (e *TypeNotSupported) GetErrorMsg() string

func (*TypeNotSupported) GetErrorType

func (e *TypeNotSupported) GetErrorType() int

type UserInfoImpl

type UserInfoImpl struct {
	UserId   int
	UserType byte
	UserName string
}

func DefaultUserInfoImpl

func DefaultUserInfoImpl() *UserInfoImpl

func NewUserInfoImpl

func NewUserInfoImpl(_userId int, _userName string, _userType byte) *UserInfoImpl

func (*UserInfoImpl) GetName

func (obj *UserInfoImpl) GetName() string

GetName returns the user Name

func (*UserInfoImpl) GetSystemId

func (obj *UserInfoImpl) GetSystemId() int

GetSystemId returns the system ID for this user

func (*UserInfoImpl) GetType

func (obj *UserInfoImpl) GetType() byte

GetType returns the user type

func (*UserInfoImpl) MarshalBinary

func (obj *UserInfoImpl) MarshalBinary() ([]byte, error)

func (*UserInfoImpl) String

func (obj *UserInfoImpl) String() string

func (*UserInfoImpl) UnmarshalBinary

func (obj *UserInfoImpl) UnmarshalBinary(data []byte) error

type VersionMismatchException

type VersionMismatchException struct {
	*TGDBError
}

func DefaultTGVersionMismatchException

func DefaultTGVersionMismatchException() *VersionMismatchException

Create New VersionMismatchException Instance

func NewTGVersionMismatchException

func NewTGVersionMismatchException(eCode string, eType int, eMsg, eDetails string) *VersionMismatchException

func NewTGVersionMismatchExceptionAttr

func NewTGVersionMismatchExceptionAttr(attrTypeName string) *VersionMismatchException

func NewTGVersionMismatchExceptionWithMsg

func NewTGVersionMismatchExceptionWithMsg(msg string) *VersionMismatchException

func (*VersionMismatchException) Error

func (e *VersionMismatchException) Error() string

func (*VersionMismatchException) GetErrorCode

func (e *VersionMismatchException) GetErrorCode() string

func (*VersionMismatchException) GetErrorDetails

func (e *VersionMismatchException) GetErrorDetails() string

func (*VersionMismatchException) GetErrorMsg

func (e *VersionMismatchException) GetErrorMsg() string

func (*VersionMismatchException) GetErrorType

func (e *VersionMismatchException) GetErrorType() int

Jump to

Keyboard shortcuts

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