controller

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CORS

func CORS() gin.HandlerFunc

func IPLimitCheck

func IPLimitCheck(c *gin.Context)

func InitGin

func InitGin(listen string) (httpServer *http.Server)

func NoCache

func NoCache() gin.HandlerFunc

func Routes

func Routes(r *gin.Engine)

Types

type ConfigData

type ConfigData struct {
	TrustDomain           []string `json:"trust_domain"`
	AuthorizationEndpoint string   `json:"authorization_endpoint"`
	TokenEndpoint         string   `json:"token_endpoint"`
	UserinfoEndpoint      string   `json:"userinfo_endpoint"`
	DefaultScope          string   `json:"default_scope"`
}

type ExchangeTokenByCodeRequest

type ExchangeTokenByCodeRequest struct {
	Code         string `json:"code"`
	ClientID     string `json:"client_id"`
	ClientSecret string `json:"client_secret"`
	Scope        string `json:"scope"`
	RedirectURI  string `json:"redirect_uri"`
}

type GlobalResponse

type GlobalResponse struct {
	Code int         `json:"code"`
	Msg  string      `json:"msg"`
	Data interface{} `json:"data"`
}

type RefreshTokenRequest

type RefreshTokenRequest struct {
	ClientID     string `json:"client_id"`
	ClientSecret string `json:"client_secret"`
	RefreshToken string `json:"refresh_token"`
}

type ReqApiData

type ReqApiData struct {
	Method          string            `json:"method"`
	ApiAddr         string            `json:"api_addr"`
	AccessToken     string            `json:"access_token"`
	AccessTokenType string            `json:"access_token_type"`
	Header          map[string]string `json:"header"`
	HttpBody        string            `json:"http_body"`
}

type ReqCredentialData

type ReqCredentialData struct {
	ClientId     string `json:"client_id"`
	ClientSecret string `json:"client_secret"`
}

type ReqPasswordData

type ReqPasswordData struct {
	ClientId     string `json:"client_id"`
	ClientSecret string `json:"client_secret"`
	Username     string `json:"username"`
	Password     string `json:"password"`
}

Jump to

Keyboard shortcuts

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