Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CertificateKeyPair ¶
Key-Value Pair structure that contains TLS Client/Server Certificate and Key file path pair
type HandlerStruct ¶
type HandlerStruct struct { Handler *RestCallback Consumes *common.MimeType Produces *common.MimeType Path string Methods []common.RestMethod }
Structure containing
func (HandlerStruct) String ¶
func (hs HandlerStruct) String() string
String representation of the Handler Strcture
type RestCallback ¶
type RestCallback func(w http.ResponseWriter, req *http.Request, path string, accepts common.MimeType, produces common.MimeType)
Generic Rest Callback function for handling pattern request
type RestClient ¶
type RestClient interface { // Authenticate and open connectivity with the server Open() error // Close connection and sign-off the server Close() error //Send a requerst to the connected server Request(protocol common.RestProtocol, path string, method common.RestMethod, accepts *common.MimeType, body *[]byte, values *url.Values) (int, []byte, error) // Returns information about server connectivity state IsConnected() bool }
Generic Rest Client interface
type RestServer ¶
type RestServer interface { AddPath(path string, callback RestCallback, accepts *common.MimeType, produces *common.MimeType, allowedMethods []common.RestMethod) bool AddRootPath(callback RestCallback, accepts *common.MimeType, produces *common.MimeType, allowedMethods []common.RestMethod) bool StartTLS(hostOrIpAddress string, port int32, certs []CertificateKeyPair, CaCertificate string, insecure bool) error Start(hostOrIpAddress string, port int32) error Stop() error Shutdown() error IsRunning() bool WaitFor() error }
Generic Rest Server interface
Click to show internal directories.
Click to hide internal directories.