clients

package
v0.0.34 Latest Latest
Warning

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

Go to latest
Published: May 21, 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 AddTagsToAsset added in v0.0.32

func AddTagsToAsset(ctx context.Context, client *http.Client, assetID string, tags []string) error

AddTagsToAsset appends one or more tags to an asset without replacing existing tags (incremental, matching the "prefer incremental" AC).

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 DeleteAttribute added in v0.0.32

func DeleteAttribute(ctx context.Context, client *http.Client, attributeID string) error

DeleteAttribute removes a single attribute instance via DELETE /rest/2.0/attributes/{id}.

func DeleteRelation added in v0.0.32

func DeleteRelation(ctx context.Context, client *http.Client, relationID string) error

DeleteRelation removes a relation via DELETE /rest/2.0/relations/{id}.

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 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"`
	StatusID                    string `json:"statusId,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"`
	Status         *CreateAssetStatusRef `json:"status,omitempty"`
	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 CreateAssetStatusRef added in v0.0.33

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

CreateAssetStatusRef is a reference to a status in a create asset response.

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 EditAssetAddTagsRequest added in v0.0.32

type EditAssetAddTagsRequest struct {
	TagNames []string `json:"tagNames"`
}

EditAssetAddTagsRequest is the body for POST /rest/2.0/assets/{id}/tags. Collibra expects the field to be named "tagNames" — sending "tags" is silently ignored by the API and yields a "tagNames may not be null" 400.

type EditAssetAssignment added in v0.0.32

type EditAssetAssignment struct {
	AssetType      EditAssetTypeRef                   `json:"assetType"`
	DomainType     *EditAssetDomainTypeRef            `json:"domainType,omitempty"`
	AttributeTypes []EditAssetAssignmentAttributeType `json:"attributeTypes"`
	RelationTypes  []EditAssetAssignmentRelationType  `json:"relationTypes,omitempty"`
}

EditAssetAssignment is the scoped assignment for a (asset type, domain type) pair — lists which attribute and relation types are valid for assets of this shape. This is the public shape the edit_asset tool consumes; it is built up from Collibra's raw assignment response by GetAssignmentForAssetType.

func GetAssignmentForAssetType added in v0.0.32

func GetAssignmentForAssetType(ctx context.Context, client *http.Client, assetTypeID, domainTypeID string) (*EditAssetAssignment, error)

GetAssignmentForAssetType returns the scoped assignment for an (asset type, domain type) pair, listing valid attribute and relation types. Collibra's endpoint returns an array — typically one entry per matching scope. We merge attribute and relation types across the returned entries; if a domainTypeID was supplied, we filter to entries that match it (when present on the entry), otherwise we use everything returned.

type EditAssetAssignmentAttributeType added in v0.0.32

type EditAssetAssignmentAttributeType struct {
	ID          string                          `json:"id"`
	Name        string                          `json:"name"`
	Kind        string                          `json:"kind,omitempty"`
	Required    bool                            `json:"required,omitempty"`
	Constraints *EditAssetAssignmentConstraints `json:"constraints,omitempty"`
}

EditAssetAssignmentAttributeType is an attribute type allowed by a scoped assignment, with its full name and (optional) constraints.

type EditAssetAssignmentConstraints added in v0.0.32

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

EditAssetAssignmentConstraints captures attribute type constraints used to validate operation values before any writes.

type EditAssetAssignmentRelationType added in v0.0.32

type EditAssetAssignmentRelationType struct {
	ID         string            `json:"id"`
	Role       string            `json:"role"`
	CoRole     string            `json:"coRole,omitempty"`
	SourceType *EditAssetTypeRef `json:"sourceType,omitempty"`
	TargetType *EditAssetTypeRef `json:"targetType,omitempty"`
}

EditAssetAssignmentRelationType is a relation type allowed by a scoped assignment, in the direction where the edited asset is the source (head). Role is the forward name (e.g. "synonym"); CoRole is the reverse name.

type EditAssetAttributeAssetRef added in v0.0.32

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

EditAssetAttributeAssetRef is a reference to the owning asset.

type EditAssetAttributeInstance added in v0.0.32

