app

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	// contains filtered or unexported fields
}

App is a struct that holds the dependencies for the application. It includes a serviceProvider which provides the services for the application, a grpcServer which is the gRPC server for the application, a db which is the database connection for the application, and a cache which is the Redis client for the application.

func NewApp

func NewApp(ctx context.Context) (*App, error)

NewApp is a function that creates a new App struct. It takes a context as a parameter and returns a pointer to an App struct and an error. It initializes the dependencies of the App struct by calling the initDeps method. If the initDeps method returns an error, NewApp returns nil and the error. If the initDeps method does not return an error, NewApp returns a pointer to the App struct and nil error.

func (*App) Run

func (a *App) Run() error

Run is a method on the App struct. It starts the gRPC server by calling the runGRPCServer method and returns any error that it returns.

Jump to

Keyboard shortcuts

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