configx

package
v1.3.30 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StringType      = DataType(0)
	IntType         = DataType(1)
	BoolType        = DataType(2)
	DateType        = DataType(3)
	NumberType      = DataType(4)
	IntRangeType    = DataType(5)
	NumberRangeType = DataType(6)
	DateRangeType   = DataType(7)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigKey

type ConfigKey string

type ConfigKeySchema

type ConfigKeySchema struct {
	Key         ConfigKey
	Type        DataType
	Description string
}

type DataType

type DataType int

func (DataType) Value added in v1.3.13

func (dt DataType) Value(content string) (interface{}, error)

解析配置值

type Option

type Option[T any] struct {
	Parse func()
}

type RangeDateValue added in v1.3.13

type RangeDateValue struct {
	Start time.Time
	End   time.Time
}

type RangeFloat64Value added in v1.3.13

type RangeFloat64Value struct {
	Start float64
	End   float64
}

type RangeIntValue added in v1.3.13

type RangeIntValue struct {
	Start int
	End   int
}

Jump to

Keyboard shortcuts

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