Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AdminServer ¶
type AdminServer struct {
// contains filtered or unexported fields
}
func NewAdminServer ¶
func NewAdminServer(log *zap.Logger, mode string, m KeyManager, krm KeyReportingManager) (*AdminServer, error)
func (*AdminServer) Run ¶
func (as *AdminServer) Run()
type ErrorResponse ¶
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)
}
type ProxyServer ¶
type ProxyServer struct {
// contains filtered or unexported fields
}
func NewProxyServer ¶
func NewProxyServer(log *zap.Logger, mode, privacyMode string, m KeyManager, ks keyStorage, kms keyMemStorage, e estimator, v validator, r recorder, credential string, enc encrypter, rlm rateLimitManager) (*ProxyServer, error)
func (*ProxyServer) Run ¶
func (ps *ProxyServer) Run()
type Route ¶
type Route struct {
// contains filtered or unexported fields
}
func NewRoute ¶
func NewRoute(rc *config.RouteConfig, openAiClient openai.OpenAiClient, lg logger.Logger, lc *config.LoggerConfig, mode string) (*Route, error)
type ValidationError ¶
type ValidationError interface { Error() string Validation() }
type WebServer ¶
type WebServer struct {
// contains filtered or unexported fields
}
func NewWebServer ¶
Click to show internal directories.
Click to hide internal directories.