type EditAssetAttributeInstance struct {
	ID    string                     `json:"id"`
	Type  EditAssetAttributeTypeRef  `json:"type"`
	Asset EditAssetAttributeAssetRef `json:"asset"`
	Value string                     `json:"value"`
}

EditAssetAttributeInstance is a single attribute value on an asset, returned by GET /rest/2.0/attributes?assetId=....

func BulkCreateAttributes added in v0.0.32

func BulkCreateAttributes(ctx context.Context, client *http.Client, items []CreateAttributeRequest) ([]EditAssetAttributeInstance, error)

BulkCreateAttributes creates multiple attribute instances in one round trip via POST /rest/2.0/attributes/bulk. Treated as all-or-nothing: if the whole batch fails, the caller marks every affected op as failed with the batch error. Partial-row failures from Collibra aren't parsed individually.

func BulkPatchAttributes added in v0.0.32

func BulkPatchAttributes(ctx context.Context, client *http.Client, items []EditAssetBulkPatchAttributeItem) ([]EditAssetAttributeInstance, error)

BulkPatchAttributes updates multiple attribute instances in one round trip via PATCH /rest/2.0/attributes/bulk. All-or-nothing, same rationale as BulkCreateAttributes.

func CreateAttributeOnAsset added in v0.0.32

func CreateAttributeOnAsset(ctx context.Context, client *http.Client, assetID, attrTypeID, value string) (*EditAssetAttributeInstance, error)

CreateAttributeOnAsset adds a single attribute instance via POST /rest/2.0/attributes. It mirrors CreateAttribute in create_asset_client.go but returns the richer EditAssetAttributeInstance shape for diff tracking.

func ListAttributesForAsset added in v0.0.32

func ListAttributesForAsset(ctx context.Context, client *http.Client, assetID string) ([]EditAssetAttributeInstance, error)

ListAttributesForAsset fetches all attribute instances on an asset. Pages are followed transparently so the caller gets the full list.

func PatchAttributeValue added in v0.0.32

func PatchAttributeValue(ctx context.Context, client *http.Client, attributeID, value string) (*EditAssetAttributeInstance, error)

PatchAttributeValue updates a single attribute instance's value via PATCH /rest/2.0/attributes/{id}.

func (*EditAssetAttributeInstance) UnmarshalJSON added in v0.0.32

func (a *EditAssetAttributeInstance) UnmarshalJSON(data []byte) error

UnmarshalJSON tolerates `value` fields returned as JSON numbers, booleans, or null. Collibra emits the field with whatever underlying type the attribute kind dictates (NumericAttributeType -> number, BooleanAttributeType -> bool, etc.), so a strict string decode fails when an asset has any non-string attribute. We stringify any scalar and treat null as the empty string; consumers only need a printable representation for diffs and error messages.

type EditAssetAttributeTypeRef added in v0.0.32

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

EditAssetAttributeTypeRef is a reference to an attribute type on an instance.

type EditAssetBulkPatchAttributeItem added in v0.0.32

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

EditAssetBulkPatchAttributeItem is one row of PATCH /rest/2.0/attributes/bulk.

type EditAssetCore added in v0.0.32

type EditAssetCore struct {
	ID          string              `json:"id"`
	Name        string              `json:"name"`
	DisplayName string              `json:"displayName,omitempty"`
	Type        EditAssetTypeRef    `json:"type"`
	Domain      EditAssetDomainRef  `json:"domain"`
	Status      *EditAssetStatusRef `json:"status,omitempty"`
}

EditAssetCore is the slim view of an asset returned by GET /rest/2.0/assets/{id} that the edit_asset tool needs for validation and dispatch.

func GetAssetCore added in v0.0.32

func GetAssetCore(ctx context.Context, client *http.Client, assetID string) (*EditAssetCore, error)

GetAssetCore fetches the core asset shape needed by the edit_asset tool.

func PatchAsset added in v0.0.32

func PatchAsset(ctx context.Context, client *http.Client, assetID string, payload EditAssetPatchRequest) (*EditAssetCore, error)

