clients

package
v0.0.31 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AttributesLimit = 100
	RelationsLimit  = 50
)
View Source
const (
	DefinitionAttributeTypeID                = "00000000-0000-0000-0000-000000000202"
	MeasureIsCalculatedUsingDataElementRelID = "00000000-0000-0000-0000-000000007200"
	BusinessAssetRepresentsDataAssetRelID    = "00000000-0000-0000-0000-000000007038"
	ColumnIsPartOfTableRelID                 = "00000000-0000-0000-0000-000000007042"
	DataAttributeRepresentsColumnRelID       = "00000000-0000-0000-0000-000000007094"
	ColumnIsSourceForDataAttributeRelID      = "00000000-0000-0000-0000-120000000011"
)

Well-known Collibra UUIDs for relation and attribute types.

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 FetchDescription added in v0.0.26

func FetchDescription(ctx context.Context, client *http.Client, assetID string) string

FetchDescription retrieves the definition/description attribute for an asset.

func GetUserGroupName added in v0.0.28

func GetUserGroupName(ctx context.Context, collibraHttpClient *http.Client, groupID string) (string, error)

GetUserGroupName fetches the name for a user group by ID.

func GetUserName added in v0.0.28

func GetUserName(ctx context.Context, collibraHttpClient *http.Client, userID string) (string, error)

GetUserName fetches the display name for a user by ID.

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 AddBusinessTermAssetRequest added in v0.0.29

type AddBusinessTermAssetRequest struct {
	Name         string `json:"name"`
	TypePublicId string `json:"typePublicId"`
	DomainId     string `json:"domainId"`
}

AddBusinessTermAssetRequest is the request body for creating a business term asset.

type AddBusinessTermAssetResponse added in v0.0.29

type AddBusinessTermAssetResponse struct {
	Id string `json:"id"`
}

AddBusinessTermAssetResponse is the response from creating a business term asset.

func CreateBusinessTermAsset added in v0.0.29

func CreateBusinessTermAsset(ctx context.Context, client *http.Client, req AddBusinessTermAssetRequest) (*AddBusinessTermAssetResponse, error)

CreateBusinessTermAsset creates a new business term asset via POST /rest/2.0/assets.

type AddBusinessTermAttributeRequest added in v0.0.29

type AddBusinessTermAttributeRequest struct {
	AssetId string `json:"assetId"`
	TypeId  string `json:"typeId"`
	Value   string `json:"value"`
}

AddBusinessTermAttributeRequest is the request body for adding an attribute to an asset.

type AddBusinessTermAttributeResponse added in v0.0.29

type AddBusinessTermAttributeResponse struct {
	Id string `json:"id"`
}

AddBusinessTermAttributeResponse is the response from adding an attribute to an asset.

func CreateBusinessTermAttribute added in v0.0.29

func CreateBusinessTermAttribute(ctx context.Context, client *http.Client, req AddBusinessTermAttributeRequest) (*AddBusinessTermAttributeResponse, error)

CreateBusinessTermAttribute adds an attribute to an asset via POST /rest/2.0/attributes.

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 AttributeResult added in v0.0.26

type AttributeResult struct {
	ID    string `json:"id"`
	Value string `json:"value"`
}

type AttributeType

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

type AttributesQueryParams added in v0.0.26

type AttributesQueryParams struct {
	AssetID         string `url:"assetId,omitempty"`
	AttributeTypeID string `url:"attributeTypeId,omitempty"`
}

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 CreateAssetDomainRef added in v0.0.29

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

CreateAssetDomainRef is a reference to a domain in a create asset response.

type CreateAssetRequest added in v0.0.29

type CreateAssetRequest struct {
	Name                        string `json:"name"`
	TypeID                      string `json:"typeId"`
	DomainID                    string `json:"domainId"`
	DisplayName                 string `json:"displayName,omitempty"`
	ExcludeFromAutoHyperlinking bool   `json:"excludeFromAutoHyperlinking,omitempty"`
}

CreateAssetRequest is the request body for POST /rest/2.0/assets.

type CreateAssetResponse added in v0.0.29

type CreateAssetResponse struct {
	ID             string               `json:"id"`
	Name           string               `json:"name"`
	DisplayName    string               `json:"displayName"`
	Type           CreateAssetTypeRef   `json:"type"`
	Domain         CreateAssetDomainRef `json:"domain"`
	CreatedBy      string               `json:"createdBy"`
	CreatedOn      int64                `json:"createdOn"`
	LastModifiedBy string               `json:"lastModifiedBy"`
	LastModifiedOn int64                `json:"lastModifiedOn"`
}

