clients

package
v0.0.45 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ParallelJdbcAuto       = "AUTO"
	ParallelJdbcAutoColumn = "AUTO_COLUMN"
	ParallelJdbcManual     = "MANUAL"
)

Valid ParallelJdbcMode values (udq-app ParallelJdbcMode enum).

View Source
const (
	PermDqJobCreate       = "DATA_QUALITY_JOB_CREATE"
	PermDqJobRun          = "DATA_QUALITY_JOB_RUN"
	PermDqJobSchedule     = "DATA_QUALITY_JOB_SCHEDULE"
	PermDqJobEdit         = "DATA_QUALITY_JOB_EDIT"
	PermResourceManageAll = "RESOURCE_MANAGE_ALL"
)
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

View Source
var DqFilterOperators = []string{"=", "!=", "<>", ">", ">=", "<", "<=", "LIKE", "IS NULL", "IS NOT NULL"}

DqFilterOperators is the allow-listed set of row-filter operators (the DQ wizard's set). Comparison and LIKE take a value; IS NULL / IS NOT NULL are valueless.

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 BuildDqSourceQuery added in v0.0.45

func BuildDqSourceQuery(in DqSourceQueryInput) string

BuildDqSourceQuery returns the dialect-correct scan SQL, composing column selection, row filter, time-slice (${rd}/${rdEnd}) and sampling — mirroring the wizard exactly.

func CatalogAssetPath added in v0.0.45

func CatalogAssetPath(assetID string) string

CatalogAssetPath returns the catalog deep-link path for an asset (relative to the instance URL).

func CreateAddFromManifestRequest

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

func CreateInitDataContractRequest added in v0.0.38

func CreateInitDataContractRequest(req InitDataContractRequest) (*bytes.Buffer, string, error)

func DefaultMonitorKeys added in v0.0.45

func DefaultMonitorKeys() []string

DefaultMonitorKeys returns the keys of the monitors that are enabled by default.

func DefaultNotificationKeys added in v0.0.45

func DefaultNotificationKeys() []string

DefaultNotificationKeys returns the keys enabled by default.

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 DeleteResponsibility added in v0.0.37

func DeleteResponsibility(ctx context.Context, client *http.Client, responsibilityID string) error

DeleteResponsibility removes a responsibility instance by its ID via DELETE /rest/2.0/responsibilities/{id}.

func DqJobDetailsPath added in v0.0.45

func DqJobDetailsPath(jobName string) string

DqJobDetailsPath returns the Job Details deep-link path for a created job. The DQ SPA route /data-quality/jobs takes the jobName and resolves the latest run itself. It is relative to the Collibra instance base URL (the chip client reaches DGC over an internal URL, so the public host is prepended by the calling surface).

func EnabledMonitorKeys added in v0.0.45

func EnabledMonitorKeys(pm *DqProfileMonitors) []string

EnabledMonitorKeys returns the catalog keys enabled in pm, in catalog order (for display).

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 GetCurrentUserGlobalPermissions added in v0.0.45

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

GetCurrentUserGlobalPermissions returns the invoking user's GLOBAL permission identifiers (e.g. DATA_QUALITY_JOB_CREATE) — GET /rest/2.0/users/current/globalPermissions. NOTE: DQ create/run/schedule are usually granted as CONNECTION-resource permissions, not global ones — use GetDqConnectionPermissions for the DQ preflight; this is kept for global-only checks.

func GetDqConnectionPermissions added in v0.0.45

func GetDqConnectionPermissions(ctx context.Context, collibraHttpClient *http.Client, connectionID string) (global, resource []string, err error)

GetDqConnectionPermissions returns the invoking user's (global, connectionResource) permission identifiers for the given DQ connection — POST /graphql, the same query the DQ UI uses. Check a permission with `HasPermission(global, p) || HasPermission(resource, p)`.

func GetDqDataDistribution added in v0.0.45

func GetDqDataDistribution(ctx context.Context, collibraHttpClient *http.Client, connectionID, dataSourceName, schemaName, tableName, columnName, groupBy string, isDate bool) (json.RawMessage, error)

GetDqDataDistribution wraps the wizard's "Show distribution" / days-with-data helper. WHY INTERNAL: there is no public equivalent — this BFF endpoint runs a live edge query to return the row distribution over a date column, so the agent can show the user which days actually have data before choosing a time-slice / backrun range. GET /rest/dq/internal/v1/explorer/{connId}/data/distribution

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 HasPermission added in v0.0.45

func HasPermission(perms []string, perm string) bool

HasPermission reports whether perm is present in perms (case-insensitive).

func IsAllowedDqFilterOperator added in v0.0.45

func IsAllowedDqFilterOperator(op string) bool

IsAllowedDqFilterOperator reports whether op is one of the allow-listed row-filter operators (case-insensitive, internal whitespace normalized). Anything else is rejected at the tool layer so it can't be spliced into the scan query.

func IsValidDqJobName added in v0.0.45

func IsValidDqJobName(jobName string) bool

IsValidDqJobName reports whether jobName satisfies the DQ server's job-name rules: the dataset-name charset (letters, digits, '.', '-', '_') and no leading hyphen (the server's validJobName check).

func MonitorKeys added in v0.0.45

func MonitorKeys() []string

MonitorKeys returns every valid monitor key, in catalog order.

func NextAvailableDqJobName added in v0.0.45

func NextAvailableDqJobName(base string, existing []string) string

NextAvailableDqJobName mirrors DatasetBll.getDatasetName's suffixing: given the (validated) base "<schema>.<table>" and the existing job names, it returns base when base itself is free, otherwise "base_N" for the smallest positive N whose "base_N" is not taken. First duplicate -> "base_1". Non-numeric "base_x" names are ignored, matching the server.

func NotAllowedMessage added in v0.0.45

func NotAllowedMessage(ctx context.Context, client *http.Client, assetTypeID, assetTypeName, domainName, domainTypeName string) string

NotAllowedMessage explains why an asset type can't be created in a domain, distinguishing "creatable nowhere on this instance" from "not in this domain" without leaking the allowed domain types.

func NotificationKeys added in v0.0.45

func NotificationKeys() []string

NotificationKeys returns every valid notification key, in catalog order.

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

func ResolveAutoDqJobName added in v0.0.45

func ResolveAutoDqJobName(ctx context.Context, collibraHttpClient *http.Client, schemaName, tableName string) (string, error)

ResolveAutoDqJobName produces the collision-free default job name for schema.table using PUBLIC APIs, matching the wizard/server algorithm: validate the base, prefix-search existing jobs, pick the first free name. Returns the resolved name (base or base_N).

