Documentation ¶
Index ¶
- Constants
- Variables
- func FeatureToggleIsEnabled(ctx context.Context, toggle int) bool
- func GetAppVersion(ctx context.Context) (string, error)
- func GetBuild(ctx context.Context) (string, error)
- func GetCustomKey(ctx context.Context, key string) (string, error)
- func GetDataFromCtx(ctx context.Context, key string) (string, error)
- func GetPlatform(ctx context.Context) (string, error)
- func GetPlatformOS(ctx context.Context) (string, error)
- type MetadataError
- type Platform
- type PlatformType
- func (p PlatformType) IsAndroid() bool
- func (p PlatformType) IsDesktopWeb() bool
- func (p PlatformType) IsIos() bool
- func (p PlatformType) IsMobile() bool
- func (p PlatformType) IsMobileWeb() bool
- func (p PlatformType) IsValid() bool
- func (p PlatformType) IsWeb() bool
- func (p PlatformType) Platform() string
- type Ratio
- type VersionData
- type VersionDataError
Constants ¶
View Source
const ( AppInfoFieldAppVersion = "app_version" // AppInfoFieldPlatformOSVersion версия операционной системы для mobile, для веб название браузера и его версия AppInfoFieldPlatformOSVersion = "platform_os_version" AppInfoFieldBuild = "build" AppInfoFieldPlatform = "platform" )
Variables ¶
View Source
var ( ErrEmptyMetadata MetadataError = errors.New("empty metadata in context") ErrKeyNotFound MetadataError = errors.New("not found key") ErrEmptyValuesInKey MetadataError = errors.New("empty values in key") ErrEmptyCondition VersionDataError = errors.New("empty condition for platform") ErrConditionVersion VersionDataError = errors.New("invalid condition version") ErrContextVersion VersionDataError = errors.New("invalid context version") )
Functions ¶
func FeatureToggleIsEnabled ¶ added in v1.0.20
Types ¶
type MetadataError ¶
type MetadataError error
type Platform ¶ added in v1.0.21
type PlatformType ¶
type PlatformType string
const ( PlatformTypeIOS PlatformType = "ios" PlatformTypeANDROID PlatformType = "android" PlatformTypeWEB PlatformType = "web" PlatformTypeWEBMobile PlatformType = "web-mobile" PlatformTypeWEBMobile2 PlatformType = "web_mobile" PlatformTypeDesktop PlatformType = "desktop" PlatformTypeWebDesktop PlatformType = "web-desktop" PlatformTypeWebDesktop2 PlatformType = "web_desktop" )
func (PlatformType) IsAndroid ¶ added in v1.0.21
func (p PlatformType) IsAndroid() bool
func (PlatformType) IsDesktopWeb ¶ added in v1.0.21
func (p PlatformType) IsDesktopWeb() bool
func (PlatformType) IsIos ¶ added in v1.0.21
func (p PlatformType) IsIos() bool
func (PlatformType) IsMobile ¶ added in v1.0.21
func (p PlatformType) IsMobile() bool
func (PlatformType) IsMobileWeb ¶ added in v1.0.21
func (p PlatformType) IsMobileWeb() bool
func (PlatformType) IsValid ¶ added in v1.0.21
func (p PlatformType) IsValid() bool
func (PlatformType) IsWeb ¶ added in v1.0.21
func (p PlatformType) IsWeb() bool
func (PlatformType) Platform ¶ added in v1.0.21
func (p PlatformType) Platform() string
type Ratio ¶
type Ratio int
func CompareVersions ¶
func CompareVersions(ctx context.Context, vd VersionData) (Ratio, error)
type VersionData ¶
type VersionData map[PlatformType]string
type VersionDataError ¶
type VersionDataError error
Click to show internal directories.
Click to hide internal directories.