zundoko-go-client

module
v0.0.0-...-83b165b Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2021 License: CC0-1.0

README

zundoko-go-client

zundoko-go-client is Zundoko Kiyoshi client written in Go.

Build

  1. Install Git and Go 1.15+.

  2. Clone the project.

    $ git clone --recursive https://github.com/kaitoy/zundoko-go-client.git
    $ cd zundoko-go-client
    
  3. Run Go Build.

    $ make build
    

Start Zundoko Server

Node 8+ is required.

In the project root directory, execute the following command to start Zundoko Server.

$ make start-server

You can stop Zundoko Server by make stop-server.

Start Zundoko Kiyoshi

Execute the built zundoko-client binary to start a Zundoko Kiyoshi.

$ ./bin/zundoko-client

zundoko-client interacts with Zundoko Server and exits after making a Kiyoshi.

Development

Generate JSON Decoders

Java 8+ is required.

This project uses Swagger Codegen to generate JSON decoders.

Write a swagger spec in swagger/swagger.yaml and run make model to generate decoders.

Unit Tests

This project uses Ginkgo and gomock for unit tests.

Steps to write unite tests are as follows:

  1. Generate a test suite by make test-suite path/to/pkg.

    Just one test suite is needed for each package, and usually there is no need to modify generated ones.

  2. Generate a test template by make test-template path/to/file.go for each Go file you want to test.

  3. Generate mocks by make mock.

    This command finds interfaces declared in files under pkg directory, and generates a mock for each interface into mock directory.

  4. Write tests in the generated templates using the generated mocks.

Execute make test to run unit tests.

License

This project is licensed under the Creative Commons license (CC0 1.0).

Directories

Path Synopsis
The zundoko-client command is a client of Zundoko Server.
The zundoko-client command is a client of Zundoko Server.
pkg
client
Package client provides an implementation of a client that interact with Zundoko server.
Package client provides an implementation of a client that interact with Zundoko server.
logging
Package logging provides utility funcs to utilize zap logger.
Package logging provides utility funcs to utilize zap logger.
runner
Package runner provides Zundoko Kiyoshi runner.
Package runner provides Zundoko Kiyoshi runner.
util
Package util provides utilities.
Package util provides utilities.

Jump to

Keyboard shortcuts

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