Documentation
¶
Index ¶
- Constants
- func ListToD(paths []string) (map[string][]string, error)
- func NewApiServer(db db_pkg.DatabaseContext, objAPI storage.ObjectAPIServer) (*apiServer, error)
- func NewCommitTxn(repoName string, branchName string, commitId string, q *queryServer) (*commitTxn, error)
- func NewQueryServer(d db_pkg.DatabaseContext) *queryServer
- type ApiServer
- type Branch
- type BranchAttrs
- type Commit
- type CommitAttrs
- type CommitSizeRequest
- type CommitSizeResponse
- type File
- type FileAttrs
- type FileAttrsMap
- type FileAttrsMessage
- type FileMap
- type FileMessage
- type FileMessageType
- type FilePartMessage
- type FilePartsMessage
- type Object
- type PutFileResponse
- type Repo
- type RepoAttrs
- type RepoAttrsMessage
- type RepoMessage
- type RepoType
- type StandardRepoMessage
- type StdRepoAttrsMessage
Constants ¶
View Source
const ( REPO_KEY_PREFIX = "repo:" DATA_REPO_KEY_PREFIX = "data:repo:" COMMIT_KEY_PREFIX = "commit:" BRANCH_KEY_PREFIX = "branch:" FILE_KEY_PREFIX = "file:" UPDATE_OP = "update" DELETE_OP = "delete" )
View Source
const (
DefaultBranch = "master"
)
Variables ¶
This section is empty.
Functions ¶
func NewApiServer ¶
func NewApiServer(db db_pkg.DatabaseContext, objAPI storage.ObjectAPIServer) (*apiServer, error)
func NewCommitTxn ¶
func NewQueryServer ¶
func NewQueryServer(d db_pkg.DatabaseContext) *queryServer
Types ¶
type ApiServer ¶
type ApiServer interface { InitRepo(name string) (*RepoAttrs, error) InitTypedRepo(repoType RepoType, name string) (*RepoAttrs, error) RemoveRepo(name string) error CheckRepoExists(name string) bool InitBranch(repoName, branchName, head string) (*BranchAttrs, error) InitCommit(repoName, branchName, commitId string) (*CommitAttrs, error) StartCommit(repoName, branchName string) (*CommitAttrs, error) CloseCommit(repoName string, branchName string, commitId string) error GetModel(srcRepoName, srcBranchName, srcCommitId string) (*Repo, *Branch, *Commit, error) GetOrCreateModel(srcRepoName, srcBranchName, srcCommitId string) (*Repo, *Branch, *Commit, error) GetRepo(repoName string) (*Repo, error) GetRepoAttrs(repoName string) (*RepoAttrs, error) GetBranchAttrs(repoName string, branchName string) (*BranchAttrs, error) GetCommitAttrs(repoName string, commitId string) (*CommitAttrs, error) GetCommitAttrsByBranch(repoName, branchName string) (*CommitAttrs, error) GetCommitMap(repoName string, commitId string) (*FileMap, error) GetFileAttrs(repoName string, commitId string, filePath string) (*FileAttrs, error) GetCommitSize(repoName, branchName, commitId string) (int64, error) GetBranchSize(repoName, branchName string) (int64, error) ExplodeRepoAttrs(repoName, branchName, commitId string) (*RepoAttrs, *BranchAttrs, *CommitAttrs, *FileMap, error) ExplodeRepo(repoName, branchName string) (*Repo, *Branch, *Commit, error) PutFile(repoName string, branchName string, commitId string, fpath string, reader io.Reader) (*FileAttrs, int64, error) GetFileURL(repoId, commitId, filepath string) (string, error) PutFileURL(repoId, branchName, commitId, filepath string) (string, error) PutFilePartURL(partSeq int, repoId, branchName, commitId, filepath string) (string, error) CreateDataset(name string) (*RepoAttrs, error) FileCheckIn(repoId, branchName, commitId, filepath string, size int64, checksum string) (*FileAttrs, error) FileMergeAndCheckIn(repoId, branchName, commitId, filepath string, parts []int, size int64) (*FileAttrs, error) }
type CommitAttrs ¶
type CommitAttrs struct { Commit *Commit Parent *Commit Children []*Commit Description string Size int64 Started time.Time Finished time.Time }
func (*CommitAttrs) Id ¶
func (ci *CommitAttrs) Id() string
func (*CommitAttrs) IsClosed ¶
func (ci *CommitAttrs) IsClosed() bool
func (*CommitAttrs) IsNew ¶
func (ci *CommitAttrs) IsNew() bool
func (*CommitAttrs) IsOpen ¶
func (ci *CommitAttrs) IsOpen() bool
type CommitSizeRequest ¶
type CommitSizeResponse ¶
type CommitSizeResponse struct {
Size int64
}
type FileAttrs ¶
func NewFileAttrs ¶
func (*FileAttrs) GetObjectHash ¶
func (*FileAttrs) GetObjectPath ¶
type FileAttrsMap ¶
type FileAttrsMessage ¶
type FileMap ¶
type FileMap struct { Commit *Commit Entries map[string]*File // contains filtered or unexported fields }
func CopyFileMap ¶
func NewFileMap ¶
type FileMessage ¶
type FileMessageType ¶
type FileMessageType string
const ( FileMessageURLGet FileMessageType = "GET" FileMessageURLPut FileMessageType = "PUT" FileMessageCheckIn FileMessageType = "CHECK_IN" FileMessagePut FileMessageType = "PUT_FILE" )
type FilePartMessage ¶
type FilePartsMessage ¶
type PutFileResponse ¶
type RepoAttrs ¶
type RepoAttrs struct { Repo *Repo Type RepoType Size_bytes uint64 Description string Branches map[string]*Branch Datasets map[string]*Repo // contains filtered or unexported fields }
TODO: add created, updated etc
type RepoAttrsMessage ¶
type RepoAttrsMessage struct { RepoAttrs *RepoAttrs BranchAttrs *BranchAttrs CommitAttrs *CommitAttrs FileMap *FileMap }
type RepoMessage ¶
type StandardRepoMessage ¶
type StandardRepoMessage struct { RepoMessage Output *RepoMessage Model *RepoMessage }
type StdRepoAttrsMessage ¶
type StdRepoAttrsMessage struct { RepoAttrsMessage OutputAttrs *RepoAttrsMessage ModelAttrs *RepoAttrsMessage }
Click to show internal directories.
Click to hide internal directories.