Documentation
¶
Index ¶
- Variables
- func AuthorizeCreateRepository(ctx context.Context, provider *githubauth4datatug.Provider, firebaseUID string, ...) (facade4datatug.GitHubCreateRepository, error)
- func AuthorizeCreateRepositoryWithScopes(ctx context.Context, provider *githubauth4datatug.Provider, firebaseUID string, ...) (facade4datatug.GitHubCreateRepository, error)
- func AuthorizeProjectStatusRepository(ctx context.Context, provider *githubauth4datatug.Provider, firebaseUID string, ...) (facade4datatug.GitHubCreateRepository, error)
- func AuthorizeQueryRepository(ctx context.Context, provider *githubauth4datatug.Provider, firebaseUID string, ...) (facade4datatug.GitHubQueryRepository, error)
- func ClonePublicDemo(ctx context.Context, commit, tree string) (map[string][]byte, error)
- type EnvironmentPresentation
- type ProjectSnapshot
- func (s *ProjectSnapshot) AllQueries(ctx context.Context) (*QueryFolder, error)
- func (s *ProjectSnapshot) Board(ctx context.Context, id string) (*datatug.Board, error)
- func (s *ProjectSnapshot) Boards(ctx context.Context) ([]datatug.ProjBoardBrief, error)
- func (s *ProjectSnapshot) CloneFiles(ctx context.Context, tree string) (map[string][]byte, error)
- func (s *ProjectSnapshot) Entities(ctx context.Context) ([]datatug.ProjEntityBrief, error)
- func (s *ProjectSnapshot) Entity(ctx context.Context, id string) (json.RawMessage, error)
- func (s *ProjectSnapshot) Environments(ctx context.Context) (datatug.Environments, error)
- func (s *ProjectSnapshot) PrivateCloneFiles(ctx context.Context, tree string) (map[string][]byte, error)
- func (s *ProjectSnapshot) ProjectSummary(ctx context.Context) (json.RawMessage, error)
- func (s *ProjectSnapshot) QueryFiles(ctx context.Context, folderPath, id string) (map[string][]byte, string, error)
- func (s *ProjectSnapshot) ReadFile(ctx context.Context, relative string) ([]byte, error)
- func (s *ProjectSnapshot) ReadQueryRevision(ctx context.Context, folderPath, id string) (out *QueryReadResult, resultErr error)
- func (s *ProjectSnapshot) SafeEnvironments(ctx context.Context) ([]SafeEnvironment, error)
- type QueryFileChange
- type QueryFolder
- type QueryMutationPreview
- type QueryReadResult
- type SafeEnvironment
Constants ¶
This section is empty.
Variables ¶
var ErrCloneSourceTooLarge = errors.New("GitHub source project exceeds 32 files; private archive cloning is required")
var ErrGitHubCreateProof = errors.New("GitHub project commit could not be proven")
var ErrGitHubQueryCommitProof = errors.New("GitHub query commit could not be proven")
var ErrInvalidProjectSnapshot = errors.New("invalid GitHub project snapshot")
var ErrInvalidQuerySnapshot = errors.New("invalid query snapshot")
var ErrProjectFileMissing = errors.New("GitHub project file missing")
var ErrUnsupportedExistingQuery = errors.New("existing query contains unsupported metadata")
Functions ¶
func AuthorizeCreateRepository ¶
func AuthorizeCreateRepository(ctx context.Context, provider *githubauth4datatug.Provider, firebaseUID string, repositoryID int64, owner, name string) (facade4datatug.GitHubCreateRepository, error)
AuthorizeCreateRepository is the production host composition seam. The dedicated DataTug App provider rechecks the current Firebase UID, GitHub actor, installation, repository identity and effective user write grant.
func AuthorizeCreateRepositoryWithScopes ¶ added in v0.33.0
func AuthorizeCreateRepositoryWithScopes(ctx context.Context, provider *githubauth4datatug.Provider, firebaseUID string, repositoryID int64, owner, name string, scopes []string) (facade4datatug.GitHubCreateRepository, error)
func AuthorizeProjectStatusRepository ¶ added in v0.33.0
func AuthorizeProjectStatusRepository(ctx context.Context, provider *githubauth4datatug.Provider, firebaseUID string, repositoryID int64, owner, name string) (facade4datatug.GitHubCreateRepository, error)
func AuthorizeQueryRepository ¶
func AuthorizeQueryRepository(ctx context.Context, provider *githubauth4datatug.Provider, firebaseUID string, repositoryID int64, owner, name string) (facade4datatug.GitHubQueryRepository, error)
Types ¶
type EnvironmentPresentation ¶ added in v0.31.0
type ProjectSnapshot ¶
type ProjectSnapshot struct {
Folder string
Branch string
Head string
// contains filtered or unexported fields
}
ProjectSnapshot pins every file lookup to one immutable commit. It never reads a second branch ref while constructing a response.
func OpenProjectSnapshot ¶
func OpenProjectSnapshot(ctx context.Context, client scopedReadClient, folder, branch string) (*ProjectSnapshot, error)
func OpenProjectSnapshotAtHead ¶
func OpenProjectSnapshotAtHead(ctx context.Context, client scopedReadClient, folder, branch, head string) (*ProjectSnapshot, error)
OpenProjectSnapshotAtHead is used to reconstruct an intended query mutation after a lost provider response. It never substitutes the branch's new head for the immutable expected head supplied by the original operation.
func (*ProjectSnapshot) AllQueries ¶
func (s *ProjectSnapshot) AllQueries(ctx context.Context) (*QueryFolder, error)
func (*ProjectSnapshot) Boards ¶ added in v0.31.0
func (s *ProjectSnapshot) Boards(ctx context.Context) ([]datatug.ProjBoardBrief, error)
func (*ProjectSnapshot) CloneFiles ¶ added in v0.35.1
CloneFiles exports only declarative project content from the pinned tree. Provider workflows, executables, credentials and arbitrary repository files never become part of the destination setup proof.
func (*ProjectSnapshot) Entities ¶ added in v0.31.0
func (s *ProjectSnapshot) Entities(ctx context.Context) ([]datatug.ProjEntityBrief, error)
func (*ProjectSnapshot) Entity ¶ added in v0.31.0
func (s *ProjectSnapshot) Entity(ctx context.Context, id string) (json.RawMessage, error)
func (*ProjectSnapshot) Environments ¶ added in v0.28.0
func (s *ProjectSnapshot) Environments(ctx context.Context) (datatug.Environments, error)
Environments reads only declared environment metadata from this pinned project snapshot. Connection secrets and source rows never leave the reader.
func (*ProjectSnapshot) PrivateCloneFiles ¶ added in v0.35.1
func (s *ProjectSnapshot) PrivateCloneFiles(ctx context.Context, tree string) (map[string][]byte, error)
PrivateCloneFiles bounds the per-blob provider reader to 32 source files. Large public demo projects use a single archive request instead.
func (*ProjectSnapshot) ProjectSummary ¶
func (s *ProjectSnapshot) ProjectSummary(ctx context.Context) (json.RawMessage, error)
ProjectSummary returns the existing manifest wire object without dropping future or legacy metadata. The immutable registered locator supplies access control; this JSON is only display data.
func (*ProjectSnapshot) QueryFiles ¶
func (*ProjectSnapshot) ReadQueryRevision ¶
func (s *ProjectSnapshot) ReadQueryRevision(ctx context.Context, folderPath, id string) (out *QueryReadResult, resultErr error)
ReadQueryRevision retains unknown and legacy metadata in the read response. Only a current narrow Core pair receives a writable Core revision. Rich definitions are readable but cannot be round-tripped through narrow saves.
func (*ProjectSnapshot) SafeEnvironments ¶ added in v0.31.0
func (s *ProjectSnapshot) SafeEnvironments(ctx context.Context) ([]SafeEnvironment, error)
type QueryFileChange ¶
type QueryFolder ¶
type QueryFolder struct {
ID string `json:"id"`
Folders []*QueryFolder `json:"folders,omitempty"`
Items []json.RawMessage `json:"items,omitempty"`
}
type QueryMutationPreview ¶
type QueryMutationPreview struct {
Changes []QueryFileChange
Response dto.SaveQueryResponse
// BodyChanged is false when the previous sidecar cannot be proved exactly;
// ambiguity never makes an otherwise valid save billable or changes its
// existing mutation eligibility.
BodyChanged bool
}
func PreviewQueryMutation ¶
func PreviewQueryMutation(ctx context.Context, request dto.SaveQueryRequest, snapshot map[string][]byte) (out *QueryMutationPreview, resultErr error)
PreviewQueryMutation runs the published Core revisioned query store in a fresh private scratch directory. The returned changes are the exact metadata/body files to send together in one Git commit at an expected head. All temp data is removed on every result, including conflicts and faults. The snapshot contains only the target query pair at one immutable commit.
type QueryReadResult ¶
type SafeEnvironment ¶ added in v0.31.0
type SafeEnvironment struct {
ID string `json:"id"`
Title string `json:"title,omitempty"`
Presentation *EnvironmentPresentation `json:"presentation,omitempty"`
}