Documentation
¶
Index ¶
- Constants
- Variables
- func ProjectExcludesRelativePath(project Project, relativePath string) bool
- func ProjectGraphPath(baseLadybugPath string, projectID string) (string, error)
- func ProjectGraphStorageKey(projectID string) (string, error)
- func ProjectIncludesRelativePath(project Project, relativePath string) bool
- func ProjectMayIncludeRelativePath(project Project, relativePath string) bool
- func ProjectSearchPath(baseLadybugPath string, projectID string) (string, error)
- type DigestRun
- type DigestRunMetadata
- type DigestService
- type GraphStorageDiagnostic
- type Options
- type Project
- type ProjectGraphBackend
- type ProjectGraphRouter
- func (router *ProjectGraphRouter) Batch(ctx context.Context, fn func(ladybug.Graph) error) error
- func (router *ProjectGraphRouter) BatchProject(ctx context.Context, projectID string, fn func(ladybug.Graph) error) error
- func (router *ProjectGraphRouter) Bootstrap(ctx context.Context, graphSchema schema.GraphSchema) error
- func (router *ProjectGraphRouter) DeleteDerivedFileNodes(ctx context.Context, projectID string, repoFileID string) error
- func (router *ProjectGraphRouter) DeleteNodes(ctx context.Context, label string, filter map[string]string) error
- func (router *ProjectGraphRouter) GetNode(ctx context.Context, label string, id string) (ladybug.Node, error)
- func (router *ProjectGraphRouter) GraphStorageDiagnostics() []GraphStorageDiagnostic
- func (router *ProjectGraphRouter) ListNodes(ctx context.Context, label string, filter map[string]string) ([]ladybug.Node, error)
- func (router *ProjectGraphRouter) ListRelationships(ctx context.Context, relationshipType string, ...) ([]ladybug.Relationship, error)
- func (router *ProjectGraphRouter) PutNode(ctx context.Context, node ladybug.Node) error
- func (router *ProjectGraphRouter) PutRelationship(ctx context.Context, relationship ladybug.Relationship) error
- type ProjectIntegrationProviderMetadata
- type ProjectIntegrationsMetadata
- type ProjectMetadata
- type Registry
Constants ¶
View Source
const ( DigestStatusCompleted = "completed" DigestStatusFailed = "failed" )
View Source
const ( DigestModeMetadataOnly = "metadata_only" DigestModeContentGraph = "content_graph" UpdatePolicyManual = "manual" UpdatePolicyLive = "live" WorkspaceModeDisabled = "disabled" WorkspaceModeReadOnly = "read_only" WorkspaceModeEdit = "edit" GraphStoragePersistent = "persistent" GraphStorageInMemory = "in_memory" ClassificationInternal = "internal" SensitiveMarkerPolicySkipFile = "skip_file" ValidationStatusValid = "valid" )
Variables ¶
View Source
var ( ErrDigestProjectNotFound = ErrProjectNotFound ErrDigestProjectDisabled = errors.New("digest project disabled") ErrDigestUnsupported = errors.New("digest unsupported") )
View Source
var ( ErrProjectNotFound = errors.New("project not found") ErrInvalidInput = errors.New("invalid project input") )
Functions ¶
func ProjectGraphPath ¶ added in v0.1.3
func ProjectGraphStorageKey ¶ added in v0.1.3
Types ¶
type DigestRunMetadata ¶
type DigestRunMetadata struct {
ID string `json:"id"`
ProjectID string `json:"project_id"`
GraphNamespace string `json:"graph_namespace"`
Status string `json:"status"`
FilesScanned int `json:"files_scanned"`
FilesStored int `json:"files_stored"`
FilesSkipped int `json:"files_skipped"`
StartedAt time.Time `json:"started_at"`
CompletedAt time.Time `json:"completed_at"`
}
func MetadataForDigestRun ¶
func MetadataForDigestRun(run DigestRun) DigestRunMetadata
type DigestService ¶
type DigestService struct {
// contains filtered or unexported fields
}
func NewDigestService ¶
func NewDigestService(registry *Registry, graph digestGraph) *DigestService
func (*DigestService) DigestProject ¶
func (*DigestService) GetDigestRun ¶
type GraphStorageDiagnostic ¶ added in v0.1.3
type GraphStorageDiagnostic struct {
ProjectID string `json:"project_id"`
Backend string `json:"backend"`
StorageKey string `json:"storage_key,omitempty"`
Open bool `json:"open,omitempty"`
Leases int `json:"leases,omitempty"`
OpenTotal int `json:"open_total,omitempty"`
CloseTotal int `json:"close_total,omitempty"`
BlockedClose int `json:"blocked_close,omitempty"`
}
type Project ¶
type Project struct {
ID string
Aliases []string
DisplayName string
Description string
RootPath string
CanonicalRootPath string
Enabled bool
Classification string
GraphNamespace string
GraphStorage string
DigestMode string
UpdatePolicy string
WorkspaceMode string
Include []string
Exclude []string
FollowSymlinks bool
MaxFileBytes int64
MaxChunkBytes int
SensitiveMarkerPolicy string
Integrations ProjectIntegrationsMetadata
ValidationStatus string
ValidationError string
}
type ProjectGraphBackend ¶ added in v0.1.3
type ProjectGraphRouter ¶
type ProjectGraphRouter struct {
// contains filtered or unexported fields
}
func NewProjectGraphRouter ¶
func NewProjectScopedGraphRouter ¶ added in v0.1.3
func NewProjectScopedGraphRouter(registry *Registry, memory ladybug.Graph, persistentBackends []ProjectGraphBackend) *ProjectGraphRouter
func (*ProjectGraphRouter) BatchProject ¶ added in v0.1.4
func (*ProjectGraphRouter) Bootstrap ¶
func (router *ProjectGraphRouter) Bootstrap(ctx context.Context, graphSchema schema.GraphSchema) error
func (*ProjectGraphRouter) DeleteDerivedFileNodes ¶
func (*ProjectGraphRouter) DeleteNodes ¶
func (*ProjectGraphRouter) GraphStorageDiagnostics ¶ added in v0.1.3
func (router *ProjectGraphRouter) GraphStorageDiagnostics() []GraphStorageDiagnostic
func (*ProjectGraphRouter) ListRelationships ¶
func (router *ProjectGraphRouter) ListRelationships(ctx context.Context, relationshipType string, filter ladybug.RelationshipFilter) ([]ladybug.Relationship, error)
func (*ProjectGraphRouter) PutRelationship ¶
func (router *ProjectGraphRouter) PutRelationship(ctx context.Context, relationship ladybug.Relationship) error
type ProjectIntegrationProviderMetadata ¶
type ProjectIntegrationProviderMetadata struct {
Enabled bool `json:"enabled"`
AuthMode string `json:"auth_mode,omitempty"`
CredentialSource string `json:"credential_source,omitempty"`
ProjectKeyCount int `json:"project_key_count,omitempty"`
SpaceKeyCount int `json:"space_key_count,omitempty"`
IngestionEnabled bool `json:"ingestion_enabled"`
}
type ProjectIntegrationsMetadata ¶
type ProjectIntegrationsMetadata struct {
Jira *ProjectIntegrationProviderMetadata `json:"jira,omitempty"`
Confluence *ProjectIntegrationProviderMetadata `json:"confluence,omitempty"`
}
type ProjectMetadata ¶
type ProjectMetadata struct {
ID string `json:"id"`
Aliases []string `json:"aliases,omitempty"`
DisplayName string `json:"display_name"`
Description string `json:"description,omitempty"`
Enabled bool `json:"enabled"`
Classification string `json:"classification"`
GraphNamespace string `json:"graph_namespace"`
GraphStorage string `json:"graph_storage"`
DigestMode string `json:"digest_mode"`
UpdatePolicy string `json:"update_policy"`
WorkspaceMode string `json:"workspace_mode"`
ValidationStatus string `json:"validation_status"`
ValidationError string `json:"validation_error,omitempty"`
Integrations *ProjectIntegrationsMetadata `json:"integrations,omitempty"`
}
func MetadataForProject ¶
func MetadataForProject(project Project) ProjectMetadata
func MetadataForProjects ¶
func MetadataForProjects(projects []Project) []ProjectMetadata
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func NewRegistry ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.