func SearchDqJobNames added in v0.0.45

func SearchDqJobNames(ctx context.Context, collibraHttpClient *http.Client, jobNameFilter string) ([]string, error)

SearchDqJobNames returns the job names matching the fuzzy, case-insensitive jobName filter via the PUBLIC GET /rest/dq/1.0/jobs (searchJobs), paging until the results are exhausted. The filter uses SQL LIKE %filter% semantics, so callers must still apply exact prefix logic to the result.

func UnsupportedWizardOptions added in v0.0.45

func UnsupportedWizardOptions(jobType string) []string

UnsupportedWizardOptions lists the data-quality wizard configuration steps the create-DQ-job tools do NOT expose yet, each paired with the default the server applies. Shared by create_data_quality_job (to disclose proactively at the preview step) and create_data_quality_job (to disclose again at preview), so the user is never misled about scope. jobType selects the type-specific entry (Sizing for Pullup, Compute for Pushdown).

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 Answer added in v0.0.43

type Answer struct {
	Type  string `json:"type"`
	Value any    `json:"value,omitempty"`
}

Answer is a typed answer. The concrete shape of Value depends on Type (TEXT/HTML/EXPRESSION → string, NUMBER → number, BOOLEAN → bool, DATE → "yyyy-MM-dd", ITEMS/ASSETS/USERORGROUPS/ATTACHMENTS → arrays). It is carried as-is so every answer type round-trips; the tool layer builds and validates the value per type.

type Assessment added in v0.0.43

type Assessment struct {
	ID                  string              `json:"id"`
	Name                string              `json:"name,omitempty"`
	Status              string              `json:"status,omitempty"` // DRAFT | SUBMITTED | OBSOLETE
	Template            *AssessmentTemplate `json:"template,omitempty"`
	Content             []QuestionAndAnswer `json:"content,omitempty"`
	Asset               *AssessmentRef      `json:"asset,omitempty"`
	AssessmentReview    *AssessmentRef      `json:"assessmentReview,omitempty"`
	Assignees           []Assignee          `json:"assignees,omitempty"`
	Owner               *AssessmentRef      `json:"owner,omitempty"`
	IsVisibleToEveryone *bool               `json:"isVisibleToEveryone,omitempty"`
	CreatedOn           string              `json:"createdOn,omitempty"`
	LastModifiedOn      string              `json:"lastModifiedOn,omitempty"`
	SubmittedOn         string              `json:"submittedOn,omitempty"`
}

Assessment is a conducted assessment. Only the fields chip reads or writes are modelled; unknown fields are ignored on decode.

func CreateAssessment added in v0.0.43

func CreateAssessment(ctx context.Context, client *http.Client, request CreateAssessmentRequest) (*Assessment, error)

CreateAssessment creates a new assessment from a template (POST) and returns the created assessment (including its questions in Content).

func GetAssessment added in v0.0.43

func GetAssessment(ctx context.Context, client *http.Client, id string) (*Assessment, error)

GetAssessment retrieves an assessment by its assessment ID.

func GetAssessmentByReview added in v0.0.43

func GetAssessmentByReview(ctx context.Context, client *http.Client, reviewAssetID string) (*Assessment, error)

GetAssessmentByReview retrieves an assessment by its Assessment Review asset UUID — the bridge from the catalog side to an assessment.

func UpdateAssessment added in v0.0.43

func UpdateAssessment(ctx context.Context, client *http.Client, id string, request UpdateAssessmentRequest) (*Assessment, error)

UpdateAssessment applies a partial update to an assessment (PATCH) and returns the updated assessment.

type AssessmentRef added in v0.0.43

type AssessmentRef struct {
	ID   string `json:"id"`
	Name string `json:"name,omitempty"`
}

AssessmentRef is the {id, name?} shape the API uses for assets, reviews, owners, users, and templates references.

type AssessmentTemplate added in v0.0.43

type AssessmentTemplate struct {
	ID        string         `json:"id"`
	Name      string         `json:"name,omitempty"`
	Version   VersionString  `json:"version,omitempty"`
	Status    string         `json:"status,omitempty"` // DRAFT | PUBLISHED | OBSOLETE
	AssetType *AssessmentRef `json:"assetType,omitempty"`
}

AssessmentTemplate is the (thin) template metadata. It does NOT expose the template's questions — those come from an assessment's Content.

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 GetAssetWithRelations added in v0.0.45

func GetAssetWithRelations(ctx context.Context, collibraHttpClient *http.Client, assetID string) (*Asset, error)

GetAssetWithRelations fetches a single asset (with its first page of incoming/outgoing relations) by UUID string. Thin wrapper over GetAssetSummary for callers that have a string id.

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 Assignee added in v0.0.43

type Assignee struct {
	ID   string `json:"id"`
	Type string `json:"type"` // USER | GROUP
}

Assignee is a user or group assigned to an assessment.

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 Community added in v0.0.38

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

Community is a minimal community reference {id, name}, enough to resolve a community name typed by a user back to the UUID that search filters expect.

func SearchCommunitiesByName added in v0.0.38

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

