yi

package module
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: May 8, 2020 License: MIT Imports: 11 Imported by: 0

README

YI 周易演算法

TimeQiGua() 參數: 下卦:int 上卦:int 變數:time.Time

NumberQiGua() 參數: 下卦:int 上卦:int 變數:int

Documentation

Index

Constants

View Source
const (
	//卦象:乾
	QianGua = 0x00
	//卦象:兌
	DuiGua = 0x01
	//卦象:離
	LiGua = 0x02
	//卦象:震
	ZhenGua = 0x03
	//卦象:巽
	XunGua = 0x04
	//卦象:坎
	KanGua = 0x05
	//卦象:艮
	GenGua = 0x06
	//卦象:坤
	KunGua = 0x07
)

Variables

This section is empty.

Functions

func GetGuaXiang

func GetGuaXiang() map[string]*GuaXiang

func StringToTime

func StringToTime(s string) time.Time

StringToTime trans string to time

func Transfer

func Transfer()

Transfer 讀取卦象json

Types

type GuaMing

type GuaMing int
const (
	//本卦
	BenGua GuaMing = iota
	//變卦
	BianGua
	//互卦
	HuGua
	//錯卦
	CuoGua
	//綜卦
	ZongGua
	GuaMax
)

type GuaXiang

type GuaXiang struct {
	ShangGua        string `bson:"shang_gua"`          //上卦
	ShangShu        int    `bson:"shang_shu"`          //上卦數
	XiaGua          string `bson:"xia_gua"`            //下卦
	XiaShu          int    `bson:"xia_shu"`            //下卦數
	JiXiong         string `bson:"ji_xiong"`           //吉凶
	GuaXiang        string `bson:"gua_xiang"`          //卦象
	GuaMing         string `bson:"gua_ming"`           //卦名
	GuaYi           string `bson:"gua_yi"`             //卦意
	GuaYun          string `bson:"gua_yun"`            //卦雲
	XiangYue        string `bson:"xiang_yue"`          //象曰
	FuHao           string `bson:"fu_hao"`             //符號
	ChuYao          string `bson:"chu_yao"`            //初爻
	ChuYaoJiXiong   string `bson:"chu_yao_ji_xiong"`   //初爻吉凶
	ErYao           string `bson:"er_yao"`             //二爻
	ErYaoJiXiong    string `bson:"er_yao_ji_xiong"`    //二爻吉凶
	SanYao          string `bson:"san_yao"`            //三爻
	SanYaoJiXiong   string `bson:"san_yao_ji_xiong"`   //三爻吉凶
	SiYao           string `bson:"si_yao"`             //四爻
	SiYaoJiXiong    string `bson:"si_yao_ji_xiong"`    //四爻吉凶
	WuYao           string `bson:"wu_yao"`             //五爻
	WuYaoJiXiong    string `bson:"wu_yao_ji_xiong"`    //五爻吉凶
	ShangYao        string `bson:"shang_yao"`          //上爻
	ShangYaoJiXiong string `bson:"shang_yao_ji_xiong"` //上爻吉凶
	Yong            string `bson:"yong"`               //用九,用六
	YongJiXiong     string `bson:"yong_ji_xiong"`      //用九,用六吉凶
}

GuaXiang 卦象

type Yi

type Yi struct {
	// contains filtered or unexported fields
}

Yi 周易卦象

func NumberQiGua

func NumberQiGua(xia int, shang int, bs ...int) *Yi

NumberQiGua

func TimeQiGua

func TimeQiGua(xia int, shang int, t time.Time) *Yi

TimeQiGua

func (*Yi) BianYao

func (y *Yi) BianYao() int

BianYao 變卦,爻

func (*Yi) Get

func (y *Yi) Get(m GuaMing) *GuaXiang

Directories

Path Synopsis
Package statik contains static assets.
Package statik contains static assets.

Jump to

Keyboard shortcuts

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