webservice

package
v0.0.1-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HTTP_CLIENT_TIMEOUT       = 10 * time.Second
	HTTP_SERVER_READ_TIMEOUT  = 5 * time.Second
	HTTP_SERVER_WRITE_TIMEOUT = 30 * time.Second //10 * time.Second
	HTTP_SERVER_IDLE_TIMEOUT  = 120 * time.Second
)

Variables

View Source
var (
	ErrLoadTlsCerts = errors.New("webserver: unable to load TLS certificates")
	ErrBindPort     = errors.New("webserver: unable to bind to web service port")
)

Functions

This section is empty.

Types

type MutualTLSClient

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

func NewMutalTLSClient

func NewMutalTLSClient(
	logger *logging.Logger,
	ca ca.CertificateAuthority,
	attrs *keystore.KeyAttributes) MutualTLSClient

func (MutualTLSClient) Get

func (client MutualTLSClient) Get(url string) ([]byte, error)

Performs an HTTP GET request

type Signer

type Signer struct {
	crypto.Signer
	// contains filtered or unexported fields
}

func NewSigner

func NewSigner(
	logger *logging.Logger,
	ca ca.CertificateAuthority,
	cert *x509.Certificate,
	cn string,
	password []byte) *Signer

func (*Signer) Public

func (signer *Signer) Public() crypto.PublicKey

func (*Signer) Sign

func (signer *Signer) Sign(
	rand io.Reader,
	digest []byte,
	opts crypto.SignerOpts) ([]byte, error)

type WebServerV1

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

func NewWebServerV1

func NewWebServerV1(
	app *app.App,
	restServiceRegistry rest.RestServiceRegistry) *WebServerV1

func (*WebServerV1) Run

func (server *WebServerV1) Run()

func (WebServerV1) Shutdown

func (server WebServerV1) Shutdown()

Directories

Path Synopsis
v1

Jump to

Keyboard shortcuts

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