service

package
v0.0.0-...-c1bb697 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

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)
}

func Comment

func Comment() IComment

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

Jump to

Keyboard shortcuts

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