Documentation ¶
Index ¶
- Constants
- Variables
- func Close() error
- func Load() error
- func Open() error
- func SetOptions(opts Options)
- func Store() error
- type Options
- type Time
- func (t *Time) FromDB(b []byte) error
- func (t Time) MarshalJSON() ([]byte, error)
- func (t Time) MarshalText() ([]byte, error)
- func (t Time) Now() Time
- func (t Time) ParseTime(tt time.Time) Time
- func (t Time) String() string
- func (t *Time) ToDB() ([]byte, error)
- func (t *Time) UnmarshalJSON(b []byte) error
- func (t *Time) Value() (driver.Value, error)
Constants ¶
View Source
const ENV = "IOT_MASTER_DATABASE_"
Variables ¶
View Source
var Engine *xorm.Engine
Functions ¶
func SetOptions ¶ added in v3.1.0
func SetOptions(opts Options)
Types ¶
type Options ¶
type Options struct { Type string `json:"type"` URL string `json:"url"` Debug bool `json:"debug,omitempty"` LogLevel int `json:"log_level"` }
Options 参数
func GetOptions ¶ added in v3.1.0
func GetOptions() Options
type Time ¶ added in v3.2.4
func (Time) MarshalJSON ¶ added in v3.2.4
func (Time) MarshalText ¶ added in v3.2.4
func (*Time) UnmarshalJSON ¶ added in v3.2.4
Click to show internal directories.
Click to hide internal directories.