SearchCommunitiesByName queries /communities?name=… and returns the matches up to the given limit. Collibra performs a case-insensitive substring match server-side, so callers wanting an exact hit should still verify name equality on the result (see search_asset_keyword's resolver).

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 ContextSpecAssetType added in v0.0.40

type ContextSpecAssetType struct {
	PublicId string `json:"publicId"`
	Name     string `json:"name,omitempty"`
}

ContextSpecAssetType is the asset type associated with a Context Specification.

type ContextSpecification added in v0.0.40

type ContextSpecification struct {
	ID             string               `json:"id"`
	Name           string               `json:"name"`
	Description    string               `json:"description,omitempty"`
	AssetType      ContextSpecAssetType `json:"assetType"`
	MappingYaml    string               `json:"mappingYaml"`
	CreatedBy      string               `json:"createdBy"`
	CreatedOn      string               `json:"createdOn"`
	LastModifiedBy string               `json:"lastModifiedBy"`
	LastModifiedOn string               `json:"lastModifiedOn"`
}

ContextSpecification is the full Context Specification resource as returned by the Semantic Blueprint API.

func GetContextSpecification added in v0.0.40

func GetContextSpecification(
	ctx context.Context,
	collibraHttpClient *http.Client,
	contextSpecificationId string,
) (*ContextSpecification, error)

GetContextSpecification calls GET /rest/semanticBlueprint/v1/contextSpecifications/{id}.

type ContextSpecificationPagedResponse added in v0.0.40

type ContextSpecificationPagedResponse struct {
	Total   int                    `json:"total"`
	Results []ContextSpecification `json:"results"`
}

ContextSpecificationPagedResponse is the paged list returned by GET /rest/semanticBlueprint/v1/contextSpecifications.

func ListContextSpecifications added in v0.0.40

func ListContextSpecifications(
	ctx context.Context,
	collibraHttpClient *http.Client,
	assetId, assetTypePublicId string,
	offset, limit int,
) (*ContextSpecificationPagedResponse, error)

ListContextSpecifications calls GET /rest/semanticBlueprint/v1/contextSpecifications.

type CreateAssessmentRequest added in v0.0.43

type CreateAssessmentRequest struct {
	Template               AssessmentRef         `json:"template"`
	Name                   string                `json:"name,omitempty"`
	Asset                  *AssessmentRef        `json:"asset,omitempty"`
	Assignees              []Assignee            `json:"assignees,omitempty"`
	Content                []QuestionIDAndAnswer `json:"content,omitempty"`
	Owner                  *AssessmentRef        `json:"owner,omitempty"`
	Status                 *string               `json:"status,omitempty"`
	IsVisibleToEveryone    *bool                 `json:"isVisibleToEveryone,omitempty"`
	AssessmentReviewDomain *AssessmentRef        `json:"assessmentReviewDomain,omitempty"`
}

CreateAssessmentRequest is the POST body. Only Template is required; provide at least a Name or an Asset.

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.

func (*CreateAttributeResponse) UnmarshalJSON added in v0.0.38

func (r *CreateAttributeResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON tolerates `value` fields returned as JSON numbers, booleans, or null. Collibra emits the field typed by the attribute kind (NumericAttributeType → number, BooleanAttributeType → bool, etc.), so a strict string decode fails even though the write succeeded.

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 CreateDqJobRequest added in v0.0.45

type CreateDqJobRequest struct {
	JobType            string                      `json:"jobType"`
	JobName            string                      `json:"jobName,omitempty"`
	DataLocation       DqDataLocation              `json:"dataLocation"`
	SourceQuery        string                      `json:"sourceQuery,omitempty"`
	RunDate            *DqPublicRunDate            `json:"runDate,omitempty"`
	RunDateEnd         *DqPublicRunDate            `json:"runDateEnd,omitempty"`
	Backrun            *DqPublicBackrun            `json:"backrun,omitempty"`
	JobSettings        *DqPublicJobSettings        `json:"jobSettings,omitempty"`
	MonitoringSettings *DqPublicMonitoringSettings `json:"monitoringSettings,omitempty"`
	Notifications      *DqJobNotifications         `json:"notifications,omitempty"`
	SchedulingSettings *DqSchedulingSettings       `json:"schedulingSettings,omitempty"`
}

CreateDqJobRequest is the body for POST /rest/dq/1.0/jobs — the PUBLIC create (JobDefinitionCreateRequest in dq/udq-app-client/oas/dq-v1-public-oas-spec.yaml). It is the full job definition: sourceQuery (into which column selection, row filter, sampling and the ${rd}/${rdEnd} time-slice predicate are composed — see BuildDqSourceQuery), the runDate window, monitors, schedule, back-run, notifications, and pullup/pushdown settings. Unlike the internal BFF endpoint, the public server is null-tolerant ("provide only the fields you want to override") and auto-generates + auto-increments jobName when it is omitted. queueRun is currently always treated as true server-side (create-only is not yet supported), so it is left at its default and not sent.

type CreateDqJobResponse added in v0.0.45

type CreateDqJobResponse struct {
	JobName      string         `json:"jobName"`
	JobType      string         `json:"jobType"`
	JobRunID     string         `json:"jobRunId"`
	DataLocation DqDataLocation `json:"dataLocation"`
	SourceQuery  string         `json:"sourceQuery,omitempty"`
}

CreateDqJobResponse is the public create response (JobDefinitionCreateResponse): the created job definition plus the queued run id.

func CreateDqJob added in v0.0.45

func CreateDqJob(ctx context.Context, collibraHttpClient *http.Client, request CreateDqJobRequest) (*CreateDqJobResponse, error)

CreateDqJob creates a data-quality job and queues an immediate run.

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 DataContractManifestVersion added in v0.0.38

type DataContractManifestVersion struct {
	Version        string `json:"version"`
	Active         bool   `json:"active"`
	Format         string `json:"format"`
	CreatedBy      string `json:"createdBy"`
	CreatedOn      int64  `json:"createdOn"`
	LastModifiedBy string `json:"lastModifiedBy"`
	LastModifiedOn int64  `json:"lastModifiedOn"`
}

DataContractManifestVersion represents metadata attributes of a data contract version

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 DomainType added in v0.0.38

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

DomainType is a minimal domain-type reference {id, name}. Domain types are a small, enumerable set, so callers list them all and match in memory rather than hitting a name-filtered search per value.

func ListDomainTypes added in v0.0.38

func ListDomainTypes(ctx context.Context, client *http.Client) ([]DomainType, error)

ListDomainTypes fetches every domain type defined in the instance. The set is small (tens of entries in OOTB Collibra), so a single large page suffices.

type DqAdaptiveMonitorSetting added in v0.0.45

type DqAdaptiveMonitorSetting struct {
	Key         string `json:"key"`
	Label       string `json:"label"`
	Description string `json:"description"`
	Default     int    `json:"default"`
}

DqAdaptiveMonitorSetting describes one tunable "Advanced monitor setting" (the adaptive behavior in the Monitors step). Key matches the create_data_quality_job input; Default is the wizard default applied when the user doesn't override.

func DqAdaptiveMonitorSettings added in v0.0.45

func DqAdaptiveMonitorSettings() []DqAdaptiveMonitorSetting

DqAdaptiveMonitorSettings is the catalog of advanced monitor settings to show the user, surfaced alongside the monitor toggles so the agent can offer them explicitly.

type DqColumn added in v0.0.45

type DqColumn struct {
	Name     string `json:"name"`
	Type     string `json:"type"`
	Disabled bool   `json:"disabled"`
}

DqColumn is a column within a table.

func ListDqColumns added in v0.0.45

func ListDqColumns(ctx context.Context, collibraHttpClient *http.Client, siteID, connectionID, dataSourceName, schemaName, tableName string, limit, offset int) ([]DqColumn, error)

ListDqColumns lists columns in a table (live edge query).

type DqConnection added in v0.0.45

type DqConnection struct {
	ConnectionID        string        `json:"connectionId"`
	ConnectionName      string        `json:"connectionName"`
	CapabilityTypes     []string      `json:"capabilityTypes"`
	DatabaseProductName string        `json:"databaseProductName"`
	EdgeSiteID          string        `json:"edgeSiteId"`
	EdgeSiteName        string        `json:"edgeSiteName"`
	SourceType          *DqSourceType `json:"sourceType,omitempty"`
	// SystemAssetID is the DGC System asset this connection ingests from (set via the catalog
	// system-asset config). It is the bridge from a catalog asset back to a DQ connection.
	SystemAssetID string `json:"systemAssetId,omitempty"`
}

DqConnection is a data-quality edge connection as returned by /rest/dq/internal/v1/connections and /connections/{id}. capabilityTypes drives job-type detection: a connection advertises PUSHDOWN, PULLUP, or both.

func GetDqConnection added in v0.0.45

func GetDqConnection(ctx context.Context, collibraHttpClient *http.Client, connectionID string) (*DqConnection, error)

GetDqConnection fetches a single connection by id. The response carries the job-type (capabilityTypes) and the dataLocation fields edgeSiteName, connectionName, and databaseProductName.

func ListDqConnections added in v0.0.45

func ListDqConnections(ctx context.Context, collibraHttpClient *http.Client) ([]DqConnection, error)

ListDqConnections returns all data-quality connections on the instance.

type DqDailySchedule added in v0.0.45

type DqDailySchedule struct {
	DailyOffset string   `json:"dailyOffset"`
	DaysOfWeek  []string `json:"daysOfWeek"`
}

DqDailySchedule drives DAILY/Weekly/Weekdays. daysOfWeek is required (>=1); dailyOffset is the run-date offset (SCHEDULED = the run's own day, ONE_DAY..SEVEN_DAYS = that many days back).

type DqDataLocation added in v0.0.45

type DqDataLocation struct {
	EdgeSiteName        string `json:"edgeSiteName"`
	EdgeConnectionName  string `json:"edgeConnectionName"`
	DataSourceName      string `json:"dataSourceName"`
	SchemaName          string `json:"schemaName"`
	TableName           string `json:"tableName"`
	DatabaseProductName string `json:"databaseProductName,omitempty"`
}

DqDataLocation identifies where a job reads data from. All five fields are required by the create API; databaseProductName is optional/read-only.

type DqDataSource added in v0.0.45

type DqDataSource struct {
	DataSourceName  string `json:"dataSourceName"`
	SupportsSchemas bool   `json:"supportsSchemas"`
	TotalJobs       int    `json:"totalJobs"`
}

DqDataSource is a database/catalog within a connection (e.g. "postgres").

func ListDqDataSources added in v0.0.45

func ListDqDataSources(ctx context.Context, collibraHttpClient *http.Client, connectionID string, limit, offset int) ([]DqDataSource, error)

ListDqDataSources lists the databases/catalogs reachable through a connection.

type DqHourlySchedule added in v0.0.45

type DqHourlySchedule struct {
	HourlyOffset string `json:"hourlyOffset"`
}

DqHourlySchedule drives HOURLY. hourlyOffset: SCHEDULED | ONE_HOUR | TWO_HOURS.

type DqJobNotifications added in v0.0.45

type DqJobNotifications struct {
	NotificationOptions   []DqNotificationOption  `json:"notificationOptions"`
	GlobalMessage         string                  `json:"globalMessage,omitempty"`
	UseIndividualMessages bool                    `json:"useIndividualMessages"`
	Channels              []DqNotificationChannel `json:"channels"`
}

DqJobNotifications is the public `notifications` object (dq-v1-public-oas-spec.yaml JobNotifications). Recipients are delivered via channels (currently EMAIL) carrying platform USERNAMES — not UUIDs. The public schema requires both notificationOptions and channels (>=1) when notifications are configured.

type DqMonitorInfo added in v0.0.45

type DqMonitorInfo struct {
	Key            string `json:"key"`
	Label          string `json:"label"`
	Description    string `json:"description"`
	DefaultEnabled bool   `json:"defaultEnabled"`
}

DqMonitorInfo describes one profile monitor for display and selection. Key matches the DqProfileMonitors JSON field and the create_data_quality_job `monitors` input; DefaultEnabled marks the monitors the wizard turns on by default.

func DqMonitorCatalog added in v0.0.45

func DqMonitorCatalog() []DqMonitorInfo

DqMonitorCatalog is the ordered list of selectable profile monitors with their defaults. Defaults match the DQ wizard: row count, null values, empty values, and uniqueness ON; the numeric/timing monitors OFF; descriptiveStatistics OFF because enabling it UNMASKS sensitive data (the server sets maskSensitive = !descriptiveStatistics in JobMonitorsMapper).

type DqMonthlySchedule added in v0.0.45

type DqMonthlySchedule struct {
	DayNumber     int    `json:"dayNumber,omitempty"`
	MonthlyOffset string `json:"monthlyOffset"`
	MonthlyRepeat string `json:"monthlyRepeat"`
}

DqMonthlySchedule drives MONTHLY. monthlyRepeat FIRST|LAST|DAY (DAY uses dayNumber 1-28); monthlyOffset: SCHEDULED | FIRST_OF_CURRENT_MONTH | FIRST_OF_PRIOR_MONTH | LAST_OF_PRIOR_MONTH.

type DqNotificationChannel added in v0.0.45

type DqNotificationChannel struct {
	Channel    string   `json:"channel"`
	Recipients []string `json:"recipients"`
}

DqNotificationChannel is one delivery channel and its recipients. Channel is EMAIL today; recipients are platform usernames.

type DqNotificationInfo added in v0.0.45

type DqNotificationInfo struct {
	Key              string `json:"key"`
	Label            string `json:"label"`
	NotificationType string `json:"notificationType"`
	DefaultEnabled   bool   `json:"defaultEnabled"`
	TakesQuantity    bool   `json:"takesQuantity"`
	DefaultQuantity  int    `json:"defaultQuantity,omitempty"`
}

DqNotificationInfo describes one selectable notification for display/selection.

func DqNotificationCatalog added in v0.0.45

func DqNotificationCatalog() []DqNotificationInfo

DqNotificationCatalog is the selectable notifications with wizard defaults (Step Notifications): Job failed, Rows<=, Score<=, Run time> ON; Job completed, Runs/Days without data OFF.

type DqNotificationOption added in v0.0.45

type DqNotificationOption struct {
	NotificationType string `json:"notificationType"`
	Enabled          bool   `json:"enabled"`
	Message          string `json:"message,omitempty"`
	Quantity         int    `json:"quantity,omitempty"`
}

DqNotificationOption is one notification rule (→ one AlertCond server-side).

func BuildNotificationOptions added in v0.0.45

func BuildNotificationOptions(enabledKeys []string, quantities map[string]int, messages map[string]string) ([]DqNotificationOption, []string)

BuildNotificationOptions turns enabled keys (case-insensitive) into NotificationOptions. quantities overrides a key's threshold (keyed by lower-case key; <=0 uses the catalog default). messages sets a per-notification message (keyed by lower-case key) that overrides the global message for that one notification — pass nil for none. Unknown keys are returned so the caller can reject them.

type DqParallelJdbcOptions added in v0.0.45

type DqParallelJdbcOptions struct {
	Mode            string `json:"mode"`                      // AUTO | AUTO_COLUMN | MANUAL
	PartitionColumn string `json:"partitionColumn,omitempty"` // only for MANUAL
	PartitionNumber int    `json:"partitionNumber,omitempty"` // required for AUTO_COLUMN and MANUAL
}

DqParallelJdbcOptions is the wizard's "Parallel JDBC" advanced-sizing control (PULLUP). mode is the ParallelJdbcMode enum (udq-app): AUTO (column + partition count both auto), AUTO_COLUMN (column auto, partitionNumber required), MANUAL (partitionColumn + partitionNumber both required). Validator rules (ParallelJdbcOptionsValidator): AUTO needs neither; AUTO_COLUMN needs partitionNumber and no column; MANUAL needs both.

type DqProfileMonitorSettings added in v0.0.45

type DqProfileMonitorSettings struct {
	DataLookback  int `json:"dataLookback"`
	LearningPhase int `json:"learningPhase"`
}

DqProfileMonitorSettings — the "Advanced monitor settings" (adaptive behavior). dataLookback = how many prior runs feed the adaptive baseline (wizard default 10); learningPhase = runs before adaptive monitors start alerting (wizard default 4). Null-safe: JobMonitorsMapper reads it only when non-null. Contract: ProfileMonitorSettings in ui-v1-private-oas-spec.yaml.

type DqProfileMonitors added in v0.0.45

type DqProfileMonitors struct {
	DescriptiveStatistics bool                      `json:"descriptiveStatistics"`
	EmptyFields           bool                      `json:"emptyFields"`
	ExecutionTime         bool                      `json:"executionTime"`
	Max                   bool                      `json:"max"`
	Mean                  bool                      `json:"mean"`
	Min                   bool                      `json:"min"`
	NullValues            bool                      `json:"nullValues"`
	RowCount              bool                      `json:"rowCount"`
	Uniqueness            bool                      `json:"uniqueness"`
	Settings              *DqProfileMonitorSettings `json:"settings,omitempty"`
}

DqProfileMonitors is the monitor-toggle set (the "Monitors" step). Wizard defaults = rowCount/uniqueness/nullValues/emptyFields ON, the rest OFF. BuildProfileMonitors builds it from the selected keys; PublicAdaptiveMonitorsFromProfile maps it onto the public adaptiveMonitors shape.

func BuildProfileMonitors added in v0.0.45

func BuildProfileMonitors(enabledKeys []string) (*DqProfileMonitors, []string)

BuildProfileMonitors turns a set of enabled monitor keys (case-insensitive) into a DqProfileMonitors. Keys not in the catalog are returned in `unknown` so the caller can reject them; the returned monitors reflect only the recognized keys (all others OFF).

type DqPublicAdaptiveMonitorSettings added in v0.0.45

type DqPublicAdaptiveMonitorSettings struct {
	DataLookBack  int `json:"dataLookBack"`
	LearningPhase int `json:"learningPhase"`
}

DqPublicAdaptiveMonitorSettings is the adaptive tuning. NOTE: the public field is dataLookBack (capital B), unlike the internal dataLookback.

type DqPublicAdaptiveMonitors added in v0.0.45

type DqPublicAdaptiveMonitors struct {
	DescriptiveStatistics bool                             `json:"descriptiveStatistics"`
	EmptyFields           bool                             `json:"emptyFields"`
	ExecutionTime         bool                             `json:"executionTime"`
	Max                   bool                             `json:"max"`
	Mean                  bool                             `json:"mean"`
	Min                   bool                             `json:"min"`
	NullValues            bool                             `json:"nullValues"`
	RowCount              bool                             `json:"rowCount"`
	Uniqueness            bool                             `json:"uniqueness"`
	Settings              *DqPublicAdaptiveMonitorSettings `json:"settings,omitempty"`
}

DqPublicAdaptiveMonitors mirrors the public AdaptiveMonitors — the same toggle set as the internal profileMonitors. settings holds the adaptive lookback/learning tuning.

func PublicAdaptiveMonitorsFromProfile added in v0.0.45

func PublicAdaptiveMonitorsFromProfile(pm *DqProfileMonitors) *DqPublicAdaptiveMonitors

PublicAdaptiveMonitorsFromProfile maps the (shared) DqProfileMonitors toggle set onto the public AdaptiveMonitors shape, so callers keep using BuildProfileMonitors for the monitor selection.

type DqPublicBackrun added in v0.0.45

type DqPublicBackrun struct {
	TimeBin  string `json:"timeBin"` // DAY | MONTH | YEAR
	BinValue int    `json:"binValue"`
}

DqPublicBackrun is the public Backrun: presence enables it (no `enabled` flag); binValue >= 1.

type DqPublicJobSettings added in v0.0.45

type DqPublicJobSettings struct {
	DateFormat       string                    `json:"dateFormat,omitempty"` // DATE | TIMESTAMP
	PushdownSettings *DqPublicPushdownSettings `json:"pushdownSettings,omitempty"`
	PullupSettings   *DqPublicPullupSettings   `json:"pullupSettings,omitempty"`
}

DqPublicJobSettings is jobSettings: the run-date dateFormat plus the type-specific tuning.

type DqPublicLoadOptions added in v0.0.45

type DqPublicLoadOptions struct {
	NumPartitions       int                    `json:"numPartitions"`
	ParallelJdbcOptions *DqParallelJdbcOptions `json:"parallelJdbcOptions,omitempty"`
}

DqPublicLoadOptions mirrors the public LoadOptions (numPartitions 0 = let Spark decide).

type DqPublicMonitoringSettings added in v0.0.45

type DqPublicMonitoringSettings struct {
	AdaptiveMonitors *DqPublicAdaptiveMonitors `json:"adaptiveMonitors,omitempty"`
}

DqPublicMonitoringSettings is monitoringSettings (currently only adaptive monitors).

type DqPublicPullupSettings added in v0.0.45

type DqPublicPullupSettings struct {
	LoadOptions        *DqPublicLoadOptions    `json:"loadOptions,omitempty"`
	SparkJobSizing     *DqPublicSparkJobSizing `json:"sparkJobSizing,omitempty"`
	SparkSqlProperties map[string]string       `json:"sparkSqlProperties,omitempty"`
}

DqPublicPullupSettings is the Pullup tuning. Omitting sparkJobSizing = automatic sizing (the public API has no autoSizing flag — absence means auto).

type DqPublicPushdownSettings added in v0.0.45

type DqPublicPushdownSettings struct {
	Connections int `json:"connections,omitempty"`
	Threads     int `json:"threads,omitempty"`
}

DqPublicPushdownSettings is the Pushdown compute (source-system concurrency).

type DqPublicRunDate added in v0.0.45

type DqPublicRunDate struct {
	Kind  string `json:"kind"`
	Value string `json:"value"`
}

DqPublicRunDate is the discriminated runDate/runDateEnd value ({kind, value}) from the public spec. kind=DATE => value is yyyy-MM-dd; kind=TIMESTAMP => value is RFC3339 (yyyy-MM-ddTHH:mm:ssZ). The engine substitutes ${rd}/${rdEnd} in sourceQuery from these per run (formatted per jobSettings.dateFormat).

type DqPublicSparkJobSizing added in v0.0.45

type DqPublicSparkJobSizing struct {
	NumExecutors     int `json:"numExecutors,omitempty"`
	DriverCores      int `json:"driverCores,omitempty"`
	NumExecutorCores int `json:"numExecutorCores,omitempty"`
	ExecutorMemoryGb int `json:"executorMemoryGb,omitempty"`
	DriverMemoryGb   int `json:"driverMemoryGb,omitempty"`
	MemoryOverheadGb int `json:"memoryOverheadGb,omitempty"`
}

DqPublicSparkJobSizing is manual Spark sizing; memory fields are INTEGER GB (SparkMemoryGB). Send this object only for manual sizing — omit it for automatic sizing.

type DqScheduleInput added in v0.0.45

type DqScheduleInput struct {
	Repeat        string   // NEVER (default) | HOURLY | DAILY | WEEKLY | WEEKDAYS | MONTHLY
	RunTime       string   // HH:mm[:ss] UTC; defaults to 00:00:00
	DaysOfWeek    []string // for WEEKLY
	DayOfMonth    int      // for MONTHLY DAY mode (1-28)
	MonthlyMode   string   // for MONTHLY: DAY (default) | FIRST | LAST
	RunDateOffset string   // mode-specific offset; defaults to SCHEDULED
}

DqScheduleInput is the friendly schedule request that BuildSchedulingSettings validates and maps onto the API's mode-specific sub-objects.

type DqSchedulingSettings added in v0.0.45

type DqSchedulingSettings struct {
	SchedulerMode    string             `json:"schedulerMode"`
	ScheduledRunTime string             `json:"scheduledRunTime"`
	IsActive         bool               `json:"isActive"`
	Daily            *DqDailySchedule   `json:"daily,omitempty"`
	Hourly           *DqHourlySchedule  `json:"hourly,omitempty"`
	Monthly          *DqMonthlySchedule `json:"monthly,omitempty"`
}

DqSchedulingSettings — schedulerMode HOURLY/DAILY/MONTHLY + scheduledRunTime (HH:mm:ss UTC), plus the mode-specific sub-object the server's SchedulingSettingsMapper requires:

  • DAILY (also Weekly/Weekdays): daily.daysOfWeek + daily.dailyOffset
  • HOURLY: hourly.hourlyOffset
  • MONTHLY: monthly.{monthlyRepeat, dayNumber, monthlyOffset}

The mapper dereferences these sub-objects unguarded, so the chosen mode's sub-object MUST be populated. The *Offset enums set the run-date offset that drives ${rd}/${rdEnd} per run.

func BuildSchedulingSettings added in v0.0.45

func BuildSchedulingSettings(in DqScheduleInput) (*DqSchedulingSettings, error)

BuildSchedulingSettings validates the friendly schedule input and maps it onto the API shape. Returns (nil, nil) for NEVER/empty (run once now), the populated settings on success, or a descriptive error the caller can surface as needs_input.

type DqSchema added in v0.0.45

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

DqSchema is a schema within a data source.

func ListDqSchemas added in v0.0.45

func ListDqSchemas(ctx context.Context, collibraHttpClient *http.Client, siteID, connectionID, dataSourceName string, limit, offset int) ([]DqSchema, error)

ListDqSchemas lists schemas in a data source (live edge query).

type DqSourceQueryInput added in v0.0.45

type DqSourceQueryInput struct {
	DatabaseProduct     string // e.g. POSTGRES (connection.databaseProductName)
	SchemaName          string
	TableName           string
	SelectedColumns     []string
	FilterColumn        string
	FilterOperator      string
	FilterValue         string
	TimeSliceColumn     string
	TimeSliceColumnCast string // optional explicit cast expression
	TimeSliceColumnType string // optional source type (drives ATHENA/TRINO/ORACLE casts)
	RunDateFormat       string // "DATE" (default) | "TIMESTAMP"
	SampleSize          int
}

DqSourceQueryInput is everything needed to build the scan query. Filter is enabled when FilterColumn+FilterOperator are set; time-slice when TimeSliceColumn is set; sampling when SampleSize > 0. SelectedColumns empty => SELECT *.

type DqSourceType added in v0.0.45

type DqSourceType struct {
	Provider string `json:"provider"`
	Type     string `json:"type"`
}

type DqTable added in v0.0.45

type DqTable struct {
	Name string `json:"name"`
	Type string `json:"type"`
}

DqTable is a table within a schema.

func ListDqTables added in v0.0.45

func ListDqTables(ctx context.Context, collibraHttpClient *http.Client, siteID, connectionID, dataSourceName, schemaName string, limit, offset int) ([]DqTable, error)

ListDqTables lists tables in a schema (live edge query).

type DqTableAssetLocation added in v0.0.45

type DqTableAssetLocation struct {
	TableAssetID   string
	SystemAssetID  string
	ConnectionID   string
	ConnectionName string
	EdgeSiteName   string
	DataSourceName string
	SchemaName     string
	TableName      string
}

DqTableAssetLocation is a catalog Table asset resolved to its DQ data location.

func ResolveDqLocationFromTableAsset added in v0.0.45

func ResolveDqLocationFromTableAsset(ctx context.Context, collibraHttpClient *http.Client, tableAssetID string) (*DqTableAssetLocation, error)

ResolveDqLocationFromTableAsset maps a DGC catalog Table asset to the DQ connection/dataSource/ schema/table that backs it. It walks the catalog hierarchy up from the table (Table -> Schema -> Database -> System) via incoming relations, then matches the DQ connection whose systemAssetId equals the table's System ancestor — the same mapping DQ uses for its own catalog asset links (so if asset links work from DQ, this resolves).

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 lists which attribute and relation types are valid for an asset. This is the public shape the edit_asset tool consumes; it is built from Collibra's raw assignment response by GetEffectiveAssignmentForAsset.

func GetEffectiveAssignmentForAsset added in v0.0.38

func GetEffectiveAssignmentForAsset(ctx context.Context, client *http.Client, assetID string) (*EditAssetAssignment, error)

GetEffectiveAssignmentForAsset returns the assignment Collibra resolves for an asset via GET /assignments/asset/{assetId} — asset-type and domain inheritance are handled server-side.

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"`
	Reversed   bool              `json:"reversed,omitempty"`
}

EditAssetAssignmentRelationType is a relation type allowed by a scoped assignment. Role is the forward name (source→target); CoRole is the inverse name (target→source). Reversed is true when the edited asset is the tail (target) of this relation — add_relation must then flip source and target when calling the API.

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"`
	ResourceType string `json:"resourceType"`
}

EditAssetCreateResponsibilityRequest is the body for POST /rest/2.0/responsibilities. resourceType is required alongside resourceId; without it the API rejects the request with a 400 (addResourceMemberIncompleteParameters).

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 user with the given email address, or nil if none exists. It uses the dedicated exact-match endpoint; the list endpoint has no email filter, so an unknown `emailAddress` query param is silently ignored and would return an arbitrary user.

func FindUserByUsername added in v0.0.32

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

FindUserByUsername returns the user whose username exactly matches, or nil if none exists. The /rest/2.0/users `name` filter is a loose partial search over username, first name and last name, so we scan the results for an exact (case-insensitive) username match rather than trusting the first row — otherwise an unrelated user could be returned and bound.

func GetCurrentUser added in v0.0.45

func GetCurrentUser(ctx context.Context, client *http.Client) (*EditAssetUser, error)

GetCurrentUser returns the invoking user (GET /rest/2.0/users/current) — the default notification recipient.

type Error

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

type GenerateContextResult added in v0.0.40

type GenerateContextResult struct {
	Content  string
	Metadata *GeneratedContextMetadata
}

GenerateContextResult carries the output of a context generation call. When includeMetadata is false, only Content is populated (raw YAML). When includeMetadata is true, Content is inside Metadata.Content and the full Metadata struct is populated.

func GenerateContext added in v0.0.40

func GenerateContext(
	ctx context.Context,
	collibraHttpClient *http.Client,
	assetId, contextSpecificationId string,
	includeMetadata bool,
) (*GenerateContextResult, error)

GenerateContext calls POST /rest/contextEngine/v1/contexts/generate. When includeMetadata is false the raw YAML is returned in Result.Content. When includeMetadata is true the JSON envelope is returned in Result.Metadata.

type GeneratedContextMetadata added in v0.0.40

type GeneratedContextMetadata struct {
	AssetId                  string               `json:"assetId"`
	ContextSpecificationId   string               `json:"contextSpecificationId"`
	ContextSpecificationName string               `json:"contextSpecificationName"`
	AssetType                ContextSpecAssetType `json:"assetType"`
	Content                  string               `json:"content"`
	GeneratedOn              string               `json:"generatedOn"`
}

GeneratedContextMetadata is the JSON envelope returned when includeMetadata=true.

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 InitDataContractRequest added in v0.0.38

type InitDataContractRequest struct {
	GovernedAssetID string
	Manifest        string
	ManifestID      string
	Version         string
	Name            string
	DomainID        string
}

InitDataContractRequest represents the request parameters for initializing a data contract

type InitDataContractResponse added in v0.0.38

type InitDataContractResponse struct {
	ID              string                      `json:"id"`
	Name            string                      `json:"name"`
	ManifestID      string                      `json:"manifestId"`
	DomainName      string                      `json:"domainName"`
	DomainID        string                      `json:"domainId"`
	ActiveVersion   string                      `json:"activeVersion"`
	ManifestVersion DataContractManifestVersion `json:"manifestVersion"`
}

InitDataContractResponse represents the metadata for the newly created data contract version

func InitDataContract added in v0.0.38

func InitDataContract(ctx context.Context, collibraHttpClient *http.Client, reqParams InitDataContractRequest) (*InitDataContractResponse, error)

func ParseInitDataContractResponse added in v0.0.38

func ParseInitDataContractResponse(jsonData []byte) (*InitDataContractResponse, error)

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 ListAssessmentsParams added in v0.0.43

type ListAssessmentsParams struct {
	Name             string `url:"name,omitempty"`
	Status           string `url:"status,omitempty"`
	TemplateID       string `url:"templateId,omitempty"`
	TemplateVersion  string `url:"templateVersion,omitempty"`
	AssetID          string `url:"assetId,omitempty"`
	LastModifiedFrom string `url:"lastModifiedFrom,omitempty"`
	LastModifiedTo   string `url:"lastModifiedTo,omitempty"`
	Limit            int    `url:"limit,omitempty"`
	Cursor           string `url:"cursor,omitempty"`
}

ListAssessmentsParams are the query filters for listing assessments. All are optional and combine.

type ListTemplatesParams added in v0.0.43

type ListTemplatesParams struct {
	Name              string `url:"name,omitempty"`
	Status            string `url:"status,omitempty"`
	AssetTypeID       string `url:"assetTypeId,omitempty"`
	LatestVersionOnly *bool  `url:"latestVersionOnly,omitempty"`
	Limit             int    `url:"limit,omitempty"`
	Cursor            string `url:"cursor,omitempty"`
}

ListTemplatesParams are the query filters for listing templates.

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 PagedAssessments added in v0.0.43

type PagedAssessments struct {
	NextCursor string       `json:"nextCursor,omitempty"`
	Results    []Assessment `json:"results"`
}

PagedAssessments is a cursor-paged list of assessments.

func ListAssessments added in v0.0.43

func ListAssessments(ctx context.Context, client *http.Client, params ListAssessmentsParams) (*PagedAssessments, error)

ListAssessments lists assessments matching the given filters. Used to resolve an assessment from the asset it was conducted on (AssetID filter).

type PagedResponseDataClassificationMatch

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

type PagedTemplates added in v0.0.43

type PagedTemplates struct {
	NextCursor string               `json:"nextCursor,omitempty"`
	Results    []AssessmentTemplate `json:"results"`
}

PagedTemplates is a cursor-paged list of templates.

func ListTemplates added in v0.0.43

func ListTemplates(ctx context.Context, client *http.Client, params ListTemplatesParams) (*PagedTemplates, error)

ListTemplates lists assessment templates matching the given filters.

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.

func ListAllowedDomainTypesForAssetType added in v0.0.33

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

ListAllowedDomainTypesForAssetType returns the deduped domain types of the first hierarchy level that has any assignment — the same level GetScopedAssignment resolves against.

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} and drives the walk up the type hierarchy when locating the level that carries assignments.

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 PrepareCreateComplexRelationLeg added in v0.0.43

