1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-17 08:55:57 +00:00

New feature: versioning.Aliases

Thanks @mulyawansentosa and @remopavithran for your donates ❤️
This commit is contained in:
Gerasimos (Makis) Maropoulos
2021-01-06 01:52:39 +02:00
parent 7aa2d1f9d5
commit b409f7807e
28 changed files with 396 additions and 85 deletions

View File

@@ -53,6 +53,8 @@ type ConfigurationReadOnly interface {
GetLanguageInputContextKey() string
// GetVersionContextKey returns the VersionContextKey field.
GetVersionContextKey() string
// GetVersionAliasesContextKey returns the VersionAliasesContextKey field.
GetVersionAliasesContextKey() string
// GetViewEngineContextKey returns the ViewEngineContextKey field.
GetViewEngineContextKey() string

View File

@@ -81,15 +81,15 @@ to the end-developer's custom implementations.
// SimpleUser is a simple implementation of the User interface.
type SimpleUser struct {
Authorization string `json:"authorization,omitempty"`
AuthorizedAt time.Time `json:"authorized_at,omitempty"`
ID string `json:"id,omitempty"`
Username string `json:"username,omitempty"`
Password string `json:"password,omitempty"`
Email string `json:"email,omitempty"`
Roles []string `json:"roles,omitempty"`
Token json.RawMessage `json:"token,omitempty"`
Fields Map `json:"fields,omitempty"`
Authorization string `json:"authorization,omitempty" db:"authorization"`
AuthorizedAt time.Time `json:"authorized_at,omitempty" db:"authorized_at"`
ID string `json:"id,omitempty" db:"id"`
Username string `json:"username,omitempty" db:"username"`
Password string `json:"password,omitempty" db:"password"`
Email string `json:"email,omitempty" db:"email"`
Roles []string `json:"roles,omitempty" db:"roles"`
Token json.RawMessage `json:"token,omitempty" db:"token"`
Fields Map `json:"fields,omitempty" db:"fields"`
}
var _ User = (*SimpleUser)(nil)

View File

@@ -239,6 +239,10 @@ var ignoreMainHandlerNames = [...]string{
"iris.reCAPTCHA",
"iris.profiling",
"iris.recover",
"iris.accesslog",
"iris.grpc",
"iris.requestid",
"iris.rewrite",
}
// ingoreMainHandlerName reports whether a main handler of "name" should

View File

@@ -62,6 +62,10 @@ type RouteReadOnly interface {
// MainHandlerIndex returns the first registered handler's index for the route.
MainHandlerIndex() int
// Property returns a specific property based on its "key"
// of this route's Party owner.
Property(key string) (interface{}, bool)
// Sitemap properties: https://www.sitemaps.org/protocol.html
// GetLastMod returns the date of last modification of the file served by this route.