PatchAsset updates the whitelisted core fields (name, displayName, statusId) on an asset via PATCH /rest/2.0/assets/{id}.

type EditAssetCreateRelationRequest added in v0.0.32

type EditAssetCreateRelationRequest struct {
	SourceID string `json:"sourceId"`
	TargetID string `json:"targetId"`
	TypeID   string `json:"typeId"`
}

EditAssetCreateRelationRequest is the body for POST /rest/2.0/relations.

type EditAssetCreateResponsibilityRequest added in v0.0.32

type EditAssetCreateResponsibilityRequest struct {
	RoleID     string `json:"roleId"`
	OwnerID    string `json:"ownerId"`
	ResourceID string `json:"resourceId"`
}

EditAssetCreateResponsibilityRequest is the body for POST /rest/2.0/responsibilities.

type EditAssetDomainDetails added in v0.0.32

type EditAssetDomainDetails struct {
	ID   string                  `json:"id"`
	Name string                  `json:"name"`
	Type *EditAssetDomainTypeRef `json:"type,omitempty"`
}

EditAssetDomainDetails is the view of a domain that exposes its domain type, returned by GET /rest/2.0/domains/{id}. Needed to scope the assignment.

func GetDomainDetails added in v0.0.32

func GetDomainDetails(ctx context.Context, client *http.Client, domainID string) (*EditAssetDomainDetails, error)

GetDomainDetails fetches a domain including its domain type reference, used to scope the assignment lookup.

type EditAssetDomainRef added in v0.0.32

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

EditAssetDomainRef is a reference to a domain on an asset.

type EditAssetDomainTypeRef added in v0.0.32

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

EditAssetDomainTypeRef is a reference to a domain type.

type EditAssetPatchAttributeRequest added in v0.0.32

type EditAssetPatchAttributeRequest struct {
	Value string `json:"value"`
}

EditAssetPatchAttributeRequest is the body for PATCH /rest/2.0/attributes/{id}.

type EditAssetPatchRequest added in v0.0.32

type EditAssetPatchRequest struct {
	Name        *string `json:"name,omitempty"`
	DisplayName *string `json:"displayName,omitempty"`
	StatusID    *string `json:"statusId,omitempty"`
}

EditAssetPatchRequest is the body for PATCH /rest/2.0/assets/{id} — only the fields allowed by update_property (name, displayName, statusId).

type EditAssetRelation added in v0.0.32

type EditAssetRelation struct {
	ID     string                     `json:"id"`
	Type   EditAssetTypeRef           `json:"type"`
	Source EditAssetAttributeAssetRef `json:"source"`
	Target EditAssetAttributeAssetRef `json:"target"`
}

EditAssetRelation is a relation instance between two assets.

func BulkCreateRelations added in v0.0.32

func BulkCreateRelations(ctx context.Context, client *http.Client, items []EditAssetCreateRelationRequest) ([]EditAssetRelation, error)

BulkCreateRelations creates multiple relations in one round trip via POST /rest/2.0/relations/bulk.

func CreateRelation added in v0.0.32

func CreateRelation(ctx context.Context, client *http.Client, payload EditAssetCreateRelationRequest) (*EditAssetRelation, error)

CreateRelation posts a new relation via POST /rest/2.0/relations. The source asset is the head; target is the tail.

type EditAssetResponsibility added in v0.0.32

type EditAssetResponsibility struct {
	ID         string `json:"id"`
	RoleID     string `json:"roleId,omitempty"`
	OwnerID    string `json:"ownerId,omitempty"`
	ResourceID string `json:"resourceId,omitempty"`
}

EditAssetResponsibility is a responsibility instance linking a role, an owner (user or group), and an asset.

func CreateResponsibility added in v0.0.32

func CreateResponsibility(ctx context.Context, client *http.Client, payload EditAssetCreateResponsibilityRequest) (*EditAssetResponsibility, error)

CreateResponsibility assigns a role to an owner for an asset via POST /rest/2.0/responsibilities. This is incremental — it doesn't replace other responsibilities on the asset.

type EditAssetRole added in v0.0.32

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

EditAssetRole is a resource role (e.g. Steward, Owner) that can be assigned to an asset via responsibilities.

