diff options
Diffstat (limited to 'experimental/embed/types.go')
| -rw-r--r-- | experimental/embed/types.go | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/experimental/embed/types.go b/experimental/embed/types.go new file mode 100644 index 000000000..bd048206e --- /dev/null +++ b/experimental/embed/types.go @@ -0,0 +1,24 @@ +package embed + +import ( + "github.com/authelia/authelia/v4/internal/configuration/schema" + "github.com/authelia/authelia/v4/internal/middlewares" +) + +// Configuration is a type alias for the internal schema.Configuration type. It allows manually configuring Authelia +// and transitioning to the internal implementation. +type Configuration schema.Configuration + +// ToInternal converts this Configuration struct into a *schema.Configuration struct using a type cast. +func (c *Configuration) ToInternal() *schema.Configuration { + return (*schema.Configuration)(c) +} + +// Providers is a type alias for the internal middlewares.Providers type. It allows manually performing setup of the +// various Authelia providers and transitioning to the internal implementation. +type Providers middlewares.Providers + +// ToInternal converts this Providers struct into a middlewares.Providers struct using a type cast. +func (p Providers) ToInternal() middlewares.Providers { + return middlewares.Providers(p) +} |