type PrepareCreateComplexRelationLeg struct {
	Role                 string
	CoRole               string
	RelationTypePublicID string
	AssetTypeID          string
	AssetTypeName        string
	Min                  int
	Max                  *int
}

PrepareCreateComplexRelationLeg is one leg of a complex relation type.

type PrepareCreateComplexRelationTypeFull added in v0.0.43

type PrepareCreateComplexRelationTypeFull struct {
	ID       string
	PublicID string
	Legs     []PrepareCreateComplexRelationLeg
}

PrepareCreateComplexRelationTypeFull is the subset of the /complexRelationTypes/{id} response we need. Unlike a simple relation type, a complex relation type has two or more legs, each with its own role and asset type, so there is no single role/coRole.

func GetComplexRelationTypeFull added in v0.0.43

func GetComplexRelationTypeFull(ctx context.Context, client *http.Client, id string) (*PrepareCreateComplexRelationTypeFull, error)

GetComplexRelationTypeFull fetches a complex relation type's legs from /rest/2.0/complexRelationTypes/{id}. Complex relation type ids are not resolvable via /relationTypes/{id} (that endpoint 404s for them), so relation slots whose Kind is "ComplexRelationType" hydrate here instead.

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 PrepareCreateRelationTypeFull added in v0.0.43

