Skip to content

⚙️ Core module shared across our backend projects

License

Notifications You must be signed in to change notification settings

coze-cloud/core

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

core

⚙️ Core module shared across our backend projects

Installation

Adding core to a Go project is as easy as calling this command

go get github.com/cozy-hosting/core

Using the module

The project must be based on the uber-go/fx application framework

package main

import "go.uber.org/fx"

func main() {
    // Creates a new fx application
    fx.New(
        // Add the core module to the container
        core.Module,
        fx.Invoke(
            // Add this, if you want to use SwaggerUI
            core.UseSwagger,
            // Also add this, if you want to use GraphQL + Playground
            core.UseGraphQlWithPlayground,
        ),
    ).Run()
}

Contained sub-modules

The list of uber/fx modules that are currently available: