New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

github.com/bowery/gorc

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/bowery/gorc

  • v0.0.0-20150114161205-0d1de6bd3bed
  • Source
  • Go
  • Socket score

Version published
Created
Source

gorc

A golang client for Orchestrate.io

Supports go 1.1 or later

Go Style Documentation: http://godoc.org/github.com/orchestrate-io/gorc

Usage examples

    // Import the client
    import "github.com/orchestrate-io/gorc"

    // Create a client
    c := gorc.NewClient("Your API Key")

    // Get a value
    result, _ := c.Get("collection", "key")

    // Marshall value into a map
    valueMap := make(map[string]interface{})
    result.Value(&valueMap)

    // Marshall value into a domain type
    domainObject := DomainObject{}
    result.Value(&domainObject)

    // Put a serialized value
    c.PutRaw("collection", "key", strings.NewReader("Some JSON"))

    // Put a interface{} type
    group := Group{Name: "name", Founded: 1990}
    c.Put("collection", "key", group)

    // Search
    results, _ := c.Search("collection", "A Lucene Query", 100, 0)

    // Marshall (search/event/graph) results into an array of domain objects
    var values []DomainObject{} = make([]DomainObject{}, len(results.Results))
    for i, result := range results.Results {
        result.Value(&values[i])
    }

    // Get next page of results
    if results.HasNext() {
        results, err := c.SearchGetNext(results)
    }

    // Get Events
    events, _ := c.GetEvents("collection", "key", "kind")

    // Put Events
    c.PutEvent("collection", "key", "kind", domainObject)
    c.PutEventRaw("collection", "key", "kind", strings.NewReader(serializedJson))

    // Get Relations
    relations, _ := c.GetRelations("collection", "key", []string{"kind", "kind"})

    // Put Relation
    c.PutRelation("sourceCollection", "sourceKey", "kind", "sinkCollection", "sinkKey")

    // Get a value at a particular ref
    valueAtRef := c.GetRef("collection", "key", "ref")

    // List the last 10 values of a collection-key pair
    valueHistory := c.ListRefs("collection", "key", 10, true)

FAQs

Package last updated on 14 Jan 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc