httpserver

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

One or two sentence synopsis of the package...

Overview

One or two paragraph overview of the package... (This page describes the nature of the individual package.)

More information at https://github.com/senzing-garage/demo-quickstart

Another Header

Details of the package... Lorem ipsum dolor sit amet, consectetur adipiscing elit...

Examples

The examples given here should be specific to the package.

Examples of use can be seen in the examplepackage_test.go files.

package main
import (
	fmt

	"github.com/senzing-garage/demo-quickstart/examplepackage"
)

func main() {
	ctx := context.TODO()
	testObject := &ExamplePackageImpl{
		Something: "I'm here",
	}
	err := testObject.SaySomething(ctx)
	if err != nil {
		fmt.Println("whoops")
	}
}

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HttpServer

type HttpServer interface {
	Serve(ctx context.Context) error
}

The HttpServer interface...

type HttpServerImpl

type HttpServerImpl struct {
	ApiUrlRoutePrefix              string // FIXME: Only works with "api"
	EnableAll                      bool
	EnableEntitySearch             bool
	EnableSenzingRestAPI           bool
	EnableSwaggerUI                bool
	EnableXterm                    bool
	EntitySearchRoutePrefix        string // FIXME: Only works with "entity-search"
	GrpcDialOptions                []grpc.DialOption
	GrpcTarget                     string
	LogLevelName                   string
	ObserverOrigin                 string
	Observers                      []observer.Observer
	OpenApiSpecificationRest       []byte
	ReadHeaderTimeout              time.Duration
	SenzingEngineConfigurationJson string
	SenzingModuleName              string
	SenzingVerboseLogging          int64
	ServerAddress                  string
	ServerOptions                  []senzingrestapi.ServerOption
	ServerPort                     int
	SwaggerUrlRoutePrefix          string // FIXME: Only works with "swagger"
	TtyOnly                        bool
	XtermAllowedHostnames          []string
	XtermArguments                 []string
	XtermCommand                   string
	XtermConnectionErrorLimit      int
	XtermKeepalivePingTimeout      int
	XtermMaxBufferSizeBytes        int
	XtermUrlRoutePrefix            string // FIXME: Only works with "xterm"
}

HttpServerImpl is the default implementation of the HttpServer interface.

func (*HttpServerImpl) Serve

func (httpServer *HttpServerImpl) Serve(ctx context.Context) error
Example

Output:

type TemplateVariables

type TemplateVariables struct {
	HttpServerImpl
	ApiServerStatus    string
	ApiServerUrl       string
	EntitySearchStatus string
	EntitySearchUrl    string
	HtmlTitle          string
	RequestHost        string
	SwaggerStatus      string
	SwaggerUrl         string
	XtermStatus        string
	XtermUrl           string
}

Jump to

Keyboard shortcuts

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