bean

package
v1.2.177 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2025 License: Apache-2.0 Imports: 0 Imported by: 0

README

常用 golang 结构体

Documentation

Index

Constants

View Source
const (
	OpEquals         = "equals"
	OpLessOrEquals   = "lessEqual"
	OpGreaterOrEqual = "greaterEqual"
	OpGreater        = "greater"
	OpLess           = "less"
)
View Source
const (
	GoogleIDEmpty = "00000000-0000-0000-0000-000000000000"

	//platform
	PlatformMobileIos      = "mobile-ios"
	PlatformMobileAndroid  = "mobile-android"
	PlatformDesktopWindows = "desktop-windows"
	PlatformDesktopMacOs   = "desktop-macos"

	//channel
	ChannelApple     = "apple"
	ChannelGoogle    = "google"
	ChannelUniversal = "universal"
)

Variables

This section is empty.

Functions

func CheckChannel added in v1.2.175

func CheckChannel(channel string) bool

func CheckPlatform added in v1.2.175

func CheckPlatform(platform string) bool

func CheckValue added in v1.2.174

func CheckValue(r IOperationMethod[int64], val int64) bool

大于,大于等于,小于,小于等于,等于

Types

type Float64Range

type Float64Range struct {
	Min *float64 `json:"min,optional"`
	Max *float64 `json:"max,optional"`
}

type IOperationMethod added in v1.2.174

type IOperationMethod[T any] interface {
	GetMethod() string
	GetValue() T
}

type Int64Method added in v1.2.174

type Int64Method struct {
	Method string `json:"method,optional"`
	Value  int64  `json:"value,optional"`
}

func (*Int64Method) Check added in v1.2.174

func (r *Int64Method) Check(val int64) bool

func (*Int64Method) GetMethod added in v1.2.174

func (r *Int64Method) GetMethod() string

func (*Int64Method) GetValue added in v1.2.174

func (r *Int64Method) GetValue() int64

type Int64Range

type Int64Range struct {
	Min *int64 `json:"min,optional"`
	Max *int64 `json:"max,optional"`
}

type NumberRange

type NumberRange[T any] struct {
	Min *T `json:"min,optional"`
	Max *T `json:"max,optional"`
}

Jump to

Keyboard shortcuts

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