-
Notifications
You must be signed in to change notification settings - Fork 1
GitFactory
This Section will describe which methods the GitFactory contract provides and how it internally works.
The GitFactory contract inherits from the Ownable contract and provides the following methods:
createRepository(string memory _repoName) public
removeRepository(string memory _repoName, uint256 _userIndex, uint256 _repoIndex) public
collectTips() public onlyOwner()
getRepositoryNames() view public returns (string[] memory)
getUsersRepositories(address _owner) view public returns (string[] memory)
getRepositoriesUserList(string memory _repoName) view public returns (address[] memory)
getUserRepoNameHash(address _owner, string memory _repoName) pure public returns (bytes32)
getRepository(bytes32 location) view public returns (LibGitFactory.Repository memory)
addFacet(IDiamondCut.FacetCut memory _diamondCut) public onlyOwner
removeFacet(uint index) public onlyOwner
replaceFacet(IDiamondCut.FacetCut memory _diamondCut, uint index) public onlyOwner
updateRepositoriesFacets(address reposAddress, IDiamondCut.FacetCut[] calldata _diamondCut, address _init, bytes calldata _calldata) public onlyOwner
receive() public
createRepository(string memory _repoName) public
This function is used to create a new repository. By providing a name, a new GitRepository smart contract is deployed.
removeRepository(string memory _repoName, uint256 _userIndex, uint256 _repoIndex) public
Used to remove a repository from the internal 'database'. It takes the owner of the repository, the repository name, the userIndex (describes at what position the owner's address is written in the reposUserList array), and the repoIndex (describes at what position the repositories name is written in the usersRepoList array). It removes the values from the arrays and reorganizes them.
This function should be called only by GitRepository contracts.
collectTips() public onlyOwner()
getRepositoryNames() view public returns (string[] memory)
getUsersRepositories(address _owner) view public returns (string[] memory)
getRepositoriesUserList(string memory _repoName) view public returns (address[] memory)
getUserRepoNameHash(address _owner, string memory _repoName) pure public returns (bytes32)
getRepository(bytes32 location) view public returns (LibGitFactory.Repository memory)
addFacet(IDiamondCut.FacetCut memory _diamondCut) public onlyOwner
removeFacet(uint index) public onlyOwner
replaceFacet(IDiamondCut.FacetCut memory _diamondCut, uint index) public onlyOwner
updateRepositoriesFacets(address reposAddress, IDiamondCut.FacetCut[] calldata _diamondCut, address _init, bytes calldata _calldata) public
onlyOwner
receive() public