{"modulePath":"github.com/weiwolves/pkg","version":"v0.0.0-20200322065615-581c8d33cff6","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package backendsigned\n\n## Functions\n\n```go\nfunc NewConfigStructure() (element.Sections, error)\n```\nNewConfigStructure global configuration structure for this package. Used in frontend (to display the user all the settings) and in backend (scope checks and default values). See the source code of this function for the overall available sections, groups and fields.\n\n## Types\n\n```go\ntype Configuration struct {\n\t*signed.OptionFactories\n\n\t// Disabled set to true to disable the middle ware.\n\t//\n\t// Path: net/signed/disabled\n\tDisabled cfgmodel.Bool\n\n\t// InTrailer enables to write the signature resp. hash into the HTTP trailer.\n\t// Note not all clients can read a trailer.\n\t//\n\t// Path: net/signed/in_trailer\n\tInTrailer cfgmodel.Bool\n\n\t// AllowedMethods specifies all HTTP methods which will be accepted by the\n\t// WithRequestSignatureValidation middleware.\n\t//\n\t// Path: net/signed/allowed_methods\n\tAllowedMethods cfgmodel.StringCSV\n\n\t// Key defines the symmetric key/password for the hashing algorithms. You\n\t// must set a type to satisfy the cfgmodel.Encryptor interface or this\n\t// package panics.\n\t//\n\t// Path: net/signed/key\n\tKey cfgmodel.Obscure\n\n\t// Algorithm defines currently supported cryptographical hashing algorithms\n\t//\n\t// Path: net/signed/algorithm\n\tAlgorithm cfgmodel.Str\n\n\t// HTTPHeaderType sets the type of the HTTP header to either Content-HMAC or\n\t// Content-Signature.\n\t//\n\t// Path: net/signed/http_header_type\n\tHTTPHeaderType cfgmodel.Str\n\n\t// KeyID name or ID of the key which is used in the HMAC algorithm. Only usable when\n\t// HTTPHeaderType has been set to \"signature\"\n\t//\n\t// Path: net/signed/key_id\n\tKeyID cfgmodel.Str\n}\n```\nConfiguration just exported for the sake of documentation. See fields for more information. Please call the New() function for creating a new Backend object. Only the New() function will set the paths to the fields.\n\n```go\nfunc New(cfgStruct element.Sections, opts ...cfgmodel.Option) *Configuration\n```\nNew initializes the backend configuration models containing the cfgpath.Route variable to the appropriate entries in the storage. The argument Sections and opts will be applied to all models.\n\n```go\nfunc (be *Configuration) PrepareOptionFactory() signed.OptionFactoryFunc\n```\nPrepareOptionFactory creates a closure around the type Backend. The closure will be used during a scoped request to figure out the configuration depending on the incoming scope. An option array will be returned by the closure.\n\n","path":"github.com/weiwolves/pkg/net/signed/backendsigned","name":"backendsigned","synopsis":"","isRedistributable":true}
