chat-api

command module
v0.9.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 27, 2017 License: MIT Imports: 10 Imported by: 0

README

MIT License Go Report Card

swaghat Chat API

swagchat is an open source chat components for your webapps.

Architecture

Architecture

API Reference

Currently writing in OAI 3

Datastore

You can choose from the followings.

  • sqlite3
  • MySQL
  • Google Cloud SQL

Storage

You can choose from the followings.

  • Local Filesystem
  • Google Cloud Storage
  • Amazon S3

Quick start

Just run the executable binary

You can download binary from Release page

# In the case of macOS
./swagchat-api_darwin_amd64
docker
docker run swagchat/chat-api

Docker repository

heroku

Deploy

Configuration

To override the default configuration options, make a copy of config/example.swagchat.yaml and name it config/swagchat.yaml.

Or you can overwrite it with environment variable, runtime parameter.

You can check the variables that can be set with the help command of the executable binary.

# In the case of macOS
./swagchat-api_darwin_amd64 -h

Development

go version

1.7 or higher

go testing

Only http client test, and not completed yet. Test run with datastore is sqlite3 and storage is local.

go test $(go list ./... | grep -v vendor)

Profiling

To display the profile by http request, please set as follows in the setting file.

This is using pprof serves provided by golang.

profiling: on
Pprof api list
/debug/pprof               pprof portal
/debug/pprof/profile       CPU profile
/debug/pprof/goroutine     goroutine profile
/debug/pprof/heap          heap profile
/debug/pprof/block         blocking profile
/debug/pprof/threadcreate  OS thread profile

License

MIT License.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
http handler
http handler

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL