serviceloader

package
v3.0.0-...-8dd957b Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load[T any]() (T, bool)

func MustLoad

func MustLoad[T any]() T

func Register

func Register[T any](priority int, service *T)

Types

type TlsConfig

type TlsConfig interface {
	IsTlsEnabled() bool
}

type Token

type Token struct {
}

func (*Token) GetClaimValue

func (s *Token) GetClaimValue(token *jwt.Token, key string) (interface{}, error)

func (*Token) GetToken

func (s *Token) GetToken(ctx context.Context) (string, error)

func (*Token) IsSecured

func (s *Token) IsSecured() bool

func (*Token) ValidateToken

func (s *Token) ValidateToken() func(ctx context.Context, token string) (*jwt.Token, error)

type TokenProvider

type TokenProvider interface {
	GetToken(ctx context.Context) (string, error)
	ValidateToken() func(ctx context.Context, token string) (*jwt.Token, error)
	GetClaimValue(token *jwt.Token, key string) (interface{}, error)
	IsSecured() bool
}

Jump to

Keyboard shortcuts

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