application

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2025 License: Apache-2.0 Imports: 17 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
}

func New

func New(name, port string) *App

func (*App) Addr

func (app *App) Addr() string

func (*App) Build

func (app *App) Build() (*App, error)

func (*App) Ctx

func (app *App) Ctx() *router.Ctx

func (*App) Database

func (app *App) Database() *database.DB

func (*App) Elastic

func (app *App) Elastic() *elastic.Elastic

func (*App) GRPCServer

func (app *App) GRPCServer() *grpc.Server

func (*App) Logger

func (app *App) Logger() *logger.Logger

func (*App) RegisterService

func (app *App) RegisterService(s Service)

func (*App) Run

func (app *App) Run() error

func (*App) SetHTTPTimeout

func (app *App) SetHTTPTimeout(timeout time.Duration)

func (*App) Stop

func (app *App) Stop() error

func (*App) Store

func (app *App) Store() *store.Store

func (*App) WithDatabase

func (app *App) WithDatabase(db *database.DB, tables ...interface{}) *App

func (*App) WithElastic

func (app *App) WithElastic(addr string) *App

func (*App) WithGRPCServer

func (app *App) WithGRPCServer(port string, timeout ...time.Duration) *App

func (*App) WithOpenTelemetry

func (app *App) WithOpenTelemetry(url string) *App

func (*App) WithStore

func (app *App) WithStore() *App

type Service

type Service interface {
	RegisterHandlers(r *router.Server)
}

type TestApp

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

func NewTestApp

func NewTestApp(t *testing.T) *TestApp

func (*TestApp) Build

func (tapp *TestApp) Build() (*TestApp, error)

func (*TestApp) Ctx

func (tapp *TestApp) Ctx() *router.Ctx

func (*TestApp) Database

func (tapp *TestApp) Database() *database.DB

func (*TestApp) Elastic

func (tapp *TestApp) Elastic() *elastic.Elastic

func (*TestApp) Endpoint

func (tapp *TestApp) Endpoint() string

func (*TestApp) GRPCAddr

func (tapp *TestApp) GRPCAddr() string

func (*TestApp) GRPCServer

func (tapp *TestApp) GRPCServer() *grpc.Server

func (*TestApp) Logger

func (tapp *TestApp) Logger() *logger.Logger

func (*TestApp) RegisterService

func (tapp *TestApp) RegisterService(s Service)

func (*TestApp) RunTests

func (tapp *TestApp) RunTests(tests ...func(t *testing.T, tapp *TestApp)) error

func (*TestApp) Store

func (tapp *TestApp) Store() *store.Store

func (*TestApp) Teardown

func (tapp *TestApp) Teardown()

func (*TestApp) WithDatabase

func (tapp *TestApp) WithDatabase(tables ...interface{}) *TestApp

func (*TestApp) WithElastic

func (tapp *TestApp) WithElastic() *TestApp

func (*TestApp) WithGRPCServer

func (tapp *TestApp) WithGRPCServer(port string, timeout ...time.Duration) *TestApp

func (*TestApp) WithStore

func (tapp *TestApp) WithStore() *TestApp

Jump to

Keyboard shortcuts

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