Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterAuthorize ¶
func RegisterAuthorize(i IAuthorize)
func RegisterComment ¶
func RegisterComment(i IComment)
func RegisterMiddleware ¶
func RegisterMiddleware(i IMiddleware)
Types ¶
type IAuthorize ¶
type IAuthorize interface { // Authorization app authorization Authorization(ctx context.Context, in *model.AuthorizeInput) (out *model.AuthorizeOutput, err error) }
func Authorize ¶
func Authorize() IAuthorize
type IComment ¶
type IComment interface { // One query one record from table for comment. Home(ctx context.Context, in *model.HomeInput) (out *model.HomeOutput, err error) // Counter query count from table for comment. Counter(ctx context.Context, in *model.CounterInput) (out *model.CounterOutput, err error) // Redirect to music. Redirect(ctx context.Context, in *model.RedirectInput) (out *model.RedirectOutput, err error) }
type IMiddleware ¶
type IMiddleware interface { // Initializer is a middleware handler for ghttp.Request. Initializer(r *ghttp.Request) // ClientIP sets the client ip to the context. ClientIP(r *ghttp.Request) // AuthLogin sets the auth info to the context. AuthLogin(r *ghttp.Request) // Logger Middleware Log Logger(r *ghttp.Request) // HandlerResponse is a middleware handler for ghttp.Request. HandlerResponse(r *ghttp.Request) // AuthorizationForAPIKey is a middleware handler for ghttp.Request. AuthorizationForAPIKey(r *ghttp.Request) // AuthorizationForPassword is a middleware handler for ghttp.Request. AuthorizationForPassword(r *ghttp.Request) // RequestLog is a middleware handler for ghttp.Request. RequestLog(r *ghttp.Request) }
func Middleware ¶
func Middleware() IMiddleware
Click to show internal directories.
Click to hide internal directories.