Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultAcceptLangKey = "accept-language"
DefaultAcceptLangKey is metadata key name for accept language
Functions ¶
func StreamServerInterceptor ¶
func StreamServerInterceptor(srv interface{}, stream grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) (err error)
func UnaryServerInterceptor ¶
func UnaryServerInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)
Types ¶
type AcceptLanguage ¶
type AcceptLanguages ¶
type AcceptLanguages []AcceptLanguage
func FromContext ¶
func FromContext(ctx context.Context) AcceptLanguages
func HandleAcceptLanguage ¶
func HandleAcceptLanguage(ctx context.Context) AcceptLanguages
func (AcceptLanguages) Languages ¶
func (al AcceptLanguages) Languages() []string
func (AcceptLanguages) Len ¶
func (al AcceptLanguages) Len() int
func (AcceptLanguages) Less ¶
func (al AcceptLanguages) Less(i, j int) bool
func (AcceptLanguages) Swap ¶
func (al AcceptLanguages) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.