Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiActionBuilder ¶
type ApiActionBuilder interface { With(function model.ApiActionFunction) ApiActionBuilder Build() model.ApiAction }
func NewApiActionBuilder ¶
func NewApiActionBuilder() ApiActionBuilder
type ApiCallHandlerBuilder ¶
type ApiCallHandlerBuilder interface { // Define mandatory path in various formats (eg.: /path/ or /path/{var} etc...) // accordingly to the gorilla mux Router specifications WithPath(path string) ApiCallHandlerBuilder //Ass a new Method Handler to the builder WithWebMethodHandling(method string, action model.ApiAction) ApiCallHandlerBuilder // Associate an error channel, for creating a flow of errors from the request WithErrorChannel(ch chan error) ApiCallHandlerBuilder // Build the model.ApiCallHandler and report any error occurred during the build process Build() (model.ApiCallHandler, error) }
Helper for creating a new model.ApiCallHandler
func NewApiCallHandlerBuilder ¶
func NewApiCallHandlerBuilder() ApiCallHandlerBuilder
type ClientConfigBuilder ¶
type ClientConfigBuilder interface { // Associate an host and a port to the builder workflow WithHost(protocol, address string, port int) ClientConfigBuilder // Associate certificate and key files full name to the builder workflow WithTLSCerts(certificate string, key string) ClientConfigBuilder // Add some more certificate files to the certificate list to the builder workflow // If no certificate is settled up first call with associate the main TLS certificate files MoreTLSCerts(certificate string, key string) ClientConfigBuilder // Add one root CA certificate files to the certificate list to the builder workflow WithRootCaCert(certificate string) ClientConfigBuilder // Add one client CA certificate files to the certificate list to the builder workflow WithClientCaCert(certificate string) ClientConfigBuilder // Set up the certificate manager for the auto-scan of certificates for a folder WithCertificateManager(dir string) ClientConfigBuilder // Add more root CA certificate files to the certificate list to the builder workflow MoreClientCaCerts(certificate string) ClientConfigBuilder // Add more client CA certificate files to the certificate list to the builder workflow MoreRootCaCerts(certificate string) ClientConfigBuilder // Set min version different from tls.VersionTLS12 WithMinVersion(min uint16) ClientConfigBuilder // Set the insecure skip verify flag, by default it's false WithInsecureSkipVerify(insecure bool) ClientConfigBuilder // Set up renegotiation, by default it's sett up to: tls.RenegotiateNever WithRenegotiationSupport(renegotiation tls.RenegotiationSupport) ClientConfigBuilder // Set up the Client Session Cache manager (suggested: tls.NewLRUClientSessionCache(1024) or more ...) WithClientSessionCache(cache tls.ClientSessionCache) ClientConfigBuilder // Add more Cipher suites to the preset values : tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, // tls.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, tls.TLS_RSA_WITH_AES_256_GCM_SHA384, // tls.TLS_RSA_WITH_AES_256_CBC_SHA MoreCipherSuites(cipherSuite uint16) ClientConfigBuilder // Add more Curve Ids to the current TLS Curve Preferences, adding to the preset values : tls.CurveP521, tls.CurveP384, // tls.CurveP256 MoreCurvePreferences(curve tls.CurveID) ClientConfigBuilder // Set preference for Server Size Cipher Suite WithPreferServerCipherSuites(preferServerCipherSuites bool) ClientConfigBuilder // Build the model.ClientConfig and report any error occurred during the build process Build() (model.ClientConfig, error) }
Helper for building a model.ClientConfig instance
func NewClientConfigBuilder ¶
func NewClientConfigBuilder() ClientConfigBuilder
type ServerConfigBuilder ¶
type ServerConfigBuilder interface { // Associate an host and a port to the builder workflow WithHost(address string, port int) ServerConfigBuilder // Associate certificate and key files full path to the builder workflow WithTLSCerts(certificate string, key string) ServerConfigBuilder // Add some more certificate files to the certificate list to the builder workflow // If no certificate is settled up first call with associate the main TLS certificate files MoreTLSCerts(certificate string, key string) ServerConfigBuilder // Add one root CA certificate files to the certificate list to the builder workflow WithRootCaCert(certificate string) ServerConfigBuilder // Add one client CA certificate files to the certificate list to the builder workflow WithClientCaCert(certificate string) ServerConfigBuilder // Set up the certificate manager for the auto-scan of certificates for a folder WithCertificateManager(dir string) ServerConfigBuilder // Add more root CA certificate files to the certificate list to the builder workflow MoreClientCaCerts(certificate string) ServerConfigBuilder // Add more client CA certificate files to the certificate list to the builder workflow MoreRootCaCerts(certificate string) ServerConfigBuilder // Set min version different from tls.VersionTLS12 WithMinVersion(min uint16) ServerConfigBuilder // Set the insecure skip verify flag, by default it's false WithInsecureSkipVerify(insecure bool) ServerConfigBuilder // Set up renegotiation, by default it's sett up to: tls.RenegotiateNever WithRenegotiationSupport(renegotiation tls.RenegotiationSupport) ServerConfigBuilder // Set up the Client Session Cache manager (suggested: tls.NewLRUClientSessionCache(1024) or more ...) WithClientSessionCache(cache tls.ClientSessionCache) ServerConfigBuilder // Add more Cipher suites to the preset values : tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, // tls.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, tls.TLS_RSA_WITH_AES_256_GCM_SHA384, // tls.TLS_RSA_WITH_AES_256_CBC_SHA MoreCipherSuites(cipherSuite uint16) ServerConfigBuilder // Add more Curve Ids to the current TLS Curve Preferences, adding to the preset values : tls.CurveP521, tls.CurveP384, // tls.CurveP256 MoreCurvePreferences(curve tls.CurveID) ServerConfigBuilder // Set preference for Server Cipher Suite WithPreferServerCipherSuites(preferServerCipherSuites bool) ServerConfigBuilder // Build the model.ServerConfig and report any error occurred during the build process Build() (model.ServerConfig, error) }
Helper for building a model.ServerConfig instance
func NewServerConfigBuilder ¶
func NewServerConfigBuilder() ServerConfigBuilder
Click to show internal directories.
Click to hide internal directories.