Documentation
¶
Index ¶
- func Deref(s *string) string
- func FormatAssetName(a asset.Asset) string
- type APIError
- type AssetOwnerEntry
- type AssetsSearchResponse
- type Client
- func (c *Client) AddTag(ctx context.Context, assetID, tag string) error
- func (c *Client) CreateAPIKey(ctx context.Context, name string) (*user.APIKey, error)
- func (c *Client) CreateGlossaryTerm(ctx context.Context, req CreateTermRequest) (*glossary.GlossaryTerm, error)
- func (c *Client) DeleteAPIKey(ctx context.Context, id string) error
- func (c *Client) DeleteAsset(ctx context.Context, id string) error
- func (c *Client) DeleteGlossaryTerm(ctx context.Context, id string) error
- func (c *Client) GetAsset(ctx context.Context, id string) (*asset.Asset, error)
- func (c *Client) GetAssetLineage(ctx context.Context, assetID string, depth int) (*lineage.LineageResponse, error)
- func (c *Client) GetAssetLineageRaw(ctx context.Context, assetID string, depth int) ([]byte, error)
- func (c *Client) GetAssetRaw(ctx context.Context, id string) ([]byte, error)
- func (c *Client) GetAssetSummary(ctx context.Context) (*asset.AssetSummary, error)
- func (c *Client) GetAssetSummaryRaw(ctx context.Context) ([]byte, error)
- func (c *Client) GetAssetsByProvider(ctx context.Context) ([]byte, error)
- func (c *Client) GetAssetsByType(ctx context.Context) ([]byte, error)
- func (c *Client) GetCurrentUser(ctx context.Context) (*user.User, error)
- func (c *Client) GetCurrentUserRaw(ctx context.Context) ([]byte, error)
- func (c *Client) GetGlossaryTerm(ctx context.Context, id string) (*glossary.GlossaryTerm, error)
- func (c *Client) GetGlossaryTermRaw(ctx context.Context, id string) ([]byte, error)
- func (c *Client) GetMetrics(ctx context.Context, start, end time.Time) ([]byte, error)
- func (c *Client) GetReindexStatus(ctx context.Context) (*ReindexStatus, error)
- func (c *Client) GetRun(ctx context.Context, id string) (*plugin.Run, error)
- func (c *Client) GetRunEntities(ctx context.Context, id string, limit, offset int) (*RunEntitiesResponse, error)
- func (c *Client) GetRunEntitiesRaw(ctx context.Context, id string, limit, offset int) ([]byte, error)
- func (c *Client) GetRunRaw(ctx context.Context, id string) ([]byte, error)
- func (c *Client) GetTeam(ctx context.Context, id string) (*team.Team, error)
- func (c *Client) GetTeamRaw(ctx context.Context, id string) ([]byte, error)
- func (c *Client) GetTopAssets(ctx context.Context, start, end time.Time, limit int) ([]byte, error)
- func (c *Client) GetTopQueries(ctx context.Context, start, end time.Time, limit int) ([]byte, error)
- func (c *Client) GetTotalAssets(ctx context.Context) ([]byte, error)
- func (c *Client) GetUser(ctx context.Context, id string) (*user.User, error)
- func (c *Client) GetUserRaw(ctx context.Context, id string) ([]byte, error)
- func (c *Client) ListAPIKeys(ctx context.Context) ([]user.APIKey, error)
- func (c *Client) ListAPIKeysRaw(ctx context.Context) ([]byte, error)
- func (c *Client) ListAssetOwners(ctx context.Context, assetID string) ([]AssetOwnerEntry, error)
- func (c *Client) ListAssetOwnersRaw(ctx context.Context, assetID string) ([]byte, error)
- func (c *Client) ListAssets(ctx context.Context, query string, limit, offset int, ...) (*AssetsSearchResponse, error)
- func (c *Client) ListAssetsRaw(ctx context.Context, query string, limit, offset int, ...) ([]byte, error)
- func (c *Client) ListGlossaryTerms(ctx context.Context, limit, offset int) (*GlossaryListResponse, error)
- func (c *Client) ListGlossaryTermsRaw(ctx context.Context, limit, offset int) ([]byte, error)
- func (c *Client) ListRuns(ctx context.Context, pipelines, statuses []string, limit, offset int) (*RunsListResponse, error)
- func (c *Client) ListRunsRaw(ctx context.Context, pipelines, statuses []string, limit, offset int) ([]byte, error)
- func (c *Client) ListTeamMembers(ctx context.Context, teamID string) ([]team.TeamMemberWithUser, error)
- func (c *Client) ListTeamMembersRaw(ctx context.Context, teamID string) ([]byte, error)
- func (c *Client) ListTeams(ctx context.Context, limit, offset int) (*TeamsListResponse, error)
- func (c *Client) ListTeamsRaw(ctx context.Context, limit, offset int) ([]byte, error)
- func (c *Client) ListUsers(ctx context.Context, limit, offset int) (*UsersListResponse, error)
- func (c *Client) ListUsersRaw(ctx context.Context, limit, offset int) ([]byte, error)
- func (c *Client) RemoveTag(ctx context.Context, assetID, tag string) error
- func (c *Client) Search(ctx context.Context, query string, types []string, limit, offset int) (*SearchResponse, error)
- func (c *Client) SearchGlossaryTerms(ctx context.Context, query string, limit, offset int) (*GlossaryListResponse, error)
- func (c *Client) SearchGlossaryTermsRaw(ctx context.Context, query string, limit, offset int) ([]byte, error)
- func (c *Client) SearchRaw(ctx context.Context, query string, types []string, limit, offset int) ([]byte, error)
- func (c *Client) StartReindex(ctx context.Context) (*ReindexStatus, error)
- func (c *Client) UpdateGlossaryTerm(ctx context.Context, id string, req UpdateTermRequest) (*glossary.GlossaryTerm, error)
- type CreateTermRequest
- type GlossaryListResponse
- type MetricsSummary
- type ReindexStatus
- type RunEntitiesResponse
- type RunsListResponse
- type SearchResponse
- type SearchResult
- type TeamsListResponse
- type TopAssetEntry
- type TopQueryEntry
- type UpdateTermRequest
- type UsersListResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatAssetName ¶
FormatAssetName returns the display name for an asset.
Types ¶
type AssetOwnerEntry ¶
type AssetOwnerEntry struct {
ID string `json:"id"`
Name string `json:"name"`
Type string `json:"type"`
Username *string `json:"username,omitempty"`
Email *string `json:"email,omitempty"`
ProfilePicture *string `json:"profile_picture,omitempty"`
}
AssetOwnerEntry represents an owner of an asset.
type AssetsSearchResponse ¶
type AssetsSearchResponse struct {
Assets []asset.Asset `json:"assets"`
Total int `json:"total"`
Limit int `json:"limit"`
Offset int `json:"offset"`
AvailableFilters asset.AvailableFilters `json:"available_filters"`
}
AssetsSearchResponse represents the response from the assets search endpoint.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a lightweight HTTP client for the Marmot API.
func (*Client) CreateAPIKey ¶
CreateAPIKey creates a new API key.
func (*Client) CreateGlossaryTerm ¶
func (c *Client) CreateGlossaryTerm(ctx context.Context, req CreateTermRequest) (*glossary.GlossaryTerm, error)
CreateGlossaryTerm creates a new glossary term.
func (*Client) DeleteAPIKey ¶
DeleteAPIKey deletes an API key by ID.
func (*Client) DeleteAsset ¶
DeleteAsset deletes an asset by ID.
func (*Client) DeleteGlossaryTerm ¶
DeleteGlossaryTerm deletes a glossary term by ID.
func (*Client) GetAssetLineage ¶
func (c *Client) GetAssetLineage(ctx context.Context, assetID string, depth int) (*lineage.LineageResponse, error)
GetAssetLineage retrieves the lineage graph for an asset.
func (*Client) GetAssetLineageRaw ¶
GetAssetLineageRaw retrieves the lineage graph as raw JSON.
func (*Client) GetAssetRaw ¶
GetAssetRaw retrieves a single asset as raw JSON bytes for json/yaml output.
func (*Client) GetAssetSummary ¶
GetAssetSummary retrieves the asset summary (counts by type, provider, tag).
func (*Client) GetAssetSummaryRaw ¶
GetAssetSummaryRaw retrieves the asset summary as raw JSON.
func (*Client) GetAssetsByProvider ¶
GetAssetsByProvider retrieves asset counts grouped by provider.
func (*Client) GetAssetsByType ¶
GetAssetsByType retrieves asset counts grouped by type.
func (*Client) GetCurrentUser ¶
GetCurrentUser retrieves the currently authenticated user.
func (*Client) GetCurrentUserRaw ¶
GetCurrentUserRaw retrieves the current user as raw JSON.
func (*Client) GetGlossaryTerm ¶
GetGlossaryTerm retrieves a single glossary term by ID.
func (*Client) GetGlossaryTermRaw ¶
GetGlossaryTermRaw retrieves a glossary term as raw JSON.
func (*Client) GetMetrics ¶
GetMetrics retrieves aggregated metrics within a time range.
func (*Client) GetReindexStatus ¶
func (c *Client) GetReindexStatus(ctx context.Context) (*ReindexStatus, error)
GetReindexStatus retrieves the current reindex status.
func (*Client) GetRunEntities ¶
func (c *Client) GetRunEntities(ctx context.Context, id string, limit, offset int) (*RunEntitiesResponse, error)
GetRunEntities retrieves the entities processed in a run.
func (*Client) GetRunEntitiesRaw ¶
func (c *Client) GetRunEntitiesRaw(ctx context.Context, id string, limit, offset int) ([]byte, error)
GetRunEntitiesRaw retrieves run entities as raw JSON.
func (*Client) GetTeamRaw ¶
GetTeamRaw retrieves a team as raw JSON.
func (*Client) GetTopAssets ¶
GetTopAssets retrieves the most viewed assets within a time range.
func (*Client) GetTopQueries ¶
func (c *Client) GetTopQueries(ctx context.Context, start, end time.Time, limit int) ([]byte, error)
GetTopQueries retrieves the most popular search queries within a time range.
func (*Client) GetTotalAssets ¶
GetTotalAssets retrieves the total asset count.
func (*Client) GetUserRaw ¶
GetUserRaw retrieves a user as raw JSON.
func (*Client) ListAPIKeys ¶
ListAPIKeys lists the current user's API keys.
func (*Client) ListAPIKeysRaw ¶
ListAPIKeysRaw lists API keys and returns raw JSON.
func (*Client) ListAssetOwners ¶
ListAssetOwners lists the owners of an asset.
func (*Client) ListAssetOwnersRaw ¶
ListAssetOwnersRaw retrieves asset owners as raw JSON.
func (*Client) ListAssets ¶
func (c *Client) ListAssets(ctx context.Context, query string, limit, offset int, assetTypes, providers, tags []string) (*AssetsSearchResponse, error)
ListAssets searches assets with optional query, pagination, and filters.
func (*Client) ListAssetsRaw ¶
func (c *Client) ListAssetsRaw(ctx context.Context, query string, limit, offset int, assetTypes, providers, tags []string) ([]byte, error)
ListAssetsRaw searches assets and returns raw JSON bytes.
func (*Client) ListGlossaryTerms ¶
func (c *Client) ListGlossaryTerms(ctx context.Context, limit, offset int) (*GlossaryListResponse, error)
ListGlossaryTerms lists glossary terms with pagination.
func (*Client) ListGlossaryTermsRaw ¶
ListGlossaryTermsRaw lists glossary terms and returns raw JSON.
func (*Client) ListRuns ¶
func (c *Client) ListRuns(ctx context.Context, pipelines, statuses []string, limit, offset int) (*RunsListResponse, error)
ListRuns lists pipeline runs with optional filters.
func (*Client) ListRunsRaw ¶
func (c *Client) ListRunsRaw(ctx context.Context, pipelines, statuses []string, limit, offset int) ([]byte, error)
ListRunsRaw lists runs and returns raw JSON.
func (*Client) ListTeamMembers ¶
func (c *Client) ListTeamMembers(ctx context.Context, teamID string) ([]team.TeamMemberWithUser, error)
ListTeamMembers lists the members of a team.
func (*Client) ListTeamMembersRaw ¶
ListTeamMembersRaw lists team members and returns raw JSON.
func (*Client) ListTeamsRaw ¶
ListTeamsRaw lists teams and returns raw JSON.
func (*Client) ListUsersRaw ¶
ListUsersRaw lists users and returns raw JSON.
func (*Client) Search ¶
func (c *Client) Search(ctx context.Context, query string, types []string, limit, offset int) (*SearchResponse, error)
Search performs a unified search across assets, glossary, teams, and users.
func (*Client) SearchGlossaryTerms ¶
func (c *Client) SearchGlossaryTerms(ctx context.Context, query string, limit, offset int) (*GlossaryListResponse, error)
SearchGlossaryTerms searches glossary terms.
func (*Client) SearchGlossaryTermsRaw ¶
func (c *Client) SearchGlossaryTermsRaw(ctx context.Context, query string, limit, offset int) ([]byte, error)
SearchGlossaryTermsRaw searches glossary terms and returns raw JSON.
func (*Client) SearchRaw ¶
func (c *Client) SearchRaw(ctx context.Context, query string, types []string, limit, offset int) ([]byte, error)
SearchRaw performs a unified search and returns raw JSON bytes.
func (*Client) StartReindex ¶
func (c *Client) StartReindex(ctx context.Context) (*ReindexStatus, error)
StartReindex triggers a search reindex.
func (*Client) UpdateGlossaryTerm ¶
func (c *Client) UpdateGlossaryTerm(ctx context.Context, id string, req UpdateTermRequest) (*glossary.GlossaryTerm, error)
UpdateGlossaryTerm updates an existing glossary term.
type CreateTermRequest ¶
type CreateTermRequest struct {
Name string `json:"name"`
Definition string `json:"definition"`
Description string `json:"description,omitempty"`
ParentTermID string `json:"parent_term_id,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty"`
}
CreateTermRequest represents the request body for creating a glossary term.
type GlossaryListResponse ¶
type GlossaryListResponse struct {
Terms []*glossary.GlossaryTerm `json:"terms"`
Total int `json:"total"`
}
GlossaryListResponse represents the response from the glossary list endpoint.
type MetricsSummary ¶
type MetricsSummary struct {
TotalAssets int `json:"total_assets"`
AssetsByType map[string]interface{} `json:"assets_by_type"`
}
MetricsSummary combines total assets and by-type breakdowns.
type ReindexStatus ¶
type ReindexStatus struct {
Status string `json:"status"`
Total int `json:"total,omitempty"`
Processed int `json:"processed,omitempty"`
Errors int `json:"errors,omitempty"`
}
ReindexStatus represents the status of a reindex operation.
type RunEntitiesResponse ¶
type RunEntitiesResponse struct {
Entities []runs.RunEntity `json:"entities"`
Total int `json:"total"`
}
RunEntitiesResponse represents the response from the run entities endpoint.
type RunsListResponse ¶
type RunsListResponse struct {
Runs []*plugin.Run `json:"runs"`
Total int `json:"total"`
Pipelines []string `json:"pipelines"`
}
RunsListResponse represents the response from the runs list endpoint.
type SearchResponse ¶
type SearchResponse struct {
Results []SearchResult `json:"results"`
Total int `json:"total"`
Limit int `json:"limit"`
Offset int `json:"offset"`
}
SearchResponse represents the response from the unified search endpoint.
type SearchResult ¶
type SearchResult struct {
ID string `json:"id"`
Name string `json:"name"`
Type string `json:"type"`
Description string `json:"description,omitempty"`
// Asset-specific fields
AssetType string `json:"asset_type,omitempty"`
Providers []string `json:"providers,omitempty"`
}
SearchResult represents a single result from the unified search endpoint.
type TeamsListResponse ¶
TeamsListResponse represents the response from the teams list endpoint.
type TopAssetEntry ¶
type TopAssetEntry struct {
ID string `json:"id"`
Name string `json:"name"`
Type string `json:"type"`
Count int `json:"count"`
}
TopAssetEntry represents a frequently viewed asset.
type TopQueryEntry ¶
TopQueryEntry represents a popular search query.
type UpdateTermRequest ¶
type UpdateTermRequest struct {
Name *string `json:"name,omitempty"`
Definition *string `json:"definition,omitempty"`
Description *string `json:"description,omitempty"`
ParentTermID *string `json:"parent_term_id,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty"`
}
UpdateTermRequest represents the request body for updating a glossary term.