Giter VIP home page Giter VIP logo

bbs's Introduction

BBS Server GoDoc

Note: This repository should be imported as code.cloudfoundry.org/bbs.

API to access the database for Diego.

A general overview of the BBS is documented here.

Reporting issues and requesting features

Please report all issues and feature requests in cloudfoundry/diego-release.

API

To interact with the BBS from outside of Diego, use the methods provided on the Client interface.

Components within Diego may use the full InternalClient interface to modify internal state.

Code Generation

The protobuf models in this repository require version 3.5 or later of the protoc compiler.

OSX

On Mac OS X with Homebrew, run the following to install it:

brew install protobuf

Linux

  1. Download a zip archive of the latest protobuf release from here.
  2. Unzip the archive in /usr/local (including /bin and /include folders).
  3. chmod a+x /usr/local/bin/protoc to make sure you can use the binary.

If you already have an older version of protobuf installed, you must uninstall it first by running brew uninstall protobuf

Install the gogoproto compiler by running:

go install github.com/gogo/protobuf/protoc-gen-gogoslick

Run go generate ./... from the root directory of this repository to generate code from the .proto files as well as to generate fake implementations of certain interfaces for use in test code.

Generating ruby models for BBS models

The following documentation assume the following versions:

  1. protoc > v3.5.0
  2. ruby protobuf gem > 3.6.12

Run the following commands from the models directory to generate .pb.rb files for the BBS models:

  1. sed -i'' -e 's/package models/package diego.bbs.models/' ./*.proto
  2. protoc -I../../vendor --proto_path=. --ruby_out=/path/to/ruby/files *.proto

Note Replace /path/to/ruby/files with the desired destination of the .pb.rb files. That directory must exist before running this command.

Note The above steps assume that github.com/gogo/protobuf/gogoproto/gogo.proto is on the GOPATH.

SQL

See the instructions in Running the SQL Unit Tests for testing against a SQL backend

See Migrations for information about writing database migrations.

Run Tests

  1. First setup your GOPATH and install the necessary dependencies for running tests.
  2. Setup a MySQL server or a postgres server. Please follow these instructions.
  3. Run the tests from the root directory of the bbs repo:
SQL_FLAVOR=mysql ginkgo -r -p -race

bbs's People

Contributors

acrmp avatar ameowlia avatar andrew-edgar avatar caod123 avatar crhino avatar cwlbraa avatar dsabeti avatar emalm avatar flawedmatrix avatar geofffranks avatar goonzoid avatar heyjcollins avatar jenspinney avatar jfmyers9 avatar joachimvaldez avatar jrussett avatar jvshahid avatar luan avatar marcpaquette avatar mariash avatar nimakaviani avatar reneighbor avatar selzoc avatar sjolicoeur avatar socalnick avatar sunjaybhatia avatar swetharepakula avatar sykesm avatar vito avatar winkingturtle-vmw avatar

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.