depstubber

This commit is contained in:
Kevin Stubbings
2023-11-21 14:31:52 -08:00
parent d7e2fbc11d
commit 8277c602ac

View File

@@ -0,0 +1,53 @@
// Code generated by depstubber. DO NOT EDIT.
// This is a simple stub for github.com/rs/cors, strictly for use in testing.
// See the LICENSE file for information about the licensing of the original library.
// Source: github.com/rs/cors (exports: Options; functions: New)
// Package cors is a stub of github.com/rs/cors, generated by depstubber.
package cors
import (
http "net/http"
)
type Cors struct {
Log Logger
}
func (_ *Cors) Handler(_ http.Handler) http.Handler {
return nil
}
func (_ *Cors) HandlerFunc(_ http.ResponseWriter, _ *http.Request) {}
func (_ *Cors) OriginAllowed(_ *http.Request) bool {
return false
}
func (_ *Cors) ServeHTTP(_ http.ResponseWriter, _ *http.Request, _ http.HandlerFunc) {}
type Logger interface {
Printf(_ string, _ ...interface{})
}
func New(_ Options) *Cors {
return nil
}
type Options struct {
AllowedOrigins []string
AllowOriginFunc func(string) bool
AllowOriginRequestFunc func(*http.Request, string) bool
AllowOriginVaryRequestFunc func(*http.Request, string) (bool, []string)
AllowedMethods []string
AllowedHeaders []string
ExposedHeaders []string
MaxAge int
AllowCredentials bool
AllowPrivateNetwork bool
OptionsPassthrough bool
OptionsSuccessStatus int
Debug bool
Logger Logger
}