Skip to content

our object model based on github.com/contiv/modelgen and github.com/contiv/objdb

License

Notifications You must be signed in to change notification settings

jojimt/contivmodel

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GoDoc

Contiv Object Model

This is how current object model looks like:

Contiv Object Model

Using go client

Here is an example of how to use contiv go client

package main

import (
    "log"

    "github.com/contiv/contivModel/client"
)

func main() {
    cl, err := client.NewContivClient("localhost:9999")
    if err != nil {
        log.Fatal(err)
    }
    
    // Define a policy
    policy := client.Policy{
        TenantName: "tenant1",
        PolicyName: "policy",
    }
    
    // Create policy
    err = cl.PostPolicy(policy)
    if err != nil {
        log.Errorf("Policy Creation failed. Err: %v", err)
    }
}

About

our object model based on github.com/contiv/modelgen and github.com/contiv/objdb

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 65.8%
  • Go 24.4%
  • RAML 4.0%
  • JavaScript 3.2%
  • Python 2.2%
  • Ruby 0.3%
  • Other 0.1%