type PrepareCreateRelationTypeFull struct {
	ID         string                  `json:"id"`
	PublicID   string                  `json:"publicId"`
	Role       string                  `json:"role"`
	CoRole     string                  `json:"coRole"`
	SourceType *PrepareCreateAssetType `json:"sourceType"`
	TargetType *PrepareCreateAssetType `json:"targetType"`
}

PrepareCreateRelationTypeFull is the subset of the /relationTypes/{id} response we need. role/coRole and the two leg types only exist on the relation type resource, not on the assignment reference, so relation slots are hydrated with them separately.

func GetRelationTypeFull added in v0.0.43

func GetRelationTypeFull(ctx context.Context, client *http.Client, id string) (*PrepareCreateRelationTypeFull, error)

GetRelationTypeFull fetches a relation type's role, coRole, and leg types from /rest/2.0/relationTypes/{id}. These are not part of the assignment payload, so relation slots are hydrated with them per id.

type PrepareCreateScopedAssignment added in v0.0.33

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

func GetScopedAssignment added in v0.0.33

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

GetScopedAssignment resolves the single assignment that governs creating an asset of the given type in the given domain: walk up to the first asset-type level that has assignments, select one by scope tier (domain-direct > community > global), then gate on the domain type.

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
	RelationTypePublicID string
	Kind                 string
	Role                 string
	CoRole               string
	// Direction is "TO_TARGET" or "TO_SOURCE" — describing which side of the
	// relation the asset being created sits on (TO_TARGET means it is the
	// source leg and the relation points out to the target).
	Direction  string
	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 QuestionAndAnswer added in v0.0.43