func ListRoles added in v0.0.32

func ListRoles(ctx context.Context, client *http.Client) ([]EditAssetRole, error)

ListRoles returns all resource roles defined in Collibra. Callers use this to resolve a role name (e.g. "Steward") to its UUID before creating a responsibility. The full list is typically small and fits in a single page.

type EditAssetStatus added in v0.0.32

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

EditAssetStatus is a status (e.g. Candidate, Accepted, Obsolete) that can be assigned to an asset via update_property statusId.

func ListStatuses added in v0.0.32

func ListStatuses(ctx context.Context, client *http.Client) ([]EditAssetStatus, error)

ListStatuses returns all asset statuses defined in Collibra. Used to resolve a status name (e.g. "Candidate") to its UUID before patching an asset.

type EditAssetStatusRef added in v0.0.32

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

EditAssetStatusRef is a reference to the asset's status.

type EditAssetTypeRef added in v0.0.32

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

EditAssetTypeRef is a reference to an asset type.

type EditAssetUser added in v0.0.32

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

EditAssetUser is a Collibra user, used to resolve a username or email to the user's UUID before assigning responsibilities.

func FindUserByEmail added in v0.0.32

func FindUserByEmail(ctx context.Context, client *http.Client, email string) (*EditAssetUser, error)

FindUserByEmail returns the first user matching an email address, or nil if none exists.

func FindUserByUsername added in v0.0.32

func FindUserByUsername(ctx context.Context, client *http.Client, username string) (*EditAssetUser, error)

FindUserByUsername returns the first user matching a username, or nil if none exists. Used by set_responsibility to resolve "jane.smith" to a UUID.

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 PrepareCreateAllowedDomainType added in v0.0.33

type PrepareCreateAllowedDomainType struct {
	ID   string
	Name string
}

PrepareCreateAllowedDomainType is one domain type an asset type can be created in. The set is deduped across all of an asset type's assignments (an asset type may be allowed in multiple domain types).

func ListAllowedDomainTypesForAssetType added in v0.0.33

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

ListAllowedDomainTypesForAssetType returns the deduped list of domain type IDs the asset type can be created in, walking the parent chain when needed. Subtypes whose own assignments have empty domainTypes (inherit-sentinel) inherit their parent's allowed types — e.g. Acronym → Business Term → Glossary, Business Asset Domain.

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"`
	Parent   *PrepareCreateAssetType `json:"parent,omitempty"`
}

PrepareCreateAssetType represents an asset type from the API. Parent is populated by /assetTypes/{id} for subtypes (e.g. Acronym → Business Term) and is the key for walking the inheritance chain when the subtype's own scoped-assignment record has empty domainTypes (which Collibra uses as the "inherit from parent" sentinel).

func GetAssetTypeByID added in v0.0.33

func GetAssetTypeByID(ctx context.Context, client *http.Client, id string) (*PrepareCreateAssetType, error)

GetAssetTypeByID resolves an asset type by its UUID. Used as the first resolution strategy in the consolidated create_asset, before falling back to publicId or name search.

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.

func SearchAssetTypesByName added in v0.0.33

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

SearchAssetTypesByName queries /assetTypes?name=… and returns the matches up to the given limit. Collibra performs a case-insensitive substring match server-side, so callers should still verify exact equality if they only want exact matches.

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 PrepareCreateAttributeTypeFull added in v0.0.33

type PrepareCreateAttributeTypeFull struct {
	ID            string   `json:"id"`
	Name          string   `json:"name"`
	PublicID      string   `json:"publicId"`
	Kind          string   `json:"attributeTypeDiscriminator"`
	StringType    string   `json:"stringType,omitempty"`
	Description   string   `json:"description,omitempty"`
	AllowedValues []string `json:"allowedValues,omitempty"`
}

PrepareCreateAttributeTypeFull is the full /attributeTypes/{id} response — includes StringType ("RICH_TEXT", "PLAIN_TEXT", etc.) which write tools use to decide whether to convert Markdown to HTML before submission.

func GetAttributeTypeFull added in v0.0.33

