Documentation
¶
Index ¶
- Constants
- func AskDad(ctx context.Context, collibraHttpClient *http.Client, question string) (string, error)
- func AskGlossary(ctx context.Context, collibraHttpClient *http.Client, question string) (string, error)
- func CreateAddFromManifestRequest(req PushDataContractManifestRequest) (*bytes.Buffer, string, error)
- func FetchDescription(ctx context.Context, client *http.Client, assetID string) string
- func PullActiveDataContractManifest(ctx context.Context, collibraHttpClient *http.Client, dataContractID string) ([]byte, error)
- func RemoveDataClassificationMatch(ctx context.Context, httpClient *http.Client, classificationMatchID string) error
- type AddDataClassRequest
- type AddDataClassificationMatchRequest
- type Asset
- type AssetQueryData
- type AssetType
- type AssetTypeDetails
- type AssetTypePagedResponse
- type AssetTypesQueryParams
- type AttributeResult
- type AttributeType
- type AttributesQueryParams
- type AttributesResponse
- type BooleanAttribute
- type ChatContext
- type ConnectedAsset
- type DataClass
- type DataClassQueryParams
- type DataClassesResponse
- type DataClassification
- type DataClassificationMatch
- type DataClassificationMatchQueryParams
- type DataContract
- type DataContractListPaginated
- type DataContractsQueryParams
- type DateAttribute
- type Domain
- type Error
- type GetLineageDirectionalOutput
- type GetLineageEntityOutput
- type GetLineageTransformationOutput
- type IncomingRelation
- type LineageDirection
- type LineageEntity
- type LineagePagination
- type LineageRelation
- type LineageResponseWarning
- type LineageTransformation
- type NamedResourceReference
- type NumericAttribute
- type OutgoingRelation
- type PagedResponseDataClassificationMatch
- type PushDataContractManifestRequest
- type PushDataContractManifestResponse
- type RelatedAsset
- type Relation
- type RelationAsset
- type RelationType
- type RelationsQueryParams
- type RelationsResponse
- type Request
- type Response
- type SearchAggregation
- type SearchAggregationValue
- type SearchField
- type SearchFilter
- type SearchHighlight
- type SearchLineageEntitiesOutput
- type SearchLineageTransformationsOutput
- type SearchRequest
- type SearchResource
- type SearchResponse
- type SearchResult
- type Status
- type StringAttribute
- type ToolContent
- type ToolMessage
- type ToolRequest
- type ToolResponse
- type TransformationSummary
Constants ¶
const ( AttributesLimit = 100 RelationsLimit = 50 )
const ( DefinitionAttributeTypeID = "00000000-0000-0000-0000-000000003008" DataAttributeRepresentsMeasureRelID = "00000000-0000-0000-0000-000000007200" GenericConnectedAssetRelID = "00000000-0000-0000-0000-000000007038" ColumnToTableRelID = "00000000-0000-0000-0000-000000007042" DataAttributeRelID1 = "00000000-0000-0000-0000-000000007094" DataAttributeRelID2 = "cd000000-0000-0000-0000-000000000023" )
Well-known Collibra UUIDs for relation and attribute types.
Variables ¶
This section is empty.
Functions ¶
func AskGlossary ¶
func CreateAddFromManifestRequest ¶
func CreateAddFromManifestRequest(req PushDataContractManifestRequest) (*bytes.Buffer, string, error)
func FetchDescription ¶ added in v0.0.26
FetchDescription retrieves the definition/description attribute for an asset.
Types ¶
type AddDataClassRequest ¶
type AddDataClassRequest struct {
Name string `json:"name"`
Description string `json:"description,omitempty"`
Status string `json:"status,omitempty"`
ColumnNameFilters []string `json:"columnNameFilters,omitempty"`
ColumnTypeFilters []string `json:"columnTypeFilters,omitempty"`
AllowNullValues *bool `json:"allowNullValues,omitempty"`
AllowEmptyValues *bool `json:"allowEmptyValues,omitempty"`
ConfidenceThreshold *int `json:"confidenceThreshold,omitempty"`
Examples []string `json:"examples,omitempty"`
}
type Asset ¶
type Asset struct {
ID string `json:"id"`
DisplayName string `json:"displayName"`
Type *AssetType `json:"type,omitempty"`
Domain *Domain `json:"domain,omitempty"`
Status *Status `json:"status,omitempty"`
StringAttributes []StringAttribute `json:"stringAttributes,omitempty"`
NumericAttributes []NumericAttribute `json:"numericAttributes,omitempty"`
BooleanAttributes []BooleanAttribute `json:"booleanAttributes,omitempty"`
DateAttributes []DateAttribute `json:"dateAttributes,omitempty"`
OutgoingRelations []OutgoingRelation `json:"outgoingRelations,omitempty"`
IncomingRelations []IncomingRelation `json:"incomingRelations,omitempty"`
}
func GetAssetSummary ¶
type AssetQueryData ¶
type AssetQueryData struct {
Assets []Asset `json:"assets"`
}
type AssetTypeDetails ¶
type AssetTypeDetails struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description,omitempty"`
PublicId string `json:"publicId,omitempty"`
DisplayNameEnabled bool `json:"displayNameEnabled"`
RatingEnabled bool `json:"ratingEnabled"`
FinalType bool `json:"finalType"`
System bool `json:"system"`
Product string `json:"product,omitempty"`
}
type AssetTypePagedResponse ¶
type AssetTypePagedResponse struct {
Total int64 `json:"total"`
Offset int64 `json:"offset"`
Limit int64 `json:"limit"`
Results []AssetTypeDetails `json:"results"`
}
AssetTypePagedResponse represents the response from the Collibra asset types API
func ListAssetTypes ¶
func ParseAssetTypesResponse ¶
func ParseAssetTypesResponse(jsonData []byte) (*AssetTypePagedResponse, error)
type AssetTypesQueryParams ¶
type AttributeResult ¶ added in v0.0.26
type AttributeType ¶
type AttributeType struct {
Name string `json:"name"`
}
type AttributesQueryParams ¶ added in v0.0.26
type AttributesResponse ¶ added in v0.0.26
type AttributesResponse struct {
Total int `json:"total"`
Offset int `json:"offset"`
Limit int `json:"limit"`
Results []AttributeResult `json:"results"`
}
func GetAssetAttributes ¶ added in v0.0.26
func GetAssetAttributes(ctx context.Context, client *http.Client, assetID string, attrTypeID string) (*AttributesResponse, error)
GetAssetAttributes queries the Collibra attributes API for a specific asset and attribute type.
type BooleanAttribute ¶
type BooleanAttribute struct {
Value bool `json:"booleanValue"`
Type *AttributeType `json:"type,omitempty"`
}
type ChatContext ¶
type ChatContext struct {
OriginUrl string `json:"originUrl"`
}
type ConnectedAsset ¶ added in v0.0.26
type ConnectedAsset struct {
ID string `json:"id"`
Name string `json:"name"`
AssetType string `json:"assetType"`
}
func FindColumnsForDataAttribute ¶ added in v0.0.26
func FindColumnsForDataAttribute(ctx context.Context, client *http.Client, dataAttributeID string) ([]ConnectedAsset, error)
FindColumnsForDataAttribute finds assets connected via both data attribute relation types.
func FindConnectedAssets ¶ added in v0.0.26
func FindConnectedAssets(ctx context.Context, client *http.Client, assetID string, relationTypeID string) ([]ConnectedAsset, error)
FindConnectedAssets finds assets connected to assetID via relationTypeID, querying both directions.
type DataClass ¶
type DataClass struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Status string `json:"status"`
ColumnNameFilters []string `json:"columnNameFilters"`
ColumnTypeFilters []string `json:"columnTypeFilters"`
AllowNullValues bool `json:"allowNullValues"`
AllowEmptyValues bool `json:"allowEmptyValues"`
ConfidenceThreshold int `json:"confidenceThreshold"`
Examples []string `json:"examples"`
CreatedBy string `json:"createdBy"`
CreatedOn int64 `json:"createdOn"`
LastModifiedBy string `json:"lastModifiedBy"`
LastModifiedOn int64 `json:"lastModifiedOn"`
Rules []json.RawMessage `json:"rules"`
}
func SearchDataClasses ¶
type DataClassQueryParams ¶
type DataClassQueryParams struct {
ContainsRules *bool `url:"containsRules,omitempty"`
CorrelationID string `url:"correlationId,omitempty"`
DataClassGroupID string `url:"dataClassGroupId,omitempty"`
Description string `url:"description,omitempty"`
Limit *int `url:"limit,omitempty"`
Name string `url:"name,omitempty"`
Offset *int `url:"offset,omitempty"`
RuleType []string `url:"ruleType,omitempty"`
Status []string `url:"status,omitempty"`
View string `url:"view,omitempty"`
}
type DataClassesResponse ¶
type DataClassification ¶
type DataClassificationMatch ¶
type DataClassificationMatch struct {
ID string `json:"id"`
CreatedBy string `json:"createdBy"`
CreatedOn int64 `json:"createdOn"`
LastModifiedBy string `json:"lastModifiedBy"`
LastModifiedOn int64 `json:"lastModifiedOn"`
System bool `json:"system"`
ResourceType string `json:"resourceType"`
Status string `json:"status"`
Confidence float64 `json:"confidence"`
Asset NamedResourceReference `json:"asset"`
Classification DataClassification `json:"classification"`
}
func AddDataClassificationMatch ¶
func AddDataClassificationMatch(ctx context.Context, httpClient *http.Client, request AddDataClassificationMatchRequest) (*DataClassificationMatch, error)
func SearchDataClassificationMatches ¶
func SearchDataClassificationMatches(ctx context.Context, httpClient *http.Client, params DataClassificationMatchQueryParams) ([]DataClassificationMatch, int64, error)
type DataClassificationMatchQueryParams ¶
type DataClassificationMatchQueryParams struct {
Offset *int `url:"offset,omitempty"`
Limit *int `url:"limit,omitempty"`
CountLimit *int `url:"countLimit,omitempty"`
AssetIDs []string `url:"assetIds,omitempty"`
Statuses []string `url:"statuses,omitempty"`
ClassificationIDs []string `url:"classificationIds,omitempty"`
AssetTypeIDs []string `url:"assetTypeIds,omitempty"`
}
type DataContract ¶
type DataContract struct {
ID string `json:"id"`
DomainID string `json:"domainId"`
ManifestID string `json:"manifestId"`
}
DataContract represents metadata attributes of a data contract
type DataContractListPaginated ¶
type DataContractListPaginated struct {
Items []DataContract `json:"items"`
Limit int `json:"limit"`
NextCursor string `json:"nextCursor,omitempty"`
Total int `json:"total,omitempty"`
}
DataContractListPaginated represents the paginated response from the data contracts API
func ListDataContracts ¶
func ParseDataContractsResponse ¶
func ParseDataContractsResponse(jsonData []byte) (*DataContractListPaginated, error)
type DateAttribute ¶
type DateAttribute struct {
Value string `json:"dateValue"`
Type *AttributeType `json:"type,omitempty"`
}
type Error ¶
type Error struct {
Message string `json:"message"`
Path []interface{} `json:"path,omitempty"`
}
type GetLineageDirectionalOutput ¶ added in v0.0.27
type GetLineageDirectionalOutput struct {
EntityId string `json:"entityId"`
Direction LineageDirection `json:"direction"`
Relations []LineageRelation `json:"relations"`
Pagination *LineagePagination `json:"pagination,omitempty"`
Warnings []LineageResponseWarning `json:"warnings,omitempty"`
Error string `json:"error,omitempty"`
}
func GetLineageDownstream ¶ added in v0.0.27
type GetLineageEntityOutput ¶ added in v0.0.27
type GetLineageEntityOutput struct {
Entity *LineageEntity `json:"entity,omitempty"`
Error string `json:"error,omitempty"`
Found bool `json:"found"`
}
func GetLineageEntity ¶ added in v0.0.27
type GetLineageTransformationOutput ¶ added in v0.0.27
type GetLineageTransformationOutput struct {
Transformation *LineageTransformation `json:"transformation,omitempty"`
Error string `json:"error,omitempty"`
Found bool `json:"found"`
}
func GetLineageTransformation ¶ added in v0.0.27
type IncomingRelation ¶
type IncomingRelation struct {
Type *RelationType `json:"type,omitempty"`
Source *RelatedAsset `json:"source,omitempty"`
}
type LineageDirection ¶ added in v0.0.27
type LineageDirection string
const ( LineageDirectionUpstream LineageDirection = "upstream" LineageDirectionDownstream LineageDirection = "downstream" )
type LineageEntity ¶ added in v0.0.27
type LineageEntity struct {
Id string `json:"id"`
Name string `json:"name"`
Type string `json:"type"`
SourceIds []string `json:"sourceIds,omitempty"`
DgcId string `json:"dgcId,omitempty"`
ParentId string `json:"parentId,omitempty"`
}
func (*LineageEntity) UnmarshalJSON ¶ added in v0.0.27
func (e *LineageEntity) UnmarshalJSON(data []byte) error
UnmarshalJSON handles both plain string values and JsonNullable-wrapped objects for the DgcId and ParentId fields. The server may serialize JsonNullable<T> as {"present": false, "undefined": true} when JsonNullableModule is not on the classpath.
type LineagePagination ¶ added in v0.0.27
type LineagePagination struct {
NextCursor string `json:"nextCursor,omitempty"`
}
type LineageRelation ¶ added in v0.0.27
type LineageResponseWarning ¶ added in v0.0.27
type LineageTransformation ¶ added in v0.0.27
type NamedResourceReference ¶
type NumericAttribute ¶
type NumericAttribute struct {
Value float64 `json:"numericValue"`
Type *AttributeType `json:"type,omitempty"`
}
type OutgoingRelation ¶
type OutgoingRelation struct {
Type *RelationType `json:"type,omitempty"`
Target *RelatedAsset `json:"target,omitempty"`
}
type PagedResponseDataClassificationMatch ¶
type PagedResponseDataClassificationMatch struct {
Total int64 `json:"total"`
Offset int64 `json:"offset"`
Limit int64 `json:"limit"`
Results []DataClassificationMatch `json:"results"`
}
type PushDataContractManifestRequest ¶
type PushDataContractManifestRequest struct {
Manifest string
ManifestID string
Version string
Force bool
Active bool
}
PushDataContractManifestRequest represents the request parameters for pushing a data contract manifest
type PushDataContractManifestResponse ¶
type PushDataContractManifestResponse struct {
ID string `json:"id"`
DomainID string `json:"domainId"`
ManifestID string `json:"manifestId"`
}
PushDataContractManifestResponse represents the response from pushing a data contract manifest
func ParseAddFromManifestResponse ¶
func ParseAddFromManifestResponse(jsonData []byte) (*PushDataContractManifestResponse, error)
func PushDataContractManifest ¶
func PushDataContractManifest(ctx context.Context, collibraHttpClient *http.Client, reqParams PushDataContractManifestRequest) (*PushDataContractManifestResponse, error)
type RelatedAsset ¶
type Relation ¶ added in v0.0.26
type Relation struct {
ID string `json:"id"`
Source RelationAsset `json:"source"`
Target RelationAsset `json:"target"`
}
type RelationAsset ¶ added in v0.0.26
type RelationType ¶
type RelationsQueryParams ¶ added in v0.0.26
type RelationsResponse ¶ added in v0.0.26
type RelationsResponse struct {
Total int `json:"total"`
Offset int `json:"offset"`
Limit int `json:"limit"`
Results []Relation `json:"results"`
}
func GetRelations ¶ added in v0.0.26
func GetRelations(ctx context.Context, client *http.Client, params RelationsQueryParams) (*RelationsResponse, error)
GetRelations queries the Collibra relations API.
type Request ¶
type Response ¶
type Response struct {
Data *AssetQueryData `json:"data,omitempty"`
Errors []Error `json:"errors,omitempty"`
}
type SearchAggregation ¶
type SearchAggregation struct {
Field string `json:"field"`
Values []SearchAggregationValue `json:"values"`
}
type SearchAggregationValue ¶
type SearchAggregationValue struct {
}
type SearchField ¶
type SearchFilter ¶
type SearchHighlight ¶
type SearchHighlight struct {
}
type SearchLineageEntitiesOutput ¶ added in v0.0.27
type SearchLineageEntitiesOutput struct {
Results []LineageEntity `json:"results"`
Pagination *LineagePagination `json:"pagination,omitempty"`
Warnings []LineageResponseWarning `json:"warnings,omitempty"`
}
type SearchLineageTransformationsOutput ¶ added in v0.0.27
type SearchLineageTransformationsOutput struct {
Results []TransformationSummary `json:"results"`
Pagination *LineagePagination `json:"pagination,omitempty"`
Warnings []LineageResponseWarning `json:"warnings,omitempty"`
}
type SearchRequest ¶
type SearchRequest struct {
Keywords string `json:"keywords"`
SearchInFields []SearchField `json:"searchInFields,omitempty"`
Filters []SearchFilter `json:"filters,omitempty"`
Limit int `json:"limit"`
Offset int `json:"offset"`
}
SearchRequest represents the request payload for the Collibra search API
func CreateSearchRequest ¶
func CreateSearchRequest(question string, resourceTypes []string, filters []SearchFilter, limit int, offset int) SearchRequest
type SearchResource ¶
type SearchResponse ¶
type SearchResponse struct {
Total int `json:"total"`
Results []SearchResult `json:"results"`
Aggregations []SearchAggregation `json:"aggregations"`
}
SearchResponse represents the response from the Collibra search API
func ParseSearchResponse ¶
func ParseSearchResponse(jsonData []byte) (*SearchResponse, error)
func SearchKeyword ¶
type SearchResult ¶
type SearchResult struct {
Resource SearchResource `json:"resource"`
Highlights []SearchHighlight `json:"highlights"`
}
type StringAttribute ¶
type StringAttribute struct {
Value string `json:"stringValue"`
Type *AttributeType `json:"type,omitempty"`
}
type ToolContent ¶
type ToolMessage ¶
type ToolMessage struct {
MessagerRole string `json:"messagerRole"`
Content ToolContent `json:"content"`
Context ChatContext `json:"context"`
}
type ToolRequest ¶
type ToolRequest struct {
Message ToolMessage `json:"message"`
History []ToolMessage `json:"history"`
}
type ToolResponse ¶
type ToolResponse struct {
Content []ToolContent `json:"content"`
}