web

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2023 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JSON

func JSON(c *gin.Context, code int, message string)

Types

type AdminServer

type AdminServer struct {
	// contains filtered or unexported fields
}

func (*AdminServer) Run

func (as *AdminServer) Run()

func (*AdminServer) Shutdown

func (as *AdminServer) Shutdown(ctx context.Context) error

type ErrorResponse

type ErrorResponse struct {
	Type     string `json:"type"`
	Title    string `json:"title"`
	Status   int    `json:"status"`
	Detail   string `json:"detail"`
	Instance string `json:"instance"`
}

type KeyManager

type KeyManager interface {
	GetKeysByTag(tag string) ([]*key.ResponseKey, error)
	UpdateKey(id string, key *key.UpdateKey) (*key.ResponseKey, error)
	CreateKey(key *key.RequestKey) (*key.ResponseKey, error)
	DeleteKey(id string) error
}

type KeyReportingManager added in v0.0.7

type KeyReportingManager interface {
	GetKeyReporting(keyId string) (*key.KeyReporting, error)
	GetEventReporting(e *event.ReportingRequest) (*event.ReportingResponse, error)
}

type ProviderSettingsManager added in v1.0.0

type ProviderSettingsManager interface {
	CreateSetting(setting *provider.Setting) (*provider.Setting, error)
	UpdateSetting(id string, setting *provider.Setting) (*provider.Setting, error)
	GetSetting(id string) (*provider.Setting, error)
}

type ProxyServer

type ProxyServer struct {
	// contains filtered or unexported fields
}

func NewProxyServer

func NewProxyServer(log *zap.Logger, mode, privacyMode string, m KeyManager, psm ProviderSettingsManager, ks keyStorage, kms keyMemStorage, e estimator, v validator, r recorder, credential string, enc encrypter, rlm rateLimitManager, timeOut time.Duration) (*ProxyServer, error)

func (*ProxyServer) Run

func (ps *ProxyServer) Run()

func (*ProxyServer) Shutdown

func (ps *ProxyServer) Shutdown(ctx context.Context) error

Jump to

Keyboard shortcuts

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