Coder Social home page Coder Social logo

The Reflect Go Library

GoDoc: https://godoc.org/github.com/reflect/reflect-go

Note: At the moment, the Reflect Go client is used only for generating authentication tokens to pass to client-side Reflect views. In the future we will release a more fully-featured Go client for the Reflect REST API.

Installation

You can install the reflect-go library using go get:

$ go get github.com/reflect/reflect-go

Importing

import (
        "github.com/reflect/reflect-go"
)

It's important to note that there is also a core Go library named reflect. To avoid conflicts with this library, you can rename your reflect-go import:

import (
        rf "github.com/reflect/reflect-go"
)

Generating Authentication Tokens

At the moment, this library is used for generating authentication tokens for use in Reflect views. To generate new tokens:

accessKey := "d232c1e5-6083-4aa7-9042-0547052cc5dd"
secretKey := "74678a9b-685c-4c14-ac45-7312fe29de06"

token, err := reflect.NewProjectTokenBuilder(accessKey).
    WithAttribute("user-id", 1234).
    WithAttribute("user-name", "Billy Bob").
    WithParameter(reflect.Parameter{
        Field: "My Field",
        Op: reflect.EqualsOperation,
        Value: "My Value",
    }).
    Build(secretKey)

Reflect's Projects

chronos icon chronos

Fault tolerant job scheduler for Mesos which handles dependencies and ISO8601 based schedules

examples icon examples

The example apps in this repository each showcase a key Reflect feature. Each app is built using our simple embedding model and annotated for your learning.

filq icon filq

A filter parser and library

gorm icon gorm

The fantastic ORM library for Golang, aims to be developer friendly

jason icon jason

Programmatically edit JSON using JSONPath.

titleize icon titleize

Capitalize every word in string: unicorn cake → Unicorn Cake

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.