modulepackage
0.1.3
Repository: https://github.com/gitana/cloudcms-go-driver.git
Documentation: pkg.go.dev
# README
cloudcms-go-driver
HTTP Driver for the for the Cloud CMS API
Installation
In your module directory, run:
go get github.com/gitana/cloudcms-go-driver
Examples
Below are some examples of how you might use this driver:
package main
import (
"github.com/gitana/cloudcms-go-driver"
)
func main() {
// Connect to CloudCMS using gitana.json in working directory
session, err := cloudcms.ConnectDefault()
if err != nil {
fmt.Println(err)
return
}
var repositoryId string
// List branches
branches, _ := session.ListBranches(repositoryId, nil)
// Read branch
branchId := "master"
branch, _ := session.ReadBranch(repositoryId, branchId)
// Read Node
node, _ := session.ReadNode(repositoryId, branchId, nodeId)
// Create Node
nodeObj := cloudcms.JsonObject{
"title": "Twelfth Night",
"description": "An old play",
}
nodeId, _ := session.createNode(repositoryId, branchId, nodeObj, nil)
// Query Nodes
query := cloudcms.JsonObject{
"_type": "store:book",
}
pagination := cloudcms.JsonObject{
"limit": 1,
}
queriedNodes, _ session.QueryNodes(repositoryId, branchId, query, pagination)
// Find Nodes
find := cloudcms.JsonObject{
"search": "Shakespeare",
"query": JsonObject{
"_type": "store:book",
}
}
findNodes, _ := session.FindNodes(repositoryId, branchId, find ,nil)
}
Resources
- Cloud CMS: https://www.cloudcms.com
- Github: https://github.com/gitana/cloudcms-go-driver
- Go Driver Download: TODO
- Cloud CMS Documentation: https://www.cloudcms.com/documentation.html
- Developers Guide: https://www.cloudcms.com/developers.html
Support
For information or questions about the Go Driver, please contact Cloud CMS at [email protected].
# Functions
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
No description provided by the author
No description provided by the author
This type implements the http.RoundTripper interface.
No description provided by the author
# Type aliases
No description provided by the author