Documentation
¶
Index ¶
- Constants
- type Client
- func (c *Client) DescribeEntity(request *DescribeEntityRequest) (response *DescribeEntityResponse, err error)
- func (c *Client) DescribeEntityWithContext(ctx context.Context, request *DescribeEntityRequest) (response *DescribeEntityResponse, err error)
- func (c *Client) DescribeRelation(request *DescribeRelationRequest) (response *DescribeRelationResponse, err error)
- func (c *Client) DescribeRelationWithContext(ctx context.Context, request *DescribeRelationRequest) (response *DescribeRelationResponse, err error)
- func (c *Client) DescribeTriple(request *DescribeTripleRequest) (response *DescribeTripleResponse, err error)
- func (c *Client) DescribeTripleWithContext(ctx context.Context, request *DescribeTripleRequest) (response *DescribeTripleResponse, err error)
- type DescribeEntityRequest
- type DescribeEntityRequestParams
- type DescribeEntityResponse
- type DescribeEntityResponseParams
- type DescribeRelationRequest
- type DescribeRelationRequestParams
- type DescribeRelationResponse
- type DescribeRelationResponseParams
- type DescribeTripleRequest
- type DescribeTripleRequestParams
- type DescribeTripleResponse
- type DescribeTripleResponseParams
- type EntityRelationContent
- type EntityRelationObject
- type EntityRelationSubject
- type TripleContent
Constants ¶
const ( // 内部错误 INTERNALERROR = "InternalError" // 图数据库引擎内部错误 INTERNALERROR_GRAPHENGINEERROR = "InternalError.GraphEngineError" // 图查询引擎计算超时错误 INTERNALERROR_GREMLINTIMEOUTERROR = "InternalError.GremlinTimeoutError" // 请求数据解析失败 INTERNALERROR_REQUESTENCODEERROR = "InternalError.RequestEncodeError" // 读取请求数据内容失败 INTERNALERROR_REQUESTPARSEERROR = "InternalError.RequestParseError" // 系统响应解析失败 INTERNALERROR_RESPONSEDECODEERROR = "InternalError.ResponseDecodeError" // 参数错误 INVALIDPARAMETER = "InvalidParameter" // 不可用的接口操作错误 INVALIDPARAMETER_INVALIDACTIONERROR = "InvalidParameter.InvalidActionError" // 参数取值错误 INVALIDPARAMETERVALUE = "InvalidParameterValue" // 账户余量不足错误 LIMITEXCEEDED_INSUFFICIENTBALANCEERROR = "LimitExceeded.InsufficientBalanceError" // 未授权的用户请求错误 UNAUTHORIZEDOPERATION_UNAUTHORIZEDACCOUNTERROR = "UnauthorizedOperation.UnauthorizedAccountError" )
const APIVersion = "2019-04-11"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
func NewClient ¶
func NewClient(credential common.CredentialIface, region string, clientProfile *profile.ClientProfile) (client *Client, err error)
func NewClientWithSecretId ¶
Deprecated
func (*Client) DescribeEntity ¶
func (c *Client) DescribeEntity(request *DescribeEntityRequest) (response *DescribeEntityResponse, err error)
DescribeEntity 输入实体名称,返回实体相关的信息如实体别名、实体英文名、实体详细信息、相关实体等
可能返回的错误码:
INTERNALERROR = "InternalError" INTERNALERROR_GRAPHENGINEERROR = "InternalError.GraphEngineError" INTERNALERROR_GREMLINTIMEOUTERROR = "InternalError.GremlinTimeoutError" INTERNALERROR_REQUESTENCODEERROR = "InternalError.RequestEncodeError" INTERNALERROR_REQUESTPARSEERROR = "InternalError.RequestParseError" INTERNALERROR_RESPONSEDECODEERROR = "InternalError.ResponseDecodeError" INVALIDPARAMETER = "InvalidParameter" INVALIDPARAMETER_INVALIDACTIONERROR = "InvalidParameter.InvalidActionError" INVALIDPARAMETERVALUE = "InvalidParameterValue" LIMITEXCEEDED_INSUFFICIENTBALANCEERROR = "LimitExceeded.InsufficientBalanceError" UNAUTHORIZEDOPERATION_UNAUTHORIZEDACCOUNTERROR = "UnauthorizedOperation.UnauthorizedAccountError"
func (*Client) DescribeEntityWithContext ¶ added in v1.0.324
func (c *Client) DescribeEntityWithContext(ctx context.Context, request *DescribeEntityRequest) (response *DescribeEntityResponse, err error)
DescribeEntity 输入实体名称,返回实体相关的信息如实体别名、实体英文名、实体详细信息、相关实体等
可能返回的错误码:
INTERNALERROR = "InternalError" INTERNALERROR_GRAPHENGINEERROR = "InternalError.GraphEngineError" INTERNALERROR_GREMLINTIMEOUTERROR = "InternalError.GremlinTimeoutError" INTERNALERROR_REQUESTENCODEERROR = "InternalError.RequestEncodeError" INTERNALERROR_REQUESTPARSEERROR = "InternalError.RequestParseError" INTERNALERROR_RESPONSEDECODEERROR = "InternalError.ResponseDecodeError" INVALIDPARAMETER = "InvalidParameter" INVALIDPARAMETER_INVALIDACTIONERROR = "InvalidParameter.InvalidActionError" INVALIDPARAMETERVALUE = "InvalidParameterValue" LIMITEXCEEDED_INSUFFICIENTBALANCEERROR = "LimitExceeded.InsufficientBalanceError" UNAUTHORIZEDOPERATION_UNAUTHORIZEDACCOUNTERROR = "UnauthorizedOperation.UnauthorizedAccountError"
func (*Client) DescribeRelation ¶
func (c *Client) DescribeRelation(request *DescribeRelationRequest) (response *DescribeRelationResponse, err error)
DescribeRelation 输入两个实体,返回两个实体间的关系,例如马化腾与腾讯公司不仅是相关实体,二者还存在隶属关系(马化腾属于腾讯公司)。
可能返回的错误码:
INTERNALERROR = "InternalError" INTERNALERROR_GRAPHENGINEERROR = "InternalError.GraphEngineError" INTERNALERROR_GREMLINTIMEOUTERROR = "InternalError.GremlinTimeoutError" INTERNALERROR_REQUESTENCODEERROR = "InternalError.RequestEncodeError" INTERNALERROR_REQUESTPARSEERROR = "InternalError.RequestParseError" INTERNALERROR_RESPONSEDECODEERROR = "InternalError.ResponseDecodeError" INVALIDPARAMETER = "InvalidParameter" INVALIDPARAMETER_INVALIDACTIONERROR = "InvalidParameter.InvalidActionError" INVALIDPARAMETERVALUE = "InvalidParameterValue" LIMITEXCEEDED_INSUFFICIENTBALANCEERROR = "LimitExceeded.InsufficientBalanceError" UNAUTHORIZEDOPERATION_UNAUTHORIZEDACCOUNTERROR = "UnauthorizedOperation.UnauthorizedAccountError"
func (*Client) DescribeRelationWithContext ¶ added in v1.0.324
func (c *Client) DescribeRelationWithContext(ctx context.Context, request *DescribeRelationRequest) (response *DescribeRelationResponse, err error)
DescribeRelation 输入两个实体,返回两个实体间的关系,例如马化腾与腾讯公司不仅是相关实体,二者还存在隶属关系(马化腾属于腾讯公司)。
可能返回的错误码:
INTERNALERROR = "InternalError" INTERNALERROR_GRAPHENGINEERROR = "InternalError.GraphEngineError" INTERNALERROR_GREMLINTIMEOUTERROR = "InternalError.GremlinTimeoutError" INTERNALERROR_REQUESTENCODEERROR = "InternalError.RequestEncodeError" INTERNALERROR_REQUESTPARSEERROR = "InternalError.RequestParseError" INTERNALERROR_RESPONSEDECODEERROR = "InternalError.ResponseDecodeError" INVALIDPARAMETER = "InvalidParameter" INVALIDPARAMETER_INVALIDACTIONERROR = "InvalidParameter.InvalidActionError" INVALIDPARAMETERVALUE = "InvalidParameterValue" LIMITEXCEEDED_INSUFFICIENTBALANCEERROR = "LimitExceeded.InsufficientBalanceError" UNAUTHORIZEDOPERATION_UNAUTHORIZEDACCOUNTERROR = "UnauthorizedOperation.UnauthorizedAccountError"
func (*Client) DescribeTriple ¶
func (c *Client) DescribeTriple(request *DescribeTripleRequest) (response *DescribeTripleResponse, err error)
DescribeTriple 三元组查询,主要分为两类,SP查询和PO查询。SP查询表示已知主语和谓语查询宾语,PO查询表示已知宾语和谓语查询主语。每一个SP或PO查询都是一个可独立执行的查询,TQL支持SP查询的嵌套查询,即主语可以是一个嵌套的子查询。其他复杂的三元组查询方法,请参考官网API文档示例。
可能返回的错误码:
INTERNALERROR = "InternalError" INTERNALERROR_GRAPHENGINEERROR = "InternalError.GraphEngineError" INTERNALERROR_GREMLINTIMEOUTERROR = "InternalError.GremlinTimeoutError" INTERNALERROR_REQUESTENCODEERROR = "InternalError.RequestEncodeError" INTERNALERROR_REQUESTPARSEERROR = "InternalError.RequestParseError" INTERNALERROR_RESPONSEDECODEERROR = "InternalError.ResponseDecodeError" INVALIDPARAMETER = "InvalidParameter" INVALIDPARAMETER_INVALIDACTIONERROR = "InvalidParameter.InvalidActionError" INVALIDPARAMETERVALUE = "InvalidParameterValue" LIMITEXCEEDED_INSUFFICIENTBALANCEERROR = "LimitExceeded.InsufficientBalanceError" UNAUTHORIZEDOPERATION_UNAUTHORIZEDACCOUNTERROR = "UnauthorizedOperation.UnauthorizedAccountError"
func (*Client) DescribeTripleWithContext ¶ added in v1.0.324
func (c *Client) DescribeTripleWithContext(ctx context.Context, request *DescribeTripleRequest) (response *DescribeTripleResponse, err error)
DescribeTriple 三元组查询,主要分为两类,SP查询和PO查询。SP查询表示已知主语和谓语查询宾语,PO查询表示已知宾语和谓语查询主语。每一个SP或PO查询都是一个可独立执行的查询,TQL支持SP查询的嵌套查询,即主语可以是一个嵌套的子查询。其他复杂的三元组查询方法,请参考官网API文档示例。
可能返回的错误码:
INTERNALERROR = "InternalError" INTERNALERROR_GRAPHENGINEERROR = "InternalError.GraphEngineError" INTERNALERROR_GREMLINTIMEOUTERROR = "InternalError.GremlinTimeoutError" INTERNALERROR_REQUESTENCODEERROR = "InternalError.RequestEncodeError" INTERNALERROR_REQUESTPARSEERROR = "InternalError.RequestParseError" INTERNALERROR_RESPONSEDECODEERROR = "InternalError.ResponseDecodeError" INVALIDPARAMETER = "InvalidParameter" INVALIDPARAMETER_INVALIDACTIONERROR = "InvalidParameter.InvalidActionError" INVALIDPARAMETERVALUE = "InvalidParameterValue" LIMITEXCEEDED_INSUFFICIENTBALANCEERROR = "LimitExceeded.InsufficientBalanceError" UNAUTHORIZEDOPERATION_UNAUTHORIZEDACCOUNTERROR = "UnauthorizedOperation.UnauthorizedAccountError"
type DescribeEntityRequest ¶
type DescribeEntityRequest struct { *tchttp.BaseRequest // 实体名称 EntityName *string `json:"EntityName,omitempty" name:"EntityName"` }
func NewDescribeEntityRequest ¶
func NewDescribeEntityRequest() (request *DescribeEntityRequest)
func (*DescribeEntityRequest) FromJsonString ¶
func (r *DescribeEntityRequest) FromJsonString(s string) error
FromJsonString It is highly **NOT** recommended to use this function because it has no param check, nor strict type check
func (*DescribeEntityRequest) ToJsonString ¶
func (r *DescribeEntityRequest) ToJsonString() string
type DescribeEntityRequestParams ¶ added in v1.0.426
type DescribeEntityRequestParams struct { // 实体名称 EntityName *string `json:"EntityName,omitempty" name:"EntityName"` }
Predefined struct for user
type DescribeEntityResponse ¶
type DescribeEntityResponse struct { *tchttp.BaseResponse Response *DescribeEntityResponseParams `json:"Response"` }
func NewDescribeEntityResponse ¶
func NewDescribeEntityResponse() (response *DescribeEntityResponse)
func (*DescribeEntityResponse) FromJsonString ¶
func (r *DescribeEntityResponse) FromJsonString(s string) error
FromJsonString It is highly **NOT** recommended to use this function because it has no param check, nor strict type check
func (*DescribeEntityResponse) ToJsonString ¶
func (r *DescribeEntityResponse) ToJsonString() string
type DescribeEntityResponseParams ¶ added in v1.0.426
type DescribeEntityResponseParams struct { // 返回查询实体相关信息 Content *string `json:"Content,omitempty" name:"Content"` // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` }
Predefined struct for user
type DescribeRelationRequest ¶
type DescribeRelationRequest struct { *tchttp.BaseRequest // 输入第一个实体 LeftEntityName *string `json:"LeftEntityName,omitempty" name:"LeftEntityName"` // 输入第二个实体 RightEntityName *string `json:"RightEntityName,omitempty" name:"RightEntityName"` }
func NewDescribeRelationRequest ¶
func NewDescribeRelationRequest() (request *DescribeRelationRequest)
func (*DescribeRelationRequest) FromJsonString ¶
func (r *DescribeRelationRequest) FromJsonString(s string) error
FromJsonString It is highly **NOT** recommended to use this function because it has no param check, nor strict type check
func (*DescribeRelationRequest) ToJsonString ¶
func (r *DescribeRelationRequest) ToJsonString() string
type DescribeRelationRequestParams ¶ added in v1.0.426
type DescribeRelationRequestParams struct { // 输入第一个实体 LeftEntityName *string `json:"LeftEntityName,omitempty" name:"LeftEntityName"` // 输入第二个实体 RightEntityName *string `json:"RightEntityName,omitempty" name:"RightEntityName"` }
Predefined struct for user
type DescribeRelationResponse ¶
type DescribeRelationResponse struct { *tchttp.BaseResponse Response *DescribeRelationResponseParams `json:"Response"` }
func NewDescribeRelationResponse ¶
func NewDescribeRelationResponse() (response *DescribeRelationResponse)
func (*DescribeRelationResponse) FromJsonString ¶
func (r *DescribeRelationResponse) FromJsonString(s string) error
FromJsonString It is highly **NOT** recommended to use this function because it has no param check, nor strict type check
func (*DescribeRelationResponse) ToJsonString ¶
func (r *DescribeRelationResponse) ToJsonString() string
type DescribeRelationResponseParams ¶ added in v1.0.426
type DescribeRelationResponseParams struct { // 返回查询实体间的关系 Content []*EntityRelationContent `json:"Content,omitempty" name:"Content"` // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` }
Predefined struct for user
type DescribeTripleRequest ¶
type DescribeTripleRequest struct { *tchttp.BaseRequest // 三元组查询条件 TripleCondition *string `json:"TripleCondition,omitempty" name:"TripleCondition"` }
func NewDescribeTripleRequest ¶
func NewDescribeTripleRequest() (request *DescribeTripleRequest)
func (*DescribeTripleRequest) FromJsonString ¶
func (r *DescribeTripleRequest) FromJsonString(s string) error
FromJsonString It is highly **NOT** recommended to use this function because it has no param check, nor strict type check
func (*DescribeTripleRequest) ToJsonString ¶
func (r *DescribeTripleRequest) ToJsonString() string
type DescribeTripleRequestParams ¶ added in v1.0.426
type DescribeTripleRequestParams struct { // 三元组查询条件 TripleCondition *string `json:"TripleCondition,omitempty" name:"TripleCondition"` }
Predefined struct for user
type DescribeTripleResponse ¶
type DescribeTripleResponse struct { *tchttp.BaseResponse Response *DescribeTripleResponseParams `json:"Response"` }
func NewDescribeTripleResponse ¶
func NewDescribeTripleResponse() (response *DescribeTripleResponse)
func (*DescribeTripleResponse) FromJsonString ¶
func (r *DescribeTripleResponse) FromJsonString(s string) error
FromJsonString It is highly **NOT** recommended to use this function because it has no param check, nor strict type check
func (*DescribeTripleResponse) ToJsonString ¶
func (r *DescribeTripleResponse) ToJsonString() string
type DescribeTripleResponseParams ¶ added in v1.0.426
type DescribeTripleResponseParams struct { // 返回三元组信息 Content []*TripleContent `json:"Content,omitempty" name:"Content"` // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` }
Predefined struct for user
type EntityRelationContent ¶
type EntityRelationContent struct { // 实体关系查询返回关系的object Object []*EntityRelationObject `json:"Object,omitempty" name:"Object"` // 实体关系查询返回关系的subject Subject []*EntityRelationSubject `json:"Subject,omitempty" name:"Subject"` // 实体关系查询返回的关系名称 Relation *string `json:"Relation,omitempty" name:"Relation"` }