clients

package
v0.0.18 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2025 License: Apache-2.0 Imports: 10 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	AttributesLimit = 100
	RelationsLimit  = 50
)

Variables

This section is empty.

Functions

func AskDad

func AskDad(ctx context.Context, collibraHttpClient *http.Client, question string) (string, error)

func AskGlossary

func AskGlossary(ctx context.Context, collibraHttpClient *http.Client, question string) (string, error)

func CreateAddFromManifestRequest

func CreateAddFromManifestRequest(req PushDataContractManifestRequest) (*bytes.Buffer, string, error)

func PullActiveDataContractManifest

func PullActiveDataContractManifest(ctx context.Context, collibraHttpClient *http.Client, dataContractID string) ([]byte, error)

func RemoveDataClassificationMatch

func RemoveDataClassificationMatch(ctx context.Context, httpClient *http.Client, classificationMatchID string) error

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 AddDataClassificationMatchRequest

type AddDataClassificationMatchRequest struct {
	AssetID          string `json:"assetId"`
	ClassificationID string `json:"classificationId"`
}

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

func GetAssetSummary(
	ctx context.Context,
	collibraHttpClient *http.Client,
	uuid uuid.UUID,
	outgoingRelationsCursor string,
	incomingRelationsCursor string,
) ([]Asset, error)

func ParseAssetDetailsGraphQLResponse

func ParseAssetDetailsGraphQLResponse(jsonData []byte) ([]Asset, error)

type AssetQueryData

type AssetQueryData struct {
	Assets []Asset `json:"assets"`
}

type AssetType

type AssetType struct {
	Name string `json:"name"`
}

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 ListAssetTypes(ctx context.Context, collibraHttpClient *http.Client, limit int, offset int) (*AssetTypePagedResponse, error)

func ParseAssetTypesResponse

func ParseAssetTypesResponse(jsonData []byte) (*AssetTypePagedResponse, error)

type AssetTypesQueryParams

type AssetTypesQueryParams struct {
	ExcludeMeta bool `url:"excludeMeta,omitempty"`
	Limit       int  `url:"limit,omitempty"`
	Offset      int  `url:"offset,omitempty"`
}

type AttributeType

type AttributeType struct {
	Name string `json:"name"`
}

type BooleanAttribute

type BooleanAttribute struct {
	Value bool           `json:"booleanValue"`
	Type  *AttributeType `json:"type,omitempty"`
}

type ChatContext

type ChatContext struct {
	OriginUrl string `json:"originUrl"`
}

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

func SearchDataClasses(ctx context.Context, collibraHttpClient *http.Client, params DataClassQueryParams) ([]DataClass, int, error)

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 DataClassesResponse struct {
	Total   int         `json:"total"`
	Results []DataClass `json:"results"`
}

type DataClassification

type DataClassification struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

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 ListDataContracts(ctx context.Context, collibraHttpClient *http.Client, cursor string, limit int, manifestID string) (*DataContractListPaginated, error)

func ParseDataContractsResponse

func ParseDataContractsResponse(jsonData []byte) (*DataContractListPaginated, error)

type DataContractsQueryParams

type DataContractsQueryParams struct {
	ManifestID   string `url:"manifestId,omitempty"`
	IncludeTotal bool   `url:"includeTotal,omitempty"`
	Cursor       string `url:"cursor,omitempty"`
	Limit        int    `url:"limit,omitempty"`
}

type DateAttribute

type DateAttribute struct {
	Value string         `json:"dateValue"`
	Type  *AttributeType `json:"type,omitempty"`
}

type Domain

type Domain struct {
	Name string `json:"name"`
}

type Error

type Error struct {
	Message string        `json:"message"`
	Path    []interface{} `json:"path,omitempty"`
}

type IncomingRelation

type IncomingRelation struct {
	Type   *RelationType `json:"type,omitempty"`
	Source *RelatedAsset `json:"source,omitempty"`
}

type NamedResourceReference

type NamedResourceReference struct {
	ID                    string `json:"id"`
	ResourceType          string `json:"resourceType"`
	ResourceDiscriminator string `json:"resourceDiscriminator,omitempty"`
	Name                  string `json:"name"`
}

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 RelatedAsset struct {
	ID          string     `json:"id"`
	DisplayName string     `json:"displayName"`
	Type        *AssetType `json:"type,omitempty"`
}

type RelationType

type RelationType struct {
	ID   string `json:"id"`
	Role string `json:"role,omitempty"`
}

type Request

type Request struct {
	Query     string                 `json:"query"`
	Variables map[string]interface{} `json:"variables,omitempty"`
}

func CreateAssetDetailsGraphQLQuery

func CreateAssetDetailsGraphQLQuery(
	assetIds []string,
	outgoingRelationsCursor string,
	incomingRelationsCursor string,
) 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 SearchField struct {
	ResourceType string   `json:"resourceType"`
	Fields       []string `json:"fields,omitempty"`
}

type SearchFilter

type SearchFilter struct {
	Field  string   `json:"field"`
	Values []string `json:"values"`
}

type SearchHighlight

type SearchHighlight struct {
}

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 SearchResource struct {
	ResourceType   string `json:"resourceType"`
	ID             string `json:"id"`
	CreatedBy      string `json:"createdBy"`
	CreatedOn      int64  `json:"createdOn"`
	LastModifiedOn int64  `json:"lastModifiedOn"`
	Name           string `json:"name"`
}

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

func SearchKeyword(ctx context.Context, collibraHttpClient *http.Client, question string, resourceTypes []string, filters []SearchFilter, limit int, offset int) (*SearchResponse, error)

type SearchResult

type SearchResult struct {
	Resource   SearchResource    `json:"resource"`
	Highlights []SearchHighlight `json:"highlights"`
}

type Status

type Status struct {
	Name string `json:"name"`
}

type StringAttribute

type StringAttribute struct {
	Value string         `json:"stringValue"`
	Type  *AttributeType `json:"type,omitempty"`
}

type ToolContent

type ToolContent struct {
	Type string `json:"type"`
	Text string `json:"text"`
}

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"`
}

Jump to

Keyboard shortcuts

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