libs

package
v0.0.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 10, 2022 License: MIT Imports: 11 Imported by: 6

Documentation

Index

Constants

View Source
const BasicAuthUserKey = "BasicAuthUserKey"
View Source
const RefKeyForBasicAuthAccountCenter = "_.mdl.basic_auth_account"
View Source
const RefKeyForLogFormatter = "_.mdl.log.formatter"

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountForBasicAuth added in v0.0.4

type AccountForBasicAuth interface {
	GetRealm() string
	SearchCredential(credential string) (account any, found bool)
}

AccountForBasicAuth

     ac := &AccountCenter{} // the struct implements AccountForBasicAuth interface
	 config := NewWebConfig().SetDependentRef(RefKeyForBasicAuthAccountCenter, ac)

type BasicAuthMiddleware added in v0.0.4

type BasicAuthMiddleware struct {
	WebMiddleware
	// contains filtered or unexported fields
}

func (*BasicAuthMiddleware) Authorize added in v0.0.4

func (b *BasicAuthMiddleware) Authorize(ctx struct {
	WebContext `http:"basic_auth,method=handle"`
})

func (*BasicAuthMiddleware) DidDependencyInitialization added in v0.0.4

func (b *BasicAuthMiddleware) DidDependencyInitialization()

type CorsMiddleware

type CorsMiddleware struct {
	WebMiddleware
	// contains filtered or unexported fields
}

func (*CorsMiddleware) DidDependencyInitialization added in v0.0.4

func (m *CorsMiddleware) DidDependencyInitialization()

func (*CorsMiddleware) HandleCors

func (m *CorsMiddleware) HandleCors(ctx struct {
	WebContext `http:""`
})

type LogMiddleware added in v0.0.4

type LogMiddleware struct {
	WebMiddleware
	// contains filtered or unexported fields
}

func (*LogMiddleware) DidDependencyInitialization added in v0.0.4

func (l *LogMiddleware) DidDependencyInitialization()

func (*LogMiddleware) HandleLog added in v0.0.4

func (l *LogMiddleware) HandleLog(ctx struct {
	WebContext `http:""`
})

type SwaggerController

type SwaggerController struct {
	WebController `http:""`
	// contains filtered or unexported fields
}

SwaggerController embeds a Swagger/OpenAPI entry. Swagger file validator: https://github.com/swagger-api/validator-badge

func (*SwaggerController) Open

func (s *SwaggerController) Open(name string) (fs.File, error)

func (*SwaggerController) SetupRouter

func (s *SwaggerController) SetupRouter(router WebRouter, _ ...any)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL