common

package
v0.0.0-...-237f4c2 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2020 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIClient

type APIClient interface {
	Connect(ipAddress string, port int64) error
	ConnectTSL(ipAddress string, port int64, config *TLSConfig) error
	Close() error
	GetApi(protocol common.RestProtocol, path string, method *common.RestMethod, produces *common.MimeType, consumes *common.MimeType, body *[]byte, values *url.Values) (int, []byte, error)
}

type ApiServer

type ApiServer interface {
	Start(ipAddress string, port int64) error
	StartTLS(ipAddress string, port int64, config *TLSConfig) error
	Stop() error
	Shutdown() error
	IsRunning() bool
	AddApiAction(path string, action common.ApiAction, hasInternalAnswer bool, method *common.RestMethod, produces *common.MimeType, consumes *common.MimeType) bool
	AddApiStream(path string, stream streams.DataStream, method *common.RestMethod, produces *common.MimeType, consumes *common.MimeType) bool
}

type HandlerRef

type HandlerRef struct {
	Path      string
	Action    common.ApiAction
	HasAnswer bool
	Stream    streams.DataStream
	Method    *common.RestMethod
	Consumes  *common.MimeType
	Produces  *common.MimeType
}

func (*HandlerRef) IsAction

func (ha *HandlerRef) IsAction() bool

func (*HandlerRef) IsStream

func (ha *HandlerRef) IsStream() bool

func (*HandlerRef) String

func (ha *HandlerRef) String() string

type TLSConfig

type TLSConfig struct {
	CaCertificate string
	Certificates  []common2.CertificateKeyPair
	UseInsecure   bool
}

Jump to

Keyboard shortcuts

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