Documentation ¶
Index ¶
- Constants
- func GetIPAddr(ctx context.Context) (string, error)
- func InjectLoggingMetadata(ctx context.Context, log *logrus.Entry) *logrus.Entry
- func MinVersionStreamServerInterceptor() grpc.StreamServerInterceptor
- func MinVersionUnaryServerInterceptor() grpc.UnaryServerInterceptor
- type DeviceType
- type UserAgent
- type Version
Constants ¶
View Source
const (
UserAgentHeaderName = "user-agent"
)
Variables ¶
This section is empty.
Functions ¶
func InjectLoggingMetadata ¶
InjectLoggingMetadata injects client metadata into a logrus log entry
func MinVersionStreamServerInterceptor ¶
func MinVersionStreamServerInterceptor() grpc.StreamServerInterceptor
MinVersionStreamServerInterceptor prevents versions below the minimum version from accessing lower version APIs.
func MinVersionUnaryServerInterceptor ¶
func MinVersionUnaryServerInterceptor() grpc.UnaryServerInterceptor
MinVersionUnaryServerInterceptor prevents versions below the minimum version from accessing outdated APIs.
Types ¶
type DeviceType ¶
type DeviceType uint8
const ( DeviceTypeUnknown DeviceType = iota DeviceTypeIOS DeviceTypeAndroid )
func (DeviceType) IsMobile ¶
func (t DeviceType) IsMobile() bool
func (DeviceType) String ¶
func (t DeviceType) String() string
type UserAgent ¶
type UserAgent struct { DeviceType DeviceType Version Version }
func GetUserAgent ¶
GetUserAgent gets the Code client user agent value from headers in the provided context
Click to show internal directories.
Click to hide internal directories.