func GetAttributeTypeFull(ctx context.Context, client *http.Client, id string) (*PrepareCreateAttributeTypeFull, error)

GetAttributeTypeFull fetches /attributeTypes/{id} and decodes the full shape including stringType — needed for create_asset / edit_asset to gate Markdown→HTML conversion on RICH_TEXT attributes.

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"`
	Type *PrepareCreateDomainType `json:"type,omitempty"`
}

PrepareCreateDomain represents a domain from the API. Type is populated by the list and detail endpoints, but not by older callers that only decoded {id, name}; tolerate a missing type field there.

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.

func SearchDomainsByName added in v0.0.33

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

SearchDomainsByName queries /domains?name=… and returns the matches up to the given limit. The list endpoint already includes the domain Type in each result, so callers that need to look up a scoped assignment can keep working from the result without an extra GET /domains/{id}.

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 PrepareCreateDomainType added in v0.0.33

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

PrepareCreateDomainType is a reference to a Collibra domain type — the scoped-assignment lookup keys off this ID to find the effective assignment for an asset type in a given domain.

type PrepareCreateScopedAssignment added in v0.0.33

type PrepareCreateScopedAssignment struct {
	AssignmentID string
	Attributes   []PrepareCreateScopedAttribute
	Relations    []PrepareCreateScopedRelation
}

PrepareCreateScopedAssignment is the effective assignment for a given (assetType, domainType) pair: the union of the assignment's attribute slots and the relation slots that apply to assets of this type when created in domains of this type.

func GetScopedAssignment added in v0.0.33

func GetScopedAssignment(ctx context.Context, client *http.Client, assetTypeID, domainTypeID string) (*PrepareCreateScopedAssignment, error)

GetScopedAssignment returns the effective scoped assignment for an (assetType, domainType) pair, walking the asset type's parent chain when needed. Collibra's data model lets a subtype omit domainTypes on its own assignment (signalling "inherit from parent") and contribute its own characteristics on top — see Acronym → Business Term in OOTB glossary. The result here is the union of all chain levels' applicable characteristics, where applicable means the assignment either explicitly lists the target domainTypeID or has empty domainTypes (the inherit-sentinel). At least one level in the chain must explicitly include the target domain type, otherwise we return "not allowed" — empty-domainTypes-everywhere is not the same as "creatable everywhere".

type PrepareCreateScopedAttribute added in v0.0.33

type PrepareCreateScopedAttribute struct {
	AttributeTypeID       string
	AttributeTypeName     string
	AttributeTypePublicID string
	Kind                  string
	Required              bool
	Min                   int
	// Max is nil when there is no upper bound (i.e. unbounded).
	Max *int
}

PrepareCreateScopedAttribute is one attribute slot in a scoped assignment: what attribute type it refers to, whether it's required, and how many instances are allowed. Kind comes from the assignment's resourceDiscriminator (e.g. "StringAttributeType") so it's never empty for valid responses.

type PrepareCreateScopedRelation added in v0.0.33

type PrepareCreateScopedRelation struct {
	RelationTypeID string
	Role           string
	CoRole         string
	// Direction is "SOURCE_TO_TARGET" or "TARGET_TO_SOURCE" — describing
	// which side of the relation the asset being created sits on.
	Direction string
	// TargetType is the asset type on the other side of the relation.
	TargetType *PrepareCreateAssetType
}

PrepareCreateScopedRelation is one relation slot in a scoped assignment.

type PrepareCreateStatus added in v0.0.33

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

PrepareCreateStatus is one Collibra status value (e.g. "Candidate").

func ListStatusesAll added in v0.0.33

func ListStatusesAll(ctx context.Context, client *http.Client) ([]PrepareCreateStatus, error)

ListStatusesAll fetches every status value defined in the instance. Status counts are small (~30) and fit comfortably in a single page; the limit guard is just defensive.

type PrepareCreateStatusListResponse added in v0.0.33

type PrepareCreateStatusListResponse struct {
	Results []PrepareCreateStatus `json:"results"`
	Total   int                   `json:"total"`
}

PrepareCreateStatusListResponse is the paged response for /statuses.

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