CreateAssetResponse is the response from POST /rest/2.0/assets.

func CreateAsset added in v0.0.29

func CreateAsset(ctx context.Context, client *http.Client, request CreateAssetRequest) (*CreateAssetResponse, error)

CreateAsset creates a new asset via POST /rest/2.0/assets.

type CreateAssetTypeRef added in v0.0.29

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

CreateAssetTypeRef is a reference to an asset type in a create asset response.

type CreateAttributeAssetRef added in v0.0.29

type CreateAttributeAssetRef struct {
	ID string `json:"id"`
}

CreateAttributeAssetRef is a reference to an asset in an attribute response.

type CreateAttributeRequest added in v0.0.29

type CreateAttributeRequest struct {
	AssetID string `json:"assetId"`
	TypeID  string `json:"typeId"`
	Value   string `json:"value"`
}

CreateAttributeRequest is the request body for POST /rest/2.0/attributes.

type CreateAttributeResponse added in v0.0.29

type CreateAttributeResponse struct {
	ID    string                  `json:"id"`
	Type  CreateAttributeTypeRef  `json:"type"`
	Asset CreateAttributeAssetRef `json:"asset"`
	Value string                  `json:"value"`
}

CreateAttributeResponse is the response from POST /rest/2.0/attributes.

func CreateAttribute added in v0.0.29

func CreateAttribute(ctx context.Context, client *http.Client, request CreateAttributeRequest) (*CreateAttributeResponse, error)

CreateAttribute creates a new attribute on an asset via POST /rest/2.0/attributes.

type CreateAttributeTypeRef added in v0.0.29

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

CreateAttributeTypeRef is a reference to an attribute type.

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 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

func GetLineageDownstream(ctx context.Context, collibraHttpClient *http.Client, entityId string, entityType string, limit int, cursor string) (*GetLineageDirectionalOutput, error)

func GetLineageUpstream added in v0.0.27

func GetLineageUpstream(ctx context.Context, collibraHttpClient *http.Client, entityId string, entityType string, limit int, cursor string) (*GetLineageDirectionalOutput, error)

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

func GetLineageEntity(ctx context.Context, collibraHttpClient *http.Client, entityId string) (*GetLineageEntityOutput, error)

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

func GetLineageTransformation(ctx context.Context, collibraHttpClient *http.Client, transformationId string) (*GetLineageTransformationOutput, error)

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 LineageRelation struct {
	SourceEntityId    string   `json:"sourceEntityId"`
	TargetEntityId    string   `json:"targetEntityId"`
	TransformationIds []string `json:"transformationIds"`
}

type LineageResponseWarning added in v0.0.27

type LineageResponseWarning struct {
	Code    string `json:"code"`
	Message string `json:"message"`
}

type LineageTransformation added in v0.0.27