type QuestionAndAnswer struct {
	ID          string  `json:"id"`
	Name        string  `json:"name,omitempty"`
	Description string  `json:"description,omitempty"`
	Answer      *Answer `json:"answer,omitempty"`
	Comments    string  `json:"comments,omitempty"`
}

QuestionAndAnswer is one question plus its current answer, as returned by GET.

type QuestionIDAndAnswer added in v0.0.43

type QuestionIDAndAnswer struct {
	ID       string  `json:"id"`
	Answer   *Answer `json:"answer,omitempty"`
	Comments *string `json:"comments,omitempty"`
}

QuestionIDAndAnswer is the write shape: a question id and the answer to set.

type RecipientResolution added in v0.0.45

type RecipientResolution struct {
	UserIDs    []string
	Usernames  []string
	Unresolved []string
}

RecipientResolution is the outcome of resolving notification recipients to active users. UserIDs and Usernames are positionally aligned (same resolved user); Usernames feed the public notification channels (which take usernames), UserIDs are kept for callers that need the UUID.

func ResolveNotificationRecipients added in v0.0.45

func ResolveNotificationRecipients(ctx context.Context, client *http.Client, recipients []string) (RecipientResolution, error)

ResolveNotificationRecipients resolves each username/email to an active user's UUID. An entry containing '@' is looked up by email, otherwise by username. Not-found or disabled accounts land in Unresolved (the list endpoint excludes disabled users and the email lookup 404s), so the caller can warn and decide whether to proceed without them. Duplicates are de-duped.

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 TableAssetMatch added in v0.0.45

