v20190411

package
v3.0.117+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const APIVersion = "2019-04-11"

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	common.Client
}

func NewClient

func NewClient(credential *common.Credential, region string, clientProfile *profile.ClientProfile) (client *Client, err error)

func NewClientWithSecretId

func NewClientWithSecretId(secretId, secretKey, region string) (client *Client, err error)

Deprecated

func (*Client) DescribeEntity

func (c *Client) DescribeEntity(request *DescribeEntityRequest) (response *DescribeEntityResponse, err error)

输入实体名称,返回实体相关的信息如实体别名、实体英文名、实体详细信息、相关实体等

func (*Client) DescribeRelation

func (c *Client) DescribeRelation(request *DescribeRelationRequest) (response *DescribeRelationResponse, err error)

输入两个实体,返回两个实体间的关系,例如马化腾与腾讯公司不仅是相关实体,二者还存在隶属关系(马化腾属于腾讯公司)。

func (*Client) DescribeTriple

func (c *Client) DescribeTriple(request *DescribeTripleRequest) (response *DescribeTripleResponse, err error)

三元组查询,主要分为两类,SP查询和PO查询。SP查询表示已知主语和谓语查询宾语,PO查询表示已知宾语和谓语查询主语。每一个SP或PO查询都是一个可独立执行的查询,TQL支持SP查询的嵌套查询,即主语可以是一个嵌套的子查询。其他复杂的三元组查询方法,请参考官网API文档示例。

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

func (*DescribeEntityRequest) ToJsonString

func (r *DescribeEntityRequest) ToJsonString() string

type DescribeEntityResponse

type DescribeEntityResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// 返回查询实体相关信息
		Content *string `json:"Content,omitempty" name:"Content"`

		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewDescribeEntityResponse

func NewDescribeEntityResponse() (response *DescribeEntityResponse)

func (*DescribeEntityResponse) FromJsonString

func (r *DescribeEntityResponse) FromJsonString(s string) error

func (*DescribeEntityResponse) ToJsonString

func (r *DescribeEntityResponse) ToJsonString() string

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

func (*DescribeRelationRequest) ToJsonString

func (r *DescribeRelationRequest) ToJsonString() string

type DescribeRelationResponse

type DescribeRelationResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// 返回查询实体间的关系
		Content []*EntityRelationContent `json:"Content,omitempty" name:"Content" list`

		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewDescribeRelationResponse

func NewDescribeRelationResponse() (response *DescribeRelationResponse)

func (*DescribeRelationResponse) FromJsonString

func (r *DescribeRelationResponse) FromJsonString(s string) error

func (*DescribeRelationResponse) ToJsonString

func (r *DescribeRelationResponse) ToJsonString() string

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

func (*DescribeTripleRequest) ToJsonString

func (r *DescribeTripleRequest) ToJsonString() string

type DescribeTripleResponse

type DescribeTripleResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// 返回三元组信息
		Content []*TripleContent `json:"Content,omitempty" name:"Content" list`

		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewDescribeTripleResponse

func NewDescribeTripleResponse() (response *DescribeTripleResponse)

func (*DescribeTripleResponse) FromJsonString

func (r *DescribeTripleResponse) FromJsonString(s string) error

func (*DescribeTripleResponse) ToJsonString

func (r *DescribeTripleResponse) ToJsonString() string

type EntityRelationContent

type EntityRelationContent struct {

	// 实体关系查询返回关系的object
	Object []*EntityRelationObject `json:"Object,omitempty" name:"Object" list`

	// 实体关系查询返回关系的subject
	Subject []*EntityRelationSubject `json:"Subject,omitempty" name:"Subject" list`

	// 实体关系查询返回的关系名称
	Relation *string `json:"Relation,omitempty" name:"Relation"`
}

type EntityRelationObject

type EntityRelationObject struct {

	// object对应id
	Id []*string `json:"Id,omitempty" name:"Id" list`

	// object对应name
	Name []*string `json:"Name,omitempty" name:"Name" list`

	// object对应popular值
	Popular []*int64 `json:"Popular,omitempty" name:"Popular" list`
}

type EntityRelationSubject

type EntityRelationSubject struct {

	// Subject对应id
	Id []*string `json:"Id,omitempty" name:"Id" list`

	// Subject对应name
	Name []*string `json:"Name,omitempty" name:"Name" list`

	// Subject对应popular
	Popular []*int64 `json:"Popular,omitempty" name:"Popular" list`
}

type TripleContent

type TripleContent struct {

	// 实体id
	Id *string `json:"Id,omitempty" name:"Id"`

	// 实体名称
	Name *string `json:"Name,omitempty" name:"Name"`

	// 实体order
	Order *int64 `json:"Order,omitempty" name:"Order"`

	// 实体流行度
	Popular *int64 `json:"Popular,omitempty" name:"Popular"`
}

Jump to

Keyboard shortcuts

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