type LineageTransformation struct {
	Id                  string `json:"id"`
	Name                string `json:"name"`
	Description         string `json:"description,omitempty"`
	TransformationLogic string `json:"transformationLogic,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 PrepareAddBusinessTermAsset added in v0.0.29

type PrepareAddBusinessTermAsset struct {
	ID     string                       `json:"id"`
	Name   string                       `json:"name"`
	Domain PrepareAddBusinessTermDomain `json:"domain"`
}

PrepareAddBusinessTermAsset represents an asset returned from a search.

func PrepareAddBusinessTermSearchAssets added in v0.0.29

func PrepareAddBusinessTermSearchAssets(ctx context.Context, client *http.Client, name string, typeID string) ([]PrepareAddBusinessTermAsset, error)

PrepareAddBusinessTermSearchAssets searches for assets by name and type ID for duplicate detection.

type PrepareAddBusinessTermAssetType added in v0.0.29

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

PrepareAddBusinessTermAssetType represents a Collibra asset type.

func PrepareAddBusinessTermGetAssetType added in v0.0.29

func PrepareAddBusinessTermGetAssetType(ctx context.Context, client *http.Client, publicID string) (*PrepareAddBusinessTermAssetType, error)

PrepareAddBusinessTermGetAssetType gets an asset type by its public ID.

type PrepareAddBusinessTermAssetsResponse added in v0.0.29

type PrepareAddBusinessTermAssetsResponse struct {
	Total   int                           `json:"total"`
	Results []PrepareAddBusinessTermAsset `json:"results"`
}

PrepareAddBusinessTermAssetsResponse is the paged response for searching assets.

type PrepareAddBusinessTermAssignment added in v0.0.29

type PrepareAddBusinessTermAssignment struct {
	ID            string                                  `json:"id"`
	AttributeType PrepareAddBusinessTermAssignmentTypeRef `json:"attributeType"`
	Min           int                                     `json:"min"`
	Max           int                                     `json:"max"`
}

PrepareAddBusinessTermAssignment represents a flattened attribute assignment for an asset type. This is derived from the raw API response which nests characteristic type references.

func PrepareAddBusinessTermGetAssignments added in v0.0.29

func PrepareAddBusinessTermGetAssignments(ctx context.Context, client *http.Client, assetTypeID string) ([]PrepareAddBusinessTermAssignment, error)

PrepareAddBusinessTermGetAssignments gets attribute assignments for an asset type. The Collibra API returns a plain JSON array of assignment objects, each containing nested assignedCharacteristicTypeReferences. This function flattens them into a list of PrepareAddBusinessTermAssignment for easier consumption.

type PrepareAddBusinessTermAssignmentTypeRef added in v0.0.29

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

PrepareAddBusinessTermAssignmentTypeRef is a reference to an attribute type within an assignment.

type PrepareAddBusinessTermAttributeType added in v0.0.29

type PrepareAddBusinessTermAttributeType struct {
	ID            string                              `json:"id"`
	Name          string                              `json:"name"`
	Kind          string                              `json:"kind"`
	Required      bool                                `json:"required"`
	AllowedValues []string                            `json:"allowedValues"`
	Constraints   *PrepareAddBusinessTermConstraints  `json:"constraints,omitempty"`
	Description   string                              `json:"description"`
	RelationType  *PrepareAddBusinessTermRelationType `json:"relationType,omitempty"`
}

PrepareAddBusinessTermAttributeType represents a full attribute type with schema details. Fields are mapped from the Collibra API response where the "kind" comes from attributeTypeDiscriminator and structural fields like constraints/relationType are not part of the standard attribute type API response.

func PrepareAddBusinessTermGetAttributeType added in v0.0.29

func PrepareAddBusinessTermGetAttributeType(ctx context.Context, client *http.Client, id string) (*PrepareAddBusinessTermAttributeType, error)

PrepareAddBusinessTermGetAttributeType gets the full attribute type schema by ID. The Collibra API returns attributeTypeDiscriminator (e.g. "StringAttributeType") which is mapped to the Kind field. Fields like constraints and relationType are not part of the standard API response and will be nil.

type PrepareAddBusinessTermConstraints added in v0.0.29

type PrepareAddBusinessTermConstraints struct {
	MinLength *int `json:"minLength,omitempty"`
	MaxLength *int `json:"maxLength,omitempty"`
}

PrepareAddBusinessTermConstraints represents validation constraints for an attribute type.

type PrepareAddBusinessTermDomain added in v0.0.29

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

PrepareAddBusinessTermDomain represents a Collibra domain.

func PrepareAddBusinessTermGetDomain added in v0.0.29

func PrepareAddBusinessTermGetDomain(ctx context.Context, client *http.Client, domainID string) (*PrepareAddBusinessTermDomain, error)

PrepareAddBusinessTermGetDomain gets a specific domain by ID.

func PrepareAddBusinessTermListDomains added in v0.0.29

func PrepareAddBusinessTermListDomains(ctx context.Context, client *http.Client) ([]PrepareAddBusinessTermDomain, error)

PrepareAddBusinessTermListDomains lists all available domains.

type PrepareAddBusinessTermDomainsResponse added in v0.0.29

type PrepareAddBusinessTermDomainsResponse struct {
	Total   int                            `json:"total"`
	Results []PrepareAddBusinessTermDomain `json:"results"`
}

PrepareAddBusinessTermDomainsResponse is the paged response for listing domains.

type PrepareAddBusinessTermRelationType added in v0.0.29

type PrepareAddBusinessTermRelationType struct {
	ID         string                                  `json:"id"`
	Role       string                                  `json:"role"`
	CoRole     string                                  `json:"coRole"`
	Direction  string                                  `json:"direction"`
	TargetType PrepareAddBusinessTermAssignmentTypeRef `json:"targetType"`
	SourceType PrepareAddBusinessTermAssignmentTypeRef `json:"sourceType"`
}

PrepareAddBusinessTermRelationType represents relation type information within an attribute type.

type PrepareCreateAssetResult added in v0.0.29

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

PrepareCreateAssetResult represents an existing asset found during duplicate check.

func SearchAssetsForDuplicate added in v0.0.29

func SearchAssetsForDuplicate(ctx context.Context, client *http.Client, name string, assetTypeID string, domainID string) ([]PrepareCreateAssetResult, error)

SearchAssetsForDuplicate searches for existing assets by name, type, and domain.

type PrepareCreateAssetSearchResponse added in v0.0.29

type PrepareCreateAssetSearchResponse struct {
	Results []PrepareCreateAssetResult `json:"results"`
	Total   int                        `json:"total"`
}

PrepareCreateAssetSearchResponse is the response from searching assets.

type PrepareCreateAssetStatus added in v0.0.29

type PrepareCreateAssetStatus string

PrepareCreateAssetStatus represents the status of asset creation readiness.

const (
	StatusReady              PrepareCreateAssetStatus = "ready"
	StatusIncomplete         PrepareCreateAssetStatus = "incomplete"
	StatusNeedsClarification PrepareCreateAssetStatus = "needs_clarification"
	StatusDuplicateFound     PrepareCreateAssetStatus = "duplicate_found"
)

type PrepareCreateAssetType added in v0.0.29

type PrepareCreateAssetType struct {
	ID       string `json:"id"`
	PublicID string `json:"publicId"`
	Name     string `json:"name"`
}

PrepareCreateAssetType represents an asset type from the API.

func GetAssetTypeByPublicID added in v0.0.29

func GetAssetTypeByPublicID(ctx context.Context, client *http.Client, publicID string) (*PrepareCreateAssetType, error)

GetAssetTypeByPublicID resolves an asset type by its publicId.

func GetAvailableAssetTypesForDomain added in v0.0.29

func GetAvailableAssetTypesForDomain(ctx context.Context, client *http.Client, domainID string) ([]PrepareCreateAssetType, error)

GetAvailableAssetTypesForDomain returns the asset types allowed in a given domain.

func ListAssetTypesForPrepare added in v0.0.29

func ListAssetTypesForPrepare(ctx context.Context, client *http.Client, limit int) ([]PrepareCreateAssetType, int, error)

ListAssetTypesForPrepare lists asset types, limited to the given count.

type PrepareCreateAssetTypeListResponse added in v0.0.29

type PrepareCreateAssetTypeListResponse struct {
	Results []PrepareCreateAssetType `json:"results"`
	Total   int                      `json:"total"`
}

PrepareCreateAssetTypeListResponse is the response from listing asset types.

type PrepareCreateAttributeType added in v0.0.29

type PrepareCreateAttributeType struct {
	ID              string                    `json:"id"`
	Name            string                    `json:"name"`
	Kind            string                    `json:"kind"`
	Required        bool                      `json:"required"`
	Constraints     *PrepareCreateConstraints `json:"constraints,omitempty"`
	AllowedValues   []string                  `json:"allowedValues,omitempty"`
	Direction       string                    `json:"direction,omitempty"`
	TargetAssetType *PrepareCreateAssetType   `json:"targetAssetType,omitempty"`
}

PrepareCreateAttributeType represents an attribute type with full schema.

func GetAttributeTypeByID added in v0.0.29

func GetAttributeTypeByID(ctx context.Context, client *http.Client, attrTypeID string) (*PrepareCreateAttributeType, error)

GetAttributeTypeByID gets the full attribute type schema by ID.

type PrepareCreateConstraints added in v0.0.29

type PrepareCreateConstraints struct {
	MinLength *int     `json:"minLength,omitempty"`
	MaxLength *int     `json:"maxLength,omitempty"`
	Min       *float64 `json:"min,omitempty"`
	Max       *float64 `json:"max,omitempty"`
}

PrepareCreateConstraints represents attribute validation constraints.

type PrepareCreateDomain added in v0.0.29

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

PrepareCreateDomain represents a domain from the API.

func GetDomainByID added in v0.0.29

func GetDomainByID(ctx context.Context, client *http.Client, domainID string) (*PrepareCreateDomain, error)

GetDomainByID gets a specific domain by its ID.

func ListDomainsForPrepare added in v0.0.29

func ListDomainsForPrepare(ctx context.Context, client *http.Client, limit int) ([]PrepareCreateDomain, int, error)

ListDomainsForPrepare lists domains, limited to the given count.

type PrepareCreateDomainListResponse added in v0.0.29

type PrepareCreateDomainListResponse struct {
	Results []PrepareCreateDomain `json:"results"`
	Total   int                   `json:"total"`
}

PrepareCreateDomainListResponse is the response from listing domains.

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 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 RelationAsset struct {
	ID       string `json:"id"`
	Name     string `json:"name"`
	TypeName string `json:"typeName"`
}

type RelationType

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

type RelationsQueryParams added in v0.0.26

type RelationsQueryParams struct {
	SourceID       string `url:"sourceId,omitempty"`
	TargetID       string `url:"targetId,omitempty"`
	RelationTypeID string `url:"relationTypeId,omitempty"`
	Limit          int    `url:"limit"`
}

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 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 ResourceRef added in v0.0.28

type ResourceRef struct {
	ID                    string `json:"id"`
	ResourceDiscriminator string `json:"resourceDiscriminator"`
}

ResourceRef represents a reference to a resource (user, group, community, etc.) in the API.

type ResourceRole added in v0.0.28

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

ResourceRole represents the role in a responsibility (e.g., Owner, Steward).

type Response

type Response struct {
	Data   *AssetQueryData `json:"data,omitempty"`
	Errors []Error         `json:"errors,omitempty"`
}

type Responsibility added in v0.0.28

type Responsibility struct {
	ID           string        `json:"id"`
	Role         *ResourceRole `json:"role,omitempty"`
	Owner        *ResourceRef  `json:"owner,omitempty"`
	BaseResource *ResourceRef  `json:"baseResource,omitempty"`
	System       bool          `json:"system"`
}

Responsibility represents a single responsibility assignment for an asset.

func GetResponsibilities added in v0.0.28

func GetResponsibilities(ctx context.Context, collibraHttpClient *http.Client, assetID string) ([]Responsibility, error)

GetResponsibilities fetches all responsibilities for the given asset ID, including inherited ones.

type ResponsibilityPagedResponse added in v0.0.28

type ResponsibilityPagedResponse struct {
	Total   int64            `json:"total"`
	Offset  int64            `json:"offset"`
	Limit   int64            `json:"limit"`
	Results []Responsibility `json:"results"`
}

ResponsibilityPagedResponse represents the paginated response from the responsibilities API.

type ResponsibilityQueryParams added in v0.0.28

type ResponsibilityQueryParams struct {
	ResourceIDs      string `url:"resourceIds,omitempty"`
	IncludeInherited bool   `url:"includeInherited,omitempty"`
	Limit            int    `url:"limit,omitempty"`
	Offset           int    `url:"offset,omitempty"`
}

ResponsibilityQueryParams defines the query parameters for the responsibilities API.

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 SearchLineageEntitiesOutput added in v0.0.27

type SearchLineageEntitiesOutput struct {
	Results    []LineageEntity          `json:"results"`
	Pagination *LineagePagination       `json:"pagination,omitempty"`
	Warnings   []LineageResponseWarning `json:"warnings,omitempty"`
}

func SearchLineageEntities added in v0.0.27

func SearchLineageEntities(ctx context.Context, collibraHttpClient *http.Client, nameContains string, entityType string, dgcId string, limit int, cursor string) (*SearchLineageEntitiesOutput, error)

type SearchLineageTransformationsOutput added in v0.0.27

type SearchLineageTransformationsOutput struct {
	Results    []TransformationSummary  `json:"results"`
	Pagination *LineagePagination       `json:"pagination,omitempty"`
	Warnings   []LineageResponseWarning `json:"warnings,omitempty"`
}

func SearchLineageTransformations added in v0.0.27

func SearchLineageTransformations(ctx context.Context, collibraHttpClient *http.Client, nameContains string, limit int, cursor string) (*SearchLineageTransformationsOutput, error)

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

type TransformationSummary added in v0.0.27

type TransformationSummary struct {
	Id          string `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description,omitempty"`
}

type UserGroupResponse added in v0.0.28

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

UserGroupResponse represents the response from the /rest/2.0/userGroups/{groupId} endpoint.

type UserResponse added in v0.0.28

type UserResponse struct {
	ID        string `json:"id"`
	UserName  string `json:"userName"`
	FirstName string `json:"firstName,omitempty"`
	LastName  string `json:"lastName,omitempty"`
}

UserResponse represents the response from the /rest/2.0/users/{userId} endpoint.

Jump to

Keyboard shortcuts

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