type TableAssetMatch struct {
	ID          string
	DisplayName string
	FullName    string
	DomainName  string
}

TableAssetMatch is a catalog Table asset candidate from a by-name lookup.

func FindTableAssetsByName added in v0.0.45

func FindTableAssetsByName(ctx context.Context, collibraHttpClient *http.Client, name string, limit int) ([]TableAssetMatch, error)

FindTableAssetsByName looks up catalog Table assets by exact signifier (displayName) via the public assets API (GET /rest/2.0/assets) — no search index required. Returns all matches so the caller can disambiguate.

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 UpdateAssessmentRequest added in v0.0.43

type UpdateAssessmentRequest struct {
	Name                   *string               `json:"name,omitempty"`
	Status                 *string               `json:"status,omitempty"`
	Owner                  *AssessmentRef        `json:"owner,omitempty"`
	Assignees              []Assignee            `json:"assignees,omitempty"`
	Content                []QuestionIDAndAnswer `json:"content,omitempty"`
	IsVisibleToEveryone    *bool                 `json:"isVisibleToEveryone,omitempty"`
	AssessmentReviewDomain *AssessmentRef        `json:"assessmentReviewDomain,omitempty"`
}

UpdateAssessmentRequest is the PATCH body. All fields optional (partial update); nil/omitted fields are left unchanged.

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.

type VersionString added in v0.0.43

type VersionString string

VersionString holds a template version, which the API sends as a JSON number (e.g. 8) but occasionally as a string. It is a string type so the generated output schema ("string") matches the marshaled value; UnmarshalJSON accepts either form. Using json.Number here caused a schema/wire mismatch — the schema said "string" (json.Number's underlying kind) while it marshaled as a bare number, failing output validation.

func (*VersionString) UnmarshalJSON added in v0.0.43

func (v *VersionString) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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