app

package
v0.0.0-...-562e214 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2024 License: MIT Imports: 32 Imported by: 1

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 NewApp

func NewApp(calls ...Option) *App

func (*App) GqlgenRouter

func (a *App) GqlgenRouter() chi.Router

GqlgenRouter USE IN YOUR OWN RISK

func (*App) HttpRouter

func (a *App) HttpRouter() chi.Router

HttpRouter USE FOR HttpServiceType ONLY

func (*App) Run

func (a *App) Run(services ...Service)

type GqlgenParams

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

func (*GqlgenParams) GqlgenSchema

func (p *GqlgenParams) GqlgenSchema() graphql.ExecutableSchema

func (*GqlgenParams) SetGqlgenSchema

func (p *GqlgenParams) SetGqlgenSchema(schema graphql.ExecutableSchema)

type GrpcParams

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

func (*GrpcParams) GrpcClientOptions

func (p *GrpcParams) GrpcClientOptions() []grpc.DialOption

func (*GrpcParams) GrpcHttpProxyServeMux

func (p *GrpcParams) GrpcHttpProxyServeMux() *runtime.ServeMux

func (*GrpcParams) GrpcServerEndpoint

func (p *GrpcParams) GrpcServerEndpoint() string

func (*GrpcParams) GrpcServiceRegistrar

func (p *GrpcParams) GrpcServiceRegistrar() grpc.ServiceRegistrar

func (*GrpcParams) SetOpenAPIDoc

func (p *GrpcParams) SetOpenAPIDoc(doc []byte)

type Option

type Option func(o *calledAppOptions)

func WithDutyHttpServePort

func WithDutyHttpServePort(port int) Option

func WithGqlgenFieldMiddlewares

func WithGqlgenFieldMiddlewares(middlewares ...graphql.FieldMiddleware) Option

func WithGqlgenMiddlewares

func WithGqlgenMiddlewares(middlewares ...func(http.Handler) http.Handler) Option

func WithGqlgenOperationMiddlewares

func WithGqlgenOperationMiddlewares(middlewares ...graphql.OperationMiddleware) Option

func WithGqlgenResponseMiddlewares

func WithGqlgenResponseMiddlewares(middlewares ...graphql.ResponseMiddleware) Option

func WithGqlgenServePort

func WithGqlgenServePort(port int) Option

func WithGrpcHttpProxyPort

func WithGrpcHttpProxyPort(port int) Option

func WithGrpcServePort

func WithGrpcServePort(port int) Option

func WithGrpcServerOptions

func WithGrpcServerOptions(options ...grpc.ServerOption) Option

WithGrpcServerOptions USE IN YOUR OWN RISK

func WithGrpcStatsHandler

func WithGrpcStatsHandler(handler stats.Handler) Option

func WithGrpcTapHandler

func WithGrpcTapHandler(handler tap.ServerInHandle) Option

func WithGrpcUnaryServerInterceptors

func WithGrpcUnaryServerInterceptors(interceptors ...grpc.UnaryServerInterceptor) Option

type RegisterParams

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

func (*RegisterParams) Context

func (p *RegisterParams) Context() context.Context

func (*RegisterParams) Gqlgen

func (p *RegisterParams) Gqlgen() *GqlgenParams

func (*RegisterParams) Grpc

func (p *RegisterParams) Grpc() *GrpcParams

func (*RegisterParams) SetServiceType

func (p *RegisterParams) SetServiceType(serviceType ServiceType)

type Service

type Service interface {
	RegisterService(params *RegisterParams) error
}

type ServiceType

type ServiceType uint32
const (
	UnknownServiceType ServiceType = 0
	GrpcServiceType    ServiceType = 1
	GqlgenServiceType  ServiceType = 2
	HttpServiceType    ServiceType = 3
)

Jump to

Keyboard shortcuts

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