func UnpackPageInterface(ctx context.Context, in system.Packed) (PageInterface, error) { switch in.Type() { case system.J_MAP: i, err := system.UnpackUnknownType(ctx, in, true, "kego.io/demo/demo2", "page") if err != nil { return nil, err } ob, ok := i.(PageInterface) if !ok { return nil, fmt.Errorf("%T does not implement PageInterface", i) } return ob, nil default: return nil, fmt.Errorf("Unsupported json type %s when unpacking into PageInterface.", in.Type()) } }
func UnpackSection(ctx context.Context, in system.Packed) (Section, error) { switch in.Type() { case system.J_MAP: i, err := system.UnpackUnknownType(ctx, in, true, "kego.io/demo/site", "section") if err != nil { return nil, err } ob, ok := i.(Section) if !ok { return nil, fmt.Errorf("%T does not implement Section", i) } return ob, nil default: return nil, fmt.Errorf("Unsupported json type %s when unpacking into Section.", in.Type()) } }
func UnpackFInterface(ctx context.Context, in system.Packed) (FInterface, error) { switch in.Type() { case system.J_MAP: i, err := system.UnpackUnknownType(ctx, in, true, "kego.io/process/validate/tests", "f") if err != nil { return nil, err } ob, ok := i.(FInterface) if !ok { return nil, fmt.Errorf("%T does not implement FInterface", i) } return ob, nil default: return nil, fmt.Errorf("Unsupported json type %s when unpacking into FInterface.", in.Type()) } }
func UnpackLocalized(ctx context.Context, in system.Packed) (Localized, error) { switch in.Type() { case system.J_MAP: i, err := system.UnpackUnknownType(ctx, in, true, "kego.io/demo/demo5/translation", "localized") if err != nil { return nil, err } ob, ok := i.(Localized) if !ok { return nil, fmt.Errorf("%T does not implement Localized", i) } return ob, nil default: return nil, fmt.Errorf("Unsupported json type %s when unpacking into Localized.", in.Type()) } }