Versions in this module Expand all Collapse all v0 v0.6.0 Jun 30, 2023 Changes in this version + const BaseVersion + var AllSupportedTypes = []Type + var ErrEmptyID = errors.New("asset does not have ID") + var ErrEmptyURN = errors.New("asset does not have URN") + var ErrNilAsset = errors.New("nil asset") + var ErrUnknownType = errors.New("unknown type") + func IncreaseMinorVersion(v string) (string, error) + func NewFilterBuilder() *filterBuilder + func ParseVersion(v string) (*semver.Version, error) + type Asset struct + Changelog diff.Changelog + CreatedAt time.Time + Data map[string]interface{} + Description string + ID string + Labels map[string]string + Name string + Owners []user.User + Probes []Probe + Service string + Type Type + URL string + URN string + UpdatedAt time.Time + UpdatedBy user.User + Version string + func (a *Asset) Diff(otherAsset *Asset) (diff.Changelog, error) + func (a *Asset) Patch(patchData map[string]interface{}) + type DiscoveryError struct + Err error + func (err DiscoveryError) Error() string + type DiscoveryRepository interface + DeleteByID func(ctx context.Context, ns *namespace.Namespace, assetID string) error + DeleteByURN func(ctx context.Context, ns *namespace.Namespace, assetURN string) error + Search func(ctx context.Context, cfg SearchConfig) (results []SearchResult, err error) + Suggest func(ctx context.Context, cfg SearchConfig) (suggestions []string, err error) + Upsert func(ctx context.Context, ns *namespace.Namespace, ast *Asset) error + type Filter struct + Data map[string][]string + Offset int + Query string + QueryFields []string + Services []string + Size int + SortBy string + SortDirection string + Types []Type + func (f *Filter) Validate() error + type InvalidError struct + AssetID string + func (err InvalidError) Error() string + type Lineage struct + Edges []LineageEdge + NodeAttrs map[string]NodeAttributes + type LineageDirection string + const LineageDirectionDownstream + const LineageDirectionUpstream + func (dir LineageDirection) IsValid() bool + type LineageEdge struct + Prop map[string]interface{} + Source string + Target string + type LineageGraph []LineageEdge + type LineageNotFoundError struct + URN string + func (err LineageNotFoundError) Error() string + type LineageQuery struct + Direction LineageDirection + Level int + type LineageRepository interface + DeleteByURN func(ctx context.Context, urn string) error + GetGraph func(ctx context.Context, urn string, query LineageQuery) (LineageGraph, error) + Upsert func(ctx context.Context, ns *namespace.Namespace, urn string, ...) error + type NodeAttributes struct + Probes ProbesInfo + type NotFoundError struct + AssetID string + URN string + func (err NotFoundError) Error() string + type Probe struct + AssetURN string + CreatedAt time.Time + ID string + Metadata map[string]interface{} + Status string + StatusReason string + Timestamp time.Time + type ProbesFilter struct + AssetURNs []string + MaxRows int + NewerThan time.Time + OlderThan time.Time + type ProbesInfo struct + Latest Probe + type Repository interface + AddProbe func(ctx context.Context, ns *namespace.Namespace, assetURN string, probe *Probe) error + DeleteByID func(ctx context.Context, id string) error + DeleteByURN func(ctx context.Context, urn string) error + GetAll func(context.Context, Filter) ([]Asset, error) + GetByID func(ctx context.Context, id string) (Asset, error) + GetByURN func(ctx context.Context, urn string) (Asset, error) + GetByVersionWithID func(ctx context.Context, id string, version string) (Asset, error) + GetByVersionWithURN func(ctx context.Context, urn string, version string) (Asset, error) + GetCount func(context.Context, Filter) (int, error) + GetProbes func(ctx context.Context, assetURN string) ([]Probe, error) + GetProbesWithFilter func(ctx context.Context, flt ProbesFilter) (map[string][]Probe, error) + GetTypes func(ctx context.Context, flt Filter) (map[Type]int, error) + GetVersionHistory func(ctx context.Context, flt Filter, id string) ([]Asset, error) + Upsert func(ctx context.Context, ns *namespace.Namespace, ast *Asset) (string, error) + type SearchConfig struct + Filters SearchFilter + MaxResults int + Namespace *namespace.Namespace + Queries map[string]string + RankBy string + Text string + func (s SearchConfig) Validate() error + type SearchFilter = map[string][]string + type SearchResult struct + Data map[string]interface{} + Description string + ID string + Labels map[string]string + Service string + Title string + Type string + URN string + func (sr SearchResult) ToAsset() Asset + type Service struct + func NewService(assetRepository Repository, discoveryRepository DiscoveryRepository, ...) *Service + func (s *Service) AddProbe(ctx context.Context, ns *namespace.Namespace, assetURN string, probe *Probe) error + func (s *Service) DeleteAsset(ctx context.Context, ns *namespace.Namespace, id string) error + func (s *Service) GetAllAssets(ctx context.Context, flt Filter, withTotal bool) ([]Asset, uint32, error) + func (s *Service) GetAssetByID(ctx context.Context, id string) (ast Asset, err error) + func (s *Service) GetAssetByVersion(ctx context.Context, id string, version string) (Asset, error) + func (s *Service) GetAssetVersionHistory(ctx context.Context, flt Filter, id string) ([]Asset, error) + func (s *Service) GetLineage(ctx context.Context, urn string, query LineageQuery) (Lineage, error) + func (s *Service) GetTypes(ctx context.Context, flt Filter) (map[Type]int, error) + func (s *Service) SearchAssets(ctx context.Context, cfg SearchConfig) (results []SearchResult, err error) + func (s *Service) SuggestAssets(ctx context.Context, cfg SearchConfig) (suggestions []string, err error) + func (s *Service) UpsertAsset(ctx context.Context, ns *namespace.Namespace, ast *Asset, ...) (string, error) + func (s *Service) UpsertAssetWithoutLineage(ctx context.Context, ns *namespace.Namespace, ast *Asset) (string, error) + type Type string + const TypeApplication + const TypeDashboard + const TypeFeatureTable + const TypeJob + const TypeModel + const TypeTable + const TypeTopic + func (t Type) IsValid() bool + func (t Type) String() string