Exemple #1
0
func init() {
	pkg := jsonctx.InitPackage("kego.io/demo/common/words")
	pkg.SetHash(11971197020902887977)
	pkg.Init(
		"localizer",
		func() interface{} { return (*Localizer)(nil) },
		nil,
		func() interface{} { return new(LocalizerRule) },
		func() reflect.Type { return reflect.TypeOf((*Localizer)(nil)).Elem() },
	)

	pkg.Init(
		"simple",
		func() interface{} { return new(Simple) },
		nil,
		func() interface{} { return new(SimpleRule) },
		func() reflect.Type { return reflect.TypeOf((*SimpleInterface)(nil)).Elem() },
	)

	pkg.Init(
		"translation",
		func() interface{} { return new(Translation) },
		nil,
		func() interface{} { return new(TranslationRule) },
		func() reflect.Type { return reflect.TypeOf((*TranslationInterface)(nil)).Elem() },
	)

}
Exemple #2
0
func init() {
	pkg := jsonctx.InitPackage("kego.io/tests/data/alias")
	pkg.SetHash(3681006963164671295)
	pkg.Init("alms",
		func() interface{} { return new(Alms) },
		func(in interface{}) interface{} { return *in.(*Alms) },
		func() interface{} { return new(AlmsRule) },
		func() reflect.Type { return reflect.TypeOf((*AlmsInterface)(nil)).Elem() },
	)

	pkg.Init("main",
		func() interface{} { return new(Main) },
		nil,
		func() interface{} { return new(MainRule) },
		func() reflect.Type { return reflect.TypeOf((*MainInterface)(nil)).Elem() },
	)

	pkg.Init("simple",
		func() interface{} { return new(Simple) },
		nil,
		func() interface{} { return new(SimpleRule) },
		func() reflect.Type { return reflect.TypeOf((*SimpleInterface)(nil)).Elem() },
	)

}
Exemple #3
0
func init() {
	pkg := jsonctx.InitPackage("kego.io/demo/demo5/translation")
	pkg.SetHash(13251613636822643043)
	pkg.Init(
		"localized",
		func() interface{} { return (*Localized)(nil) },
		nil,
		func() interface{} { return new(LocalizedRule) },
		func() reflect.Type { return reflect.TypeOf((*Localized)(nil)).Elem() },
	)

	pkg.Init(
		"simple",
		func() interface{} { return new(Simple) },
		nil,
		func() interface{} { return new(SimpleRule) },
		func() reflect.Type { return reflect.TypeOf((*SimpleInterface)(nil)).Elem() },
	)

	pkg.Init(
		"smartling",
		func() interface{} { return new(Smartling) },
		nil,
		func() interface{} { return new(SmartlingRule) },
		func() reflect.Type { return reflect.TypeOf((*SmartlingInterface)(nil)).Elem() },
	)

}
Exemple #4
0
func init() {
	pkg := jsonctx.InitPackage("kego.io/demo/common/images")
	pkg.SetHash(7237742861799384387)
	pkg.Init(
		"icon",
		func() interface{} { return new(Icon) },
		nil,
		func() interface{} { return new(IconRule) },
		func() reflect.Type { return reflect.TypeOf((*IconInterface)(nil)).Elem() },
	)

	pkg.Init(
		"image",
		func() interface{} { return (*Image)(nil) },
		nil,
		func() interface{} { return new(ImageRule) },
		func() reflect.Type { return reflect.TypeOf((*Image)(nil)).Elem() },
	)

	pkg.Init(
		"photo",
		func() interface{} { return new(Photo) },
		nil,
		func() interface{} { return new(PhotoRule) },
		func() reflect.Type { return reflect.TypeOf((*PhotoInterface)(nil)).Elem() },
	)

}
Exemple #5
0
func init() {
	pkg := jsonctx.InitPackage("kego.io/demo/demo8")
	pkg.SetHash(8344646746139445788)
	pkg.Init(
		"page",
		func() interface{} { return new(Page) },
		nil,
		func() interface{} { return new(PageRule) },
		func() reflect.Type { return reflect.TypeOf((*PageInterface)(nil)).Elem() },
	)

}
Exemple #6
0
func init() {
	pkg := jsonctx.InitPackage("kego.io/demo/common/units")
	pkg.SetHash(10988868301072060435)
	pkg.Init(
		"rectangle",
		func() interface{} { return new(Rectangle) },
		nil,
		func() interface{} { return new(RectangleRule) },
		func() reflect.Type { return reflect.TypeOf((*RectangleInterface)(nil)).Elem() },
	)

}
Exemple #7
0
func init() {
	pkg := jsonctx.InitPackage("kego.io/demo/demo1")
	pkg.SetHash(10713598547770441995)
	pkg.Init(
		"page",
		func() interface{} { return new(Page) },
		nil,
		func() interface{} { return new(PageRule) },
		func() reflect.Type { return reflect.TypeOf((*PageInterface)(nil)).Elem() },
	)

}
Exemple #8
0
func init() {
	pkg := jsonctx.InitPackage("kego.io/demo/demo2")
	pkg.SetHash(5277376379671719742)
	pkg.Init(
		"page",
		func() interface{} { return new(Page) },
		nil,
		func() interface{} { return new(PageRule) },
		func() reflect.Type { return reflect.TypeOf((*PageInterface)(nil)).Elem() },
	)

}
Exemple #9
0
func init() {
	pkg := jsonctx.InitPackage("kego.io/demo/demo4")
	pkg.SetHash(15041727781809772107)
	pkg.Init(
		"page",
		func() interface{} { return new(Page) },
		nil,
		func() interface{} { return new(PageRule) },
		func() reflect.Type { return reflect.TypeOf((*PageInterface)(nil)).Elem() },
	)

}
Exemple #10
0
func init() {
	pkg := jsonctx.InitPackage("kego.io/demo/demo7")
	pkg.SetHash(16224128938049598805)
	pkg.Init(
		"page",
		func() interface{} { return new(Page) },
		nil,
		func() interface{} { return new(PageRule) },
		func() reflect.Type { return reflect.TypeOf((*PageInterface)(nil)).Elem() },
	)

}
Exemple #11
0
func init() {
	pkg := jsonctx.InitPackage("kego.io/demo/demo3/images")
	pkg.SetHash(16432779313430741732)
	pkg.Init(
		"photo",
		func() interface{} { return new(Photo) },
		nil,
		func() interface{} { return new(PhotoRule) },
		func() reflect.Type { return reflect.TypeOf((*PhotoInterface)(nil)).Elem() },
	)

}
Exemple #12
0
func init() {
	pkg := jsonctx.InitPackage("kego.io/demo/demo9")
	pkg.SetHash(3818513847626526840)
	pkg.Init(
		"person",
		func() interface{} { return new(Person) },
		nil,
		func() interface{} { return new(PersonRule) },
		func() reflect.Type { return reflect.TypeOf((*PersonInterface)(nil)).Elem() },
	)

}
Exemple #13
0
func init() {
	pkg := jsonctx.InitPackage("kego.io/demo/demo2/images")
	pkg.SetHash(17974458391396798528)
	pkg.Init(
		"photo",
		func() interface{} { return new(Photo) },
		nil,
		func() interface{} { return new(PhotoRule) },
		func() reflect.Type { return reflect.TypeOf((*PhotoInterface)(nil)).Elem() },
	)

}
Exemple #14
0
func init() {
	pkg := jsonctx.InitPackage("kego.io/demo/demo7/images")
	pkg.SetHash(14109639835138036999)
	pkg.Init(
		"photo",
		func() interface{} { return new(Photo) },
		nil,
		func() interface{} { return new(PhotoRule) },
		func() reflect.Type { return reflect.TypeOf((*PhotoInterface)(nil)).Elem() },
	)

}
Exemple #15
0
func init() {
	pkg := jsonctx.InitPackage("kego.io/process/validate/tests")
	pkg.SetHash(17573435268142783549)
	pkg.Init(
		"a",
		func() interface{} { return new(A) },
		nil,
		func() interface{} { return new(ARule) },
		func() reflect.Type { return reflect.TypeOf((*AInterface)(nil)).Elem() },
	)

	pkg.Init(
		"b",
		func() interface{} { return new(B) },
		nil,
		func() interface{} { return new(BRule) },
		func() reflect.Type { return reflect.TypeOf((*BInterface)(nil)).Elem() },
	)

	pkg.Init(
		"c",
		func() interface{} { return (*C)(nil) },
		nil,
		func() interface{} { return new(CRule) },
		func() reflect.Type { return reflect.TypeOf((*C)(nil)).Elem() },
	)

	pkg.Init(
		"d",
		func() interface{} { return new(D) },
		nil,
		func() interface{} { return new(DRule) },
		func() reflect.Type { return reflect.TypeOf((*DInterface)(nil)).Elem() },
	)

	pkg.Init(
		"e",
		func() interface{} { return new(E) },
		nil,
		func() interface{} { return new(ERule) },
		func() reflect.Type { return reflect.TypeOf((*EInterface)(nil)).Elem() },
	)

	pkg.Init(
		"f",
		func() interface{} { return new(F) },
		nil,
		func() interface{} { return new(FRule) },
		func() reflect.Type { return reflect.TypeOf((*FInterface)(nil)).Elem() },
	)

}
Exemple #16
0
func init() {
	pkg := jsonctx.InitPackage("kego.io/demo/site")
	pkg.SetHash(3726678967244446909)
	pkg.Init(
		"body",
		func() interface{} { return new(Body) },
		nil,
		func() interface{} { return new(BodyRule) },
		func() reflect.Type { return reflect.TypeOf((*BodyInterface)(nil)).Elem() },
	)

	pkg.Init(
		"columns",
		func() interface{} { return new(Columns) },
		nil,
		func() interface{} { return new(ColumnsRule) },
		func() reflect.Type { return reflect.TypeOf((*ColumnsInterface)(nil)).Elem() },
	)

	pkg.Init(
		"hero",
		func() interface{} { return new(Hero) },
		nil,
		func() interface{} { return new(HeroRule) },
		func() reflect.Type { return reflect.TypeOf((*HeroInterface)(nil)).Elem() },
	)

	pkg.Init(
		"page",
		func() interface{} { return new(Page) },
		nil,
		func() interface{} { return new(PageRule) },
		func() reflect.Type { return reflect.TypeOf((*PageInterface)(nil)).Elem() },
	)

	pkg.Init(
		"section",
		func() interface{} { return (*Section)(nil) },
		nil,
		func() interface{} { return new(SectionRule) },
		func() reflect.Type { return reflect.TypeOf((*Section)(nil)).Elem() },
	)

}
Exemple #17
0
func init() {
	pkg := jsonctx.InitPackage("kego.io/demo/demo6")
	pkg.SetHash(7465480149826331644)
	pkg.Init(
		"page",
		func() interface{} { return new(Page) },
		nil,
		func() interface{} { return new(PageRule) },
		func() reflect.Type { return reflect.TypeOf((*PageInterface)(nil)).Elem() },
	)

	pkg.Init(
		"person",
		func() interface{} { return new(Person) },
		nil,
		func() interface{} { return new(PersonRule) },
		func() reflect.Type { return reflect.TypeOf((*PersonInterface)(nil)).Elem() },
	)

}
Exemple #18
0
func init() {
	jpkg := jsonctx.InitPackage("kego.io/json")
	jpkg.Init(
		"string",
		func() interface{} { return "" },
		nil,
		func() interface{} { return new(JsonStringRule) },
		nil,
	)
	jpkg.Init(
		"number",
		func() interface{} { return 0.0 },
		nil,
		func() interface{} { return new(JsonNumberRule) },
		nil,
	)
	jpkg.Init(
		"bool",
		func() interface{} { return false },
		nil,
		func() interface{} { return new(JsonBoolRule) },
		nil,
	)
}
Exemple #19
0
Fichier : rule.go Projet : kego/ke
func init() {
	jsonctx.InitDummy(reflect.TypeOf((*RuleInterface)(nil)).Elem(), reflect.TypeOf(&DummyRule{}))

	pkg := jsonctx.InitPackage("kego.io/system")
	pkg.Dummy("rule", func() interface{} { return new(DummyRule) })
}