Documentation ¶
Index ¶
- Constants
- Variables
- func AuthFromMD(ctx context.Context, expectedScheme string) (string, error)
- func AuthFunction(ctx context.Context, jwtValidator *validator.Validator, config *config.Config) (ctxResult context.Context, err error)
- func Get(config *config.Config) (grpc.UnaryServerInterceptor, grpc.StreamServerInterceptor)
- func GetJWTValidator(config *config.Config) *validator.Validator
- func StreamMetricsServerInterceptor() grpc.StreamServerInterceptor
- func TxCtxUnaryServerInterceptor(timeout time.Duration) grpc.UnaryServerInterceptor
- func UnaryMetricsServerInterceptor() ...
- type CustomClaim
- type Forwarder
- type Organization
- type RateLimiter
- type User
Constants ¶
Variables ¶
View Source
var ( DefaultTimeout = 2 * time.Second MaximumTimeout = 5 * time.Second )
View Source
var (
UserAgent = "tigris-forwarder/" + util.Version
)
Functions ¶
func AuthFunction ¶
func Get ¶
func Get(config *config.Config) (grpc.UnaryServerInterceptor, grpc.StreamServerInterceptor)
func StreamMetricsServerInterceptor ¶
func StreamMetricsServerInterceptor() grpc.StreamServerInterceptor
func TxCtxUnaryServerInterceptor ¶
func TxCtxUnaryServerInterceptor(timeout time.Duration) grpc.UnaryServerInterceptor
func UnaryMetricsServerInterceptor ¶
func UnaryMetricsServerInterceptor() func(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)
Types ¶
type CustomClaim ¶
type CustomClaim struct { Roles []string `json:"https://tigris-db-api/r"` Org Organization `json:"https://tigris-db-api/o"` User User `json:"https://tigris-db-api/u"` }
type Organization ¶
type Organization struct {
Code string `json:"code"`
}
type RateLimiter ¶
type RateLimiter struct { }
Click to show internal directories.
Click to hide internal directories.