acceptlang

package module
v0.0.0-...-c5a2248 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2016 License: MIT Imports: 6 Imported by: 1

README

grpc-accept-language

Under development.

AuthorMasahiro Sano
CopyrightCopyright (c) 2016- Masahiro Sano
LicenseMIT License

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UnaryAcceptLanguageHandler

func UnaryAcceptLanguageHandler(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)

Types

type AcceptLanguage

type AcceptLanguage struct {
	Language string
	Quality  float32
}

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)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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