examples

command module
v8.0.0-...-0afa3f7 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

README

Examples

This directory provides an example demonstrating the use of the gorm-multitenancy package with various configurations:

Getting Started

To run this example on your local machine, follow these steps:

Step 1: Clone the Repository
git clone https://github.com/bartventer/gorm-multitenancy.git
cd gorm-multitenancy
Step 2: Run the Example

This example supports various configurations through command-line options.

Usage
go run -C examples . [options]
Options
  • -server string

    • Description: Specifies the HTTP server to run (and gorm-multitenancy middleware to use)
    • Options: echo, gin, iris, nethttp
    • Default: echo
  • -driver string

    • Description: Specifies the gorm-multitenancy database driver.
    • Options: postgres, mysql
    • Default: postgres
Examples
  • Run with default options:

    go run -C examples .
    
  • Run with the NetHTTP server and MySQL driver:

    go run -C examples . -server=nethttp -driver=mysql
    

[!NOTE] To enable debug logging, set the GMT_DEBUG environment variable to true. This can be helpful for troubleshooting or understanding the internal workings of the application.

Interacting with the API

Please see API Usage for more examples on how to interact with the server.

Contributing

All contributions are welcome! See the Contributing Guide for more details.

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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