Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Application ¶
Example ¶
package main import ( "fmt" selfSym "bitbucket.org/taubyte/go-sdk-symbols/self" "bitbucket.org/taubyte/go-sdk/self" ) func main() { // Mocking the calls to the vm for usage in tests and playground selfSym.MockApplication("QmYiQuR2K377j4ZUjxesY6a6oVvnLhzMMJsQSqmxrGZkyG") // Called from a function in the application "QmYiQuR2K377j4ZUjxesY6a6oVvnLhzMMJsQSqmxrGZkyG" application, err := self.Application() if err != nil { panic(err) } fmt.Println(application) }
Output: QmYiQuR2K377j4ZUjxesY6a6oVvnLhzMMJsQSqmxrGZkyG
func Branch ¶
Example ¶
package main import ( "fmt" selfSym "bitbucket.org/taubyte/go-sdk-symbols/self" "bitbucket.org/taubyte/go-sdk/self" ) func main() { // Mocking the calls to the vm for usage in tests and playground selfSym.MockBranch("master") // Called from a function in the branch "master" branch, err := self.Branch() if err != nil { panic(err) } fmt.Println(branch) }
Output: master
func Commit ¶
Example ¶
package main import ( "fmt" selfSym "bitbucket.org/taubyte/go-sdk-symbols/self" "bitbucket.org/taubyte/go-sdk/self" ) func main() { // Mocking the calls to the vm for usage in tests and playground selfSym.MockCommit("189d781643e5efc1d90130fc8e2c526f1040e10d") // Called from a function with id "189d781643e5efc1d90130fc8e2c526f1040e10d" commit, err := self.Commit() if err != nil { panic(err) } fmt.Println(commit) }
Output: 189d781643e5efc1d90130fc8e2c526f1040e10d
func Function ¶
Example ¶
package main import ( "fmt" selfSym "bitbucket.org/taubyte/go-sdk-symbols/self" "bitbucket.org/taubyte/go-sdk/self" ) func main() { // Mocking the calls to the vm for usage in tests and playground selfSym.MockFunction("QmNtG4SdhqrC3bEtz5euGZeEmaUhQrz6cSJ1LuEyu8Z5NM") // Called from a function with id "QmNtG4SdhqrC3bEtz5euGZeEmaUhQrz6cSJ1LuEyu8Z5NM" function, err := self.Function() if err != nil { panic(err) } fmt.Println(function) }
Output: QmNtG4SdhqrC3bEtz5euGZeEmaUhQrz6cSJ1LuEyu8Z5NM
func Project ¶
Example ¶
package main import ( "fmt" selfSym "bitbucket.org/taubyte/go-sdk-symbols/self" "bitbucket.org/taubyte/go-sdk/self" ) func main() { // Mocking the calls to the vm for usage in tests and playground selfSym.MockProject("QmZY4u91d1YALDN2LTbpVtgwW8iT5cK9PE1bHZqX9J51Tv") // Called from a function in the project "QmZY4u91d1YALDN2LTbpVtgwW8iT5cK9PE1bHZqX9J51Tv" project, err := self.Project() if err != nil { panic(err) } fmt.Println(project) }
Output: QmZY4u91d1YALDN2LTbpVtgwW8iT5cK9PE1bHZqX9J51Tv
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.